@frames.js/debugger
Version:
Debug your Frames.js applications
1 lines • 55.9 kB
JavaScript
exports.id=4096,exports.ids=[4096],exports.modules={79032:function(e,t,s){var n;e.exports=n||function(e,t){if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof global&&global.crypto&&(n=global.crypto),!n)try{n=s(6113)}catch(e){}var n,i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function e(){}return function(t){var s;return e.prototype=t,s=new e,e.prototype=null,s}}(),c={},o=c.lib={},h=o.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=o.WordArray=h.extend({init:function(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,s=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var r=0;r<i;r++){var c=s[r>>>2]>>>24-r%4*8&255;t[n+r>>>2]|=c<<24-(n+r)%4*8}else for(var o=0;o<i;o+=4)t[n+o>>>2]=s[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=h.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],s=0;s<e;s+=4)t.push(i());return new a.init(t,e)}}),p=c.enc={},l=p.Hex={stringify:function(e){for(var t=e.words,s=e.sigBytes,n=[],i=0;i<s;i++){var r=t[i>>>2]>>>24-i%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n<t;n+=2)s[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(s,t/2)}},u=p.Latin1={stringify:function(e){for(var t=e.words,s=e.sigBytes,n=[],i=0;i<s;i++){var r=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n<t;n++)s[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(s,t)}},d=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},m=o.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var s,n=this._data,i=n.words,r=n.sigBytes,c=this.blockSize,o=r/(4*c),h=(o=t?e.ceil(o):e.max((0|o)-this._minBufferSize,0))*c,p=e.min(4*h,r);if(h){for(var l=0;l<h;l+=c)this._doProcessBlock(i,l);s=i.splice(0,h),n.sigBytes-=p}return new a.init(s,p)},clone:function(){var e=h.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=m.extend({cfg:h.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,s){return new e.init(s).finalize(t)}},_createHmacHelper:function(e){return function(t,s){return new x.HMAC.init(e,s).finalize(t)}}});var x=c.algo={};return c}(Math)},66810:function(e,t,s){e.exports=s(79032).enc.Hex},58556:function(e,t,s){var n,i,r,c,o,h,a;e.exports=(r=(i=(n=s(79032)).lib).WordArray,c=i.Hasher,o=n.algo,h=[],a=o.SHA1=c.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var s=this._hash.words,n=s[0],i=s[1],r=s[2],c=s[3],o=s[4],a=0;a<80;a++){if(a<16)h[a]=0|e[t+a];else{var p=h[a-3]^h[a-8]^h[a-14]^h[a-16];h[a]=p<<1|p>>>31}var l=(n<<5|n>>>27)+o+h[a];a<20?l+=(i&r|~i&c)+1518500249:a<40?l+=(i^r^c)+1859775393:a<60?l+=(i&r|i&c|r&c)-1894007588:l+=(i^r^c)-899497514,o=c,c=r,r=i<<30|i>>>2,i=n,n=l}s[0]=s[0]+n|0,s[1]=s[1]+i|0,s[2]=s[2]+r|0,s[3]=s[3]+c|0,s[4]=s[4]+o|0},_doFinalize:function(){var e=this._data,t=e.words,s=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=Math.floor(s/4294967296),t[(n+64>>>9<<4)+15]=s,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=c._createHelper(a),n.HmacSHA1=c._createHmacHelper(a),n.SHA1)},14096:(e,t,s)=>{"use strict";s.r(t),s.d(t,{RedisNotificationsStorage:()=>su,getStorage:()=>sl});var n=s(66810),i=s(58556),r=Object.defineProperty;((e,t)=>{for(var s in t)r(e,s,{get:t[s],enumerable:!0})})({},{UpstashError:()=>c,UrlError:()=>o});var c=class extends Error{constructor(e){super(e),this.name="UpstashError"}},o=class extends Error{constructor(e){super(`Upstash Redis client was passed an invalid URL. You should pass a URL starting with https. Received: "${e}". `),this.name="UrlError"}},h=class{baseUrl;headers;options;readYourWrites;upstashSyncToken="";hasCredentials;retry;constructor(e){if(this.options={backend:e.options?.backend,agent:e.agent,responseEncoding:e.responseEncoding??"base64",cache:e.cache,signal:e.signal,keepAlive:e.keepAlive??!0},this.upstashSyncToken="",this.readYourWrites=e.readYourWrites??!0,this.baseUrl=(e.baseUrl||"").replace(/\/$/,""),this.baseUrl&&!/^https?:\/\/[^\s#$./?].\S*$/.test(this.baseUrl))throw new o(this.baseUrl);this.headers={"Content-Type":"application/json",...e.headers},this.hasCredentials=!!(this.baseUrl&&this.headers.authorization.split(" ")[1]),"base64"===this.options.responseEncoding&&(this.headers["Upstash-Encoding"]="base64"),this.retry="boolean"!=typeof e.retry||e.retry?{attempts:e.retry?.retries??5,backoff:e.retry?.backoff??(e=>50*Math.exp(e))}:{attempts:1,backoff:()=>0}}mergeTelemetry(e){this.headers=l(this.headers,"Upstash-Telemetry-Runtime",e.runtime),this.headers=l(this.headers,"Upstash-Telemetry-Platform",e.platform),this.headers=l(this.headers,"Upstash-Telemetry-Sdk",e.sdk)}async request(e){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(e.body),keepalive:this.options.keepAlive,agent:this.options.agent,signal:this.options.signal,backend:this.options.backend};if(this.hasCredentials||console.warn("[Upstash Redis] Redis client was initialized without url or token. Failed to execute command."),this.readYourWrites){let e=this.upstashSyncToken;this.headers["upstash-sync-token"]=e}let s=null,n=null;for(let i=0;i<=this.retry.attempts;i++)try{s=await fetch([this.baseUrl,...e.path??[]].join("/"),t);break}catch(e){if(this.options.signal?.aborted){let e=new Blob([JSON.stringify({result:this.options.signal.reason??"Aborted"})]),t={status:200,statusText:this.options.signal.reason??"Aborted"};s=new Response(e,t);break}n=e,await new Promise(e=>setTimeout(e,this.retry.backoff(i)))}if(!s)throw n??Error("Exhausted all retries");let i=await s.json();if(!s.ok)throw new c(`${i.error}, command was: ${JSON.stringify(e.body)}`);if(this.readYourWrites){let e=s.headers;this.upstashSyncToken=e.get("upstash-sync-token")??""}if(this.readYourWrites){let e=s.headers;this.upstashSyncToken=e.get("upstash-sync-token")??""}return"base64"===this.options.responseEncoding?Array.isArray(i)?i.map(({result:e,error:t})=>({result:p(e),error:t})):{result:p(i.result),error:i.error}:i}};function a(e){let t="";try{let s=atob(e),n=s.length,i=new Uint8Array(n);for(let e=0;e<n;e++)i[e]=s.charCodeAt(e);t=new TextDecoder().decode(i)}catch{t=e}return t}function p(e){let t;switch(typeof e){case"undefined":return e;case"number":t=e;break;case"object":t=Array.isArray(e)?e.map(e=>"string"==typeof e?a(e):Array.isArray(e)?e.map(e=>p(e)):e):null;break;case"string":t="OK"===e?"OK":a(e)}return t}function l(e,t,s){return s&&(e[t]=e[t]?[e[t],s].join(","):s),e}function u(e){try{return function e(t){let s=Array.isArray(t)?t.map(t=>{try{return e(t)}catch{return t}}):JSON.parse(t);return"number"==typeof s&&s.toString()!==t?t:s}(e)}catch{return e}}function d(e){return[e[0],...u(e.slice(1))]}var m=e=>{switch(typeof e){case"string":case"number":case"boolean":return e;default:return JSON.stringify(e)}},x=class{command;serialize;deserialize;constructor(e,t){if(this.serialize=m,this.deserialize=t?.automaticDeserialization===void 0||t.automaticDeserialization?t?.deserialize??u:e=>e,this.command=e.map(e=>this.serialize(e)),t?.latencyLogging){let e=this.exec.bind(this);this.exec=async t=>{let s=performance.now(),n=await e(t),i=(performance.now()-s).toFixed(2);return console.log(`Latency for \x1b[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1b[0m: \x1b[38;2;0;255;255m${i} ms\x1b[0m`),n}}}async exec(e){let{result:t,error:s}=await e.request({body:this.command,upstashSyncToken:e.upstashSyncToken});if(s)throw new c(s);if(void 0===t)throw TypeError("Request did not return a result");return this.deserialize(t)}},w=class extends x{constructor(e,t){let s=["hrandfield",e[0]];"number"==typeof e[1]&&s.push(e[1]),e[2]&&s.push("WITHVALUES"),super(s,{deserialize:e[2]?e=>(function(e){if(0===e.length)return null;let t={};for(;e.length>=2;){let s=e.shift(),n=e.shift();try{t[s]=JSON.parse(n)}catch{t[s]=n}}return t})(e):t?.deserialize,...t})}},f=class extends x{constructor(e,t){super(["append",...e],t)}},y=class extends x{constructor([e,t,s],n){let i=["bitcount",e];"number"==typeof t&&i.push(t),"number"==typeof s&&i.push(s),super(i,n)}},g=class{constructor(e,t,s,n=e=>e.exec(this.client)){this.client=t,this.opts=s,this.execOperation=n,this.command=["bitfield",...e]}command;chain(...e){return this.command.push(...e),this}get(...e){return this.chain("get",...e)}set(...e){return this.chain("set",...e)}incrby(...e){return this.chain("incrby",...e)}overflow(e){return this.chain("overflow",e)}exec(){let e=new x(this.command,this.opts);return this.execOperation(e)}},O=class extends x{constructor(e,t){super(["bitop",...e],t)}},b=class extends x{constructor(e,t){super(["bitpos",...e],t)}},E=class extends x{constructor([e,t,s],n){super(["COPY",e,t,...s?.replace?["REPLACE"]:[]],{...n,deserialize:e=>e>0?"COPIED":"NOT_COPIED"})}},S=class extends x{constructor(e){super(["dbsize"],e)}},A=class extends x{constructor(e,t){super(["decr",...e],t)}},v=class extends x{constructor(e,t){super(["decrby",...e],t)}},R=class extends x{constructor(e,t){super(["del",...e],t)}},T=class extends x{constructor(e,t){super(["echo",...e],t)}},N=class extends x{constructor([e,t,s],n){super(["eval",e,t.length,...t,...s??[]],n)}},z=class extends x{constructor([e,t,s],n){super(["evalsha",e,t.length,...t,...s??[]],n)}},k=class extends x{constructor(e,t){super(["exists",...e],t)}},U=class extends x{constructor(e,t){super(["expire",...e.filter(Boolean)],t)}},P=class extends x{constructor(e,t){super(["expireat",...e],t)}},I=class extends x{constructor(e,t){let s=["flushall"];e&&e.length>0&&e[0].async&&s.push("async"),super(s,t)}},C=class extends x{constructor([e],t){let s=["flushdb"];e?.async&&s.push("async"),super(s,t)}},D=class extends x{constructor([e,t,...s],n){let i=["geoadd",e];"nx"in t&&t.nx?i.push("nx"):"xx"in t&&t.xx&&i.push("xx"),"ch"in t&&t.ch&&i.push("ch"),"latitude"in t&&t.latitude&&i.push(t.longitude,t.latitude,t.member),i.push(...s.flatMap(({latitude:e,longitude:t,member:s})=>[t,e,s])),super(i,n)}},M=class extends x{constructor([e,t,s,n="M"],i){super(["GEODIST",e,t,s,n],i)}},L=class extends x{constructor(e,t){let[s]=e;super(["GEOHASH",s,...Array.isArray(e[1])?e[1]:e.slice(1)],t)}},_=class extends x{constructor(e,t){let[s]=e;super(["GEOPOS",s,...Array.isArray(e[1])?e[1]:e.slice(1)],{deserialize:e=>(function(e){let t=[];for(let s of e)s?.[0]&&s?.[1]&&t.push({lng:Number.parseFloat(s[0]),lat:Number.parseFloat(s[1])});return t})(e),...t})}},B=class extends x{constructor([e,t,s,n,i],r){let c=["GEOSEARCH",e];("FROMMEMBER"===t.type||"frommember"===t.type)&&c.push(t.type,t.member),("FROMLONLAT"===t.type||"fromlonlat"===t.type)&&c.push(t.type,t.coordinate.lon,t.coordinate.lat),("BYRADIUS"===s.type||"byradius"===s.type)&&c.push(s.type,s.radius,s.radiusType),("BYBOX"===s.type||"bybox"===s.type)&&c.push(s.type,s.rect.width,s.rect.height,s.rectType),c.push(n),i?.count&&c.push("COUNT",i.count.limit,...i.count.any?["ANY"]:[]),super([...c,...i?.withCoord?["WITHCOORD"]:[],...i?.withDist?["WITHDIST"]:[],...i?.withHash?["WITHHASH"]:[]],{deserialize:e=>i?.withCoord||i?.withDist||i?.withHash?e.map(e=>{let t=1,s={};try{s.member=JSON.parse(e[0])}catch{s.member=e[0]}return i.withDist&&(s.dist=Number.parseFloat(e[t++])),i.withHash&&(s.hash=e[t++].toString()),i.withCoord&&(s.coord={long:Number.parseFloat(e[t][0]),lat:Number.parseFloat(e[t][1])}),s}):e.map(e=>{try{return{member:JSON.parse(e)}}catch{return{member:e}}}),...r})}},J=class extends x{constructor([e,t,s,n,i,r],c){let o=["GEOSEARCHSTORE",e,t];("FROMMEMBER"===s.type||"frommember"===s.type)&&o.push(s.type,s.member),("FROMLONLAT"===s.type||"fromlonlat"===s.type)&&o.push(s.type,s.coordinate.lon,s.coordinate.lat),("BYRADIUS"===n.type||"byradius"===n.type)&&o.push(n.type,n.radius,n.radiusType),("BYBOX"===n.type||"bybox"===n.type)&&o.push(n.type,n.rect.width,n.rect.height,n.rectType),o.push(i),r?.count&&o.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]),super([...o,...r?.storeDist?["STOREDIST"]:[]],c)}},H=class extends x{constructor(e,t){super(["get",...e],t)}},Y=class extends x{constructor(e,t){super(["getbit",...e],t)}},$=class extends x{constructor(e,t){super(["getdel",...e],t)}},j=class extends x{constructor(e,t){super(["getrange",...e],t)}},F=class extends x{constructor(e,t){super(["getset",...e],t)}},W=class extends x{constructor(e,t){super(["hdel",...e],t)}},X=class extends x{constructor(e,t){super(["hexists",...e],t)}},G=class extends x{constructor(e,t){super(["hget",...e],t)}},K=class extends x{constructor(e,t){super(["hgetall",...e],{deserialize:e=>(function(e){if(0===e.length)return null;let t={};for(;e.length>=2;){let s=e.shift(),n=e.shift();try{let e=!Number.isNaN(Number(n))&&!Number.isSafeInteger(Number(n));t[s]=e?n:JSON.parse(n)}catch{t[s]=n}}return t})(e),...t})}},q=class extends x{constructor(e,t){super(["hincrby",...e],t)}},V=class extends x{constructor(e,t){super(["hincrbyfloat",...e],t)}},Q=class extends x{constructor([e],t){super(["hkeys",e],t)}},Z=class extends x{constructor(e,t){super(["hlen",...e],t)}},ee=class extends x{constructor([e,...t],s){super(["hmget",e,...t],{deserialize:e=>(function(e,t){if(t.every(e=>null===e))return null;let s={};for(let[n,i]of e.entries())try{s[i]=JSON.parse(t[n])}catch{s[i]=t[n]}return s})(t,e),...s})}},et=class extends x{constructor([e,t],s){super(["hmset",e,...Object.entries(t).flatMap(([e,t])=>[e,t])],s)}},es=class extends x{constructor([e,t,s],n){let i=["hscan",e,t];s?.match&&i.push("match",s.match),"number"==typeof s?.count&&i.push("count",s.count),super(i,{deserialize:d,...n})}},en=class extends x{constructor([e,t],s){super(["hset",e,...Object.entries(t).flatMap(([e,t])=>[e,t])],s)}},ei=class extends x{constructor(e,t){super(["hsetnx",...e],t)}},er=class extends x{constructor(e,t){super(["hstrlen",...e],t)}},ec=class extends x{constructor(e,t){super(["hvals",...e],t)}},eo=class extends x{constructor(e,t){super(["incr",...e],t)}},eh=class extends x{constructor(e,t){super(["incrby",...e],t)}},ea=class extends x{constructor(e,t){super(["incrbyfloat",...e],t)}},ep=class extends x{constructor(e,t){super(["JSON.ARRAPPEND",...e],t)}},el=class extends x{constructor(e,t){super(["JSON.ARRINDEX",...e],t)}},eu=class extends x{constructor(e,t){super(["JSON.ARRINSERT",...e],t)}},ed=class extends x{constructor(e,t){super(["JSON.ARRLEN",e[0],e[1]??"$"],t)}},em=class extends x{constructor(e,t){super(["JSON.ARRPOP",...e],t)}},ex=class extends x{constructor(e,t){super(["JSON.ARRTRIM",e[0],e[1]??"$",e[2]??0,e[3]??0],t)}},ew=class extends x{constructor(e,t){super(["JSON.CLEAR",...e],t)}},ef=class extends x{constructor(e,t){super(["JSON.DEL",...e],t)}},ey=class extends x{constructor(e,t){super(["JSON.FORGET",...e],t)}},eg=class extends x{constructor(e,t){let s=["JSON.GET"];"string"==typeof e[1]?s.push(...e):(s.push(e[0]),e[1]&&(e[1].indent&&s.push("INDENT",e[1].indent),e[1].newline&&s.push("NEWLINE",e[1].newline),e[1].space&&s.push("SPACE",e[1].space)),s.push(...e.slice(2))),super(s,t)}},eO=class extends x{constructor(e,t){super(["JSON.MGET",...e[0],e[1]],t)}},eb=class extends x{constructor(e,t){let s=["JSON.MSET"];for(let t of e)s.push(t.key,t.path,t.value);super(s,t)}},eE=class extends x{constructor(e,t){super(["JSON.NUMINCRBY",...e],t)}},eS=class extends x{constructor(e,t){super(["JSON.NUMMULTBY",...e],t)}},eA=class extends x{constructor(e,t){super(["JSON.OBJKEYS",...e],t)}},ev=class extends x{constructor(e,t){super(["JSON.OBJLEN",...e],t)}},eR=class extends x{constructor(e,t){super(["JSON.RESP",...e],t)}},eT=class extends x{constructor(e,t){let s=["JSON.SET",e[0],e[1],e[2]];e[3]&&(e[3].nx?s.push("NX"):e[3].xx&&s.push("XX")),super(s,t)}},eN=class extends x{constructor(e,t){super(["JSON.STRAPPEND",...e],t)}},ez=class extends x{constructor(e,t){super(["JSON.STRLEN",...e],t)}},ek=class extends x{constructor(e,t){super(["JSON.TOGGLE",...e],t)}},eU=class extends x{constructor(e,t){super(["JSON.TYPE",...e],t)}},eP=class extends x{constructor(e,t){super(["keys",...e],t)}},eI=class extends x{constructor(e,t){super(["lindex",...e],t)}},eC=class extends x{constructor(e,t){super(["linsert",...e],t)}},eD=class extends x{constructor(e,t){super(["llen",...e],t)}},eM=class extends x{constructor(e,t){super(["lmove",...e],t)}},eL=class extends x{constructor(e,t){let[s,n,i,r]=e;super(["LMPOP",s,...n,i,...r?["COUNT",r]:[]],t)}},e_=class extends x{constructor(e,t){super(["lpop",...e],t)}},eB=class extends x{constructor(e,t){let s=["lpos",e[0],e[1]];"number"==typeof e[2]?.rank&&s.push("rank",e[2].rank),"number"==typeof e[2]?.count&&s.push("count",e[2].count),"number"==typeof e[2]?.maxLen&&s.push("maxLen",e[2].maxLen),super(s,t)}},eJ=class extends x{constructor(e,t){super(["lpush",...e],t)}},eH=class extends x{constructor(e,t){super(["lpushx",...e],t)}},eY=class extends x{constructor(e,t){super(["lrange",...e],t)}},e$=class extends x{constructor(e,t){super(["lrem",...e],t)}},ej=class extends x{constructor(e,t){super(["lset",...e],t)}},eF=class extends x{constructor(e,t){super(["ltrim",...e],t)}},eW=class extends x{constructor(e,t){super(["mget",...Array.isArray(e[0])?e[0]:e],t)}},eX=class extends x{constructor([e],t){super(["mset",...Object.entries(e).flatMap(([e,t])=>[e,t])],t)}},eG=class extends x{constructor([e],t){super(["msetnx",...Object.entries(e).flat()],t)}},eK=class extends x{constructor(e,t){super(["persist",...e],t)}},eq=class extends x{constructor(e,t){super(["pexpire",...e],t)}},eV=class extends x{constructor(e,t){super(["pexpireat",...e],t)}},eQ=class extends x{constructor(e,t){super(["pfadd",...e],t)}},eZ=class extends x{constructor(e,t){super(["pfcount",...e],t)}},e0=class extends x{constructor(e,t){super(["pfmerge",...e],t)}},e1=class extends x{constructor(e,t){let s=["ping"];e?.[0]!==void 0&&s.push(e[0]),super(s,t)}},e2=class extends x{constructor(e,t){super(["psetex",...e],t)}},e4=class extends x{constructor(e,t){super(["pttl",...e],t)}},e8=class extends x{constructor(e,t){super(["publish",...e],t)}},e5=class extends x{constructor(e){super(["randomkey"],e)}},e3=class extends x{constructor(e,t){super(["rename",...e],t)}},e6=class extends x{constructor(e,t){super(["renamenx",...e],t)}},e9=class extends x{constructor(e,t){super(["rpop",...e],t)}},e7=class extends x{constructor(e,t){super(["rpush",...e],t)}},te=class extends x{constructor(e,t){super(["rpushx",...e],t)}},tt=class extends x{constructor(e,t){super(["sadd",...e],t)}},ts=class extends x{constructor([e,t],s){let n=["scan",e];t?.match&&n.push("match",t.match),"number"==typeof t?.count&&n.push("count",t.count),t?.type&&t.type.length>0&&n.push("type",t.type),super(n,{deserialize:d,...s})}},tn=class extends x{constructor(e,t){super(["scard",...e],t)}},ti=class extends x{constructor(e,t){super(["script","exists",...e],{deserialize:e=>e,...t})}},tr=class extends x{constructor([e],t){let s=["script","flush"];e?.sync?s.push("sync"):e?.async&&s.push("async"),super(s,t)}},tc=class extends x{constructor(e,t){super(["script","load",...e],t)}},to=class extends x{constructor(e,t){super(["sdiff",...e],t)}},th=class extends x{constructor(e,t){super(["sdiffstore",...e],t)}},ta=class extends x{constructor([e,t,s],n){let i=["set",e,t];s&&("nx"in s&&s.nx?i.push("nx"):"xx"in s&&s.xx&&i.push("xx"),"get"in s&&s.get&&i.push("get"),"ex"in s&&"number"==typeof s.ex?i.push("ex",s.ex):"px"in s&&"number"==typeof s.px?i.push("px",s.px):"exat"in s&&"number"==typeof s.exat?i.push("exat",s.exat):"pxat"in s&&"number"==typeof s.pxat?i.push("pxat",s.pxat):"keepTtl"in s&&s.keepTtl&&i.push("keepTtl")),super(i,n)}},tp=class extends x{constructor(e,t){super(["setbit",...e],t)}},tl=class extends x{constructor(e,t){super(["setex",...e],t)}},tu=class extends x{constructor(e,t){super(["setnx",...e],t)}},td=class extends x{constructor(e,t){super(["setrange",...e],t)}},tm=class extends x{constructor(e,t){super(["sinter",...e],t)}},tx=class extends x{constructor(e,t){super(["sinterstore",...e],t)}},tw=class extends x{constructor(e,t){super(["sismember",...e],t)}},tf=class extends x{constructor(e,t){super(["smembers",...e],t)}},ty=class extends x{constructor(e,t){super(["smismember",e[0],...e[1]],t)}},tg=class extends x{constructor(e,t){super(["smove",...e],t)}},tO=class extends x{constructor([e,t],s){let n=["spop",e];"number"==typeof t&&n.push(t),super(n,s)}},tb=class extends x{constructor([e,t],s){let n=["srandmember",e];"number"==typeof t&&n.push(t),super(n,s)}},tE=class extends x{constructor(e,t){super(["srem",...e],t)}},tS=class extends x{constructor([e,t,s],n){let i=["sscan",e,t];s?.match&&i.push("match",s.match),"number"==typeof s?.count&&i.push("count",s.count),super(i,{deserialize:d,...n})}},tA=class extends x{constructor(e,t){super(["strlen",...e],t)}},tv=class extends x{constructor(e,t){super(["sunion",...e],t)}},tR=class extends x{constructor(e,t){super(["sunionstore",...e],t)}},tT=class extends x{constructor(e){super(["time"],e)}},tN=class extends x{constructor(e,t){super(["touch",...e],t)}},tz=class extends x{constructor(e,t){super(["ttl",...e],t)}},tk=class extends x{constructor(e,t){super(["type",...e],t)}},tU=class extends x{constructor(e,t){super(["unlink",...e],t)}},tP=class extends x{constructor([e,t,s],n){super(["XACK",e,t,...Array.isArray(s)?[...s]:[s]],n)}},tI=class extends x{constructor([e,t,s,n],i){let r=["XADD",e];for(let[e,i]of(n&&(n.nomkStream&&r.push("NOMKSTREAM"),n.trim&&(r.push(n.trim.type,n.trim.comparison,n.trim.threshold),void 0!==n.trim.limit&&r.push("LIMIT",n.trim.limit))),r.push(t),Object.entries(s)))r.push(e,i);super(r,i)}},tC=class extends x{constructor([e,t,s,n,i,r],c){let o=[];r?.count&&o.push("COUNT",r.count),r?.justId&&o.push("JUSTID"),super(["XAUTOCLAIM",e,t,s,n,i,...o],c)}},tD=class extends x{constructor([e,t,s,n,i,r],c){let o=Array.isArray(i)?[...i]:[i],h=[];r?.idleMS&&h.push("IDLE",r.idleMS),r?.idleMS&&h.push("TIME",r.timeMS),r?.retryCount&&h.push("RETRYCOUNT",r.retryCount),r?.force&&h.push("FORCE"),r?.justId&&h.push("JUSTID"),r?.lastId&&h.push("LASTID",r.lastId),super(["XCLAIM",e,t,s,n,...o,...h],c)}},tM=class extends x{constructor([e,t],s){super(["XDEL",e,...Array.isArray(t)?[...t]:[t]],s)}},tL=class extends x{constructor([e,t],s){let n=["XGROUP"];switch(t.type){case"CREATE":n.push("CREATE",e,t.group,t.id),t.options&&(t.options.MKSTREAM&&n.push("MKSTREAM"),void 0!==t.options.ENTRIESREAD&&n.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break;case"CREATECONSUMER":n.push("CREATECONSUMER",e,t.group,t.consumer);break;case"DELCONSUMER":n.push("DELCONSUMER",e,t.group,t.consumer);break;case"DESTROY":n.push("DESTROY",e,t.group);break;case"SETID":n.push("SETID",e,t.group,t.id),t.options?.ENTRIESREAD!==void 0&&n.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break;default:throw Error("Invalid XGROUP")}super(n,s)}},t_=class extends x{constructor([e,t],s){let n=[];"CONSUMERS"===t.type?n.push("CONSUMERS",e,t.group):n.push("GROUPS",e),super(["XINFO",...n],s)}},tB=class extends x{constructor(e,t){super(["XLEN",...e],t)}},tJ=class extends x{constructor([e,t,s,n,i,r],c){super(["XPENDING",e,t,...r?.idleTime?["IDLE",r.idleTime]:[],s,n,i,...r?.consumer===void 0?[]:Array.isArray(r.consumer)?[...r.consumer]:[r.consumer]],c)}},tH=class extends x{constructor([e,t,s,n],i){let r=["XRANGE",e,t,s];"number"==typeof n&&r.push("COUNT",n),super(r,{deserialize:e=>(function(e){let t={};for(let s of e)for(;s.length>=2;){let e=s.shift(),n=s.shift();for((e in t)||(t[e]={});n.length>=2;){let s=n.shift(),i=n.shift();try{t[e][s]=JSON.parse(i)}catch{t[e][s]=i}}}return t})(e),...i})}},tY=class extends x{constructor([e,t,s],n){if(Array.isArray(e)&&Array.isArray(t)&&e.length!==t.length)throw Error("ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified");let i=[];"number"==typeof s?.count&&i.push("COUNT",s.count),"number"==typeof s?.blockMS&&i.push("BLOCK",s.blockMS),i.push("STREAMS",...Array.isArray(e)?[...e]:[e],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...i],n)}},t$=class extends x{constructor([e,t,s,n,i],r){if(Array.isArray(s)&&Array.isArray(n)&&s.length!==n.length)throw Error("ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified");let c=[];"number"==typeof i?.count&&c.push("COUNT",i.count),"number"==typeof i?.blockMS&&c.push("BLOCK",i.blockMS),"boolean"==typeof i?.NOACK&&i.NOACK&&c.push("NOACK"),c.push("STREAMS",...Array.isArray(s)?[...s]:[s],...Array.isArray(n)?[...n]:[n]),super(["XREADGROUP","GROUP",e,t,...c],r)}},tj=class extends x{constructor([e,t,s,n],i){let r=["XREVRANGE",e,t,s];"number"==typeof n&&r.push("COUNT",n),super(r,{deserialize:e=>(function(e){let t={};for(let s of e)for(;s.length>=2;){let e=s.shift(),n=s.shift();for((e in t)||(t[e]={});n.length>=2;){let s=n.shift(),i=n.shift();try{t[e][s]=JSON.parse(i)}catch{t[e][s]=i}}}return t})(e),...i})}},tF=class extends x{constructor([e,t],s){let{limit:n,strategy:i,threshold:r,exactness:c="~"}=t;super(["XTRIM",e,i,c,r,...n?["LIMIT",n]:[]],s)}},tW=class extends x{constructor([e,t,...s],n){let i=["zadd",e];"nx"in t&&t.nx?i.push("nx"):"xx"in t&&t.xx&&i.push("xx"),"ch"in t&&t.ch&&i.push("ch"),"incr"in t&&t.incr&&i.push("incr"),"lt"in t&&t.lt?i.push("lt"):"gt"in t&&t.gt&&i.push("gt"),"score"in t&&"member"in t&&i.push(t.score,t.member),i.push(...s.flatMap(({score:e,member:t})=>[e,t])),super(i,n)}},tX=class extends x{constructor(e,t){super(["zcard",...e],t)}},tG=class extends x{constructor(e,t){super(["zcount",...e],t)}},tK=class extends x{constructor(e,t){super(["zincrby",...e],t)}},tq=class extends x{constructor([e,t,s,n],i){let r=["zinterstore",e,t];Array.isArray(s)?r.push(...s):r.push(s),n&&("weights"in n&&n.weights?r.push("weights",...n.weights):"weight"in n&&"number"==typeof n.weight&&r.push("weights",n.weight),"aggregate"in n&&r.push("aggregate",n.aggregate)),super(r,i)}},tV=class extends x{constructor(e,t){super(["zlexcount",...e],t)}},tQ=class extends x{constructor([e,t],s){let n=["zpopmax",e];"number"==typeof t&&n.push(t),super(n,s)}},tZ=class extends x{constructor([e,t],s){let n=["zpopmin",e];"number"==typeof t&&n.push(t),super(n,s)}},t0=class extends x{constructor([e,t,s,n],i){let r=["zrange",e,t,s];n?.byScore&&r.push("byscore"),n?.byLex&&r.push("bylex"),n?.rev&&r.push("rev"),n?.count!==void 0&&void 0!==n.offset&&r.push("limit",n.offset,n.count),n?.withScores&&r.push("withscores"),super(r,i)}},t1=class extends x{constructor(e,t){super(["zrank",...e],t)}},t2=class extends x{constructor(e,t){super(["zrem",...e],t)}},t4=class extends x{constructor(e,t){super(["zremrangebylex",...e],t)}},t8=class extends x{constructor(e,t){super(["zremrangebyrank",...e],t)}},t5=class extends x{constructor(e,t){super(["zremrangebyscore",...e],t)}},t3=class extends x{constructor(e,t){super(["zrevrank",...e],t)}},t6=class extends x{constructor([e,t,s],n){let i=["zscan",e,t];s?.match&&i.push("match",s.match),"number"==typeof s?.count&&i.push("count",s.count),super(i,{deserialize:d,...n})}},t9=class extends x{constructor(e,t){super(["zscore",...e],t)}},t7=class extends x{constructor([e,t,s],n){let i=["zunion",e];Array.isArray(t)?i.push(...t):i.push(t),s&&("weights"in s&&s.weights?i.push("weights",...s.weights):"weight"in s&&"number"==typeof s.weight&&i.push("weights",s.weight),"aggregate"in s&&i.push("aggregate",s.aggregate),s.withScores&&i.push("withscores")),super(i,n)}},se=class extends x{constructor([e,t,s,n],i){let r=["zunionstore",e,t];Array.isArray(s)?r.push(...s):r.push(s),n&&("weights"in n&&n.weights?r.push("weights",...n.weights):"weight"in n&&"number"==typeof n.weight&&r.push("weights",n.weight),"aggregate"in n&&r.push("aggregate",n.aggregate)),super(r,i)}},st=class extends x{constructor(e,t){super(["zdiffstore",...e],t)}},ss=class extends x{constructor(e,t){let[s,n]=e;super(["zmscore",s,...n],t)}},sn=class{client;commands;commandOptions;multiExec;constructor(e){if(this.client=e.client,this.commands=[],this.commandOptions=e.commandOptions,this.multiExec=e.multiExec??!1,this.commandOptions?.latencyLogging){let e=this.exec.bind(this);this.exec=async t=>{let s=performance.now(),n=await (t?e(t):e()),i=(performance.now()-s).toFixed(2);return console.log(`Latency for \x1b[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1b[0m: \x1b[38;2;0;255;255m${i} ms\x1b[0m`),n}}}exec=async e=>{if(0===this.commands.length)throw Error("Pipeline is empty");let t=this.multiExec?["multi-exec"]:["pipeline"],s=await this.client.request({path:t,body:Object.values(this.commands).map(e=>e.command)});return e?.keepErrors?s.map(({error:e,result:t},s)=>({error:e,result:this.commands[s].deserialize(t)})):s.map(({error:e,result:t},s)=>{if(e)throw new c(`Command ${s+1} [ ${this.commands[s].command[0]} ] failed: ${e}`);return this.commands[s].deserialize(t)})};length(){return this.commands.length}chain(e){return this.commands.push(e),this}append=(...e)=>this.chain(new f(e,this.commandOptions));bitcount=(...e)=>this.chain(new y(e,this.commandOptions));bitfield=(...e)=>new g(e,this.client,this.commandOptions,this.chain.bind(this));bitop=(e,t,s,...n)=>this.chain(new O([e,t,s,...n],this.commandOptions));bitpos=(...e)=>this.chain(new b(e,this.commandOptions));copy=(...e)=>this.chain(new E(e,this.commandOptions));zdiffstore=(...e)=>this.chain(new st(e,this.commandOptions));dbsize=()=>this.chain(new S(this.commandOptions));decr=(...e)=>this.chain(new A(e,this.commandOptions));decrby=(...e)=>this.chain(new v(e,this.commandOptions));del=(...e)=>this.chain(new R(e,this.commandOptions));echo=(...e)=>this.chain(new T(e,this.commandOptions));eval=(...e)=>this.chain(new N(e,this.commandOptions));evalsha=(...e)=>this.chain(new z(e,this.commandOptions));exists=(...e)=>this.chain(new k(e,this.commandOptions));expire=(...e)=>this.chain(new U(e,this.commandOptions));expireat=(...e)=>this.chain(new P(e,this.commandOptions));flushall=e=>this.chain(new I(e,this.commandOptions));flushdb=(...e)=>this.chain(new C(e,this.commandOptions));geoadd=(...e)=>this.chain(new D(e,this.commandOptions));geodist=(...e)=>this.chain(new M(e,this.commandOptions));geopos=(...e)=>this.chain(new _(e,this.commandOptions));geohash=(...e)=>this.chain(new L(e,this.commandOptions));geosearch=(...e)=>this.chain(new B(e,this.commandOptions));geosearchstore=(...e)=>this.chain(new J(e,this.commandOptions));get=(...e)=>this.chain(new H(e,this.commandOptions));getbit=(...e)=>this.chain(new Y(e,this.commandOptions));getdel=(...e)=>this.chain(new $(e,this.commandOptions));getrange=(...e)=>this.chain(new j(e,this.commandOptions));getset=(e,t)=>this.chain(new F([e,t],this.commandOptions));hdel=(...e)=>this.chain(new W(e,this.commandOptions));hexists=(...e)=>this.chain(new X(e,this.commandOptions));hget=(...e)=>this.chain(new G(e,this.commandOptions));hgetall=(...e)=>this.chain(new K(e,this.commandOptions));hincrby=(...e)=>this.chain(new q(e,this.commandOptions));hincrbyfloat=(...e)=>this.chain(new V(e,this.commandOptions));hkeys=(...e)=>this.chain(new Q(e,this.commandOptions));hlen=(...e)=>this.chain(new Z(e,this.commandOptions));hmget=(...e)=>this.chain(new ee(e,this.commandOptions));hmset=(e,t)=>this.chain(new et([e,t],this.commandOptions));hrandfield=(e,t,s)=>this.chain(new w([e,t,s],this.commandOptions));hscan=(...e)=>this.chain(new es(e,this.commandOptions));hset=(e,t)=>this.chain(new en([e,t],this.commandOptions));hsetnx=(e,t,s)=>this.chain(new ei([e,t,s],this.commandOptions));hstrlen=(...e)=>this.chain(new er(e,this.commandOptions));hvals=(...e)=>this.chain(new ec(e,this.commandOptions));incr=(...e)=>this.chain(new eo(e,this.commandOptions));incrby=(...e)=>this.chain(new eh(e,this.commandOptions));incrbyfloat=(...e)=>this.chain(new ea(e,this.commandOptions));keys=(...e)=>this.chain(new eP(e,this.commandOptions));lindex=(...e)=>this.chain(new eI(e,this.commandOptions));linsert=(e,t,s,n)=>this.chain(new eC([e,t,s,n],this.commandOptions));llen=(...e)=>this.chain(new eD(e,this.commandOptions));lmove=(...e)=>this.chain(new eM(e,this.commandOptions));lpop=(...e)=>this.chain(new e_(e,this.commandOptions));lmpop=(...e)=>this.chain(new eL(e,this.commandOptions));lpos=(...e)=>this.chain(new eB(e,this.commandOptions));lpush=(e,...t)=>this.chain(new eJ([e,...t],this.commandOptions));lpushx=(e,...t)=>this.chain(new eH([e,...t],this.commandOptions));lrange=(...e)=>this.chain(new eY(e,this.commandOptions));lrem=(e,t,s)=>this.chain(new e$([e,t,s],this.commandOptions));lset=(e,t,s)=>this.chain(new ej([e,t,s],this.commandOptions));ltrim=(...e)=>this.chain(new eF(e,this.commandOptions));mget=(...e)=>this.chain(new eW(e,this.commandOptions));mset=e=>this.chain(new eX([e],this.commandOptions));msetnx=e=>this.chain(new eG([e],this.commandOptions));persist=(...e)=>this.chain(new eK(e,this.commandOptions));pexpire=(...e)=>this.chain(new eq(e,this.commandOptions));pexpireat=(...e)=>this.chain(new eV(e,this.commandOptions));pfadd=(...e)=>this.chain(new eQ(e,this.commandOptions));pfcount=(...e)=>this.chain(new eZ(e,this.commandOptions));pfmerge=(...e)=>this.chain(new e0(e,this.commandOptions));ping=e=>this.chain(new e1(e,this.commandOptions));psetex=(e,t,s)=>this.chain(new e2([e,t,s],this.commandOptions));pttl=(...e)=>this.chain(new e4(e,this.commandOptions));publish=(...e)=>this.chain(new e8(e,this.commandOptions));randomkey=()=>this.chain(new e5(this.commandOptions));rename=(...e)=>this.chain(new e3(e,this.commandOptions));renamenx=(...e)=>this.chain(new e6(e,this.commandOptions));rpop=(...e)=>this.chain(new e9(e,this.commandOptions));rpush=(e,...t)=>this.chain(new e7([e,...t],this.commandOptions));rpushx=(e,...t)=>this.chain(new te([e,...t],this.commandOptions));sadd=(e,t,...s)=>this.chain(new tt([e,t,...s],this.commandOptions));scan=(...e)=>this.chain(new ts(e,this.commandOptions));scard=(...e)=>this.chain(new tn(e,this.commandOptions));scriptExists=(...e)=>this.chain(new ti(e,this.commandOptions));scriptFlush=(...e)=>this.chain(new tr(e,this.commandOptions));scriptLoad=(...e)=>this.chain(new tc(e,this.commandOptions));sdiff=(...e)=>this.chain(new to(e,this.commandOptions));sdiffstore=(...e)=>this.chain(new th(e,this.commandOptions));set=(e,t,s)=>this.chain(new ta([e,t,s],this.commandOptions));setbit=(...e)=>this.chain(new tp(e,this.commandOptions));setex=(e,t,s)=>this.chain(new tl([e,t,s],this.commandOptions));setnx=(e,t)=>this.chain(new tu([e,t],this.commandOptions));setrange=(...e)=>this.chain(new td(e,this.commandOptions));sinter=(...e)=>this.chain(new tm(e,this.commandOptions));sinterstore=(...e)=>this.chain(new tx(e,this.commandOptions));sismember=(e,t)=>this.chain(new tw([e,t],this.commandOptions));smembers=(...e)=>this.chain(new tf(e,this.commandOptions));smismember=(e,t)=>this.chain(new ty([e,t],this.commandOptions));smove=(e,t,s)=>this.chain(new tg([e,t,s],this.commandOptions));spop=(...e)=>this.chain(new tO(e,this.commandOptions));srandmember=(...e)=>this.chain(new tb(e,this.commandOptions));srem=(e,...t)=>this.chain(new tE([e,...t],this.commandOptions));sscan=(...e)=>this.chain(new tS(e,this.commandOptions));strlen=(...e)=>this.chain(new tA(e,this.commandOptions));sunion=(...e)=>this.chain(new tv(e,this.commandOptions));sunionstore=(...e)=>this.chain(new tR(e,this.commandOptions));time=()=>this.chain(new tT(this.commandOptions));touch=(...e)=>this.chain(new tN(e,this.commandOptions));ttl=(...e)=>this.chain(new tz(e,this.commandOptions));type=(...e)=>this.chain(new tk(e,this.commandOptions));unlink=(...e)=>this.chain(new tU(e,this.commandOptions));zadd=(...e)=>(e[1],this.chain(new tW([e[0],e[1],...e.slice(2)],this.commandOptions)));xadd=(...e)=>this.chain(new tI(e,this.commandOptions));xack=(...e)=>this.chain(new tP(e,this.commandOptions));xdel=(...e)=>this.chain(new tM(e,this.commandOptions));xgroup=(...e)=>this.chain(new tL(e,this.commandOptions));xread=(...e)=>this.chain(new tY(e,this.commandOptions));xreadgroup=(...e)=>this.chain(new t$(e,this.commandOptions));xinfo=(...e)=>this.chain(new t_(e,this.commandOptions));xlen=(...e)=>this.chain(new tB(e,this.commandOptions));xpending=(...e)=>this.chain(new tJ(e,this.commandOptions));xclaim=(...e)=>this.chain(new tD(e,this.commandOptions));xautoclaim=(...e)=>this.chain(new tC(e,this.commandOptions));xtrim=(...e)=>this.chain(new tF(e,this.commandOptions));xrange=(...e)=>this.chain(new tH(e,this.commandOptions));xrevrange=(...e)=>this.chain(new tj(e,this.commandOptions));zcard=(...e)=>this.chain(new tX(e,this.commandOptions));zcount=(...e)=>this.chain(new tG(e,this.commandOptions));zincrby=(e,t,s)=>this.chain(new tK([e,t,s],this.commandOptions));zinterstore=(...e)=>this.chain(new tq(e,this.commandOptions));zlexcount=(...e)=>this.chain(new tV(e,this.commandOptions));zmscore=(...e)=>this.chain(new ss(e,this.commandOptions));zpopmax=(...e)=>this.chain(new tQ(e,this.commandOptions));zpopmin=(...e)=>this.chain(new tZ(e,this.commandOptions));zrange=(...e)=>this.chain(new t0(e,this.commandOptions));zrank=(e,t)=>this.chain(new t1([e,t],this.commandOptions));zrem=(e,...t)=>this.chain(new t2([e,...t],this.commandOptions));zremrangebylex=(...e)=>this.chain(new t4(e,this.commandOptions));zremrangebyrank=(...e)=>this.chain(new t8(e,this.commandOptions));zremrangebyscore=(...e)=>this.chain(new t5(e,this.commandOptions));zrevrank=(e,t)=>this.chain(new t3([e,t],this.commandOptions));zscan=(...e)=>this.chain(new t6(e,this.commandOptions));zscore=(e,t)=>this.chain(new t9([e,t],this.commandOptions));zunionstore=(...e)=>this.chain(new se(e,this.commandOptions));zunion=(...e)=>this.chain(new t7(e,this.commandOptions));get json(){return{arrappend:(...e)=>this.chain(new ep(e,this.commandOptions)),arrindex:(...e)=>this.chain(new el(e,this.commandOptions)),arrinsert:(...e)=>this.chain(new eu(e,this.commandOptions)),arrlen:(...e)=>this.chain(new ed(e,this.commandOptions)),arrpop:(...e)=>this.chain(new em(e,this.commandOptions)),arrtrim:(...e)=>this.chain(new ex(e,this.commandOptions)),clear:(...e)=>this.chain(new ew(e,this.commandOptions)),del:(...e)=>this.chain(new ef(e,this.commandOptions)),forget:(...e)=>this.chain(new ey(e,this.commandOptions)),get:(...e)=>this.chain(new eg(e,this.commandOptions)),mget:(...e)=>this.chain(new eO(e,this.commandOptions)),mset:(...e)=>this.chain(new eb(e,this.commandOptions)),numincrby:(...e)=>this.chain(new eE(e,this.commandOptions)),nummultby:(...e)=>this.chain(new eS(e,this.commandOptions)),objkeys:(...e)=>this.chain(new eA(e,this.commandOptions)),objlen:(...e)=>this.chain(new ev(e,this.commandOptions)),resp:(...e)=>this.chain(new eR(e,this.commandOptions)),set:(...e)=>this.chain(new eT(e,this.commandOptions)),strappend:(...e)=>this.chain(new eN(e,this.commandOptions)),strlen:(...e)=>this.chain(new ez(e,this.commandOptions)),toggle:(...e)=>this.chain(new ek(e,this.commandOptions)),type:(...e)=>this.chain(new eU(e,this.commandOptions))}}},si=class{pipelinePromises=new WeakMap;activePipeline=null;indexInCurrentPipeline=0;redis;pipeline;pipelineCounter=0;constructor(e){this.redis=e,this.pipeline=e.pipeline()}async withAutoPipeline(e){let t=this.activePipeline??this.redis.pipeline();this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let s=this.indexInCurrentPipeline++;e(t);let n=this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let e=t.exec({keepErrors:!0});this.pipelineCounter+=1,this.pipelinePromises.set(t,e),this.activePipeline=null}return this.pipelinePromises.get(t)}),i=(await n)[s];if(i.error)throw new c(`Command failed: ${i.error}`);return i.result}async deferExecution(){await Promise.resolve(),await Promise.resolve()}},sr=class{script;sha1;redis;constructor(e,t){this.redis=e,this.sha1=this.digest(t),this.script=t}async eval(e,t){return await this.redis.eval(this.script,e,t)}async evalsha(e,t){return await this.redis.evalsha(this.sha1,e,t)}async exec(e,t){return await this.redis.evalsha(this.sha1,e,t).catch(async s=>{if(s instanceof Error&&s.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,e,t);throw s})}digest(e){return n.stringify(i(e))}},sc=class{client;opts;enableTelemetry;enableAutoPipelining;constructor(e,t){this.client=e,this.opts=t,this.enableTelemetry=t?.enableTelemetry??!0,t?.readYourWrites===!1&&(this.client.readYourWrites=!1),this.enableAutoPipelining=t?.enableAutoPipelining??!0}get readYourWritesSyncToken(){return this.client.upstashSyncToken}set readYourWritesSyncToken(e){this.client.upstashSyncToken=e}get json(){return{arrappend:(...e)=>new ep(e,this.opts).exec(this.client),arrindex:(...e)=>new el(e,this.opts).exec(this.client),arrinsert:(...e)=>new eu(e,this.opts).exec(this.client),arrlen:(...e)=>new ed(e,this.opts).exec(this.client),arrpop:(...e)=>new em(e,this.opts).exec(this.client),arrtrim:(...e)=>new ex(e,this.opts).exec(this.client),clear:(...e)=>new ew(e,this.opts).exec(this.client),del:(...e)=>new ef(e,this.opts).exec(this.client),forget:(...e)=>new ey(e,this.opts).exec(this.client),get:(...e)=>new eg(e,this.opts).exec(this.client),mget:(...e)=>new eO(e,this.opts).exec(this.client),mset:(...e)=>new eb(e,this.opts).exec(this.client),numincrby:(...e)=>new eE(e,this.opts).exec(this.client),nummultby:(...e)=>new eS(e,this.opts).exec(this.client),objkeys:(...e)=>new eA(e,this.opts).exec(this.client),objlen:(...e)=>new ev(e,this.opts).exec(this.client),resp:(...e)=>new eR(e,this.opts).exec(this.client),set:(...e)=>new eT(e,this.opts).exec(this.client),strappend:(...e)=>new eN(e,this.opts).exec(this.client),strlen:(...e)=>new ez(e,this.opts).exec(this.client),toggle:(...e)=>new ek(e,this.opts).exec(this.client),type:(...e)=>new eU(e,this.opts).exec(this.client)}}use=e=>{let t=this.client.request.bind(this.client);this.client.request=s=>e(s,t)};addTelemetry=e=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(e)}catch{}};createScript(e){return new sr(this,e)}pipeline=()=>new sn({client:this.client,commandOptions:this.opts,multiExec:!1});autoPipeline=()=>(function e(t,s){return t.autoPipelineExecutor||(t.autoPipelineExecutor=new si(t)),new Proxy(t,{get:(t,n)=>"pipelineCounter"===n?t.autoPipelineExecutor.pipelineCounter:"json"===n?e(t,!0):n in t&&!(n in t.autoPipelineExecutor.pipeline)?t[n]:(s?"function"==typeof t.autoPipelineExecutor.pipeline.json[n]:"function"==typeof t.autoPipelineExecutor.pipeline[n])?(...e)=>t.autoPipelineExecutor.withAutoPipeline(t=>{s?t.json[n](...e):t[n](...e)}):t.autoPipelineExecutor.pipeline[n]})})(this);multi=()=>new sn({client:this.client,commandOptions:this.opts,multiExec:!0});bitfield=(...e)=>new g(e,this.client,this.opts);append=(...e)=>new f(e,this.opts).exec(this.client);bitcount=(...e)=>new y(e,this.opts).exec(this.client);bitop=(e,t,s,...n)=>new O([e,t,s,...n],this.opts).exec(this.client);bitpos=(...e)=>new b(e,this.opts).exec(this.client);copy=(...e)=>new E(e,this.opts).exec(this.client);dbsize=()=>new S(this.opts).exec(this.client);decr=(...e)=>new A(e,this.opts).exec(this.client);decrby=(...e)=>new v(e,this.opts).exec(this.client);del=(...e)=>new R(e,this.opts).exec(this.client);echo=(...e)=>new T(e,this.opts).exec(this.client);eval=(...e)=>new N(e,this.opts).exec(this.client);evalsha=(...e)=>new z(e,this.opts).exec(this.client);exists=(...e)=>new k(e,this.opts).exec(this.client);expire=(...e)=>new U(e,this.opts).exec(this.client);expireat=(...e)=>new P(e,this.opts).exec(this.client);flushall=e=>new I(e,this.opts).exec(this.client);flushdb=(...e)=>new C(e,this.opts).exec(this.client);geoadd=(...e)=>new D(e,this.opts).exec(this.client);geopos=(...e)=>new _(e,this.opts).exec(this.client);geodist=(...e)=>new M(e,this.opts).exec(this.client);geohash=(...e)=>new L(e,this.opts).exec(this.client);geosearch=(...e)=>new B(e,this.opts).exec(this.client);geosearchstore=(...e)=>new J(e,this.opts).exec(this.client);get=(...e)=>new H(e,this.opts).exec(this.client);getbit=(...e)=>new Y(e,this.opts).exec(this.client);getdel=(...e)=>new $(e,this.opts).exec(this.client);getrange=(...e)=>new j(e,this.opts).exec(this.client);getset=(e,t)=>new F([e,t],this.opts).exec(this.client);hdel=(...e)=>new W(e,this.opts).exec(this.client);hexists=(...e)=>new X(e,this.opts).exec(this.client);hget=(...e)=>new G(e,this.opts).exec(this.client);hgetall=(...e)=>new K(e,this.opts).exec(this.client);hincrby=(...e)=>new q(e,this.opts).exec(this.client);hincrbyfloat=(...e)=>new V(e,this.opts).exec(this.client);hkeys=(...e)=>new Q(e,this.opts).exec(this.client);hlen=(...e)=>new Z(e,this.opts).exec(this.client);hmget=(...e)=>new ee(e,this.opts).exec(this.client);hmset=(e,t)=>new et([e,t],this.opts).exec(this.client);hrandfield=(e,t,s)=>new w([e,t,s],this.opts).exec(this.client);hscan=(...e)=>new es(e,this.opts).exec(this.client);hset=(e,t)=>new en([e,t],this.opts).exec(this.client);hsetnx=(e,t,s)=>new ei([e,t,s],this.opts).exec(this.client);hstrlen=(...e)=>new er(e,this.opts).exec(this.client);hvals=(...e)=>new ec(e,this.opts).exec(this.client);incr=(...e)=>new eo(e,this.opts).exec(this.client);incrby=(...e)=>new eh(e,this.opts).exec(this.client);incrbyfloat=(...e)=>new ea(e,this.opts).exec(this.client);keys=(...e)=>new eP(e,this.opts).exec(this.client);lindex=(...e)=>new eI(e,this.opts).exec(this.client);linsert=(e,t,s,n)=>new eC([e,t,s,n],this.opts).exec(this.client);llen=(...e)=>new eD(e,this.opts).exec(this.client);lmove=(...e)=>new eM(e,this.opts).exec(this.client);lpop=(...e)=>new e_(e,this.opts).exec(this.client);lmpop=(...e)=>new eL(e,this.opts).exec(this.client);lpos=(...e)=>new eB(e,this.opts).exec(this.client);lpush=(e,...t)=>new eJ([e,...t],this.opts).exec(this.client);lpushx=(e,...t)=>new eH([e,...t],this.opts).exec(this.client);lrange=(...e)=>new eY(e,this.opts).exec(this.client);lrem=(e,t,s)=>new e$([e,t,s],this.opts).exec(this.client);lset=(e,t,s)=>new ej([e,t,s],this.opts).exec(this.client);ltrim=(...e)=>new eF(e,this.opts).exec(this.client);mget=(...e)=>new eW(e,this.opts).exec(this.client);mset=e=>new eX([e],this.opts).exec(this.client);msetnx=e=>new eG([e],this.opts).exec(this.client);persist=(...e)=>new eK(e,this.opts).exec(this.client);pexpire=(...e)=>new eq(e,this.opts).exec(this.client);pexpireat=(...e)=>new eV(e,this.opts).exec(this.client);pfadd=(...e)=>new eQ(e,this.opts).exec(this.client);pfcount=(...e)=>new eZ(e,this.opts).exec(this.client);pfmerge=(...e)=>new e0(e,this.opts).exec(this.client);ping=e=>new e1(e,this.opts).exec(this.client);psetex=(e,t,s)=>new e2([e,t,s],this.opts).exec(this.client);pttl=(...e)=>new e4(e,this.opts).exec(this.client);publish=(...e)=>new e8(e,this.opts).exec(this.client);randomkey=()=>new e5().exec(this.client);rename=(...e)=>new e3(e,this.opts).exec(this.client);renamenx=(...e)=>new e6(e,this.opts).exec(this.client);rpop=(...e)=>new e9(e,this.opts).exec(this.client);rpush=(e,...t)=>new e7([e,...t],this.opts).exec(this.client);rpushx=(e,...t)=>new te([e,...t],this.opts).exec(this.client);sadd=(e,t,...s)=>new tt([e,t,...s],this.opts).exec(this.client);scan=(...e)=>new ts(e,this.opts).exec(this.client);scard=(...e)=>new tn(e,this.opts).exec(this.client);scriptExists=(...e)=>new ti(e,this.opts).exec(this.client);scriptFlush=(...e)=>new tr(e,this.opts).exec(this.client);scriptLoad=(...e)=>new tc(e,this.opts).exec(this.client);sdiff=(...e)=>new to(e,this.opts).exec(this.client);sdiffstore=(...e)=>new th(e,this.opts).exec(this.client);set=(e,t,s)=>new ta([e,t,s],this.opts).exec(this.client);setbit=(...e)=>new tp(e,this.opts).exec(this.client);setex=(e,t,s)=>new tl([e,t,s],this.opts).exec(this.client);setnx=(e,t)=>new tu([e,t],this.opts).exec(this.client);setrange=(...e)=>new td(e,this.opts).exec(this.client);sinter=(...e)=>new tm(e,this.opts).exec(this.client);sinterstore=(...e)=>new tx(e,this.opts).exec(this.client);sismember=(e,t)=>new tw([e,t],this.opts).exec(this.client);smismember=(e,t)=>new ty([e,t],this.opts).exec(this.client);smembers=(...e)=>new tf(e,this.opts).exec(this.client);smove=(e,t,s)=>new tg([e,t,s],this.opts).exec(this.client);spop=(...e)=>new tO(e,this.opts).exec(this.client);srandmember=(...e)=>new tb(e,this.opts).exec(this.client);srem=(e,...t)=>new tE([e,...t],this.opts).exec(this.client);sscan=(...e)=>new tS(e,this.opts).exec(this.client);strlen=(...e)=>new tA(e,this.opts).exec(this.client);sunion=(...e)=>new tv(e,this.opts).exec(this.client);sunionstore=(...e)=>new tR(e,this.opts).exec(this.client);time=()=>new tT().exec(this.client);touch=(...e)=>new tN(e,this.opts).exec(this.client);ttl=(...e)=>new tz(e,this.opts).exec(this.cli