express-sweet 2.0.0 → 2.0.2
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/CHANGELOG.md +21 -451
- package/README.md +11 -33
- package/dist/build.cjs +151 -0
- package/dist/build.mjs +151 -0
- package/package.json +25 -26
- package/types/database/Database.d.ts +48 -48
- package/types/database/loadModels.d.ts +2 -1
- package/types/handlebars_helpers/comparison.d.ts +18 -18
- package/types/handlebars_helpers/date.d.ts +1 -1
- package/types/handlebars_helpers/html.d.ts +1 -1
- package/types/handlebars_helpers/math.d.ts +7 -7
- package/types/handlebars_helpers/number.d.ts +1 -1
- package/types/handlebars_helpers/object.d.ts +2 -2
- package/types/handlebars_helpers/string.d.ts +3 -3
- package/types/index.d.ts +0 -1
- package/types/interfaces/AuthenticationConfig.d.ts +0 -1
- package/types/interfaces/BasicConfig.d.ts +0 -1
- package/types/interfaces/ViewConfig.d.ts +0 -1
- package/types/mount.d.ts +2 -1
- package/types/services/Authentication.d.ts +0 -1
- package/types/types/global.d.ts +17 -0
- package/dist/build.common.js +0 -387
- package/dist/build.esm.js +0 -387
- package/types/exceptions/FaceCollectionCreateFailed.d.ts +0 -25
- package/types/exceptions/FaceCollectionDeleteFailed.d.ts +0 -25
- package/types/exceptions/FaceIndexFailed.d.ts +0 -20
- package/types/exceptions/FaceMissingInPhoto.d.ts +0 -11
- package/types/exceptions/FacesMultipleInPhoto.d.ts +0 -11
- package/types/exceptions/index.d.ts +0 -5
package/dist/build.cjs
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";var fs$3=require("node:fs"),require$$0$2=require("fs"),require$$1=require("path"),node_module=require("node:module"),path$4=require("node:path"),express=require("express"),require$$0$3=require("crypto"),require$$0$4=require("stream"),require$$0$5=require("events"),require$$1$1=require("util"),require$$1$2=require("os"),require$$0$6=require("buffer"),require$$0$7=require("tty"),require$$4=require("net"),require$$0$8=require("http"),require$$0$9=require("url"),require$$2=require("tls"),require$$0$a=require("string_decoder"),node_url=require("node:url"),promises=require("node:fs/promises"),node_events=require("node:events"),Stream=require("node:stream"),node_string_decoder=require("node:string_decoder"),sequelize=require("sequelize"),_documentCurrentScript="undefined"!=typeof document?document.currentScript:null;function _interopNamespaceDefault(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var fs__namespace=_interopNamespaceDefault(fs$3);class Global{static mount(){global.APP_DIR=process.cwd(),process.env.EXPRESS_DEBUG&&console.log("Set global variable APP_DIR")}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var main$1={};const fs$2=require$$0$2,path$3=require$$1;function log$2(e){console.log(`[dotenv][DEBUG] ${e}`)}const NEWLINE="\n",RE_INI_KEY_VAL=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,RE_NEWLINES=/\\n/g,NEWLINES_MATCH=/\n|\r|\r\n/;function parse$5(e,t){const r=Boolean(t&&t.debug),s={};return e.toString().split(NEWLINES_MATCH).forEach((function(e,t){const n=e.match(RE_INI_KEY_VAL);if(null!=n){const e=n[1];let t=n[2]||"";const r=t.length-1,i='"'===t[0]&&'"'===t[r];"'"===t[0]&&"'"===t[r]||i?(t=t.substring(1,r),i&&(t=t.replace(RE_NEWLINES,NEWLINE))):t=t.trim(),s[e]=t}else r&&log$2(`did not match key and value when parsing line ${t+1}: ${e}`)})),s}function config(e){let t=path$3.resolve(process.cwd(),".env"),r="utf8",s=!1;e&&(null!=e.path&&(t=e.path),null!=e.encoding&&(r=e.encoding),null!=e.debug&&(s=!0));try{const e=parse$5(fs$2.readFileSync(t,{encoding:r}),{debug:s});return Object.keys(e).forEach((function(t){Object.prototype.hasOwnProperty.call(process.env,t)?s&&log$2(`"${t}" is already defined in \`process.env\` and will not be overwritten`):process.env[t]=e[t]})),{parsed:e}}catch(e){return{error:e}}}main$1.config=config,main$1.parse=parse$5;var isArray=e=>"[object Array]"===Object.prototype.toString.call(e),isAsyncFunction=e=>e&&e.constructor&&e.constructor===Object.getPrototypeOf((async function(){})).constructor,isFunction=e=>e&&e.constructor&&(e.constructor===Object.getPrototypeOf((function(){})).constructor||e.constructor===Object.getPrototypeOf((async function(){})).constructor),isObject=e=>null!=e&&"object"==typeof e&&!1===Array.isArray(e),isString=e=>"string"==typeof e&&""!==e;const require$7=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);var loadAuthenticationConfig=()=>{const e={enabled:!1,session_store:"memory",cookie_name:"connect.sid",cookie_secure:!0,cookie_httpOnly:!0,redis_host:void 0,username:"username",password:"password",success_redirect:"/",failure_redirect:"/login",authenticate_user:(e,t,r)=>new Promise((e=>e(null))),subscribe_user:e=>new Promise((e=>e({}))),allow_unauthenticated:[],expiration:864e5},t=`${process.cwd()}/config/authentication`;if(!fs$3.existsSync(`${t}.js`))return e;const r=Object.assign(e,require$7(t).default||require$7(t));if("redis"===r.session_store&&!r.redis_host)throw new TypeError("If the session store is redis, redis_host in the authentication configuration is required");return r.cookie_name||(r.cookie_name="connect.sid"),r};const require$6=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);var loadBasicConfig=()=>{const e={env_path:void 0,cors_enabled:!1,max_body_size:"100kb",router_dir:path$4.join(process.cwd(),"routes"),default_router:void 0,rewrite_base_url:e=>e,is_ajax:e=>!!e.xhr,hook_handle_error:void 0},t=`${process.cwd()}/config/config`;return fs$3.existsSync(`${t}.js`)?Object.assign(e,require$6(t).default||require$6(t)):e};const require$5=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);var loadDatabaseConfig=()=>{const e={database:"unkown",username:"unkown",password:void 0,host:"localhost",dialect:"mariadb"},t=`${process.cwd()}/config/database`;if(!fs$3.existsSync(`${t}.js`))return e;const r=process.env.NODE_ENV||"development",s=require$5(t).default||require$5(t),n=Object.assign(e,s[r]);return process.env.EXPRESS_DEBUG&&console.log(`Connection DB is ${n.host} ${n.database}`),n};const require$4=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);var loadViewConfig=()=>{const e={views_dir:path$4.join(process.cwd(),"views"),partials_dir:path$4.join(process.cwd(),"views/partials"),layouts_dir:path$4.join(process.cwd(),"views/layout"),default_layout:path$4.join(process.cwd(),"views/layout/default.hbs"),extension:".hbs",beforeRender:(e,t)=>{}},t=`${process.cwd()}/config/view`;return fs$3.existsSync(`${t}.js`)?Object.assign(e,require$4(t).default||require$4(t)):e},index$4=Object.freeze({__proto__:null,isArray:isArray,isAsyncFunction:isAsyncFunction,isFunction:isFunction,isObject:isObject,isString:isString,loadAuthenticationConfig:loadAuthenticationConfig,loadBasicConfig:loadBasicConfig,loadDatabaseConfig:loadDatabaseConfig,loadViewConfig:loadViewConfig});class Environment{static mount(){if(global.loadedEnv)return;const e=loadBasicConfig();if(!e.env_path)return;const t=main$1.parse(fs$3.readFileSync(e.env_path));for(let e in t)process.env[e]=t[e];global.loadedEnv=!0}}const cacheBusting=(e,t)=>{const r=`${path$4.join(process.cwd(),"public")}/${e.replace(/^\//,"")}`;if(!fs$3.existsSync(r))return e;const s=new Date(fs$3.statSync(r).mtime).getTime();let n="";return t&&t.replace(/\/$/,""),n+=`/${e.replace(/^\//,"")}?${s}`,n};var html=Object.freeze({__proto__:null,cacheBusting:cacheBusting});const jsonStringify=(e,t=0)=>JSON.stringify(e,null,t),jsonParse=e=>JSON.parse(e);var object=Object.freeze({__proto__:null,jsonParse:jsonParse,jsonStringify:jsonStringify});const replace=(e,t,r)=>e.replace(t,r),split=(e,t)=>isString(e)?(isString(t)||(t=","),e.split(t)):[],formatBytes=(e,t=0)=>{let r=0,s="Bytes";if(e&&e>0){const n=1024,i=t<0?0:t,a=Math.floor(Math.log(e)/Math.log(n));s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][a],r=parseFloat((e/Math.pow(n,a)).toFixed(i))}return`${r}${s}`};var string$1=Object.freeze({__proto__:null,formatBytes:formatBytes,replace:replace,split:split});const eq=(e,t)=>e===t,eqw=(e,t)=>e==t,neq=(e,t)=>e!==t,neqw=(e,t)=>e!=t,lt=(e,t)=>e<t,lte$1=(e,t)=>e<=t,gt=(e,t)=>e>t,gte$1=(e,t)=>e>=t,not=e=>!e,ifx=(e,t,r)=>(isObject(r)&&"ifx"===r.name&&r.hasOwnProperty("hash")&&(r=""),e?t:r),empty=e=>("string"==typeof e?e=e.replace(/^[\s ]+|[\s ]+$/g,""):Array.isArray(e)&&0===e.length&&(e=null),!e),notEmpty=e=>("string"==typeof e?e=e.replace(/^[\s ]+|[\s ]+$/g,""):Array.isArray(e)&&0===e.length&&(e=null),!!e),count=e=>!!Array.isArray(e)&&e.length,and=(...e)=>{isObject(e[e.length-1])&&e.pop();for(let t of e)if(!t)return!1;return!0},or=(...e)=>{isObject(e[e.length-1])&&e.pop();for(let t of e)if(t)return!0;return!1},coalesce=(...e)=>{isObject(e[e.length-1])&&e.pop();for(let t of e)if(t)return t;return e.pop()},includes=(e,t,r=!0)=>{if(!Array.isArray(e)||0===e.length)return!1;for(let s of e)if(r&&s===t||!r&&s==t)return!0;return!1},regexMatch=(e,t,r)=>{isString(e)||(e=e.toString()),isObject(r)&&(r=void 0);return new RegExp(t,r).test(e)};var comparison=Object.freeze({__proto__:null,and:and,coalesce:coalesce,count:count,empty:empty,eq:eq,eqw:eqw,gt:gt,gte:gte$1,ifx:ifx,includes:includes,lt:lt,lte:lte$1,neq:neq,neqw:neqw,not:not,notEmpty:notEmpty,or:or,regexMatch:regexMatch});function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var moment$1={exports:{}},module;module=moment$1,module.exports=function(){var e,t;function r(){return e.apply(null,arguments)}function s(t){e=t}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function l(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var r,s=[],n=e.length;for(r=0;r<n;++r)s.push(t(e[r],r));return s}function m(e,t){for(var r in t)a(t,r)&&(e[r]=t[r]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,r,s){return Kr(e,t,r,s,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function h(e){return null==e._pf&&(e._pf=f()),e._pf}function _(e){var r=null,s=!1,n=e._d&&!isNaN(e._d.getTime());return n&&(r=h(e),s=t.call(r.parsedDateParts,(function(e){return null!=e})),n=r.overflow<0&&!r.empty&&!r.invalidEra&&!r.invalidMonth&&!r.invalidWeekday&&!r.weekdayMismatch&&!r.nullInput&&!r.invalidFormat&&!r.userInvalidated&&(!r.meridiem||r.meridiem&&s),e._strict&&(n=n&&0===r.charsLeftOver&&0===r.unusedTokens.length&&void 0===r.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?n:(e._isValid=n,e._isValid)}function E(e){var t=d(NaN);return null!=e?m(h(t),e):h(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),s=r.length>>>0;for(t=0;t<s;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var S=r.momentProperties=[],R=!1;function g(e,t){var r,s,n,i=S.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=h(t)),c(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)c(n=t[s=S[r]])||(e[s]=n);return e}function A(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===R&&(R=!0,r.updateOffset(this),R=!1)}function T(e){return e instanceof A||null!=e&&null!=e._isAMomentObject}function v(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function b(e,t){var s=!0;return m((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),s){var n,i,o,c=[],u=arguments.length;for(i=0;i<u;i++){if(n="","object"==typeof arguments[i]){for(o in n+="\n["+i+"] ",arguments[0])a(arguments[0],o)&&(n+=o+": "+arguments[0][o]+", ");n=n.slice(0,-2)}else n=arguments[i];c.push(n)}v(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),s=!1}return t.apply(this,arguments)}),t)}var I,N={};function y(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),N[e]||(v(t),N[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function $(e){var t,r;for(r in e)a(e,r)&&(O(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function C(e,t){var r,s=m({},e);for(r in t)a(t,r)&&(i(e[r])&&i(t[r])?(s[r]={},m(s[r],e[r]),m(s[r],t[r])):null!=t[r]?s[r]=t[r]:delete s[r]);for(r in e)a(e,r)&&!a(t,r)&&i(e[r])&&(s[r]=m({},s[r]));return s}function L(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,I=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)a(e,t)&&r.push(t);return r};var D={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function P(e,t,r){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,r):s}function x(e,t,r){var s=""+Math.abs(e),n=t-s.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+s}var M=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,w={},U={};function G(e,t,r,s){var n=s;"string"==typeof s&&(n=function(){return this[s]()}),e&&(U[e]=n),t&&(U[t[0]]=function(){return x(n.apply(this,arguments),t[1],t[2])}),r&&(U[r]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function Y(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function k(e){var t,r,s=e.match(M);for(t=0,r=s.length;t<r;t++)U[s[t]]?s[t]=U[s[t]]:s[t]=Y(s[t]);return function(t){var n,i="";for(n=0;n<r;n++)i+=O(s[n])?s[n].call(t,e):s[n];return i}}function B(e,t){return e.isValid()?(t=j(t,e.localeData()),w[t]=w[t]||k(t),w[t](e)):e.localeData().invalidDate()}function j(e,t){var r=5;function s(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;r>=0&&F.test(e);)e=e.replace(F,s),F.lastIndex=0,r-=1;return e}var X={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function H(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(M).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var K="Invalid date";function q(){return this._invalidDate}var W="%d",V=/\d{1,2}/;function z(e){return this._ordinal.replace("%d",e)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(e,t,r,s){var n=this._relativeTime[r];return O(n)?n(e,t,r,s):n.replace(/%d/i,e)}function J(e,t){var r=this._relativeTime[e>0?"future":"past"];return O(r)?r(t):r.replace(/%s/i,t)}var ee={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function te(e){return"string"==typeof e?ee[e]||ee[e.toLowerCase()]:void 0}function re(e){var t,r,s={};for(r in e)a(e,r)&&(t=te(r))&&(s[t]=e[r]);return s}var se={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ne(e){var t,r=[];for(t in e)a(e,t)&&r.push({unit:t,priority:se[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}var ie,ae=/\d/,oe=/\d\d/,ce=/\d{3}/,ue=/\d{4}/,le=/[+-]?\d{6}/,pe=/\d\d?/,me=/\d\d\d\d?/,de=/\d\d\d\d\d\d?/,fe=/\d{1,3}/,he=/\d{1,4}/,_e=/[+-]?\d{1,6}/,Ee=/\d+/,Se=/[+-]?\d+/,Re=/Z|[+-]\d\d:?\d\d/gi,ge=/Z|[+-]\d\d(?::?\d\d)?/gi,Ae=/[+-]?\d+(\.\d{1,3})?/,Te=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ve=/^[1-9]\d?/,be=/^([1-9]\d|\d)/;function Ie(e,t,r){ie[e]=O(t)?t:function(e,s){return e&&r?r:t}}function Ne(e,t){return a(ie,e)?ie[e](t._strict,t._locale):new RegExp(ye(e))}function ye(e){return Oe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,s,n){return t||r||s||n})))}function Oe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $e(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Ce(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=$e(t)),r}ie={};var Le={};function De(e,t){var r,s,n=t;for("string"==typeof e&&(e=[e]),u(t)&&(n=function(e,r){r[t]=Ce(e)}),s=e.length,r=0;r<s;r++)Le[e[r]]=n}function Pe(e,t){De(e,(function(e,r,s,n){s._w=s._w||{},t(e,s._w,s,n)}))}function xe(e,t,r){null!=t&&a(Le,e)&&Le[e](t,r._a,r,e)}function Me(e){return e%4==0&&e%100!=0||e%400==0}var Fe=0,we=1,Ue=2,Ge=3,Ye=4,ke=5,Be=6,je=7,Xe=8;function He(e){return Me(e)?366:365}G("Y",0,0,(function(){var e=this.year();return e<=9999?x(e,4):"+"+e})),G(0,["YY",2],0,(function(){return this.year()%100})),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),Ie("Y",Se),Ie("YY",pe,oe),Ie("YYYY",he,ue),Ie("YYYYY",_e,le),Ie("YYYYYY",_e,le),De(["YYYYY","YYYYYY"],Fe),De("YYYY",(function(e,t){t[Fe]=2===e.length?r.parseTwoDigitYear(e):Ce(e)})),De("YY",(function(e,t){t[Fe]=r.parseTwoDigitYear(e)})),De("Y",(function(e,t){t[Fe]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return Ce(e)+(Ce(e)>68?1900:2e3)};var Ke,qe=Ve("FullYear",!0);function We(){return Me(this.year())}function Ve(e,t){return function(s){return null!=s?(Ze(this,e,s),r.updateOffset(this,t),this):ze(this,e)}}function ze(e,t){if(!e.isValid())return NaN;var r=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return s?r.getUTCSeconds():r.getSeconds();case"Minutes":return s?r.getUTCMinutes():r.getMinutes();case"Hours":return s?r.getUTCHours():r.getHours();case"Date":return s?r.getUTCDate():r.getDate();case"Day":return s?r.getUTCDay():r.getDay();case"Month":return s?r.getUTCMonth():r.getMonth();case"FullYear":return s?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Ze(e,t,r){var s,n,i,a,o;if(e.isValid()&&!isNaN(r)){switch(s=e._d,n=e._isUTC,t){case"Milliseconds":return void(n?s.setUTCMilliseconds(r):s.setMilliseconds(r));case"Seconds":return void(n?s.setUTCSeconds(r):s.setSeconds(r));case"Minutes":return void(n?s.setUTCMinutes(r):s.setMinutes(r));case"Hours":return void(n?s.setUTCHours(r):s.setHours(r));case"Date":return void(n?s.setUTCDate(r):s.setDate(r));case"FullYear":break;default:return}i=r,a=e.month(),o=29!==(o=e.date())||1!==a||Me(i)?o:28,n?s.setUTCFullYear(i,a,o):s.setFullYear(i,a,o)}}function Qe(e){return O(this[e=te(e)])?this[e]():this}function Je(e,t){if("object"==typeof e){var r,s=ne(e=re(e)),n=s.length;for(r=0;r<n;r++)this[s[r].unit](e[s[r].unit])}else if(O(this[e=te(e)]))return this[e](t);return this}function et(e,t){return(e%t+t)%t}function tt(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=et(t,12);return e+=(t-r)/12,1===r?Me(e)?29:28:31-r%7%2}Ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},G("M",["MM",2],"Mo",(function(){return this.month()+1})),G("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),G("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Ie("M",pe,ve),Ie("MM",pe,oe),Ie("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ie("MMMM",(function(e,t){return t.monthsRegex(e)})),De(["M","MM"],(function(e,t){t[we]=Ce(e)-1})),De(["MMM","MMMM"],(function(e,t,r,s){var n=r._locale.monthsParse(e,s,r._strict);null!=n?t[we]=n:h(r).invalidMonth=e}));var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),st="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=Te,at=Te;function ot(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone}function ct(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ut(e,t,r){var s,n,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)i=d([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(i,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(n=Ke.call(this._shortMonthsParse,a))?n:null:-1!==(n=Ke.call(this._longMonthsParse,a))?n:null:"MMM"===t?-1!==(n=Ke.call(this._shortMonthsParse,a))||-1!==(n=Ke.call(this._longMonthsParse,a))?n:null:-1!==(n=Ke.call(this._longMonthsParse,a))||-1!==(n=Ke.call(this._shortMonthsParse,a))?n:null}function lt(e,t,r){var s,n,i;if(this._monthsParseExact)return ut.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=d([2e3,s]),r&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),r||this._monthsParse[s]||(i="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(r&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!r&&this._monthsParse[s].test(e))return s}}function pt(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Ce(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var r=t,s=e.date();return s=s<29?s:Math.min(s,tt(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,s):e._d.setMonth(r,s),e}function mt(e){return null!=e?(pt(this,e),r.updateOffset(this,!0),this):ze(this,"Month")}function dt(){return tt(this.year(),this.month())}function ft(e){return this._monthsParseExact?(a(this,"_monthsRegex")||_t.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ht(e){return this._monthsParseExact?(a(this,"_monthsRegex")||_t.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=at),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function _t(){function e(e,t){return t.length-e.length}var t,r,s,n,i=[],a=[],o=[];for(t=0;t<12;t++)r=d([2e3,t]),s=Oe(this.monthsShort(r,"")),n=Oe(this.months(r,"")),i.push(s),a.push(n),o.push(n),o.push(s);i.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Et(e,t,r,s,n,i,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,r,s,n,i,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,r,s,n,i,a),o}function St(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Rt(e,t,r){var s=7+t-r;return-(7+St(e,0,s).getUTCDay()-t)%7+s-1}function gt(e,t,r,s,n){var i,a,o=1+7*(t-1)+(7+r-s)%7+Rt(e,s,n);return o<=0?a=He(i=e-1)+o:o>He(e)?(i=e+1,a=o-He(e)):(i=e,a=o),{year:i,dayOfYear:a}}function At(e,t,r){var s,n,i=Rt(e.year(),t,r),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?s=a+Tt(n=e.year()-1,t,r):a>Tt(e.year(),t,r)?(s=a-Tt(e.year(),t,r),n=e.year()+1):(n=e.year(),s=a),{week:s,year:n}}function Tt(e,t,r){var s=Rt(e,t,r),n=Rt(e+1,t,r);return(He(e)-s+n)/7}function vt(e){return At(e,this._week.dow,this._week.doy).week}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),Ie("w",pe,ve),Ie("ww",pe,oe),Ie("W",pe,ve),Ie("WW",pe,oe),Pe(["w","ww","W","WW"],(function(e,t,r,s){t[s.substr(0,1)]=Ce(e)}));var bt={dow:0,doy:6};function It(){return this._week.dow}function Nt(){return this._week.doy}function yt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ot(e){var t=At(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function $t(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ct(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lt(e,t){return e.slice(t,7).concat(e.slice(0,t))}G("d",0,"do","day"),G("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),G("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),G("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),Ie("d",pe),Ie("e",pe),Ie("E",pe),Ie("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ie("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ie("dddd",(function(e,t){return t.weekdaysRegex(e)})),Pe(["dd","ddd","dddd"],(function(e,t,r,s){var n=r._locale.weekdaysParse(e,s,r._strict);null!=n?t.d=n:h(r).invalidWeekday=e})),Pe(["d","e","E"],(function(e,t,r,s){t[s]=Ce(e)}));var Dt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Mt=Te,Ft=Te,wt=Te;function Ut(e,t){var r=n(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Lt(r,this._week.dow):e?r[e.day()]:r}function Gt(e){return!0===e?Lt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Yt(e){return!0===e?Lt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function kt(e,t,r){var s,n,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)i=d([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(n=Ke.call(this._weekdaysParse,a))?n:null:"ddd"===t?-1!==(n=Ke.call(this._shortWeekdaysParse,a))?n:null:-1!==(n=Ke.call(this._minWeekdaysParse,a))?n:null:"dddd"===t?-1!==(n=Ke.call(this._weekdaysParse,a))||-1!==(n=Ke.call(this._shortWeekdaysParse,a))||-1!==(n=Ke.call(this._minWeekdaysParse,a))?n:null:"ddd"===t?-1!==(n=Ke.call(this._shortWeekdaysParse,a))||-1!==(n=Ke.call(this._weekdaysParse,a))||-1!==(n=Ke.call(this._minWeekdaysParse,a))?n:null:-1!==(n=Ke.call(this._minWeekdaysParse,a))||-1!==(n=Ke.call(this._weekdaysParse,a))||-1!==(n=Ke.call(this._shortWeekdaysParse,a))?n:null}function Bt(e,t,r){var s,n,i;if(this._weekdaysParseExact)return kt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(n=d([2e3,1]).day(s),r&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(r&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(r&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!r&&this._weekdaysParse[s].test(e))return s}}function jt(e){if(!this.isValid())return null!=e?this:NaN;var t=ze(this,"Day");return null!=e?(e=$t(e,this.localeData()),this.add(e-t,"d")):t}function Xt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ht(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ct(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Kt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Vt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Mt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Vt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Vt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=wt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Vt(){function e(e,t){return t.length-e.length}var t,r,s,n,i,a=[],o=[],c=[],u=[];for(t=0;t<7;t++)r=d([2e3,1]).day(t),s=Oe(this.weekdaysMin(r,"")),n=Oe(this.weekdaysShort(r,"")),i=Oe(this.weekdays(r,"")),a.push(s),o.push(n),c.push(i),u.push(s),u.push(n),u.push(i);a.sort(e),o.sort(e),c.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function zt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Qt(e,t){G(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Jt(e,t){return t._meridiemParse}function er(e){return"p"===(e+"").toLowerCase().charAt(0)}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,zt),G("k",["kk",2],0,Zt),G("hmm",0,0,(function(){return""+zt.apply(this)+x(this.minutes(),2)})),G("hmmss",0,0,(function(){return""+zt.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)})),G("Hmm",0,0,(function(){return""+this.hours()+x(this.minutes(),2)})),G("Hmmss",0,0,(function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),Ie("a",Jt),Ie("A",Jt),Ie("H",pe,be),Ie("h",pe,ve),Ie("k",pe,ve),Ie("HH",pe,oe),Ie("hh",pe,oe),Ie("kk",pe,oe),Ie("hmm",me),Ie("hmmss",de),Ie("Hmm",me),Ie("Hmmss",de),De(["H","HH"],Ge),De(["k","kk"],(function(e,t,r){var s=Ce(e);t[Ge]=24===s?0:s})),De(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),De(["h","hh"],(function(e,t,r){t[Ge]=Ce(e),h(r).bigHour=!0})),De("hmm",(function(e,t,r){var s=e.length-2;t[Ge]=Ce(e.substr(0,s)),t[Ye]=Ce(e.substr(s)),h(r).bigHour=!0})),De("hmmss",(function(e,t,r){var s=e.length-4,n=e.length-2;t[Ge]=Ce(e.substr(0,s)),t[Ye]=Ce(e.substr(s,2)),t[ke]=Ce(e.substr(n)),h(r).bigHour=!0})),De("Hmm",(function(e,t,r){var s=e.length-2;t[Ge]=Ce(e.substr(0,s)),t[Ye]=Ce(e.substr(s))})),De("Hmmss",(function(e,t,r){var s=e.length-4,n=e.length-2;t[Ge]=Ce(e.substr(0,s)),t[Ye]=Ce(e.substr(s,2)),t[ke]=Ce(e.substr(n))}));var tr=/[ap]\.?m?\.?/i,rr=Ve("Hours",!0);function sr(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var nr,ir={calendar:D,longDateFormat:X,invalidDate:K,ordinal:W,dayOfMonthOrdinalParse:V,relativeTime:Z,months:rt,monthsShort:st,week:bt,weekdays:Dt,weekdaysMin:xt,weekdaysShort:Pt,meridiemParse:tr},ar={},or={};function cr(e,t){var r,s=Math.min(e.length,t.length);for(r=0;r<s;r+=1)if(e[r]!==t[r])return r;return s}function ur(e){return e?e.toLowerCase().replace("_","-"):e}function lr(e){for(var t,r,s,n,i=0;i<e.length;){for(t=(n=ur(e[i]).split("-")).length,r=(r=ur(e[i+1]))?r.split("-"):null;t>0;){if(s=mr(n.slice(0,t).join("-")))return s;if(r&&r.length>=t&&cr(n,r)>=t-1)break;t--}i++}return nr}function pr(e){return!(!e||!e.match("^[^/\\\\]*$"))}function mr(e){var t=null;if(void 0===ar[e]&&module&&module.exports&&pr(e))try{t=nr._abbr,commonjsRequire("./locale/"+e),dr(t)}catch(t){ar[e]=null}return ar[e]}function dr(e,t){var r;return e&&((r=c(t)?_r(e):fr(e,t))?nr=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nr._abbr}function fr(e,t){if(null!==t){var r,s=ir;if(t.abbr=e,null!=ar[e])y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=ar[e]._config;else if(null!=t.parentLocale)if(null!=ar[t.parentLocale])s=ar[t.parentLocale]._config;else{if(null==(r=mr(t.parentLocale)))return or[t.parentLocale]||(or[t.parentLocale]=[]),or[t.parentLocale].push({name:e,config:t}),null;s=r._config}return ar[e]=new L(C(s,t)),or[e]&&or[e].forEach((function(e){fr(e.name,e.config)})),dr(e),ar[e]}return delete ar[e],null}function hr(e,t){if(null!=t){var r,s,n=ir;null!=ar[e]&&null!=ar[e].parentLocale?ar[e].set(C(ar[e]._config,t)):(null!=(s=mr(e))&&(n=s._config),t=C(n,t),null==s&&(t.abbr=e),(r=new L(t)).parentLocale=ar[e],ar[e]=r),dr(e)}else null!=ar[e]&&(null!=ar[e].parentLocale?(ar[e]=ar[e].parentLocale,e===dr()&&dr(e)):null!=ar[e]&&delete ar[e]);return ar[e]}function _r(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nr;if(!n(e)){if(t=mr(e))return t;e=[e]}return lr(e)}function Er(){return I(ar)}function Sr(e){var t,r=e._a;return r&&-2===h(e).overflow&&(t=r[we]<0||r[we]>11?we:r[Ue]<1||r[Ue]>tt(r[Fe],r[we])?Ue:r[Ge]<0||r[Ge]>24||24===r[Ge]&&(0!==r[Ye]||0!==r[ke]||0!==r[Be])?Ge:r[Ye]<0||r[Ye]>59?Ye:r[ke]<0||r[ke]>59?ke:r[Be]<0||r[Be]>999?Be:-1,h(e)._overflowDayOfYear&&(t<Fe||t>Ue)&&(t=Ue),h(e)._overflowWeeks&&-1===t&&(t=je),h(e)._overflowWeekday&&-1===t&&(t=Xe),h(e).overflow=t),e}var Rr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ar=/Z|[+-]\d\d(?::?\d\d)?/,Tr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],vr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],br=/^\/?Date\((-?\d+)/i,Ir=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Nr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yr(e){var t,r,s,n,i,a,o=e._i,c=Rr.exec(o)||gr.exec(o),u=Tr.length,l=vr.length;if(c){for(h(e).iso=!0,t=0,r=u;t<r;t++)if(Tr[t][1].exec(c[1])){n=Tr[t][0],s=!1!==Tr[t][2];break}if(null==n)return void(e._isValid=!1);if(c[3]){for(t=0,r=l;t<r;t++)if(vr[t][1].exec(c[3])){i=(c[2]||" ")+vr[t][0];break}if(null==i)return void(e._isValid=!1)}if(!s&&null!=i)return void(e._isValid=!1);if(c[4]){if(!Ar.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=n+(i||"")+(a||""),Gr(e)}else e._isValid=!1}function Or(e,t,r,s,n,i){var a=[$r(e),st.indexOf(t),parseInt(r,10),parseInt(s,10),parseInt(n,10)];return i&&a.push(parseInt(i,10)),a}function $r(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Cr(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Lr(e,t,r){return!e||Pt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Dr(e,t,r){if(e)return Nr[e];if(t)return 0;var s=parseInt(r,10),n=s%100;return(s-n)/100*60+n}function Pr(e){var t,r=Ir.exec(Cr(e._i));if(r){if(t=Or(r[4],r[3],r[2],r[5],r[6],r[7]),!Lr(r[1],t,e))return;e._a=t,e._tzm=Dr(r[8],r[9],r[10]),e._d=St.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function xr(e){var t=br.exec(e._i);null===t?(yr(e),!1===e._isValid&&(delete e._isValid,Pr(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Mr(e,t,r){return null!=e?e:null!=t?t:r}function Fr(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function wr(e){var t,r,s,n,i,a=[];if(!e._d){for(s=Fr(e),e._w&&null==e._a[Ue]&&null==e._a[we]&&Ur(e),null!=e._dayOfYear&&(i=Mr(e._a[Fe],s[Fe]),(e._dayOfYear>He(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),r=St(i,0,e._dayOfYear),e._a[we]=r.getUTCMonth(),e._a[Ue]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[Ye]&&0===e._a[ke]&&0===e._a[Be]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?St:Et).apply(null,a),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(h(e).weekdayMismatch=!0)}}function Ur(e){var t,r,s,n,i,a,o,c,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,a=4,r=Mr(t.GG,e._a[Fe],At(qr(),1,4).year),s=Mr(t.W,1),((n=Mr(t.E,1))<1||n>7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,u=At(qr(),i,a),r=Mr(t.gg,e._a[Fe],u.year),s=Mr(t.w,u.week),null!=t.d?((n=t.d)<0||n>6)&&(c=!0):null!=t.e?(n=t.e+i,(t.e<0||t.e>6)&&(c=!0)):n=i),s<1||s>Tt(r,i,a)?h(e)._overflowWeeks=!0:null!=c?h(e)._overflowWeekday=!0:(o=gt(r,s,n,i,a),e._a[Fe]=o.year,e._dayOfYear=o.dayOfYear)}function Gr(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],h(e).empty=!0;var t,s,n,i,a,o,c,u=""+e._i,l=u.length,p=0;for(c=(n=j(e._f,e._locale).match(M)||[]).length,t=0;t<c;t++)i=n[t],(s=(u.match(Ne(i,e))||[])[0])&&((a=u.substr(0,u.indexOf(s))).length>0&&h(e).unusedInput.push(a),u=u.slice(u.indexOf(s)+s.length),p+=s.length),U[i]?(s?h(e).empty=!1:h(e).unusedTokens.push(i),xe(i,s,e)):e._strict&&!s&&h(e).unusedTokens.push(i);h(e).charsLeftOver=l-p,u.length>0&&h(e).unusedInput.push(u),e._a[Ge]<=12&&!0===h(e).bigHour&&e._a[Ge]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[Ge]=Yr(e._locale,e._a[Ge],e._meridiem),null!==(o=h(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(o,e._a[Fe])),wr(e),Sr(e)}else Pr(e);else yr(e)}function Yr(e,t,r){var s;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((s=e.isPM(r))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function kr(e){var t,r,s,n,i,a,o=!1,c=e._f.length;if(0===c)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<c;n++)i=0,a=!1,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[n],Gr(t),_(t)&&(a=!0),i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,o?i<s&&(s=i,r=t):(null==s||i<s||a)&&(s=i,r=t,a&&(o=!0));m(e,r||t)}function Br(e){if(!e._d){var t=re(e._i),r=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wr(e)}}function jr(e){var t=new A(Sr(Xr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Xr(e){var t=e._i,r=e._f;return e._locale=e._locale||_r(e._l),null===t||void 0===r&&""===t?E({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new A(Sr(t)):(l(t)?e._d=t:n(r)?kr(e):r?Gr(e):Hr(e),_(e)||(e._d=null),e))}function Hr(e){var t=e._i;c(t)?e._d=new Date(r.now()):l(t)?e._d=new Date(t.valueOf()):"string"==typeof t?xr(e):n(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),wr(e)):i(t)?Br(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Kr(e,t,r,s,a){var c={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==r&&!1!==r||(s=r,r=void 0),(i(e)&&o(e)||n(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=a,c._l=r,c._i=e,c._f=t,c._strict=s,jr(c)}function qr(e,t,r,s){return Kr(e,t,r,s,!1)}r.createFromInputFallback=b("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Wr=b("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:E()})),Vr=b("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:E()}));function zr(e,t){var r,s;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return qr();for(r=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](r)||(r=t[s]);return r}function Zr(){return zr("isBefore",[].slice.call(arguments,0))}function Qr(){return zr("isAfter",[].slice.call(arguments,0))}var Jr=function(){return Date.now?Date.now():+new Date},es=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ts(e){var t,r,s=!1,n=es.length;for(t in e)if(a(e,t)&&(-1===Ke.call(es,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<n;++r)if(e[es[r]]){if(s)return!1;parseFloat(e[es[r]])!==Ce(e[es[r]])&&(s=!0)}return!0}function rs(){return this._isValid}function ss(){return Ns(NaN)}function ns(e){var t=re(e),r=t.year||0,s=t.quarter||0,n=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=ts(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*o*60*60,this._days=+a+7*i,this._months=+n+3*s+12*r,this._data={},this._locale=_r(),this._bubble()}function is(e){return e instanceof ns}function as(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function os(e,t,r){var s,n=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(s=0;s<n;s++)Ce(e[s])!==Ce(t[s])&&a++;return a+i}function cs(e,t){G(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+x(~~(e/60),2)+t+x(~~e%60,2)}))}cs("Z",":"),cs("ZZ",""),Ie("Z",ge),Ie("ZZ",ge),De(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=ls(ge,e)}));var us=/([\+\-]|\d\d)/gi;function ls(e,t){var r,s,n=(t||"").match(e);return null===n?null:0===(s=60*(r=((n[n.length-1]||[])+"").match(us)||["-",0,0])[1]+Ce(r[2]))?0:"+"===r[0]?s:-s}function ps(e,t){var s,n;return t._isUTC?(s=t.clone(),n=(T(e)||l(e)?e.valueOf():qr(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+n),r.updateOffset(s,!1),s):qr(e).local()}function ms(e){return-Math.round(e._d.getTimezoneOffset())}function ds(e,t,s){var n,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=ls(ge,e)))return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&t&&(n=ms(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?Ls(this,Ns(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:ms(this)}function fs(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function hs(e){return this.utcOffset(0,e)}function _s(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(ms(this),"m")),this}function Es(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=ls(Re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Ss(e){return!!this.isValid()&&(e=e?qr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Rs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function gs(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return g(t,this),(t=Xr(t))._a?(e=t._isUTC?d(t._a):qr(t._a),this._isDSTShifted=this.isValid()&&os(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function As(){return!!this.isValid()&&!this._isUTC}function Ts(){return!!this.isValid()&&this._isUTC}function vs(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var bs=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Is=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ns(e,t){var r,s,n,i=e,o=null;return is(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(o=bs.exec(e))?(r="-"===o[1]?-1:1,i={y:0,d:Ce(o[Ue])*r,h:Ce(o[Ge])*r,m:Ce(o[Ye])*r,s:Ce(o[ke])*r,ms:Ce(as(1e3*o[Be]))*r}):(o=Is.exec(e))?(r="-"===o[1]?-1:1,i={y:ys(o[2],r),M:ys(o[3],r),w:ys(o[4],r),d:ys(o[5],r),h:ys(o[6],r),m:ys(o[7],r),s:ys(o[8],r)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(n=$s(qr(i.from),qr(i.to)),(i={}).ms=n.milliseconds,i.M=n.months),s=new ns(i),is(e)&&a(e,"_locale")&&(s._locale=e._locale),is(e)&&a(e,"_isValid")&&(s._isValid=e._isValid),s}function ys(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Os(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function $s(e,t){var r;return e.isValid()&&t.isValid()?(t=ps(t,e),e.isBefore(t)?r=Os(e,t):((r=Os(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Cs(e,t){return function(r,s){var n;return null===s||isNaN(+s)||(y(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=r,r=s,s=n),Ls(this,Ns(r,s),e),this}}function Ls(e,t,s,n){var i=t._milliseconds,a=as(t._days),o=as(t._months);e.isValid()&&(n=null==n||n,o&&pt(e,ze(e,"Month")+o*s),a&&Ze(e,"Date",ze(e,"Date")+a*s),i&&e._d.setTime(e._d.valueOf()+i*s),n&&r.updateOffset(e,a||o))}Ns.fn=ns.prototype,Ns.invalid=ss;var Ds=Cs(1,"add"),Ps=Cs(-1,"subtract");function xs(e){return"string"==typeof e||e instanceof String}function Ms(e){return T(e)||l(e)||xs(e)||u(e)||ws(e)||Fs(e)||null==e}function Fs(e){var t,r,s=i(e)&&!o(e),n=!1,c=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=c.length;for(t=0;t<u;t+=1)r=c[t],n=n||a(e,r);return s&&n}function ws(e){var t=n(e),r=!1;return t&&(r=0===e.filter((function(t){return!u(t)&&xs(e)})).length),t&&r}function Us(e){var t,r,s=i(e)&&!o(e),n=!1,c=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<c.length;t+=1)r=c[t],n=n||a(e,r);return s&&n}function Gs(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Ys(e,t){1===arguments.length&&(arguments[0]?Ms(arguments[0])?(e=arguments[0],t=void 0):Us(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||qr(),n=ps(s,this).startOf("day"),i=r.calendarFormat(this,n)||"sameElse",a=t&&(O(t[i])?t[i].call(this,s):t[i]);return this.format(a||this.localeData().calendar(i,this,qr(s)))}function ks(){return new A(this)}function Bs(e,t){var r=T(e)?e:qr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=te(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function js(e,t){var r=T(e)?e:qr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=te(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function Xs(e,t,r,s){var n=T(e)?e:qr(e),i=T(t)?t:qr(t);return!!(this.isValid()&&n.isValid()&&i.isValid())&&("("===(s=s||"()")[0]?this.isAfter(n,r):!this.isBefore(n,r))&&(")"===s[1]?this.isBefore(i,r):!this.isAfter(i,r))}function Hs(e,t){var r,s=T(e)?e:qr(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=te(t)||"millisecond")?this.valueOf()===s.valueOf():(r=s.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Ks(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function qs(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ws(e,t,r){var s,n,i;if(!this.isValid())return NaN;if(!(s=ps(e,this)).isValid())return NaN;switch(n=6e4*(s.utcOffset()-this.utcOffset()),t=te(t)){case"year":i=Vs(this,s)/12;break;case"month":i=Vs(this,s);break;case"quarter":i=Vs(this,s)/3;break;case"second":i=(this-s)/1e3;break;case"minute":i=(this-s)/6e4;break;case"hour":i=(this-s)/36e5;break;case"day":i=(this-s-n)/864e5;break;case"week":i=(this-s-n)/6048e5;break;default:i=this-s}return r?i:$e(i)}function Vs(e,t){if(e.date()<t.date())return-Vs(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(r,"months");return-(r+(t-s<0?(t-s)/(s-e.clone().add(r-1,"months")):(t-s)/(e.clone().add(r+1,"months")-s)))||0}function zs(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zs(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?B(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(r,"Z")):B(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Qs(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,s,n="moment",i="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",s=i+'[")]',this.format(e+t+r+s)}function Js(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)}function en(e,t){return this.isValid()&&(T(e)&&e.isValid()||qr(e).isValid())?Ns({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function tn(e){return this.from(qr(),e)}function rn(e,t){return this.isValid()&&(T(e)&&e.isValid()||qr(e).isValid())?Ns({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function sn(e){return this.to(qr(),e)}function nn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=_r(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function on(){return this._locale}var cn=1e3,un=60*cn,ln=60*un,pn=3506328*ln;function mn(e,t){return(e%t+t)%t}function dn(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-pn:new Date(e,t,r).valueOf()}function fn(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-pn:Date.UTC(e,t,r)}function hn(e){var t,s;if(void 0===(e=te(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?fn:dn,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mn(t+(this._isUTC?0:this.utcOffset()*un),ln);break;case"minute":t=this._d.valueOf(),t-=mn(t,un);break;case"second":t=this._d.valueOf(),t-=mn(t,cn)}return this._d.setTime(t),r.updateOffset(this,!0),this}function _n(e){var t,s;if(void 0===(e=te(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?fn:dn,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ln-mn(t+(this._isUTC?0:this.utcOffset()*un),ln)-1;break;case"minute":t=this._d.valueOf(),t+=un-mn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=cn-mn(t,cn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function En(){return this._d.valueOf()-6e4*(this._offset||0)}function Sn(){return Math.floor(this.valueOf()/1e3)}function Rn(){return new Date(this.valueOf())}function gn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function An(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Tn(){return this.isValid()?this.toISOString():null}function vn(){return _(this)}function bn(){return m({},h(this))}function In(){return h(this).overflow}function Nn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function yn(e,t){var s,n,i,a=this._eras||_r("en")._eras;for(s=0,n=a.length;s<n;++s)switch("string"==typeof a[s].since&&(i=r(a[s].since).startOf("day"),a[s].since=i.valueOf()),typeof a[s].until){case"undefined":a[s].until=1/0;break;case"string":i=r(a[s].until).startOf("day").valueOf(),a[s].until=i.valueOf()}return a}function On(e,t,r){var s,n,i,a,o,c=this.eras();for(e=e.toUpperCase(),s=0,n=c.length;s<n;++s)if(i=c[s].name.toUpperCase(),a=c[s].abbr.toUpperCase(),o=c[s].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return c[s];break;case"NNNN":if(i===e)return c[s];break;case"NNNNN":if(o===e)return c[s]}else if([i,a,o].indexOf(e)>=0)return c[s]}function $n(e,t){var s=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*s}function Cn(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until)return s[e].name;if(s[e].until<=r&&r<=s[e].since)return s[e].name}return""}function Ln(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until)return s[e].narrow;if(s[e].until<=r&&r<=s[e].since)return s[e].narrow}return""}function Dn(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),s[e].since<=r&&r<=s[e].until)return s[e].abbr;if(s[e].until<=r&&r<=s[e].since)return s[e].abbr}return""}function Pn(){var e,t,s,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(s=i[e].since<=i[e].until?1:-1,n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return(this.year()-r(i[e].since).year())*s+i[e].offset;return this.year()}function xn(e){return a(this,"_erasNameRegex")||kn.call(this),e?this._erasNameRegex:this._erasRegex}function Mn(e){return a(this,"_erasAbbrRegex")||kn.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fn(e){return a(this,"_erasNarrowRegex")||kn.call(this),e?this._erasNarrowRegex:this._erasRegex}function wn(e,t){return t.erasAbbrRegex(e)}function Un(e,t){return t.erasNameRegex(e)}function Gn(e,t){return t.erasNarrowRegex(e)}function Yn(e,t){return t._eraYearOrdinalRegex||Ee}function kn(){var e,t,r,s,n,i=[],a=[],o=[],c=[],u=this.eras();for(e=0,t=u.length;e<t;++e)r=Oe(u[e].name),s=Oe(u[e].abbr),n=Oe(u[e].narrow),a.push(r),i.push(s),o.push(n),c.push(r),c.push(s),c.push(n);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Bn(e,t){G(0,[e,e.length],0,t)}function jn(e){return Vn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Xn(e){return Vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Hn(){return Tt(this.year(),1,4)}function Kn(){return Tt(this.isoWeekYear(),1,4)}function qn(){var e=this.localeData()._week;return Tt(this.year(),e.dow,e.doy)}function Wn(){var e=this.localeData()._week;return Tt(this.weekYear(),e.dow,e.doy)}function Vn(e,t,r,s,n){var i;return null==e?At(this,s,n).year:(t>(i=Tt(e,s,n))&&(t=i),zn.call(this,e,t,r,s,n))}function zn(e,t,r,s,n){var i=gt(e,t,r,s,n),a=St(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}G("N",0,0,"eraAbbr"),G("NN",0,0,"eraAbbr"),G("NNN",0,0,"eraAbbr"),G("NNNN",0,0,"eraName"),G("NNNNN",0,0,"eraNarrow"),G("y",["y",1],"yo","eraYear"),G("y",["yy",2],0,"eraYear"),G("y",["yyy",3],0,"eraYear"),G("y",["yyyy",4],0,"eraYear"),Ie("N",wn),Ie("NN",wn),Ie("NNN",wn),Ie("NNNN",Un),Ie("NNNNN",Gn),De(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,s){var n=r._locale.erasParse(e,s,r._strict);n?h(r).era=n:h(r).invalidEra=e})),Ie("y",Ee),Ie("yy",Ee),Ie("yyy",Ee),Ie("yyyy",Ee),Ie("yo",Yn),De(["y","yy","yyy","yyyy"],Fe),De(["yo"],(function(e,t,r,s){var n;r._locale._eraYearOrdinalRegex&&(n=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Fe]=r._locale.eraYearOrdinalParse(e,n):t[Fe]=parseInt(e,10)})),G(0,["gg",2],0,(function(){return this.weekYear()%100})),G(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Bn("gggg","weekYear"),Bn("ggggg","weekYear"),Bn("GGGG","isoWeekYear"),Bn("GGGGG","isoWeekYear"),Ie("G",Se),Ie("g",Se),Ie("GG",pe,oe),Ie("gg",pe,oe),Ie("GGGG",he,ue),Ie("gggg",he,ue),Ie("GGGGG",_e,le),Ie("ggggg",_e,le),Pe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,s){t[s.substr(0,2)]=Ce(e)})),Pe(["gg","GG"],(function(e,t,s,n){t[n]=r.parseTwoDigitYear(e)})),G("Q",0,"Qo","quarter"),Ie("Q",ae),De("Q",(function(e,t){t[we]=3*(Ce(e)-1)})),G("D",["DD",2],"Do","date"),Ie("D",pe,ve),Ie("DD",pe,oe),Ie("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),De(["D","DD"],Ue),De("Do",(function(e,t){t[Ue]=Ce(e.match(pe)[0])}));var Qn=Ve("Date",!0);function Jn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}G("DDD",["DDDD",3],"DDDo","dayOfYear"),Ie("DDD",fe),Ie("DDDD",ce),De(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=Ce(e)})),G("m",["mm",2],0,"minute"),Ie("m",pe,be),Ie("mm",pe,oe),De(["m","mm"],Ye);var ei=Ve("Minutes",!1);G("s",["ss",2],0,"second"),Ie("s",pe,be),Ie("ss",pe,oe),De(["s","ss"],ke);var ti,ri,si=Ve("Seconds",!1);for(G("S",0,0,(function(){return~~(this.millisecond()/100)})),G(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),G(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),G(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),G(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),G(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),G(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Ie("S",fe,ae),Ie("SS",fe,oe),Ie("SSS",fe,ce),ti="SSSS";ti.length<=9;ti+="S")Ie(ti,Ee);function ni(e,t){t[Be]=Ce(1e3*("0."+e))}for(ti="S";ti.length<=9;ti+="S")De(ti,ni);function ii(){return this._isUTC?"UTC":""}function ai(){return this._isUTC?"Coordinated Universal Time":""}ri=Ve("Milliseconds",!1),G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var oi=A.prototype;function ci(e){return qr(1e3*e)}function ui(){return qr.apply(null,arguments).parseZone()}function li(e){return e}oi.add=Ds,oi.calendar=Ys,oi.clone=ks,oi.diff=Ws,oi.endOf=_n,oi.format=Js,oi.from=en,oi.fromNow=tn,oi.to=rn,oi.toNow=sn,oi.get=Qe,oi.invalidAt=In,oi.isAfter=Bs,oi.isBefore=js,oi.isBetween=Xs,oi.isSame=Hs,oi.isSameOrAfter=Ks,oi.isSameOrBefore=qs,oi.isValid=vn,oi.lang=an,oi.locale=nn,oi.localeData=on,oi.max=Vr,oi.min=Wr,oi.parsingFlags=bn,oi.set=Je,oi.startOf=hn,oi.subtract=Ps,oi.toArray=gn,oi.toObject=An,oi.toDate=Rn,oi.toISOString=Zs,oi.inspect=Qs,"undefined"!=typeof Symbol&&null!=Symbol.for&&(oi[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),oi.toJSON=Tn,oi.toString=zs,oi.unix=Sn,oi.valueOf=En,oi.creationData=Nn,oi.eraName=Cn,oi.eraNarrow=Ln,oi.eraAbbr=Dn,oi.eraYear=Pn,oi.year=qe,oi.isLeapYear=We,oi.weekYear=jn,oi.isoWeekYear=Xn,oi.quarter=oi.quarters=Zn,oi.month=mt,oi.daysInMonth=dt,oi.week=oi.weeks=yt,oi.isoWeek=oi.isoWeeks=Ot,oi.weeksInYear=qn,oi.weeksInWeekYear=Wn,oi.isoWeeksInYear=Hn,oi.isoWeeksInISOWeekYear=Kn,oi.date=Qn,oi.day=oi.days=jt,oi.weekday=Xt,oi.isoWeekday=Ht,oi.dayOfYear=Jn,oi.hour=oi.hours=rr,oi.minute=oi.minutes=ei,oi.second=oi.seconds=si,oi.millisecond=oi.milliseconds=ri,oi.utcOffset=ds,oi.utc=hs,oi.local=_s,oi.parseZone=Es,oi.hasAlignedHourOffset=Ss,oi.isDST=Rs,oi.isLocal=As,oi.isUtcOffset=Ts,oi.isUtc=vs,oi.isUTC=vs,oi.zoneAbbr=ii,oi.zoneName=ai,oi.dates=b("dates accessor is deprecated. Use date instead.",Qn),oi.months=b("months accessor is deprecated. Use month instead",mt),oi.years=b("years accessor is deprecated. Use year instead",qe),oi.zone=b("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",fs),oi.isDSTShifted=b("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",gs);var pi=L.prototype;function mi(e,t,r,s){var n=_r(),i=d().set(s,t);return n[r](i,e)}function di(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return mi(e,t,r,"month");var s,n=[];for(s=0;s<12;s++)n[s]=mi(e,s,r,"month");return n}function fi(e,t,r,s){"boolean"==typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var n,i=_r(),a=e?i._week.dow:0,o=[];if(null!=r)return mi(t,(r+a)%7,s,"day");for(n=0;n<7;n++)o[n]=mi(t,(n+a)%7,s,"day");return o}function hi(e,t){return di(e,t,"months")}function _i(e,t){return di(e,t,"monthsShort")}function Ei(e,t,r){return fi(e,t,r,"weekdays")}function Si(e,t,r){return fi(e,t,r,"weekdaysShort")}function Ri(e,t,r){return fi(e,t,r,"weekdaysMin")}pi.calendar=P,pi.longDateFormat=H,pi.invalidDate=q,pi.ordinal=z,pi.preparse=li,pi.postformat=li,pi.relativeTime=Q,pi.pastFuture=J,pi.set=$,pi.eras=yn,pi.erasParse=On,pi.erasConvertYear=$n,pi.erasAbbrRegex=Mn,pi.erasNameRegex=xn,pi.erasNarrowRegex=Fn,pi.months=ot,pi.monthsShort=ct,pi.monthsParse=lt,pi.monthsRegex=ht,pi.monthsShortRegex=ft,pi.week=vt,pi.firstDayOfYear=Nt,pi.firstDayOfWeek=It,pi.weekdays=Ut,pi.weekdaysMin=Yt,pi.weekdaysShort=Gt,pi.weekdaysParse=Bt,pi.weekdaysRegex=Kt,pi.weekdaysShortRegex=qt,pi.weekdaysMinRegex=Wt,pi.isPM=er,pi.meridiem=sr,dr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=b("moment.lang is deprecated. Use moment.locale instead.",dr),r.langData=b("moment.langData is deprecated. Use moment.localeData instead.",_r);var gi=Math.abs;function Ai(){var e=this._data;return this._milliseconds=gi(this._milliseconds),this._days=gi(this._days),this._months=gi(this._months),e.milliseconds=gi(e.milliseconds),e.seconds=gi(e.seconds),e.minutes=gi(e.minutes),e.hours=gi(e.hours),e.months=gi(e.months),e.years=gi(e.years),this}function Ti(e,t,r,s){var n=Ns(t,r);return e._milliseconds+=s*n._milliseconds,e._days+=s*n._days,e._months+=s*n._months,e._bubble()}function vi(e,t){return Ti(this,e,t,1)}function bi(e,t){return Ti(this,e,t,-1)}function Ii(e){return e<0?Math.floor(e):Math.ceil(e)}function Ni(){var e,t,r,s,n,i=this._milliseconds,a=this._days,o=this._months,c=this._data;return i>=0&&a>=0&&o>=0||i<=0&&a<=0&&o<=0||(i+=864e5*Ii(Oi(o)+a),a=0,o=0),c.milliseconds=i%1e3,e=$e(i/1e3),c.seconds=e%60,t=$e(e/60),c.minutes=t%60,r=$e(t/60),c.hours=r%24,a+=$e(r/24),o+=n=$e(yi(a)),a-=Ii(Oi(n)),s=$e(o/12),o%=12,c.days=a,c.months=o,c.years=s,this}function yi(e){return 4800*e/146097}function Oi(e){return 146097*e/4800}function $i(e){if(!this.isValid())return NaN;var t,r,s=this._milliseconds;if("month"===(e=te(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,r=this._months+yi(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Oi(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function Ci(e){return function(){return this.as(e)}}var Li=Ci("ms"),Di=Ci("s"),Pi=Ci("m"),xi=Ci("h"),Mi=Ci("d"),Fi=Ci("w"),wi=Ci("M"),Ui=Ci("Q"),Gi=Ci("y"),Yi=Li;function ki(){return Ns(this)}function Bi(e){return e=te(e),this.isValid()?this[e+"s"]():NaN}function ji(e){return function(){return this.isValid()?this._data[e]:NaN}}var Xi=ji("milliseconds"),Hi=ji("seconds"),Ki=ji("minutes"),qi=ji("hours"),Wi=ji("days"),Vi=ji("months"),zi=ji("years");function Zi(){return $e(this.days()/7)}var Qi=Math.round,Ji={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ea(e,t,r,s,n){return n.relativeTime(t||1,!!r,e,s)}function ta(e,t,r,s){var n=Ns(e).abs(),i=Qi(n.as("s")),a=Qi(n.as("m")),o=Qi(n.as("h")),c=Qi(n.as("d")),u=Qi(n.as("M")),l=Qi(n.as("w")),p=Qi(n.as("y")),m=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||a<=1&&["m"]||a<r.m&&["mm",a]||o<=1&&["h"]||o<r.h&&["hh",o]||c<=1&&["d"]||c<r.d&&["dd",c];return null!=r.w&&(m=m||l<=1&&["w"]||l<r.w&&["ww",l]),(m=m||u<=1&&["M"]||u<r.M&&["MM",u]||p<=1&&["y"]||["yy",p])[2]=t,m[3]=+e>0,m[4]=s,ea.apply(null,m)}function ra(e){return void 0===e?Qi:"function"==typeof e&&(Qi=e,!0)}function sa(e,t){return void 0!==Ji[e]&&(void 0===t?Ji[e]:(Ji[e]=t,"s"===e&&(Ji.ss=t-1),!0))}function na(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,s,n=!1,i=Ji;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(n=e),"object"==typeof t&&(i=Object.assign({},Ji,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),s=ta(this,!n,i,r=this.localeData()),n&&(s=r.pastFuture(+this,s)),r.postformat(s)}var ia=Math.abs;function aa(e){return(e>0)-(e<0)||+e}function oa(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,s,n,i,a,o,c=ia(this._milliseconds)/1e3,u=ia(this._days),l=ia(this._months),p=this.asSeconds();return p?(e=$e(c/60),t=$e(e/60),c%=60,e%=60,r=$e(l/12),l%=12,s=c?c.toFixed(3).replace(/\.?0+$/,""):"",n=p<0?"-":"",i=aa(this._months)!==aa(p)?"-":"",a=aa(this._days)!==aa(p)?"-":"",o=aa(this._milliseconds)!==aa(p)?"-":"",n+"P"+(r?i+r+"Y":"")+(l?i+l+"M":"")+(u?a+u+"D":"")+(t||e||c?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(c?o+s+"S":"")):"P0D"}var ca=ns.prototype;return ca.isValid=rs,ca.abs=Ai,ca.add=vi,ca.subtract=bi,ca.as=$i,ca.asMilliseconds=Li,ca.asSeconds=Di,ca.asMinutes=Pi,ca.asHours=xi,ca.asDays=Mi,ca.asWeeks=Fi,ca.asMonths=wi,ca.asQuarters=Ui,ca.asYears=Gi,ca.valueOf=Yi,ca._bubble=Ni,ca.clone=ki,ca.get=Bi,ca.milliseconds=Xi,ca.seconds=Hi,ca.minutes=Ki,ca.hours=qi,ca.days=Wi,ca.weeks=Zi,ca.months=Vi,ca.years=zi,ca.humanize=na,ca.toISOString=oa,ca.toString=oa,ca.toJSON=oa,ca.locale=nn,ca.localeData=on,ca.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",oa),ca.lang=an,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Ie("x",Se),Ie("X",Ae),De("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),De("x",(function(e,t,r){r._d=new Date(Ce(e))})),
|
|
2
|
+
//! moment.js
|
|
3
|
+
r.version="2.30.1",s(qr),r.fn=oi,r.min=Zr,r.max=Qr,r.now=Jr,r.utc=d,r.unix=ci,r.months=hi,r.isDate=l,r.locale=dr,r.invalid=E,r.duration=Ns,r.isMoment=T,r.weekdays=Ei,r.parseZone=ui,r.localeData=_r,r.isDuration=is,r.monthsShort=_i,r.weekdaysMin=Ri,r.defineLocale=fr,r.updateLocale=hr,r.locales=Er,r.weekdaysShort=Si,r.normalizeUnits=te,r.relativeTimeRounding=ra,r.relativeTimeThreshold=sa,r.calendarFormat=Gs,r.prototype=oi,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}();var momentExports=moment$1.exports,moment=getDefaultExportFromCjs(momentExports);const formatDate=(e,t,r)=>{if(e=isString(e)?e:"",isString(r)||isArray(r)){const s=moment(t||new Date);return s.locale(r),s.format(e)}return moment(t||new Date).format(e)};var date=Object.freeze({__proto__:null,formatDate:formatDate});const number2locale=(e,t)=>(isString(e)&&(e=Number(e)),e.toLocaleString(t));var number=Object.freeze({__proto__:null,number2locale:number2locale});const add=(e,t)=>Number(e)+Number(t),sub=(e,t)=>Number(e)-Number(t),multiply=(e,t)=>Number(e)*Number(t),divide=(e,t)=>Number(e)/Number(t),ceil=e=>Math.ceil(Number(e)),floor=e=>Math.floor(Number(e)),abs=e=>Math.abs(Number(e));var math=Object.freeze({__proto__:null,abs:abs,add:add,ceil:ceil,divide:divide,floor:floor,multiply:multiply,sub:sub}),helpers=Object.freeze({__proto__:null,comparison:comparison,date:date,html:html,math:math,number:number,object:object,string:string$1});const require$3=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);class View{static mount(e){const t=loadViewConfig(),r=require$3("express-hbs");for(let[e,t]of Object.entries(helpers))for(let[e,s]of Object.entries(t))r.registerHelper(e,s);e.engine("hbs",r.express4({partialsDir:t.partials_dir,layoutsDir:t.layouts_dir,defaultLayout:t.default_layout,extname:t.extension})),e.set("view engine","hbs"),e.set("views",t.views_dir)}static mountBeforeRender(e){const t=loadViewConfig();e.use((async(e,r,s)=>{t.beforeRender&&(isAsyncFunction(t.beforeRender)?await t.beforeRender(e,r):t.beforeRender(e,r)),s()}))}}var cookieParser$2={exports:{}},cookie$4={};
|
|
4
|
+
/*!
|
|
5
|
+
* cookie
|
|
6
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
7
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
8
|
+
* MIT Licensed
|
|
9
|
+
*/
|
|
10
|
+
cookie$4.parse=parse$4,cookie$4.serialize=serialize$1;var decode$1=decodeURIComponent,encode$1=encodeURIComponent,pairSplitRegExp=/; */,fieldContentRegExp$1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse$4(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},s=t||{},n=e.split(pairSplitRegExp),i=s.decode||decode$1,a=0;a<n.length;a++){var o=n[a],c=o.indexOf("=");if(!(c<0)){var u=o.substr(0,c).trim(),l=o.substr(++c,o.length).trim();'"'==l[0]&&(l=l.slice(1,-1)),null==r[u]&&(r[u]=tryDecode$1(l,i))}}return r}function serialize$1(e,t,r){var s=r||{},n=s.encode||encode$1;if("function"!=typeof n)throw new TypeError("option encode is invalid");if(!fieldContentRegExp$1.test(e))throw new TypeError("argument name is invalid");var i=n(t);if(i&&!fieldContentRegExp$1.test(i))throw new TypeError("argument val is invalid");var a=e+"="+i;if(null!=s.maxAge){var o=s.maxAge-0;if(isNaN(o)||!isFinite(o))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(o)}if(s.domain){if(!fieldContentRegExp$1.test(s.domain))throw new TypeError("option domain is invalid");a+="; Domain="+s.domain}if(s.path){if(!fieldContentRegExp$1.test(s.path))throw new TypeError("option path is invalid");a+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw new TypeError("option expires is invalid");a+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(a+="; HttpOnly"),s.secure&&(a+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}function tryDecode$1(e,t){try{return t(e)}catch(t){return e}}var cookieSignature$1={};!function(e){var t=require$$0$3;function r(e){return t.createHash("sha1").update(e).digest("hex")}e.sign=function(e,r){if("string"!=typeof e)throw new TypeError("Cookie value must be provided as a string.");if("string"!=typeof r)throw new TypeError("Secret string must be provided.");return e+"."+t.createHmac("sha256",r).update(e).digest("base64").replace(/\=+$/,"")},e.unsign=function(t,s){if("string"!=typeof t)throw new TypeError("Signed cookie string must be provided.");if("string"!=typeof s)throw new TypeError("Secret string must be provided.");var n=t.slice(0,t.lastIndexOf("."));return r(e.sign(n,s))==r(t)&&n}}(cookieSignature$1);
|
|
11
|
+
/*!
|
|
12
|
+
* cookie-parser
|
|
13
|
+
* Copyright(c) 2014 TJ Holowaychuk
|
|
14
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
15
|
+
* MIT Licensed
|
|
16
|
+
*/
|
|
17
|
+
var cookie$3=cookie$4,signature=cookieSignature$1;function cookieParser(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(e,s,n){if(e.cookies)return n();var i=e.headers.cookie;if(e.secret=r[0],e.cookies=Object.create(null),e.signedCookies=Object.create(null),!i)return n();e.cookies=cookie$3.parse(i,t),0!==r.length&&(e.signedCookies=signedCookies(e.cookies,r),e.signedCookies=JSONCookies(e.signedCookies)),e.cookies=JSONCookies(e.cookies),n()}}function JSONCookie(e){if("string"==typeof e&&"j:"===e.substr(0,2))try{return JSON.parse(e.slice(2))}catch(e){return}}function JSONCookies(e){for(var t,r,s=Object.keys(e),n=0;n<s.length;n++)(r=JSONCookie(e[t=s[n]]))&&(e[t]=r);return e}function signedCookie(e,t){if("string"==typeof e){if("s:"!==e.substr(0,2))return e;for(var r=!t||Array.isArray(t)?t||[]:[t],s=0;s<r.length;s++){var n=signature.unsign(e.slice(2),r[s]);if(!1!==n)return n}return!1}}function signedCookies(e,t){for(var r,s,n,i=Object.keys(e),a=Object.create(null),o=0;o<i.length;o++)(n=e[s=i[o]])!==(r=signedCookie(n,t))&&(a[s]=r,delete e[s]);return a}cookieParser$2.exports=cookieParser,cookieParser$2.exports.JSONCookie=JSONCookie,cookieParser$2.exports.JSONCookies=JSONCookies,cookieParser$2.exports.signedCookie=signedCookie,cookieParser$2.exports.signedCookies=signedCookies;var cookieParserExports=cookieParser$2.exports,cookieParser$1=getDefaultExportFromCjs(cookieParserExports),multer$2={exports:{}},typeIs={exports:{}},mediaTyper={},paramRegExp=/; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g,textRegExp=/^[\u0020-\u007e\u0080-\u00ff]+$/,tokenRegExp=/^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/,qescRegExp=/\\([\u0000-\u007f])/g,quoteRegExp=/([\\"])/g,subtypeNameRegExp=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,typeNameRegExp=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,typeRegExp=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;function format$1(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.subtype,s=e.suffix,n=e.type;if(!n||!typeNameRegExp.test(n))throw new TypeError("invalid type");if(!r||!subtypeNameRegExp.test(r))throw new TypeError("invalid subtype");var i=n+"/"+r;if(s){if(!typeNameRegExp.test(s))throw new TypeError("invalid suffix");i+="+"+s}if(t&&"object"==typeof t)for(var a,o=Object.keys(t).sort(),c=0;c<o.length;c++){if(a=o[c],!tokenRegExp.test(a))throw new TypeError("invalid parameter name");i+="; "+a+"="+qstring(t[a])}return i}function parse$3(e){if(!e)throw new TypeError("argument string is required");if("object"==typeof e&&(e=getcontenttype(e)),"string"!=typeof e)throw new TypeError("argument string is required to be a string");var t,r,s,n=e.indexOf(";"),i=splitType(-1!==n?e.substr(0,n):e),a={};for(paramRegExp.lastIndex=n;r=paramRegExp.exec(e);){if(r.index!==n)throw new TypeError("invalid parameter format");n+=r[0].length,t=r[1].toLowerCase(),'"'===(s=r[2])[0]&&(s=s.substr(1,s.length-2).replace(qescRegExp,"$1")),a[t]=s}if(-1!==n&&n!==e.length)throw new TypeError("invalid parameter format");return i.parameters=a,i}function getcontenttype(e){return"function"==typeof e.getHeader?e.getHeader("content-type"):"object"==typeof e.headers?e.headers&&e.headers["content-type"]:void 0}function qstring(e){var t=String(e);if(tokenRegExp.test(t))return t;if(t.length>0&&!textRegExp.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(quoteRegExp,"\\$1")+'"'}function splitType(e){var t=typeRegExp.exec(e.toLowerCase());if(!t)throw new TypeError("invalid media type");var r,s=t[1],n=t[2],i=n.lastIndexOf("+");return-1!==i&&(r=n.substr(i+1),n=n.substr(0,i)),{type:s,subtype:n,suffix:r}}mediaTyper.format=format$1,mediaTyper.parse=parse$3;var mimeTypes={},require$$0$1={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}},mimeDb=require$$0$1;
|
|
18
|
+
/*!
|
|
19
|
+
* mime-types
|
|
20
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
21
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
22
|
+
* MIT Licensed
|
|
23
|
+
*/
|
|
24
|
+
!function(e){var t=mimeDb,r=require$$1.extname,s=/^\s*([^;\s]*)(?:;|\s|$)/,n=/^text\//i;function i(e){if(!e||"string"!=typeof e)return!1;var r=s.exec(e),i=r&&t[r[1].toLowerCase()];return i&&i.charset?i.charset:!(!r||!n.test(r[1]))&&"UTF-8"}e.charset=i,e.charsets={lookup:i},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var r=-1===t.indexOf("/")?e.lookup(t):t;if(!r)return!1;if(-1===r.indexOf("charset")){var s=e.charset(r);s&&(r+="; charset="+s.toLowerCase())}return r},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var r=s.exec(t),n=r&&e.extensions[r[1].toLowerCase()];if(!n||!n.length)return!1;return n[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var s=r("x."+t).toLowerCase().substr(1);if(!s)return!1;return e.types[s]||!1},e.types=Object.create(null),function(e,r){var s=["nginx","apache",void 0,"iana"];Object.keys(t).forEach((function(n){var i=t[n],a=i.extensions;if(a&&a.length){e[n]=a;for(var o=0;o<a.length;o++){var c=a[o];if(r[c]){var u=s.indexOf(t[r[c]].source),l=s.indexOf(i.source);if("application/octet-stream"!==r[c]&&(u>l||u===l&&"application/"===r[c].substr(0,12)))continue}r[c]=n}}}))}(e.extensions,e.types)}(mimeTypes);
|
|
25
|
+
/*!
|
|
26
|
+
* type-is
|
|
27
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
28
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
29
|
+
* MIT Licensed
|
|
30
|
+
*/
|
|
31
|
+
var typer=mediaTyper,mime=mimeTypes;function typeis(e,t){var r,s,n=t,i=tryNormalizeType(e);if(!i)return!1;if(n&&!Array.isArray(n))for(n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1];if(!n||!n.length)return i;for(r=0;r<n.length;r++)if(mimeMatch(normalize$1(s=n[r]),i))return"+"===s[0]||-1!==s.indexOf("*")?i:s;return!1}function hasbody(e){return void 0!==e.headers["transfer-encoding"]||!isNaN(e.headers["content-length"])}function typeofrequest(e,t){var r=t;if(!hasbody(e))return null;if(arguments.length>2){r=new Array(arguments.length-1);for(var s=0;s<r.length;s++)r[s]=arguments[s+1]}return typeis(e.headers["content-type"],r)}function normalize$1(e){if("string"!=typeof e)return!1;switch(e){case"urlencoded":return"application/x-www-form-urlencoded";case"multipart":return"multipart/*"}return"+"===e[0]?"*/*"+e:-1===e.indexOf("/")?mime.lookup(e):e}function mimeMatch(e,t){if(!1===e)return!1;var r=t.split("/"),s=e.split("/");return 2===r.length&&2===s.length&&(("*"===s[0]||s[0]===r[0])&&("*+"===s[1].substr(0,2)?s[1].length<=r[1].length+1&&s[1].substr(1)===r[1].substr(1-s[1].length):"*"===s[1]||s[1]===r[1]))}function normalizeType(e){var t=typer.parse(e);return t.parameters=void 0,typer.format(t)}function tryNormalizeType(e){if(!e)return null;try{return normalizeType(e)}catch(e){return null}}typeIs.exports=typeofrequest,typeIs.exports.is=typeis,typeIs.exports.hasBody=hasbody,typeIs.exports.normalize=normalize$1,typeIs.exports.match=mimeMatch;var typeIsExports=typeIs.exports;function parseContentType$2(e){if(0===e.length)return;const t=Object.create(null);let r=0;for(;r<e.length;++r){const t=e.charCodeAt(r);if(1!==TOKEN$1[t]){if(47!==t||0===r)return;break}}if(r===e.length)return;const s=e.slice(0,r).toLowerCase(),n=++r;for(;r<e.length;++r){const s=e.charCodeAt(r);if(1!==TOKEN$1[s]){if(r===n)return;if(void 0===parseContentTypeParams(e,r,t))return;break}}if(r===n)return;return{type:s,subtype:e.slice(n,r).toLowerCase(),params:t}}function parseContentTypeParams(e,t,r){for(;t<e.length;){for(;t<e.length;++t){const r=e.charCodeAt(t);if(32!==r&&9!==r)break}if(t===e.length)break;if(59!==e.charCodeAt(t++))return;for(;t<e.length;++t){const r=e.charCodeAt(t);if(32!==r&&9!==r)break}if(t===e.length)return;let s;const n=t;for(;t<e.length;++t){const r=e.charCodeAt(t);if(1!==TOKEN$1[r]){if(61!==r)return;break}}if(t===e.length)return;if(s=e.slice(n,t),++t===e.length)return;let i,a="";if(34===e.charCodeAt(t)){i=++t;let r=!1;for(;t<e.length;++t){const s=e.charCodeAt(t);if(92!==s){if(34===s){if(r){i=t,r=!1;continue}a+=e.slice(i,t);break}if(r&&(i=t-1,r=!1),1!==QDTEXT[s])return}else r?(i=t,r=!1):(a+=e.slice(i,t),r=!0)}if(t===e.length)return;++t}else{for(i=t;t<e.length;++t){const r=e.charCodeAt(t);if(1!==TOKEN$1[r]){if(t===i)return;break}}a=e.slice(i,t)}s=s.toLowerCase(),void 0===r[s]&&(r[s]=a)}return r}function parseDisposition$1(e,t){if(0===e.length)return;const r=Object.create(null);let s=0;for(;s<e.length;++s){const n=e.charCodeAt(s);if(1!==TOKEN$1[n]){if(void 0===parseDispositionParams(e,s,r,t))return;break}}return{type:e.slice(0,s).toLowerCase(),params:r}}function parseDispositionParams(e,t,r,s){for(;t<e.length;){for(;t<e.length;++t){const r=e.charCodeAt(t);if(32!==r&&9!==r)break}if(t===e.length)break;if(59!==e.charCodeAt(t++))return;for(;t<e.length;++t){const r=e.charCodeAt(t);if(32!==r&&9!==r)break}if(t===e.length)return;let n;const i=t;for(;t<e.length;++t){const r=e.charCodeAt(t);if(1!==TOKEN$1[r]){if(61===r)break;return}}if(t===e.length)return;let a,o,c="";if(n=e.slice(i,t),42===n.charCodeAt(n.length-1)){const r=++t;for(;t<e.length;++t){const r=e.charCodeAt(t);if(1!==CHARSET[r]){if(39!==r)return;break}}if(t===e.length)return;for(o=e.slice(r,t),++t;t<e.length;++t){if(39===e.charCodeAt(t))break}if(t===e.length)return;if(++t===e.length)return;a=t;let s=0;for(;t<e.length;++t){const r=e.charCodeAt(t);if(1!==EXTENDED_VALUE[r]){if(37===r){let r,n;if(t+2<e.length&&-1!==(r=HEX_VALUES$1[e.charCodeAt(t+1)])&&-1!==(n=HEX_VALUES$1[e.charCodeAt(t+2)])){const i=(r<<4)+n;c+=e.slice(a,t),c+=String.fromCharCode(i),a=(t+=2)+1,i>=128?s=2:0===s&&(s=1);continue}return}break}}if(c+=e.slice(a,t),c=convertToUTF8$1(c,o,s),void 0===c)return}else{if(++t===e.length)return;if(34===e.charCodeAt(t)){a=++t;let r=!1;for(;t<e.length;++t){const s=e.charCodeAt(t);if(92!==s){if(34===s){if(r){a=t,r=!1;continue}c+=e.slice(a,t);break}if(r&&(a=t-1,r=!1),1!==QDTEXT[s])return}else r?(a=t,r=!1):(c+=e.slice(a,t),r=!0)}if(t===e.length)return;++t}else{for(a=t;t<e.length;++t){const r=e.charCodeAt(t);if(1!==TOKEN$1[r]){if(t===a)return;break}}c=e.slice(a,t)}if(c=s(c,2),void 0===c)return}n=n.toLowerCase(),void 0===r[n]&&(r[n]=c)}return r}function getDecoder$2(e){let t;for(;;)switch(e){case"utf-8":case"utf8":return decoders.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return decoders.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return decoders.utf16le;case"base64":return decoders.base64;default:if(void 0===t){t=!0,e=e.toLowerCase();continue}return decoders.other.bind(e)}}const decoders={utf8:(e,t)=>{if(0===e.length)return"";if("string"==typeof e){if(t<2)return e;e=Buffer.from(e,"latin1")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>0===e.length?"":"string"==typeof e?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.ucs2Slice(0,e.length)),base64:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.base64Slice(0,e.length)),other:(e,t)=>{if(0===e.length)return"";"string"==typeof e&&(e=Buffer.from(e,"latin1"));try{return new TextDecoder(void 0).decode(e)}catch{}}};function convertToUTF8$1(e,t,r){const s=getDecoder$2(t);if(s)return s(e,r)}function basename$1(e){if("string"!=typeof e)return"";for(let t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return".."===(e=e.slice(t+1))||"."===e?"":e}return".."===e||"."===e?"":e}const TOKEN$1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],QDTEXT=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],CHARSET=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],EXTENDED_VALUE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],HEX_VALUES$1=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];var utils$3={basename:basename$1,convertToUTF8:convertToUTF8$1,getDecoder:getDecoder$2,parseContentType:parseContentType$2,parseDisposition:parseDisposition$1};function memcmp(e,t,r,s,n){for(let i=0;i<n;++i)if(e[t+i]!==r[s+i])return!1;return!0}class SBMH{constructor(e,t){if("function"!=typeof t)throw new Error("Missing match callback");if("string"==typeof e)e=Buffer.from(e);else if(!Buffer.isBuffer(e))throw new Error("Expected Buffer for needle, got "+typeof e);const r=e.length;if(this.maxMatches=1/0,this.matches=0,this._cb=t,this._lookbehindSize=0,this._needle=e,this._bufPos=0,this._lookbehind=Buffer.allocUnsafe(r),this._occ=[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],r>1)for(let t=0;t<r-1;++t)this._occ[e[t]]=r-1-t}reset(){this.matches=0,this._lookbehindSize=0,this._bufPos=0}push(e,t){let r;Buffer.isBuffer(e)||(e=Buffer.from(e,"latin1"));const s=e.length;for(this._bufPos=t||0;r!==s&&this.matches<this.maxMatches;)r=feed(this,e);return r}destroy(){const e=this._lookbehindSize;e&&this._cb(!1,this._lookbehind,0,e,!1),this.reset()}}function feed(e,t){const r=t.length,s=e._needle,n=s.length;let i=-e._lookbehindSize;const a=n-1,o=s[a],c=r-n,u=e._occ,l=e._lookbehind;if(i<0){for(;i<0&&i<=c;){const r=i+a,s=r<0?l[e._lookbehindSize+r]:t[r];if(s===o&&matchNeedle(e,t,i,a))return e._lookbehindSize=0,++e.matches,i>-e._lookbehindSize?e._cb(!0,l,0,e._lookbehindSize+i,!1):e._cb(!0,void 0,0,0,!0),e._bufPos=i+n;i+=u[s]}for(;i<0&&!matchNeedle(e,t,i,r-i);)++i;if(i<0){const s=e._lookbehindSize+i;return s>0&&e._cb(!1,l,0,s,!1),e._lookbehindSize-=s,l.copy(l,0,s,e._lookbehindSize),l.set(t,e._lookbehindSize),e._lookbehindSize+=r,e._bufPos=r,r}e._cb(!1,l,0,e._lookbehindSize,!1),e._lookbehindSize=0}i+=e._bufPos;const p=s[0];for(;i<=c;){const r=t[i+a];if(r===o&&t[i]===p&&memcmp(s,0,t,i,a))return++e.matches,i>0?e._cb(!0,t,e._bufPos,i,!0):e._cb(!0,void 0,0,0,!0),e._bufPos=i+n;i+=u[r]}for(;i<r;){if(t[i]===p&&memcmp(t,i,s,0,r-i)){t.copy(l,0,i,r),e._lookbehindSize=r-i;break}++i}return i>0&&e._cb(!1,t,e._bufPos,i<r?i:r,!0),e._bufPos=r,r}function matchNeedle(e,t,r,s){const n=e._lookbehind,i=e._lookbehindSize,a=e._needle;for(let e=0;e<s;++e,++r){if((r<0?n[i+r]:t[r])!==a[e])return!1}return!0}var sbmh=SBMH;const{Readable:Readable,Writable:Writable$2}=require$$0$4,StreamSearch=sbmh,{basename:basename,convertToUTF8:convertToUTF8,getDecoder:getDecoder$1,parseContentType:parseContentType$1,parseDisposition:parseDisposition}=utils$3,BUF_CRLF=Buffer.from("\r\n"),BUF_CR=Buffer.from("\r"),BUF_DASH=Buffer.from("-");function noop$2(){}const MAX_HEADER_PAIRS=2e3,MAX_HEADER_SIZE=16384,HPARSER_NAME=0,HPARSER_PRE_OWS=1,HPARSER_VALUE=2;class HeaderParser{constructor(e){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=HPARSER_NAME,this.name="",this.value="",this.crlf=0,this.cb=e}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=HPARSER_NAME,this.name="",this.value="",this.crlf=0}push(e,t,r){let s=t;for(;t<r;)switch(this.state){case HPARSER_NAME:{let n=!1;for(;t<r;++t){if(this.byteCount===MAX_HEADER_SIZE)return-1;++this.byteCount;const r=e[t];if(1!==TOKEN[r]){if(58!==r)return-1;if(this.name+=e.latin1Slice(s,t),0===this.name.length)return-1;++t,n=!0,this.state=HPARSER_PRE_OWS;break}}if(!n){this.name+=e.latin1Slice(s,t);break}}case HPARSER_PRE_OWS:{let n=!1;for(;t<r;++t){if(this.byteCount===MAX_HEADER_SIZE)return-1;++this.byteCount;const r=e[t];if(32!==r&&9!==r){s=t,n=!0,this.state=HPARSER_VALUE;break}}if(!n)break}case HPARSER_VALUE:switch(this.crlf){case 0:for(;t<r;++t){if(this.byteCount===MAX_HEADER_SIZE)return-1;++this.byteCount;const r=e[t];if(1!==FIELD_VCHAR[r]){if(13!==r)return-1;++this.crlf;break}}this.value+=e.latin1Slice(s,t++);break;case 1:if(this.byteCount===MAX_HEADER_SIZE)return-1;if(++this.byteCount,10!==e[t++])return-1;++this.crlf;break;case 2:{if(this.byteCount===MAX_HEADER_SIZE)return-1;++this.byteCount;const r=e[t];32===r||9===r?(s=t,this.crlf=0):(++this.pairCount<MAX_HEADER_PAIRS&&(this.name=this.name.toLowerCase(),void 0===this.header[this.name]?this.header[this.name]=[this.value]:this.header[this.name].push(this.value)),13===r?(++this.crlf,++t):(s=t,this.crlf=0,this.state=HPARSER_NAME,this.name="",this.value=""));break}case 3:{if(this.byteCount===MAX_HEADER_SIZE)return-1;if(++this.byteCount,10!==e[t++])return-1;const r=this.header;return this.reset(),this.cb(r),t}}}return t}}class FileStream extends Readable{constructor(e,t){super(e),this.truncated=!1,this._readcb=null,this.once("end",(()=>{if(this._read(),0==--t._fileEndsLeft&&t._finalcb){const e=t._finalcb;t._finalcb=null,process.nextTick(e)}}))}_read(e){const t=this._readcb;t&&(this._readcb=null,t())}}const ignoreData={push:(e,t)=>{},destroy:()=>{}};function callAndUnsetCb(e,t){const r=e._writecb;e._writecb=null,r&&r()}function nullDecoder(e,t){return e}class Multipart extends Writable$2{constructor(e){if(super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.highWaterMark?e.highWaterMark:void 0}),!e.conType.params||"string"!=typeof e.conType.params.boundary)throw new Error("Multipart: Boundary not found");const t=e.conType.params.boundary,r="string"==typeof e.defParamCharset&&e.defParamCharset?getDecoder$1(e.defParamCharset):nullDecoder,s=e.defCharset||"utf8",n=e.preservePath,i={autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.fileHwm?e.fileHwm:void 0},a=e.limits,o=a&&"number"==typeof a.fieldSize?a.fieldSize:1048576,c=a&&"number"==typeof a.fileSize?a.fileSize:1/0,u=a&&"number"==typeof a.files?a.files:1/0,l=a&&"number"==typeof a.fields?a.fields:1/0,p=a&&"number"==typeof a.parts?a.parts:1/0;let m=-1,d=0,f=0,h=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let _,E,S,R,g,A=0,T=0,v=!1,b=!1,I=!1;this._hparser=null;const N=new HeaderParser((e=>{let t;if(this._hparser=null,h=!1,R="text/plain",E=s,S="7bit",g=void 0,v=!1,!e["content-disposition"])return void(h=!0);const a=parseDisposition(e["content-disposition"][0],r);if(a&&"form-data"===a.type){if(a.params&&(a.params.name&&(g=a.params.name),a.params["filename*"]?t=a.params["filename*"]:a.params.filename&&(t=a.params.filename),void 0===t||n||(t=basename(t))),e["content-type"]){const t=parseContentType$1(e["content-type"][0]);t&&(R=`${t.type}/${t.subtype}`,t.params&&"string"==typeof t.params.charset&&(E=t.params.charset.toLowerCase()))}if(e["content-transfer-encoding"]&&(S=e["content-transfer-encoding"][0].toLowerCase()),"application/octet-stream"===R||void 0!==t){if(f===u)return b||(b=!0,this.emit("filesLimit")),void(h=!0);if(++f,0===this.listenerCount("file"))return void(h=!0);A=0,this._fileStream=new FileStream(i,this),++this._fileEndsLeft,this.emit("file",g,this._fileStream,{filename:t,encoding:S,mimeType:R})}else{if(d===l)return I||(I=!0,this.emit("fieldsLimit")),void(h=!0);if(++d,0===this.listenerCount("field"))return void(h=!0);_=[],T=0}}else h=!0}));let y=0;const O=(e,t,r,s,n)=>{e:for(;t;){if(null!==this._hparser){const e=this._hparser.push(t,r,s);if(-1===e){this._hparser=null,N.reset(),this.emit("error",new Error("Malformed part header"));break}r=e}if(r===s)break;if(0!==y){if(1===y){switch(t[r]){case 45:y=2,++r;break;case 13:y=3,++r;break;default:y=0}if(r===s)return}if(2===y){if(y=0,45===t[r])return this._complete=!0,void(this._bparser=ignoreData);const e=this._writecb;this._writecb=noop$2,O(!1,BUF_DASH,0,1,!1),this._writecb=e}else if(3===y){if(y=0,10===t[r]){if(++r,m>=p)break;if(this._hparser=N,r===s)break;continue e}{const e=this._writecb;this._writecb=noop$2,O(!1,BUF_CR,0,1,!1),this._writecb=e}}}if(!h)if(this._fileStream){let e;const i=Math.min(s-r,c-A);n?e=t.slice(r,r+i):(e=Buffer.allocUnsafe(i),t.copy(e,0,r,r+i)),A+=e.length,A===c?(e.length>0&&this._fileStream.push(e),this._fileStream.emit("limit"),this._fileStream.truncated=!0,h=!0):this._fileStream.push(e)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(void 0!==_){let e;const i=Math.min(s-r,o-T);n?e=t.slice(r,r+i):(e=Buffer.allocUnsafe(i),t.copy(e,0,r,r+i)),T+=i,_.push(e),T===o&&(h=!0,v=!0)}break}if(e){if(y=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(void 0!==_){let e;switch(_.length){case 0:e="";break;case 1:e=convertToUTF8(_[0],E,0);break;default:e=convertToUTF8(Buffer.concat(_,T),E,0)}_=void 0,T=0,this.emit("field",g,e,{nameTruncated:!1,valueTruncated:v,encoding:S,mimeType:R})}++m===p&&this.emit("partsLimit")}};this._bparser=new StreamSearch(`\r\n--${t}`,O),this._writecb=null,this._finalcb=null,this.write(BUF_CRLF)}static detect(e){return"multipart"===e.type&&"form-data"===e.subtype}_write(e,t,r){this._writecb=r,this._bparser.push(e,0),this._writecb&&callAndUnsetCb(this)}_destroy(e,t){this._hparser=null,this._bparser=ignoreData,e||(e=checkEndState(this));const r=this._fileStream;r&&(this._fileStream=null,r.destroy(e)),t(e)}_final(e){if(this._bparser.destroy(),!this._complete)return e(new Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=finalcb.bind(null,this,e):finalcb(this,e)}}function finalcb(e,t,r){if(r)return t(r);t(r=checkEndState(e))}function checkEndState(e){if(e._hparser)return new Error("Malformed part header");const t=e._fileStream;return t&&(e._fileStream=null,t.destroy(new Error("Unexpected end of file"))),e._complete?void 0:new Error("Unexpected end of form")}const TOKEN=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],FIELD_VCHAR=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];var multipart=Multipart;const{Writable:Writable$1}=require$$0$4,{getDecoder:getDecoder}=utils$3;class URLEncoded extends Writable$1{constructor(e){super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.highWaterMark?e.highWaterMark:void 0});let t=e.defCharset||"utf8";e.conType.params&&"string"==typeof e.conType.params.charset&&(t=e.conType.params.charset),this.charset=t;const r=e.limits;this.fieldSizeLimit=r&&"number"==typeof r.fieldSize?r.fieldSize:1048576,this.fieldsLimit=r&&"number"==typeof r.fields?r.fields:1/0,this.fieldNameSizeLimit=r&&"number"==typeof r.fieldNameSize?r.fieldNameSize:100,this._inKey=!0,this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,this._fields=0,this._key="",this._val="",this._byte=-2,this._lastPos=0,this._encode=0,this._decoder=getDecoder(t)}static detect(e){return"application"===e.type&&"x-www-form-urlencoded"===e.subtype}_write(e,t,r){if(this._fields>=this.fieldsLimit)return r();let s=0;const n=e.length;if(this._lastPos=0,-2!==this._byte){if(s=readPctEnc(this,e,s,n),-1===s)return r(new Error("Malformed urlencoded form"));if(s>=n)return r();this._inKey?++this._bytesKey:++this._bytesVal}e:for(;s<n;)if(this._inKey){for(s=skipKeyBytes(this,e,s,n);s<n;){switch(e[s]){case 61:this._lastPos<s&&(this._key+=e.latin1Slice(this._lastPos,s)),this._lastPos=++s,this._key=this._decoder(this._key,this._encode),this._encode=0,this._inKey=!1;continue e;case 38:if(this._lastPos<s&&(this._key+=e.latin1Slice(this._lastPos,s)),this._lastPos=++s,this._key=this._decoder(this._key,this._encode),this._encode=0,this._bytesKey>0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),r();continue;case 43:this._lastPos<s&&(this._key+=e.latin1Slice(this._lastPos,s)),this._key+=" ",this._lastPos=s+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<s&&(this._key+=e.latin1Slice(this._lastPos,s)),this._lastPos=s+1,this._byte=-1,s=readPctEnc(this,e,s+1,n),-1===s)return r(new Error("Malformed urlencoded form"));if(s>=n)return r();++this._bytesKey,s=skipKeyBytes(this,e,s,n);continue}++s,++this._bytesKey,s=skipKeyBytes(this,e,s,n)}this._lastPos<s&&(this._key+=e.latin1Slice(this._lastPos,s))}else{for(s=skipValBytes(this,e,s,n);s<n;){switch(e[s]){case 38:if(this._lastPos<s&&(this._val+=e.latin1Slice(this._lastPos,s)),this._lastPos=++s,this._inKey=!0,this._val=this._decoder(this._val,this._encode),this._encode=0,(this._bytesKey>0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),r();continue e;case 43:this._lastPos<s&&(this._val+=e.latin1Slice(this._lastPos,s)),this._val+=" ",this._lastPos=s+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<s&&(this._val+=e.latin1Slice(this._lastPos,s)),this._lastPos=s+1,this._byte=-1,s=readPctEnc(this,e,s+1,n),-1===s)return r(new Error("Malformed urlencoded form"));if(s>=n)return r();++this._bytesVal,s=skipValBytes(this,e,s,n);continue}++s,++this._bytesVal,s=skipValBytes(this,e,s,n)}this._lastPos<s&&(this._val+=e.latin1Slice(this._lastPos,s))}r()}_final(e){if(-2!==this._byte)return e(new Error("Malformed urlencoded form"));(!this._inKey||this._bytesKey>0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),e()}}function readPctEnc(e,t,r,s){if(r>=s)return s;if(-1===e._byte){const n=HEX_VALUES[t[r++]];if(-1===n)return-1;if(n>=8&&(e._encode=2),r<s){const s=HEX_VALUES[t[r++]];if(-1===s)return-1;e._inKey?e._key+=String.fromCharCode((n<<4)+s):e._val+=String.fromCharCode((n<<4)+s),e._byte=-2,e._lastPos=r}else e._byte=n}else{const s=HEX_VALUES[t[r++]];if(-1===s)return-1;e._inKey?e._key+=String.fromCharCode((e._byte<<4)+s):e._val+=String.fromCharCode((e._byte<<4)+s),e._byte=-2,e._lastPos=r}return r}function skipKeyBytes(e,t,r,s){if(e._bytesKey>e.fieldNameSizeLimit){for(e._keyTrunc||e._lastPos<r&&(e._key+=t.latin1Slice(e._lastPos,r-1)),e._keyTrunc=!0;r<s;++r){const s=t[r];if(61===s||38===s)break;++e._bytesKey}e._lastPos=r}return r}function skipValBytes(e,t,r,s){if(e._bytesVal>e.fieldSizeLimit){for(e._valTrunc||e._lastPos<r&&(e._val+=t.latin1Slice(e._lastPos,r-1)),e._valTrunc=!0;r<s&&38!==t[r];++r)++e._bytesVal;e._lastPos=r}return r}const HEX_VALUES=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];var urlencoded=URLEncoded;const{parseContentType:parseContentType}=utils$3;function getInstance(e){const t=e.headers,r=parseContentType(t["content-type"]);if(!r)throw new Error("Malformed content type");for(const s of TYPES){if(!s.detect(r))continue;const n={limits:e.limits,headers:t,conType:r,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return e.highWaterMark&&(n.highWaterMark=e.highWaterMark),e.fileHwm&&(n.fileHwm=e.fileHwm),n.defCharset=e.defCharset,n.defParamCharset=e.defParamCharset,n.preservePath=e.preservePath,new s(n)}throw new Error(`Unsupported content type: ${t["content-type"]}`)}const TYPES=[multipart,urlencoded].filter((function(e){return"function"==typeof e.detect}));var lib$4=e=>{if("object"==typeof e&&null!==e||(e={}),"object"!=typeof e.headers||null===e.headers||"string"!=typeof e.headers["content-type"])throw new Error("Missing Content-Type");return getInstance(e)},immutable=extend$1,hasOwnProperty$1=Object.prototype.hasOwnProperty;function extend$1(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var s in r)hasOwnProperty$1.call(r,s)&&(e[s]=r[s])}return e}var reFirstKey=/^[^\[]*/,reDigitPath=/^\[(\d+)\]/,reNormalPath=/^\[([^\]]+)\]/;function parsePath$1(e){function t(){return[{type:"object",key:e,last:!0}]}var r=reFirstKey.exec(e)[0];if(!r)return t();for(var s=e.length,n=r.length,i={type:"object",key:r},a=[i];n<s;){var o;if("["!==e[n]||"]"!==e[n+1])if(null===(o=reDigitPath.exec(e.substring(n)))){if(null===(o=reNormalPath.exec(e.substring(n))))return t();n+=o[0].length,i.nextType="object",i={type:"object",key:o[1]},a.push(i)}else n+=o[0].length,i.nextType="array",i={type:"array",key:parseInt(o[1],10)},a.push(i);else if(n+=2,i.append=!0,n!==s)return t()}return i.last=!0,a}var parsePath_1=parsePath$1;function valueType(e){return void 0===e?"undefined":Array.isArray(e)?"array":"object"==typeof e?"object":"scalar"}function setLastValue(e,t,r,s){switch(valueType(r)){case"undefined":t.append?e[t.key]=[s]:e[t.key]=s;break;case"array":e[t.key].push(s);break;case"object":return setLastValue(r,{type:"object",key:"",last:!0},r[""],s);case"scalar":e[t.key]=[e[t.key],s]}return e}function setValue$1(e,t,r,s){if(t.last)return setLastValue(e,t,r,s);var n;switch(valueType(r)){case"undefined":return"array"===t.nextType?e[t.key]=[]:e[t.key]=Object.create(null),e[t.key];case"object":return e[t.key];case"array":return"array"===t.nextType?r:(n=Object.create(null),e[t.key]=n,r.forEach((function(e,t){void 0!==e&&(n[""+t]=e)})),n);case"scalar":return(n=Object.create(null))[""]=r,e[t.key]=n,n}}var setValue_1=setValue$1,parsePath=parsePath_1,setValue=setValue_1;function appendField$1(e,t,r){parsePath(t).reduce((function(e,t){return setValue(e,t,e[t.key],r)}),e)}var appendField_1=appendField$1,EventEmitter$2=require$$0$5.EventEmitter;function Counter$1(){EventEmitter$2.call(this),this.value=0}Counter$1.prototype=Object.create(EventEmitter$2.prototype),Counter$1.prototype.increment=function(){this.value++},Counter$1.prototype.decrement=function(){0==--this.value&&this.emit("zero")},Counter$1.prototype.isZero=function(){return 0===this.value},Counter$1.prototype.onceZero=function(e){if(this.isZero())return e();this.once("zero",e)};var counter=Counter$1,util$7=require$$1$1,errorMessages={LIMIT_PART_COUNT:"Too many parts",LIMIT_FILE_SIZE:"File too large",LIMIT_FILE_COUNT:"Too many files",LIMIT_FIELD_KEY:"Field name too long",LIMIT_FIELD_VALUE:"Field value too long",LIMIT_FIELD_COUNT:"Too many fields",LIMIT_UNEXPECTED_FILE:"Unexpected field",MISSING_FIELD_NAME:"Field name missing"};function MulterError$2(e,t){Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=errorMessages[e],this.code=e,t&&(this.field=t)}util$7.inherits(MulterError$2,Error);var multerError=MulterError$2,getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;
|
|
32
|
+
/*
|
|
33
|
+
object-assign
|
|
34
|
+
(c) Sindre Sorhus
|
|
35
|
+
@license MIT
|
|
36
|
+
*/function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(e){s[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(e){return!1}}var objectAssign$1=shouldUseNative()?Object.assign:function(e,t){for(var r,s,n=toObject(e),i=1;i<arguments.length;i++){for(var a in r=Object(arguments[i]))hasOwnProperty.call(r,a)&&(n[a]=r[a]);if(getOwnPropertySymbols){s=getOwnPropertySymbols(r);for(var o=0;o<s.length;o++)propIsEnumerable.call(r,s[o])&&(n[s[o]]=r[s[o]])}}return n},objectAssign=objectAssign$1;function arrayRemove(e,t){var r=e.indexOf(t);~r&&e.splice(r,1)}function FileAppender$1(e,t){switch(this.strategy=e,this.req=t,e){case"NONE":case"VALUE":break;case"ARRAY":t.files=[];break;case"OBJECT":t.files=Object.create(null);break;default:throw new Error("Unknown file strategy: "+e)}}FileAppender$1.prototype.insertPlaceholder=function(e){var t={fieldname:e.fieldname};switch(this.strategy){case"NONE":case"VALUE":break;case"ARRAY":this.req.files.push(t);break;case"OBJECT":this.req.files[e.fieldname]?this.req.files[e.fieldname].push(t):this.req.files[e.fieldname]=[t]}return t},FileAppender$1.prototype.removePlaceholder=function(e){switch(this.strategy){case"NONE":case"VALUE":break;case"ARRAY":arrayRemove(this.req.files,e);break;case"OBJECT":1===this.req.files[e.fieldname].length?delete this.req.files[e.fieldname]:arrayRemove(this.req.files[e.fieldname],e)}},FileAppender$1.prototype.replacePlaceholder=function(e,t){"VALUE"!==this.strategy?(delete e.fieldname,objectAssign(e,t)):this.req.file=t};var fileAppender=FileAppender$1;function removeUploadedFiles$1(e,t,r){var s=e.length,n=[];if(0===s)return r(null,n);!function i(a){var o=e[a];t(o,(function(e){e&&(e.file=o,e.field=o.fieldname,n.push(e)),a<s-1?i(a+1):r(null,n)}))}(0)}var removeUploadedFiles_1=removeUploadedFiles$1,is=typeIsExports,Busboy=lib$4,extend=immutable,appendField=appendField_1,Counter=counter,MulterError$1=multerError,FileAppender=fileAppender,removeUploadedFiles=removeUploadedFiles_1;function makeMiddleware$1(e){return function(t,r,s){if(!is(t,["multipart"]))return s();var n,i=e(),a=i.limits,o=i.storage,c=i.fileFilter,u=i.fileStrategy,l=i.preservePath;t.body=Object.create(null);try{n=Busboy({headers:t.headers,limits:a,preservePath:l})}catch(e){return s(e)}var p=new FileAppender(u,t),m=!1,d=!1,f=!1,h=new Counter,_=[];function E(e){m||(m=!0,t.unpipe(n),n.removeAllListeners(),s(e))}function S(){d&&h.isZero()&&!f&&E()}function R(e){f||(f=!0,h.onceZero((function(){removeUploadedFiles(_,(function(e,r){o._removeFile(t,e,r)}),(function(t,r){if(t)return E(t);e.storageErrors=r,E(e)}))})))}function g(e,t){R(new MulterError$1(e,t))}n.on("field",(function(e,r,{nameTruncated:s,valueTruncated:n}){return null==e?g("MISSING_FIELD_NAME"):s?g("LIMIT_FIELD_KEY"):n?g("LIMIT_FIELD_VALUE",e):a&&Object.prototype.hasOwnProperty.call(a,"fieldNameSize")&&e.length>a.fieldNameSize?g("LIMIT_FIELD_KEY"):void appendField(t.body,e,r)})),n.on("file",(function(e,r,{filename:s,encoding:n,mimeType:i}){if(!s)return r.resume();if(a&&Object.prototype.hasOwnProperty.call(a,"fieldNameSize")&&e.length>a.fieldNameSize)return g("LIMIT_FIELD_KEY");var u={fieldname:e,originalname:s,encoding:n,mimetype:i},l=p.insertPlaceholder(u);c(t,u,(function(s,n){if(s)return p.removePlaceholder(l),R(s);if(!n)return p.removePlaceholder(l),r.resume();var i=!1;h.increment(),Object.defineProperty(u,"stream",{configurable:!0,enumerable:!1,value:r}),r.on("error",(function(e){h.decrement(),R(e)})),r.on("limit",(function(){i=!0,g("LIMIT_FILE_SIZE",e)})),o._handleFile(t,u,(function(e,t){if(i)return p.removePlaceholder(l),_.push(extend(u,t)),h.decrement();if(e)return p.removePlaceholder(l),h.decrement(),R(e);var r=extend(u,t);p.replacePlaceholder(l,r),_.push(r),h.decrement(),S()}))}))})),n.on("error",(function(e){R(e)})),n.on("partsLimit",(function(){g("LIMIT_PART_COUNT")})),n.on("filesLimit",(function(){g("LIMIT_FILE_COUNT")})),n.on("fieldsLimit",(function(){g("LIMIT_FIELD_COUNT")})),n.on("close",(function(){d=!0,S()})),t.pipe(n)}}var makeMiddleware_1=makeMiddleware$1,path$2=require$$1,fs$1=require$$0$2,_0777=parseInt("0777",8),mkdirp$1=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(e,t,r,s){"function"==typeof t?(r=t,t={}):t&&"object"==typeof t||(t={mode:t});var n=t.mode,i=t.fs||fs$1;void 0===n&&(n=_0777),s||(s=null);var a=r||function(){};e=path$2.resolve(e),i.mkdir(e,n,(function(r){if(!r)return a(null,s=s||e);if("ENOENT"===r.code){if(path$2.dirname(e)===e)return a(r);mkdirP(path$2.dirname(e),t,(function(r,s){r?a(r,s):mkdirP(e,t,a,s)}))}else i.stat(e,(function(e,t){e||!t.isDirectory()?a(r,s):a(null,s)}))}))}mkdirP.sync=function e(t,r,s){r&&"object"==typeof r||(r={mode:r});var n=r.mode,i=r.fs||fs$1;void 0===n&&(n=_0777),s||(s=null),t=path$2.resolve(t);try{i.mkdirSync(t,n),s=s||t}catch(n){if("ENOENT"===n.code)s=e(path$2.dirname(t),r,s),e(t,r,s);else{var a;try{a=i.statSync(t)}catch(e){throw n}if(!a.isDirectory())throw n}}return s};var fs=require$$0$2,os=require$$1$2,path$1=require$$1,crypto$1=require$$0$3,mkdirp=mkdirp$1;function getFilename(e,t,r){crypto$1.randomBytes(16,(function(e,t){r(e,e?void 0:t.toString("hex"))}))}function getDestination(e,t,r){r(null,os.tmpdir())}function DiskStorage(e){this.getFilename=e.filename||getFilename,"string"==typeof e.destination?(mkdirp.sync(e.destination),this.getDestination=function(t,r,s){s(null,e.destination)}):this.getDestination=e.destination||getDestination}DiskStorage.prototype._handleFile=function(e,t,r){var s=this;s.getDestination(e,t,(function(n,i){if(n)return r(n);s.getFilename(e,t,(function(e,s){if(e)return r(e);var n=path$1.join(i,s),a=fs.createWriteStream(n);t.stream.pipe(a),a.on("error",r),a.on("finish",(function(){r(null,{destination:i,filename:s,path:n,size:a.bytesWritten})}))}))}))},DiskStorage.prototype._removeFile=function(e,t,r){var s=t.path;delete t.destination,delete t.filename,delete t.path,fs.unlink(s,r)};var disk=function(e){return new DiskStorage(e)},readable={exports:{}},processNextickArgs={exports:{}},hasRequiredProcessNextickArgs,isarray,hasRequiredIsarray,stream$1,hasRequiredStream;function requireProcessNextickArgs(){if(hasRequiredProcessNextickArgs)return processNextickArgs.exports;return hasRequiredProcessNextickArgs=1,"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?processNextickArgs.exports={nextTick:function(e,t,r,s){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var n,i,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,s)}));default:for(n=new Array(a-1),i=0;i<n.length;)n[i++]=arguments[i];return process.nextTick((function(){e.apply(null,n)}))}}}:processNextickArgs.exports=process,processNextickArgs.exports}function requireIsarray(){if(hasRequiredIsarray)return isarray;hasRequiredIsarray=1;var e={}.toString;return isarray=Array.isArray||function(t){return"[object Array]"==e.call(t)}}function requireStream(){return hasRequiredStream?stream$1:(hasRequiredStream=1,stream$1=require$$0$4)}var safeBuffer$3={exports:{}},hasRequiredSafeBuffer$1;function requireSafeBuffer$1(){return hasRequiredSafeBuffer$1||(hasRequiredSafeBuffer$1=1,function(e,t){var r=require$$0$6,s=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=i),n(s,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$3,safeBuffer$3.exports)),safeBuffer$3.exports}var util$6={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util$6;function e(e){return Object.prototype.toString.call(e)}return hasRequiredUtil=1,util$6.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},util$6.isBoolean=function(e){return"boolean"==typeof e},util$6.isNull=function(e){return null===e},util$6.isNullOrUndefined=function(e){return null==e},util$6.isNumber=function(e){return"number"==typeof e},util$6.isString=function(e){return"string"==typeof e},util$6.isSymbol=function(e){return"symbol"==typeof e},util$6.isUndefined=function(e){return void 0===e},util$6.isRegExp=function(t){return"[object RegExp]"===e(t)},util$6.isObject=function(e){return"object"==typeof e&&null!==e},util$6.isDate=function(t){return"[object Date]"===e(t)},util$6.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},util$6.isFunction=function(e){return"function"==typeof e},util$6.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},util$6.isBuffer=require$$0$6.Buffer.isBuffer,util$6}var inherits$2={exports:{}},inherits_browser$1={exports:{}},hasRequiredInherits_browser$1;function requireInherits_browser$1(){return hasRequiredInherits_browser$1||(hasRequiredInherits_browser$1=1,"function"==typeof Object.create?inherits_browser$1.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$1.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),inherits_browser$1.exports}try{var util$5=require("util");if("function"!=typeof util$5.inherits)throw"";inherits$2.exports=util$5.inherits}catch(e){inherits$2.exports=requireInherits_browser$1()}var inheritsExports$1=inherits$2.exports,BufferList={exports:{}},hasRequiredBufferList,destroy_1,hasRequiredDestroy,node$1,hasRequiredNode$1,_stream_writable,hasRequired_stream_writable,_stream_duplex,hasRequired_stream_duplex;function requireBufferList(){return hasRequiredBufferList||(hasRequiredBufferList=1,function(e){var t=requireSafeBuffer$1().Buffer,r=require$$1$1;function s(e,t,r){e.copy(t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return t.alloc(0);for(var r=t.allocUnsafe(e>>>0),n=this.head,i=0;n;)s(n.data,r,i),i+=n.data.length,n=n.next;return r},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})}(BufferList)),BufferList.exports}function requireDestroy(){if(hasRequiredDestroy)return destroy_1;hasRequiredDestroy=1;var e=requireProcessNextickArgs();function t(e,t){e.emit("error",t)}return destroy_1={destroy:function(r,s){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(s?s(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(t,this,r)):e.nextTick(t,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,(function(r){!s&&r?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,e.nextTick(t,n,r)):e.nextTick(t,n,r):s&&s(r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function requireNode$1(){return hasRequiredNode$1?node$1:(hasRequiredNode$1=1,node$1=require$$1$1.deprecate)}function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;hasRequired_stream_writable=1;var e=requireProcessNextickArgs();function t(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var s=e.entry;e.entry=null;for(;s;){var n=s.callback;t.pendingcb--,n(r),s=s.next}t.corkedRequestsFree.next=e}(t,e)}}_stream_writable=d;var r,s=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:e.nextTick;d.WritableState=m;var n=Object.create(requireUtil());n.inherits=inheritsExports$1;var i={deprecate:requireNode$1()},a=requireStream(),o=requireSafeBuffer$1().Buffer,c=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,l=requireDestroy();function p(){}function m(n,i){r=r||require_stream_duplex(),n=n||{};var a=i instanceof r;this.objectMode=!!n.objectMode,a&&(this.objectMode=this.objectMode||!!n.writableObjectMode);var o=n.highWaterMark,c=n.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:a&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===n.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,r){var n=t._writableState,i=n.sync,a=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),r)!function(t,r,s,n,i){--r.pendingcb,s?(e.nextTick(i,n),e.nextTick(R,t,r),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),R(t,r))}(t,n,i,r,a);else{var o=E(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),i?s(h,t,n,o,a):h(t,n,o,a)}}(i,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function d(e){if(r=r||require_stream_duplex(),!(u.call(d,this)||this instanceof r))return new d(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function f(e,t,r,s,n,i,a){t.writelen=s,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,i,t.onwrite),t.sync=!1}function h(e,t,r,s){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,s(),R(e,t)}function _(e,r){r.bufferProcessing=!0;var s=r.bufferedRequest;if(e._writev&&s&&s.next){var n=r.bufferedRequestCount,i=new Array(n),a=r.corkedRequestsFree;a.entry=s;for(var o=0,c=!0;s;)i[o]=s,s.isBuf||(c=!1),s=s.next,o+=1;i.allBuffers=c,f(e,r,!0,r.length,i,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;s;){var u=s.chunk,l=s.encoding,p=s.callback;if(f(e,r,!1,r.objectMode?1:u.length,u,l,p),s=s.next,r.bufferedRequestCount--,r.writing)break}null===s&&(r.lastBufferedRequest=null)}r.bufferedRequest=s,r.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(t,r){var s=E(r);return s&&(!function(t,r){r.prefinished||r.finalCalled||("function"==typeof t._final?(r.pendingcb++,r.finalCalled=!0,e.nextTick(S,t,r)):(r.prefinished=!0,t.emit("prefinish")))}(t,r),0===r.pendingcb&&(r.finished=!0,t.emit("finish"))),s}return n.inherits(d,a),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===d&&(e&&e._writableState instanceof m)}})):u=function(e){return e instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,r,s){var n,i=this._writableState,a=!1,u=!i.objectMode&&(n=t,o.isBuffer(n)||n instanceof c);return u&&!o.isBuffer(t)&&(t=function(e){return o.from(e)}(t)),"function"==typeof r&&(s=r,r=null),u?r="buffer":r||(r=i.defaultEncoding),"function"!=typeof s&&(s=p),i.ended?function(t,r){var s=new Error("write after end");t.emit("error",s),e.nextTick(r,s)}(this,s):(u||function(t,r,s,n){var i=!0,a=!1;return null===s?a=new TypeError("May not write null values to stream"):"string"==typeof s||void 0===s||r.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),e.nextTick(n,a),i=!1),i}(this,i,t,s))&&(i.pendingcb++,a=function(e,t,r,s,n,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=o.from(t,r));return t}(t,s,n);s!==a&&(r=!0,n="buffer",s=a)}var c=t.objectMode?1:s.length;t.length+=c;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:s,encoding:n,isBuf:r,callback:i,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else f(e,t,!1,c,s,n,i);return u}(this,i,u,t,r,s)),a},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||_(this,e))},d.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,r,s){var n=this._writableState;"function"==typeof t?(s=t,t=null,r=null):"function"==typeof r&&(s=r,r=null),null!=t&&this.write(t,r),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,r,s){r.ending=!0,R(t,r),s&&(r.finished?e.nextTick(s):t.once("finish",s));r.ended=!0,t.writable=!1}(this,n,s)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),d.prototype.destroy=l.destroy,d.prototype._undestroy=l.undestroy,d.prototype._destroy=function(e,t){this.end(),t(e)},_stream_writable}function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var e=requireProcessNextickArgs(),t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};_stream_duplex=c;var r=Object.create(requireUtil());r.inherits=inheritsExports$1;var s=require_stream_readable(),n=require_stream_writable();r.inherits(c,s);for(var i=t(n.prototype),a=0;a<i.length;a++){var o=i[a];c.prototype[o]||(c.prototype[o]=n.prototype[o])}function c(e){if(!(this instanceof c))return new c(e);s.call(this,e),n.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||e.nextTick(l,this)}function l(e){e.end()}return Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),c.prototype._destroy=function(t,r){this.push(null),this.end(),e.nextTick(r,t)},_stream_duplex}var string_decoder={},safeBuffer$2={exports:{}},hasRequiredSafeBuffer,hasRequiredString_decoder,_stream_readable,hasRequired_stream_readable,_stream_transform,hasRequired_stream_transform,_stream_passthrough,hasRequired_stream_passthrough;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(e,t){var r=require$$0$6,s=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=i),n(s,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$2,safeBuffer$2.exports)),safeBuffer$2.exports}function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var e=requireSafeBuffer().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(r){var s;switch(this.encoding=function(r){var s=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(r);if("string"!=typeof s&&(e.isEncoding===t||!t(r)))throw new Error("Unknown encoding: "+r);return s||r}(r),this.encoding){case"utf16le":this.text=i,this.end=a,s=4;break;case"utf8":this.fillLast=n,s=4;break;case"base64":this.text=o,this.end=c,s=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(s)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function i(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var s=r.charCodeAt(r.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function o(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function l(e){return e&&e.length?this.write(e):""}return string_decoder.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},r.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},string_decoder}function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;hasRequired_stream_readable=1;var e=requireProcessNextickArgs();_stream_readable=h;var t,r=requireIsarray();h.ReadableState=f,require$$0$5.EventEmitter;var s=function(e,t){return e.listeners(t).length},n=requireStream(),i=requireSafeBuffer$1().Buffer,a=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o=Object.create(requireUtil());o.inherits=inheritsExports$1;var c=require$$1$1,u=void 0;u=c&&c.debuglog?c.debuglog("stream"):function(){};var l,p=requireBufferList(),m=requireDestroy();o.inherits(h,n);var d=["error","close","destroy","pause","resume"];function f(e,r){e=e||{};var s=r instanceof(t=t||require_stream_duplex());this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:s&&(i||0===i)?i:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=requireString_decoder().StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function h(e){if(t=t||require_stream_duplex(),!(this instanceof h))return new h(e);this._readableState=new f(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function _(e,t,r,s,n){var o,c=e._readableState;null===t?(c.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,g(e)}(e,c)):(n||(o=function(e,t){var r;s=t,i.isBuffer(s)||s instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var s;return r}(c,t)),o?e.emit("error",o):c.objectMode||t&&t.length>0?("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===i.prototype||(t=function(e){return i.from(e)}(t)),s?c.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,c,t,!0):c.ended?e.emit("error",new Error("stream.push() after EOF")):(c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?E(e,c,t,!1):T(e,c)):E(e,c,t,!1))):s||(c.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(c)}function E(e,t,r,s){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,s?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&g(e)),T(e,t)}Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),h.prototype.destroy=m.destroy,h.prototype._undestroy=m.undestroy,h.prototype._destroy=function(e,t){this.push(null),t(e)},h.prototype.push=function(e,t){var r,s=this._readableState;return s.objectMode?r=!0:"string"==typeof e&&((t=t||s.defaultEncoding)!==s.encoding&&(e=i.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},h.prototype.unshift=function(e){return _(this,e,null,!0,!1)},h.prototype.isPaused=function(){return!1===this._readableState.flowing},h.prototype.setEncoding=function(e){return l||(l=requireString_decoder().StringDecoder),this._readableState.decoder=new l(e),this._readableState.encoding=e,this};var S=8388608;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function g(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(u("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(A,t):A(t))}function A(e){u("emit readable"),e.emit("readable"),N(e)}function T(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(v,t,r))}function v(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(u("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function b(e){u("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(u("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function y(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var s;e<t.head.data.length?(s=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):s=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,s=1,n=r.data;e-=n.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0===(e-=a)){a===i.length?(++s,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++s}return t.length-=s,n}(e,t):function(e,t){var r=i.allocUnsafe(e),s=t.head,n=1;s.data.copy(r),e-=s.data.length;for(;s=s.next;){var a=s.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++n,s.next?t.head=s.next:t.head=t.tail=null):(t.head=s,s.data=a.slice(o));break}++n}return t.length-=n,r}(e,t);return s}(e,t.buffer,t.decoder),r);var r}function O(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,e.nextTick($,r,t))}function $(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,s=e.length;r<s;r++)if(e[r]===t)return r;return-1}return h.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):g(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&O(this),null;var s,n=t.needReadable;return u("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",n=!0),t.ended||t.reading?u("reading or ended",n=!1):n&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(s=e>0?y(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==s&&this.emit("data",s),s},h.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},h.prototype.pipe=function(t,n){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,u("pipe count=%d opts=%j",a.pipesCount,n);var o=(!n||!1!==n.end)&&t!==process.stdout&&t!==process.stderr?l:S;function c(e,r){u("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),t.removeListener("close",_),t.removeListener("finish",E),t.removeListener("drain",p),t.removeListener("error",h),t.removeListener("unpipe",c),i.removeListener("end",l),i.removeListener("end",S),i.removeListener("data",f),m=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||p())}function l(){u("onend"),t.end()}a.endEmitted?e.nextTick(o):i.once("end",o),t.on("unpipe",c);var p=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,N(e))}}(i);t.on("drain",p);var m=!1;var d=!1;function f(e){u("ondata"),d=!1,!1!==t.write(e)||d||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==C(a.pipes,t))&&!m&&(u("false write response, pause",a.awaitDrain),a.awaitDrain++,d=!0),i.pause())}function h(e){u("onerror",e),S(),t.removeListener("error",h),0===s(t,"error")&&t.emit("error",e)}function _(){t.removeListener("finish",E),S()}function E(){u("onfinish"),t.removeListener("close",_),S()}function S(){u("unpipe"),i.unpipe(t)}return i.on("data",f),function(e,t,s){if("function"==typeof e.prependListener)return e.prependListener(t,s);e._events&&e._events[t]?r(e._events[t])?e._events[t].unshift(s):e._events[t]=[s,e._events[t]]:e.on(t,s)}(t,"error",h),t.once("close",_),t.once("finish",E),t.emit("pipe",i),a.flowing||(u("pipe resume"),i.resume()),t},h.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var s=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)s[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=C(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},h.prototype.on=function(t,r){var s=n.prototype.on.call(this,t,r);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&g(this):e.nextTick(b,this))}return s},h.prototype.addListener=h.prototype.on,h.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!0,function(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(I,t,r))}(this,t)),this},h.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},h.prototype.wrap=function(e){var t=this,r=this._readableState,s=!1;for(var n in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(n){(u("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(t.push(n)||(s=!0,e.pause()))})),e)void 0===this[n]&&"function"==typeof e[n]&&(this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n));for(var i=0;i<d.length;i++)e.on(d[i],this.emit.bind(this,d[i]));return this._read=function(t){u("wrapped _read",t),s&&(s=!1,e.resume())},this},Object.defineProperty(h.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),h._fromList=y,_stream_readable}function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=s;var e=require_stream_duplex(),t=Object.create(requireUtil());function r(e,t){var r=this._transformState;r.transforming=!1;var s=r.writecb;if(!s)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),s(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);e.call(this,t),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",n)}function n(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){i(e,t,r)})):i(this,null,null)}function i(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}return t.inherits=inheritsExports$1,t.inherits(s,e),s.prototype.push=function(t,r){return this._transformState.needTransform=!1,e.prototype.push.call(this,t,r)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var s=this._transformState;if(s.writecb=r,s.writechunk=e,s.writeencoding=t,!s.transforming){var n=this._readableState;(s.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(t,r){var s=this;e.prototype._destroy.call(this,t,(function(e){r(e),s.emit("close")}))},_stream_transform}function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=r;var e=require_stream_transform(),t=Object.create(requireUtil());function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return t.inherits=inheritsExports$1,t.inherits(r,e),r.prototype._transform=function(e,t,r){r(null,e)},_stream_passthrough}!function(e,t){var r=require$$0$4;"disable"===process.env.READABLE_STREAM&&r?(e.exports=r,(t=e.exports=r.Readable).Readable=r.Readable,t.Writable=r.Writable,t.Duplex=r.Duplex,t.Transform=r.Transform,t.PassThrough=r.PassThrough,t.Stream=r):((t=e.exports=require_stream_readable()).Stream=r||t,t.Readable=t,t.Writable=require_stream_writable(),t.Duplex=require_stream_duplex(),t.Transform=require_stream_transform(),t.PassThrough=require_stream_passthrough())}(readable,readable.exports);var readableExports=readable.exports,toString$1=Object.prototype.toString,isModern="undefined"!=typeof Buffer&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;function isArrayBuffer(e){return"ArrayBuffer"===toString$1.call(e).slice(8,-1)}function fromArrayBuffer(e,t,r){t>>>=0;var s=e.byteLength-t;if(s<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=s;else if((r>>>=0)>s)throw new RangeError("'length' is out of bounds");return isModern?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return isModern?Buffer.from(e,t):new Buffer(e,t)}function bufferFrom$1(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return isArrayBuffer(e)?fromArrayBuffer(e,t,r):"string"==typeof e?fromString(e,t):isModern?Buffer.from(e):new Buffer(e)}var bufferFrom_1=bufferFrom$1,typedarray={},hasRequiredTypedarray;function requireTypedarray(){return hasRequiredTypedarray||(hasRequiredTypedarray=1,function(e){var t,r,s,n=void 0,i=(t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,{Class:function(e){return t.call(e).replace(/^\[object *|\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,t){return r.call(e,t)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return 0|e},ToUint32:function(e){return e>>>0}}),a=Math.LN2,o=Math.abs,c=Math.floor,u=Math.log,l=Math.min,p=Math.pow,m=Math.round;function d(e){if(f&&s){var t,r=f(e);for(t=0;t<r.length;t+=1)s(e,r[t],{value:e[r[t]],writable:!1,enumerable:!1,configurable:!1})}}s=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,r){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object");return i.HasProperty(r,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,r.get),i.HasProperty(r,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,r.set),i.HasProperty(r,"value")&&(e[t]=r.value),e};var f=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object");var t,r=[];for(t in e)i.HasOwnProperty(e,t)&&r.push(t);return r};function h(e,t){var r=32-t;return e<<r>>r}function _(e,t){var r=32-t;return e<<r>>>r}function E(e){return[255&e]}function S(e){return h(e[0],8)}function R(e){return[255&e]}function g(e){return _(e[0],8)}function A(e){return[(e=m(Number(e)))<0?0:e>255?255:255&e]}function T(e){return[e>>8&255,255&e]}function v(e){return h(e[0]<<8|e[1],16)}function b(e){return[e>>8&255,255&e]}function I(e){return _(e[0]<<8|e[1],16)}function N(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function y(e){return h(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function O(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function $(e){return _(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function C(e,t,r){var s,n,i,m,d,f,h,_=(1<<t-1)-1;function E(e){var t=c(e),r=e-t;return r<.5?t:r>.5||t%2?t+1:t}for(e!=e?(n=(1<<t)-1,i=p(2,r-1),s=0):e===1/0||e===-1/0?(n=(1<<t)-1,i=0,s=e<0?1:0):0===e?(n=0,i=0,s=1/e==-1/0?1:0):(s=e<0,(e=o(e))>=p(2,1-_)?(n=l(c(u(e)/a),1023),(i=E(e/p(2,n)*p(2,r)))/p(2,r)>=2&&(n+=1,i=1),n>_?(n=(1<<t)-1,i=0):(n+=_,i-=p(2,r))):(n=0,i=E(e/p(2,1-_-r)))),d=[],m=r;m;m-=1)d.push(i%2?1:0),i=c(i/2);for(m=t;m;m-=1)d.push(n%2?1:0),n=c(n/2);for(d.push(s?1:0),d.reverse(),f=d.join(""),h=[];f.length;)h.push(parseInt(f.substring(0,8),2)),f=f.substring(8);return h}function L(e,t,r){var s,n,i,a,o,c,u,l,m=[];for(s=e.length;s;s-=1)for(i=e[s-1],n=8;n;n-=1)m.push(i%2?1:0),i>>=1;return m.reverse(),a=m.join(""),o=(1<<t-1)-1,c=parseInt(a.substring(0,1),2)?-1:1,u=parseInt(a.substring(1,1+t),2),l=parseInt(a.substring(1+t),2),u===(1<<t)-1?0!==l?NaN:c*(1/0):u>0?c*p(2,u-o)*(1+l/p(2,r)):0!==l?c*p(2,-(o-1))*(l/p(2,r)):c<0?-0:0}function D(e){return L(e,11,52)}function P(e){return C(e,11,52)}function x(e){return L(e,8,23)}function M(e){return C(e,8,23)}!function(){var t=function(e){if((e=i.ToInt32(e))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var t;for(this.byteLength=e,this._bytes=[],this._bytes.length=e,t=0;t<this.byteLength;t+=1)this._bytes[t]=0;d(this)};e.ArrayBuffer=e.ArrayBuffer||t;var r=function(){};function a(e,a,o){var c;return c=function(e,r,n){var a,o,u,l;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===c)for(a=arguments[0],this.length=a.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new t(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)this._setter(u,a._getter(u));else if("object"!=typeof arguments[0]||(arguments[0]instanceof t||"ArrayBuffer"===i.Class(arguments[0]))){if("object"!=typeof arguments[0]||!(arguments[0]instanceof t||"ArrayBuffer"===i.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)");if(this.buffer=e,this.byteOffset=i.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=i.ToUint32(n),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(o=arguments[0],this.length=i.ToUint32(o.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new t(this.byteLength),this.byteOffset=0,u=0;u<this.length;u+=1)l=o[u],this._setter(u,Number(l));else{if(this.length=i.ToInt32(arguments[0]),n<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new t(this.byteLength),this.byteOffset=0}this.constructor=c,d(this),function(e){if(s){if(e.length>1e5)throw new RangeError("Array too large for polyfill");var t;for(t=0;t<e.length;t+=1)r(t)}function r(t){s(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:!0,configurable:!1})}}(this)},c.prototype=new r,c.prototype.BYTES_PER_ELEMENT=e,c.prototype._pack=a,c.prototype._unpack=o,c.BYTES_PER_ELEMENT=e,c.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if((e=i.ToUint32(e))>=this.length)return n;var t,r,s=[];for(t=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;t<this.BYTES_PER_ELEMENT;t+=1,r+=1)s.push(this.buffer._bytes[r]);return this._unpack(s)},c.prototype.get=c.prototype._getter,c.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if((e=i.ToUint32(e))>=this.length)return n;var r,s,a=this._pack(t);for(r=0,s=this.byteOffset+e*this.BYTES_PER_ELEMENT;r<this.BYTES_PER_ELEMENT;r+=1,s+=1)this.buffer._bytes[s]=a[r]},c.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var r,s,n,a,o,c,u,l,p,m;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(r=arguments[0],(n=i.ToUint32(arguments[1]))+r.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(l=this.byteOffset+n*this.BYTES_PER_ELEMENT,p=r.length*this.BYTES_PER_ELEMENT,r.buffer===this.buffer){for(m=[],o=0,c=r.byteOffset;o<p;o+=1,c+=1)m[o]=r.buffer._bytes[c];for(o=0,u=l;o<p;o+=1,u+=1)this.buffer._bytes[u]=m[o]}else for(o=0,c=r.byteOffset,u=l;o<p;o+=1,c+=1,u+=1)this.buffer._bytes[u]=r.buffer._bytes[c]}else{if("object"!=typeof arguments[0]||void 0===arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(s=arguments[0],a=i.ToUint32(s.length),(n=i.ToUint32(arguments[1]))+a>this.length)throw new RangeError("Offset plus length of array is out of range");for(o=0;o<a;o+=1)c=s[o],this._setter(n+o,Number(c))}},c.prototype.subarray=function(e,t){function r(e,t,r){return e<t?t:e>r?r:e}e=i.ToInt32(e),t=i.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=r(e,0,this.length);var s=(t=r(t,0,this.length))-e;return s<0&&(s=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,s)},c}var o=a(1,E,S),c=a(1,R,g),u=a(1,A,g),l=a(2,T,v),p=a(2,b,I),m=a(4,N,y),f=a(4,O,$),h=a(4,M,x),_=a(8,P,D);e.Int8Array=e.Int8Array||o,e.Uint8Array=e.Uint8Array||c,e.Uint8ClampedArray=e.Uint8ClampedArray||u,e.Int16Array=e.Int16Array||l,e.Uint16Array=e.Uint16Array||p,e.Int32Array=e.Int32Array||m,e.Uint32Array=e.Uint32Array||f,e.Float32Array=e.Float32Array||h,e.Float64Array=e.Float64Array||_}(),function(){function t(e,t){return i.IsCallable(e.get)?e.get(t):e[t]}var r,s=(r=new e.Uint16Array([4660]),18===t(new e.Uint8Array(r.buffer),0)),n=function(t,r,s){if(0===arguments.length)t=new e.ArrayBuffer(0);else if(!(t instanceof e.ArrayBuffer||"ArrayBuffer"===i.Class(t)))throw new TypeError("TypeError");if(this.buffer=t||new e.ArrayBuffer(0),this.byteOffset=i.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteLength=arguments.length<3?this.buffer.byteLength-this.byteOffset:i.ToUint32(s),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");d(this)};function a(r){return function(n,a){if((n=i.ToUint32(n))+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");n+=this.byteOffset;var o,c=new e.Uint8Array(this.buffer,n,r.BYTES_PER_ELEMENT),u=[];for(o=0;o<r.BYTES_PER_ELEMENT;o+=1)u.push(t(c,o));return Boolean(a)===Boolean(s)&&u.reverse(),t(new r(new e.Uint8Array(u).buffer),0)}}function o(r){return function(n,a,o){if((n=i.ToUint32(n))+r.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var c,u=new r([a]),l=new e.Uint8Array(u.buffer),p=[];for(c=0;c<r.BYTES_PER_ELEMENT;c+=1)p.push(t(l,c));Boolean(o)===Boolean(s)&&p.reverse(),new e.Uint8Array(this.buffer,n,r.BYTES_PER_ELEMENT).set(p)}}n.prototype.getUint8=a(e.Uint8Array),n.prototype.getInt8=a(e.Int8Array),n.prototype.getUint16=a(e.Uint16Array),n.prototype.getInt16=a(e.Int16Array),n.prototype.getUint32=a(e.Uint32Array),n.prototype.getInt32=a(e.Int32Array),n.prototype.getFloat32=a(e.Float32Array),n.prototype.getFloat64=a(e.Float64Array),n.prototype.setUint8=o(e.Uint8Array),n.prototype.setInt8=o(e.Int8Array),n.prototype.setUint16=o(e.Uint16Array),n.prototype.setInt16=o(e.Int16Array),n.prototype.setUint32=o(e.Uint32Array),n.prototype.setInt32=o(e.Int32Array),n.prototype.setFloat32=o(e.Float32Array),n.prototype.setFloat64=o(e.Float64Array),e.DataView=e.DataView||n}()}(typedarray)),typedarray}var Writable=readableExports.Writable,inherits$1=inheritsExports$1,bufferFrom=bufferFrom_1;if("undefined"==typeof Uint8Array)var U8=requireTypedarray().Uint8Array;else var U8=Uint8Array;function ConcatStream(e,t){if(!(this instanceof ConcatStream))return new ConcatStream(e,t);"function"==typeof e&&(t=e,e={}),e||(e={});var r=e.encoding,s=!1;r?"u8"!==(r=String(r).toLowerCase())&&"uint8"!==r||(r="uint8array"):s=!0,Writable.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=s,t&&this.on("finish",(function(){t(this.getBody())})),this.body=[]}var concatStream=ConcatStream;function isArrayish(e){return/Array\]$/.test(Object.prototype.toString.call(e))}function isBufferish(e){return"string"==typeof e||isArrayish(e)||e&&"function"==typeof e.subarray}function stringConcat(e){for(var t=[],r=0;r<e.length;r++){var s=e[r];"string"==typeof s||Buffer.isBuffer(s)?t.push(s):isBufferish(s)?t.push(bufferFrom(s)):t.push(bufferFrom(String(s)))}return t=Buffer.isBuffer(e[0])?(t=Buffer.concat(t)).toString("utf8"):t.join("")}function bufferConcat(e){for(var t=[],r=0;r<e.length;r++){var s=e[r];Buffer.isBuffer(s)?t.push(s):isBufferish(s)?t.push(bufferFrom(s)):t.push(bufferFrom(String(s)))}return Buffer.concat(t)}function arrayConcat(e){for(var t=[],r=0;r<e.length;r++)t.push.apply(t,e[r]);return t}function u8Concat(e){for(var t=0,r=0;r<e.length;r++)"string"==typeof e[r]&&(e[r]=bufferFrom(e[r])),t+=e[r].length;for(var s=new U8(t),n=(r=0,0);r<e.length;r++)for(var i=e[r],a=0;a<i.length;a++)s[n++]=i[a];return s}inherits$1(ConcatStream,Writable),ConcatStream.prototype._write=function(e,t,r){this.body.push(e),r()},ConcatStream.prototype.inferEncoding=function(e){var t=void 0===e?this.body[0]:e;return Buffer.isBuffer(t)?"buffer":"undefined"!=typeof Uint8Array&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":"string"==typeof t?"string":"[object Object]"===Object.prototype.toString.call(t)?"object":"buffer"},ConcatStream.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?arrayConcat(this.body):"string"===this.encoding?stringConcat(this.body):"buffer"===this.encoding?bufferConcat(this.body):"uint8array"===this.encoding?u8Concat(this.body):this.body):[]};var concat=concatStream;function MemoryStorage(e){}MemoryStorage.prototype._handleFile=function(e,t,r){t.stream.pipe(concat({encoding:"buffer"},(function(e){r(null,{buffer:e,size:e.length})})))},MemoryStorage.prototype._removeFile=function(e,t,r){delete t.buffer,r(null)};var memory$1=function(e){return new MemoryStorage},makeMiddleware=makeMiddleware_1,diskStorage=disk,memoryStorage=memory$1,MulterError=multerError;function allowAll(e,t,r){r(null,!0)}function Multer(e){e.storage?this.storage=e.storage:e.dest?this.storage=diskStorage({destination:e.dest}):this.storage=memoryStorage(),this.limits=e.limits,this.preservePath=e.preservePath,this.fileFilter=e.fileFilter||allowAll}function multer(e){if(void 0===e)return new Multer({});if("object"==typeof e&&null!==e)return new Multer(e);throw new TypeError("Expected object for argument options")}Multer.prototype._makeMiddleware=function(e,t){return makeMiddleware(function(){var r=this.fileFilter,s=Object.create(null);return e.forEach((function(e){"number"==typeof e.maxCount?s[e.name]=e.maxCount:s[e.name]=1/0})),{limits:this.limits,preservePath:this.preservePath,storage:this.storage,fileFilter:function(e,t,n){if((s[t.fieldname]||0)<=0)return n(new MulterError("LIMIT_UNEXPECTED_FILE",t.fieldname));s[t.fieldname]-=1,r(e,t,n)},fileStrategy:t}}.bind(this))},Multer.prototype.single=function(e){return this._makeMiddleware([{name:e,maxCount:1}],"VALUE")},Multer.prototype.array=function(e,t){return this._makeMiddleware([{name:e,maxCount:t}],"ARRAY")},Multer.prototype.fields=function(e){return this._makeMiddleware(e,"OBJECT")},Multer.prototype.none=function(){return this._makeMiddleware([],"NONE")},Multer.prototype.any=function(){return makeMiddleware(function(){return{limits:this.limits,preservePath:this.preservePath,storage:this.storage,fileFilter:this.fileFilter,fileStrategy:"ARRAY"}}.bind(this))},multer$2.exports=multer,multer$2.exports.diskStorage=diskStorage,multer$2.exports.memoryStorage=memoryStorage,multer$2.exports.MulterError=MulterError;var multerExports=multer$2.exports,multer$1=getDefaultExportFromCjs(multerExports),morgan$2={exports:{}},basicAuth={exports:{}},safeBuffer$1={exports:{}};!function(e,t){var r=require$$0$6,s=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=i),n(s,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer$1,safeBuffer$1.exports);var safeBufferExports$1=safeBuffer$1.exports,Buffer$1=safeBufferExports$1.Buffer;
|
|
37
|
+
/*!
|
|
38
|
+
* basic-auth
|
|
39
|
+
* Copyright(c) 2013 TJ Holowaychuk
|
|
40
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
41
|
+
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
|
42
|
+
* MIT Licensed
|
|
43
|
+
*/basicAuth.exports=auth$1,basicAuth.exports.parse=parse$2;var CREDENTIALS_REGEXP=/^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/,USER_PASS_REGEXP=/^([^:]*):(.*)$/;function auth$1(e){if(!e)throw new TypeError("argument req is required");if("object"!=typeof e)throw new TypeError("argument req is required to be an object");return parse$2(getAuthorization(e))}function decodeBase64(e){return Buffer$1.from(e,"base64").toString()}function getAuthorization(e){if(!e.headers||"object"!=typeof e.headers)throw new TypeError("argument req is required to have headers property");return e.headers.authorization}function parse$2(e){if("string"==typeof e){var t=CREDENTIALS_REGEXP.exec(e);if(t){var r=USER_PASS_REGEXP.exec(decodeBase64(t[1]));if(r)return new Credentials(r[1],r[2])}}}function Credentials(e,t){this.name=e,this.pass=t}var basicAuthExports=basicAuth.exports,src={exports:{}},browser={exports:{}},debug$1={exports:{}},ms,hasRequiredMs,hasRequiredDebug,hasRequiredBrowser;function requireMs(){if(hasRequiredMs)return ms;hasRequiredMs=1;var e=1e3,t=60*e,r=60*t,s=24*r,n=365.25*s;function i(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}return ms=function(a,o){o=o||{};var c=typeof a;if("string"===c&&a.length>0)return function(i){if((i=String(i)).length>100)return;var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(i);if(!a)return;var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return o*n;case"days":case"day":case"d":return o*s;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*t;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(a);if("number"===c&&!1===isNaN(a))return o.long?function(n){return i(n,s,"day")||i(n,r,"hour")||i(n,t,"minute")||i(n,e,"second")||n+" ms"}(a):function(n){if(n>=s)return Math.round(n/s)+"d";if(n>=r)return Math.round(n/r)+"h";if(n>=t)return Math.round(n/t)+"m";if(n>=e)return Math.round(n/e)+"s";return n+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},ms}function requireDebug(){return hasRequiredDebug||(hasRequiredDebug=1,function(e,t){var r;function s(e){function s(){if(s.enabled){var e=s,n=+new Date,i=n-(r||n);e.diff=i,e.prev=r,e.curr=n,r=n;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(r,s){if("%%"===r)return r;c++;var n=t.formatters[s];if("function"==typeof n){var i=a[c];r=n.call(e,i),a.splice(c,1),c--}return r})),t.formatArgs.call(e,a),(s.log||t.log||console.log.bind(console)).apply(e,a)}}return s.namespace=e,s.enabled=t.enabled(e),s.useColors=t.useColors(),s.color=function(e){var r,s=0;for(r in e)s=(s<<5)-s+e.charCodeAt(r),s|=0;return t.colors[Math.abs(s)%t.colors.length]}(e),"function"==typeof t.init&&t.init(s),s}(t=e.exports=s.debug=s.default=s).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),s=r.length,n=0;n<s;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,s;for(r=0,s=t.skips.length;r<s;r++)if(t.skips[r].test(e))return!1;for(r=0,s=t.names.length;r<s;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=requireMs(),t.names=[],t.skips=[],t.formatters={}}(debug$1,debug$1.exports)),debug$1.exports}function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,function(e,t){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=requireDebug()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var s="color: "+this.color;e.splice(1,0,s,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))})),e.splice(i,0,s)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}(browser,browser.exports)),browser.exports}var node={exports:{}},hasRequiredNode;function requireNode(){return hasRequiredNode||(hasRequiredNode=1,function(e,t){var r=require$$0$7,s=require$$1$1;(t=e.exports=requireDebug()).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),s=0;s<r.length;s++)e.inspectOpts[r[s]]=t.inspectOpts[r[s]]},t.log=function(){return i.write(s.format.apply(s,arguments)+"\n")},t.formatArgs=function(e){var r=this.namespace,s=this.useColors;if(s){var n=this.color,i=" [3"+n+";1m"+r+" [0m";e[0]=i+e[0].split("\n").join("\n"+i),e.push("[3"+n+"m+"+t.humanize(this.diff)+"[0m")}else e[0]=(new Date).toUTCString()+" "+r+" "+e[0]},t.save=function(e){null==e?delete process.env.DEBUG:process.env.DEBUG=e},t.load=a,t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(n)},t.colors=[6,2,3,4,5,1],t.inspectOpts=Object.keys(process.env).filter((function(e){return/^debug_/i.test(e)})).reduce((function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(function(e,t){return t.toUpperCase()})),s=process.env[t];return s=!!/^(yes|on|true|enabled)$/i.test(s)||!/^(no|off|false|disabled)$/i.test(s)&&("null"===s?null:Number(s)),e[r]=s,e}),{});var n=parseInt(process.env.DEBUG_FD,10)||2;1!==n&&2!==n&&s.deprecate((function(){}),"except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();var i=1===n?process.stdout:2===n?process.stderr:function(e){var t;switch(process.binding("tty_wrap").guessHandleType(e)){case"TTY":(t=new r.WriteStream(e))._type="tty",t._handle&&t._handle.unref&&t._handle.unref();break;case"FILE":(t=new require$$0$2.SyncWriteStream(e,{autoClose:!1}))._type="fs";break;case"PIPE":case"TCP":(t=new require$$4.Socket({fd:e,readable:!1,writable:!0})).readable=!1,t.read=null,t._type="pipe",t._handle&&t._handle.unref&&t._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return t.fd=e,t._isStdio=!0,t}(n);function a(){return process.env.DEBUG}t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts).split("\n").map((function(e){return e.trim()})).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,s.inspect(e,this.inspectOpts)},t.enable(a())}(node,node.exports)),node.exports}"undefined"!=typeof process&&"renderer"===process.type?src.exports=requireBrowser():src.exports=requireNode();var srcExports=src.exports,relative$1=require$$1.relative,depd_1$1=depd$1,basePath$1=process.cwd();
|
|
44
|
+
/*!
|
|
45
|
+
* depd
|
|
46
|
+
* Copyright(c) 2014-2018 Douglas Christopher Wilson
|
|
47
|
+
* MIT Licensed
|
|
48
|
+
*/function containsNamespace$1(e,t){for(var r=e.split(/[ ,]+/),s=String(t).toLowerCase(),n=0;n<r.length;n++){var i=r[n];if(i&&("*"===i||i.toLowerCase()===s))return!0}return!1}function convertDataDescriptorToAccessor$1(e,t,r){var s=Object.getOwnPropertyDescriptor(e,t),n=s.value;return s.get=function(){return n},s.writable&&(s.set=function(e){return n=e}),delete s.value,delete s.writable,Object.defineProperty(e,t,s),s}function createArgumentsString$1(e){for(var t="",r=0;r<e;r++)t+=", arg"+r;return t.substr(2)}function createStackString$1(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var r=0;r<e.length;r++)t+="\n at "+e[r].toString();return t}function depd$1(e){if(!e)throw new TypeError("argument namespace is required");var t=callSiteLocation$1(getStack$1()[1])[0];function r(e){log$1.call(r,e)}return r._file=t,r._ignored=isignored$1(e),r._namespace=e,r._traced=istraced$1(e),r._warned=Object.create(null),r.function=wrapfunction$1,r.property=wrapproperty$1,r}function eehaslisteners(e,t){return("function"!=typeof e.listenerCount?e.listeners(t).length:e.listenerCount(t))>0}function isignored$1(e){return!!process.noDeprecation||containsNamespace$1(process.env.NO_DEPRECATION||"",e)}function istraced$1(e){return!!process.traceDeprecation||containsNamespace$1(process.env.TRACE_DEPRECATION||"",e)}function log$1(e,t){var r=eehaslisteners(process,"deprecation");if(r||!this._ignored){var s,n,i,a,o=0,c=!1,u=getStack$1(),l=this._file;for(t?(a=t,(i=callSiteLocation$1(u[1])).name=a.name,l=i[0]):i=a=callSiteLocation$1(u[o=2]);o<u.length;o++)if((n=(s=callSiteLocation$1(u[o]))[0])===l)c=!0;else if(n===this._file)l=this._file;else if(c)break;var p=s?a.join(":")+"__"+s.join(":"):void 0;if(void 0===p||!(p in this._warned)){this._warned[p]=!0;var m=e;if(m||(m=i!==a&&i.name?defaultMessage$1(i):defaultMessage$1(a)),r){var d=DeprecationError$1(this._namespace,m,u.slice(o));process.emit("deprecation",d)}else{var f=(process.stderr.isTTY?formatColor$1:formatPlain$1).call(this,m,s,u.slice(o));process.stderr.write(f+"\n","utf8")}}}}function callSiteLocation$1(e){var t=e.getFileName()||"<anonymous>",r=e.getLineNumber(),s=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var n=[t,r,s];return n.callSite=e,n.name=e.getFunctionName(),n}function defaultMessage$1(e){var t=e.callSite,r=e.name;r||(r="<anonymous@"+formatLocation$1(e)+">");var s=t.getThis(),n=s&&t.getTypeName();return"Object"===n&&(n=void 0),"Function"===n&&(n=s.name||n),n&&t.getMethodName()?n+"."+r:r}function formatPlain$1(e,t,r){var s=(new Date).toUTCString()+" "+this._namespace+" deprecated "+e;if(this._traced){for(var n=0;n<r.length;n++)s+="\n at "+r[n].toString();return s}return t&&(s+=" at "+formatLocation$1(t)),s}function formatColor$1(e,t,r){var s="[36;1m"+this._namespace+"[22;39m [33;1mdeprecated[22;39m [0m"+e+"[39m";if(this._traced){for(var n=0;n<r.length;n++)s+="\n [36mat "+r[n].toString()+"[39m";return s}return t&&(s+=" [36m"+formatLocation$1(t)+"[39m"),s}function formatLocation$1(e){return relative$1(basePath$1,e[0])+":"+e[1]+":"+e[2]}function getStack$1(){var e=Error.stackTraceLimit,t={},r=Error.prepareStackTrace;Error.prepareStackTrace=prepareObjectStackTrace$1,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(t);var s=t.stack.slice(1);return Error.prepareStackTrace=r,Error.stackTraceLimit=e,s}function prepareObjectStackTrace$1(e,t){return t}function wrapfunction$1(e,t){if("function"!=typeof e)throw new TypeError("argument fn must be a function");var r=createArgumentsString$1(e.length),s=callSiteLocation$1(getStack$1()[1]);return s.name=e.name,new Function("fn","log","deprecate","message","site",'"use strict"\nreturn function ('+r+") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(e,log$1,this,t,s)}function wrapproperty$1(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(e,t);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable");var n=this,i=callSiteLocation$1(getStack$1()[1]);i.name=t,"value"in s&&(s=convertDataDescriptorToAccessor$1(e,t));var a=s.get,o=s.set;"function"==typeof a&&(s.get=function(){return log$1.call(n,r,i),a.apply(this,arguments)}),"function"==typeof o&&(s.set=function(){return log$1.call(n,r,i),o.apply(this,arguments)}),Object.defineProperty(e,t,s)}function DeprecationError$1(e,t,r){var s,n=new Error;return Object.defineProperty(n,"constructor",{value:DeprecationError$1}),Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(n,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,get:function(){return void 0!==s?s:s=createStackString$1.call(this,r)},set:function(e){s=e}}),n}var onFinished$2={exports:{}},eeFirst=first$1;
|
|
49
|
+
/*!
|
|
50
|
+
* ee-first
|
|
51
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
52
|
+
* MIT Licensed
|
|
53
|
+
*/function first$1(e,t){if(!Array.isArray(e))throw new TypeError("arg must be an array of [ee, events...] arrays");for(var r=[],s=0;s<e.length;s++){var n=e[s];if(!Array.isArray(n)||n.length<2)throw new TypeError("each array member must be [ee, events...]");for(var i=n[0],a=1;a<n.length;a++){var o=n[a],c=listener(o,u);i.on(o,c),r.push({ee:i,event:o,fn:c})}}function u(){l(),t.apply(null,arguments)}function l(){for(var e,t=0;t<r.length;t++)(e=r[t]).ee.removeListener(e.event,e.fn)}function p(e){t=e}return p.cancel=l,p}function listener(e,t){return function(r){for(var s=new Array(arguments.length),n="error"===e?r:null,i=0;i<s.length;i++)s[i]=arguments[i];t(n,this,e,s)}}
|
|
54
|
+
/*!
|
|
55
|
+
* on-finished
|
|
56
|
+
* Copyright(c) 2013 Jonathan Ong
|
|
57
|
+
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
58
|
+
* MIT Licensed
|
|
59
|
+
*/onFinished$2.exports=onFinished$1,onFinished$2.exports.isFinished=isFinished;var first=eeFirst,defer$2="function"==typeof setImmediate?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function onFinished$1(e,t){return!1!==isFinished(e)?(defer$2(t,null,e),e):(attachListener(e,t),e)}function isFinished(e){var t=e.socket;return"boolean"==typeof e.finished?Boolean(e.finished||t&&!t.writable):"boolean"==typeof e.complete?Boolean(e.upgrade||!t||!t.readable||e.complete&&!e.readable):void 0}function attachFinishedListener(e,t){var r,s,n=!1;function i(e){r.cancel(),s.cancel(),n=!0,t(e)}function a(t){e.removeListener("socket",a),n||r===s&&(s=first([[t,"error","close"]],i))}r=s=first([[e,"end","finish"]],i),e.socket?a(e.socket):(e.on("socket",a),void 0===e.socket&&patchAssignSocket(e,a))}function attachListener(e,t){var r=e.__onFinished;r&&r.queue||(r=e.__onFinished=createListener(e),attachFinishedListener(e,r)),r.queue.push(t)}function createListener(e){function t(r){if(e.__onFinished===t&&(e.__onFinished=null),t.queue){var s=t.queue;t.queue=null;for(var n=0;n<s.length;n++)s[n](r,e)}}return t.queue=[],t}function patchAssignSocket(e,t){var r=e.assignSocket;"function"==typeof r&&(e.assignSocket=function(e){r.call(this,e),t(e)})}var onFinishedExports=onFinished$2.exports,onHeaders_1=onHeaders$1;
|
|
60
|
+
/*!
|
|
61
|
+
* on-headers
|
|
62
|
+
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
63
|
+
* MIT Licensed
|
|
64
|
+
*/function createWriteHead(e,t){var r=!1;return function(s){var n=setWriteHeadHeaders.apply(this,arguments);return r||(r=!0,t.call(this),"number"==typeof n[0]&&this.statusCode!==n[0]&&(n[0]=this.statusCode,n.length=1)),e.apply(this,n)}}function onHeaders$1(e,t){if(!e)throw new TypeError("argument res is required");if("function"!=typeof t)throw new TypeError("argument listener must be a function");e.writeHead=createWriteHead(e.writeHead,t)}function setHeadersFromArray(e,t){for(var r=0;r<t.length;r++)e.setHeader(t[r][0],t[r][1])}function setHeadersFromObject(e,t){for(var r=Object.keys(t),s=0;s<r.length;s++){var n=r[s];n&&e.setHeader(n,t[n])}}function setWriteHeadHeaders(e){var t=arguments.length,r=t>1&&"string"==typeof arguments[1]?2:1,s=t>=r+1?arguments[r]:void 0;this.statusCode=e,Array.isArray(s)?setHeadersFromArray(this,s):s&&setHeadersFromObject(this,s);for(var n=new Array(Math.min(t,r)),i=0;i<n.length;i++)n[i]=arguments[i];return n}
|
|
65
|
+
/*!
|
|
66
|
+
* morgan
|
|
67
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
68
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
69
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
70
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
71
|
+
* MIT Licensed
|
|
72
|
+
*/morgan$2.exports=morgan,morgan$2.exports.compile=compile,morgan$2.exports.format=format,morgan$2.exports.token=token;var auth=basicAuthExports,debug=srcExports("morgan"),deprecate$1=depd_1$1("morgan"),onFinished=onFinishedExports,onHeaders=onHeaders_1,CLF_MONTH=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],DEFAULT_BUFFER_DURATION=1e3;function morgan(e,t){var r=e,s=t||{};e&&"object"==typeof e&&(r=(s=e).format||"default",deprecate$1("morgan(options): use morgan("+("string"==typeof r?JSON.stringify(r):"format")+", options) instead")),void 0===r&&deprecate$1("undefined format: specify a format");var n=s.immediate,i=s.skip||!1,a="function"!=typeof r?getFormatFunction(r):r,o=s.buffer,c=s.stream||process.stdout;o&&(deprecate$1("buffer option"),c=createBufferStream(c,"number"!=typeof o?DEFAULT_BUFFER_DURATION:o));return function(e,t,r){function s(){if(!1!==i&&i(e,t))debug("skip request");else{var r=a(morgan,e,t);null!=r?(debug("log request"),c.write(r+"\n")):debug("skip line")}}e._startAt=void 0,e._startTime=void 0,e._remoteAddress=getip(e),t._startAt=void 0,t._startTime=void 0,recordStartTime.call(e),n?s():(onHeaders(t,recordStartTime),onFinished(t,s)),r()}}function clfdate(e){var t=e.getUTCDate(),r=e.getUTCHours(),s=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCFullYear(),a=CLF_MONTH[e.getUTCMonth()];return pad2(t)+"/"+a+"/"+i+":"+pad2(r)+":"+pad2(s)+":"+pad2(n)+" +0000"}function compile(e){if("string"!=typeof e)throw new TypeError("argument format must be a string");var t=' "use strict"\n return '+String(JSON.stringify(e)).replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g,(function(e,t,r){var s="req, res",n="tokens["+String(JSON.stringify(t))+"]";return void 0!==r&&(s+=", "+String(JSON.stringify(r))),'" +\n ('+n+"("+s+') || "-") + "'}));return new Function("tokens, req, res",t)}function createBufferStream(e,t){var r=[],s=null;function n(){s=null,e.write(r.join("")),r.length=0}return{write:function(e){null===s&&(s=setTimeout(n,t)),r.push(e)}}}function format(e,t){return morgan[e]=t,this}function getFormatFunction(e){var t=morgan[e]||e||morgan.default;return"function"!=typeof t?compile(t):t}function getip(e){return e.ip||e._remoteAddress||e.connection&&e.connection.remoteAddress||void 0}function headersSent(e){return"boolean"!=typeof e.headersSent?Boolean(e._header):e.headersSent}function pad2(e){var t=String(e);return(1===t.length?"0":"")+t}function recordStartTime(){this._startAt=process.hrtime(),this._startTime=new Date}function token(e,t){return morgan[e]=t,this}morgan.format("combined",':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"'),morgan.format("common",':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length]'),morgan.format("default",':remote-addr - :remote-user [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"'),deprecate$1.property(morgan,"default","default format: use combined format"),morgan.format("short",":remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms"),morgan.format("tiny",":method :url :status :res[content-length] - :response-time ms"),morgan.format("dev",(function e(t,r,s){var n=headersSent(s)?s.statusCode:void 0,i=n>=500?31:n>=400?33:n>=300?36:n>=200?32:0,a=e[i];return a||(a=e[i]=compile("[0m:method :url ["+i+"m:status[0m :response-time ms - :res[content-length][0m")),a(t,r,s)})),morgan.token("url",(function(e){return e.originalUrl||e.url})),morgan.token("method",(function(e){return e.method})),morgan.token("response-time",(function(e,t,r){if(e._startAt&&t._startAt)return(1e3*(t._startAt[0]-e._startAt[0])+1e-6*(t._startAt[1]-e._startAt[1])).toFixed(void 0===r?3:r)})),morgan.token("total-time",(function(e,t,r){if(e._startAt&&t._startAt){var s=process.hrtime(e._startAt);return(1e3*s[0]+1e-6*s[1]).toFixed(void 0===r?3:r)}})),morgan.token("date",(function(e,t,r){var s=new Date;switch(r||"web"){case"clf":return clfdate(s);case"iso":return s.toISOString();case"web":return s.toUTCString()}})),morgan.token("status",(function(e,t){return headersSent(t)?String(t.statusCode):void 0})),morgan.token("referrer",(function(e){return e.headers.referer||e.headers.referrer})),morgan.token("remote-addr",getip),morgan.token("remote-user",(function(e){var t=auth(e);return t?t.name:void 0})),morgan.token("http-version",(function(e){return e.httpVersionMajor+"."+e.httpVersionMinor})),morgan.token("user-agent",(function(e){return e.headers["user-agent"]})),morgan.token("req",(function(e,t,r){var s=e.headers[r.toLowerCase()];return Array.isArray(s)?s.join(", "):s})),morgan.token("res",(function(e,t,r){if(headersSent(t)){var s=t.getHeader(r);return Array.isArray(s)?s.join(", "):s}}));var morganExports=morgan$2.exports,morgan$1=getDefaultExportFromCjs(morganExports);class Http{static mount(e){const t=loadBasicConfig();e.use(morgan$1("dev")),e.use(express.json({limit:t.max_body_size})),e.use(express.urlencoded({extended:!0,limit:t.max_body_size}));const r=multer$1({limits:{fieldSize:1/0}});e.use(r.array("files")),e.use(cookieParser$1());const s=path$4.join(process.cwd(),"public");e.use(express.static(s))}}class CORS{static mount(e){loadBasicConfig().cors_enabled&&e.use(((e,t,r)=>{t.header("Access-Control-Allow-Origin",e.headers.origin),t.header("Access-Control-Allow-Headers","X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept"),t.header("Access-Control-Allow-Methods","GET, POST, PUT, DELETE"),t.header("Access-Control-Allow-Credentials","true"),r()}))}}class Local{static mount(e){const t=loadBasicConfig();e.use(((r,s,n)=>{if(e.locals.currentPath=new URL(`${r.protocol}://${r.get("host")}${r.originalUrl}`).pathname,r.headers.referer){const t=new URL(r.headers.referer);e.locals.baseUrl=t.origin}else e.locals.baseUrl="x-forwarded-proto"in r.headers?`${r.headers["x-forwarded-proto"]}://${r.headers.host}`:`//${r.headers.host}`;t.rewrite_base_url&&(e.locals.baseUrl=t.rewrite_base_url(e.locals.baseUrl)),n()}))}}var lib$3={exports:{}},pause$1=function(e){var t,r,s=[];return e.on("data",t=function(e,t){s.push(["data",e,t])}),e.on("end",r=function(e,t){s.push(["end",e,t])}),{end:function(){e.removeListener("data",t),e.removeListener("end",r)},resume:function(){this.end();for(var t=0,r=s.length;t<r;++t)e.emit.apply(e,s[t])}}},lib$2={exports:{}};function Strategy$2(){}Strategy$2.prototype.authenticate=function(e,t){throw new Error("Strategy#authenticate must be overridden by subclass")};var strategy$1=Strategy$2;!function(e,t){var r=strategy$1;(e.exports=r).Strategy=r}(lib$2,lib$2.exports);var libExports$3=lib$2.exports,pause=pause$1,util$4=require$$1$1,Strategy$1=libExports$3;function SessionStrategy$1(e,t){"function"==typeof e&&(t=e,e=void 0),e=e||{},Strategy$1.call(this),this.name="session",this._deserializeUser=t}util$4.inherits(SessionStrategy$1,Strategy$1),SessionStrategy$1.prototype.authenticate=function(e,t){if(!e._passport)return this.error(new Error("passport.initialize() middleware not in use"));t=t||{};var r,s=this;if(e._passport.session&&(r=e._passport.session.user),r||0===r){var n=t.pauseStream?pause(e):null;this._deserializeUser(r,e,(function(t,r){if(t)return s.error(t);if(r){var i=e._passport.instance._userProperty||"user";e[i]=r}else delete e._passport.session.user;s.pass(),n&&n.resume()}))}else s.pass()};var session$2=SessionStrategy$1;function SessionManager$1(e,t){"function"==typeof e&&(t=e,e=void 0),e=e||{},this._key=e.key||"passport",this._serializeUser=t}SessionManager$1.prototype.logIn=function(e,t,r){var s=this;this._serializeUser(t,e,(function(t,n){if(t)return r(t);e._passport.session||(e._passport.session={}),e._passport.session.user=n,e.session||(e.session={}),e.session[s._key]=e._passport.session,r()}))},SessionManager$1.prototype.logOut=function(e,t){e._passport&&e._passport.session&&delete e._passport.session.user,t&&t()};var sessionmanager=SessionManager$1,connect={exports:{}},initialize,hasRequiredInitialize;function requireInitialize(){return hasRequiredInitialize||(hasRequiredInitialize=1,initialize=function(e){return function(t,r,s){t._passport={},t._passport.instance=e,t.session&&t.session[e._key]&&(t._passport.session=t.session[e._key]),s()}}),initialize}var request={exports:{}},hasRequiredRequest,authenticationerror,hasRequiredAuthenticationerror,authenticate,hasRequiredAuthenticate,hasRequiredConnect;function requireRequest(){return hasRequiredRequest||(hasRequiredRequest=1,(e=request.exports={}).login=e.logIn=function(e,t,r){"function"==typeof t&&(r=t,t={}),t=t||{};var s="user";this._passport&&this._passport.instance&&(s=this._passport.instance._userProperty||"user");var n=void 0===t.session||t.session;if(this[s]=e,n){if(!this._passport)throw new Error("passport.initialize() middleware not in use");if("function"!=typeof r)throw new Error("req#login requires a callback function");var i=this;this._passport.instance._sm.logIn(this,e,(function(e){if(e)return i[s]=null,r(e);r()}))}else r&&r()},e.logout=e.logOut=function(){var e="user";this._passport&&this._passport.instance&&(e=this._passport.instance._userProperty||"user"),this[e]=null,this._passport&&this._passport.instance._sm.logOut(this)},e.isAuthenticated=function(){var e="user";return this._passport&&this._passport.instance&&(e=this._passport.instance._userProperty||"user"),!!this[e]},e.isUnauthenticated=function(){return!this.isAuthenticated()}),request.exports;var e}function requireAuthenticationerror(){if(hasRequiredAuthenticationerror)return authenticationerror;function e(e,t){Error.call(this),Error.captureStackTrace(this,arguments.callee),this.name="AuthenticationError",this.message=e,this.status=t||401}return hasRequiredAuthenticationerror=1,e.prototype.__proto__=Error.prototype,authenticationerror=e}function requireAuthenticate(){if(hasRequiredAuthenticate)return authenticate;hasRequiredAuthenticate=1;var e=require$$0$8,t=requireRequest(),r=requireAuthenticationerror();return authenticate=function(s,n,i,a){"function"==typeof i&&(a=i,i={}),i=i||{};var o=!0;return Array.isArray(n)||(n=[n],o=!1),function(c,u,l){e.IncomingMessage.prototype.logIn&&e.IncomingMessage.prototype.logIn!==t.logIn&&requireConnect().__monkeypatchNode();var p=[];!function t(m){var d,f,h=n[m];if(!h)return function(){if(a){if(o){var t=p.map((function(e){return e.challenge})),s=p.map((function(e){return e.status}));return a(null,!1,t,s)}return a(null,!1,p[0].challenge,p[0].status)}var n,m=p[0]||{},d=m.challenge||{};if(i.failureFlash){var f=i.failureFlash;"string"==typeof f&&(f={type:"error",message:f}),f.type=f.type||"error";var h=f.type||d.type||"error";"string"==typeof(n=f.message||d.message||d)&&c.flash(h,n)}if(i.failureMessage&&("boolean"==typeof(n=i.failureMessage)&&(n=d.message||d),"string"==typeof n&&(c.session.messages=c.session.messages||[],c.session.messages.push(n))),i.failureRedirect)return u.redirect(i.failureRedirect);for(var _,E,S=[],R=0,g=p.length;R<g;R++)d=(m=p[R]).challenge,E=m.status,_=_||E,"string"==typeof d&&S.push(d);if(u.statusCode=_||401,401==u.statusCode&&S.length&&u.setHeader("WWW-Authenticate",S),i.failWithError)return l(new r(e.STATUS_CODES[u.statusCode],_));u.end(e.STATUS_CODES[u.statusCode])}();if("function"==typeof h.authenticate)d=h;else{if(!(f=s._strategy(h)))return l(new Error('Unknown authentication strategy "'+h+'"'));d=Object.create(f)}d.success=function(e,t){if(a)return a(null,e,t);var r;if(t=t||{},i.successFlash){var n=i.successFlash;"string"==typeof n&&(n={type:"success",message:n}),n.type=n.type||"success";var o=n.type||t.type||"success";"string"==typeof(r=n.message||t.message||t)&&c.flash(o,r)}if(i.successMessage&&("boolean"==typeof(r=i.successMessage)&&(r=t.message||t),"string"==typeof r&&(c.session.messages=c.session.messages||[],c.session.messages.push(r))),i.assignProperty)return c[i.assignProperty]=e,l();c.logIn(e,i,(function(e){if(e)return l(e);function r(){if(i.successReturnToOrRedirect){var e=i.successReturnToOrRedirect;return c.session&&c.session.returnTo&&(e=c.session.returnTo,delete c.session.returnTo),u.redirect(e)}if(i.successRedirect)return u.redirect(i.successRedirect);l()}!1!==i.authInfo?s.transformAuthInfo(t,c,(function(e,t){if(e)return l(e);c.authInfo=t,r()})):r()}))},d.fail=function(e,r){"number"==typeof e&&(r=e,e=void 0),p.push({challenge:e,status:r}),t(m+1)},d.redirect=function(e,t){u.statusCode=t||302,u.setHeader("Location",e),u.setHeader("Content-Length","0"),u.end()},d.pass=function(){l()},d.error=function(e){if(a)return a(e);l(e)},d.authenticate(c,i)}(0)}},authenticate}function requireConnect(){return hasRequiredConnect||(hasRequiredConnect=1,function(e,t){var r=requireInitialize(),s=requireAuthenticate();(t=e.exports=function(){return t.__monkeypatchNode(),{initialize:r,authenticate:s}}).__monkeypatchNode=function(){var e=require$$0$8,t=requireRequest();e.IncomingMessage.prototype.login=e.IncomingMessage.prototype.logIn=t.logIn,e.IncomingMessage.prototype.logout=e.IncomingMessage.prototype.logOut=t.logOut,e.IncomingMessage.prototype.isAuthenticated=t.isAuthenticated,e.IncomingMessage.prototype.isUnauthenticated=t.isUnauthenticated}}(connect,connect.exports)),connect.exports}var SessionStrategy=session$2,SessionManager=sessionmanager;function Authenticator(){this._key="passport",this._strategies={},this._serializers=[],this._deserializers=[],this._infoTransformers=[],this._framework=null,this._userProperty="user",this.init()}Authenticator.prototype.init=function(){this.framework(requireConnect()()),this.use(new SessionStrategy(this.deserializeUser.bind(this))),this._sm=new SessionManager({key:this._key},this.serializeUser.bind(this))},Authenticator.prototype.use=function(e,t){if(t||(e=(t=e).name),!e)throw new Error("Authentication strategies must have a name");return this._strategies[e]=t,this},Authenticator.prototype.unuse=function(e){return delete this._strategies[e],this},Authenticator.prototype.framework=function(e){return this._framework=e,this},Authenticator.prototype.initialize=function(e){return e=e||{},this._userProperty=e.userProperty||"user",this._framework.initialize(this,e)},Authenticator.prototype.authenticate=function(e,t,r){return this._framework.authenticate(this,e,t,r)},Authenticator.prototype.authorize=function(e,t,r){return(t=t||{}).assignProperty="account",(this._framework.authorize||this._framework.authenticate)(this,e,t,r)},Authenticator.prototype.session=function(e){return this.authenticate("session",e)},Authenticator.prototype.serializeUser=function(e,t,r){if("function"==typeof e)return this._serializers.push(e);var s=e;"function"==typeof t&&(r=t,t=void 0);var n=this._serializers;!function e(i,a,o){if("pass"===a&&(a=void 0),a||o||0===o)return r(a,o);var c=n[i];if(!c)return r(new Error("Failed to serialize user into session"));function u(t,r){e(i+1,t,r)}try{3==c.length?c(t,s,u):c(s,u)}catch(e){return r(e)}}(0)},Authenticator.prototype.deserializeUser=function(e,t,r){if("function"==typeof e)return this._deserializers.push(e);var s=e;"function"==typeof t&&(r=t,t=void 0);var n=this._deserializers;!function e(i,a,o){if("pass"===a&&(a=void 0),a||o)return r(a,o);if(null===o||!1===o)return r(null,!1);var c=n[i];if(!c)return r(new Error("Failed to deserialize user out of session"));function u(t,r){e(i+1,t,r)}try{3==c.length?c(t,s,u):c(s,u)}catch(e){return r(e)}}(0)},Authenticator.prototype.transformAuthInfo=function(e,t,r){if("function"==typeof e)return this._infoTransformers.push(e);var s=e;"function"==typeof t&&(r=t,t=void 0);var n=this._infoTransformers;!function e(i,a,o){if("pass"===a&&(a=void 0),a||o)return r(a,o);var c=n[i];if(!c)return r(null,s);function u(t,r){e(i+1,t,r)}try{var l=c.length;if(1==l)u(null,c(s));else 3==l?c(t,s,u):c(s,u)}catch(e){return r(e)}}(0)},Authenticator.prototype._strategy=function(e){return this._strategies[e]};var authenticator=Authenticator;!function(e,t){var r=authenticator,s=session$2;(t=e.exports=new r).Passport=t.Authenticator=r,t.Strategy=libExports$3,t.strategies={},t.strategies.SessionStrategy=s}(lib$3,lib$3.exports);var libExports$2=lib$3.exports,passport$1=getDefaultExportFromCjs(libExports$2),lib$1={exports:{}},utils$2={lookup:function(e,t){if(!e)return null;for(var r=t.split("]").join("").split("["),s=0,n=r.length;s<n;s++){var i=e[r[s]];if(void 0===i)return null;if("object"!=typeof i)return i;e=i}return null}},passport=libExports$3,util$3=require$$1$1,lookup$1=utils$2.lookup;function Strategy(e,t){if("function"==typeof e&&(t=e,e={}),!t)throw new TypeError("LocalStrategy requires a verify callback");this._usernameField=e.usernameField||"username",this._passwordField=e.passwordField||"password",passport.Strategy.call(this),this.name="local",this._verify=t,this._passReqToCallback=e.passReqToCallback}util$3.inherits(Strategy,passport.Strategy),Strategy.prototype.authenticate=function(e,t){t=t||{};var r=lookup$1(e.body,this._usernameField)||lookup$1(e.query,this._usernameField),s=lookup$1(e.body,this._passwordField)||lookup$1(e.query,this._passwordField);if(!r||!s)return this.fail({message:t.badRequestMessage||"Missing credentials"},400);var n=this;function i(e,t,r){return e?n.error(e):t?void n.success(t,r):n.fail(r)}try{n._passReqToCallback?this._verify(e,r,s,i):this._verify(r,s,i)}catch(e){return n.error(e)}};var strategy=Strategy;!function(e,t){var r=strategy;(e.exports=r).Strategy=r}(lib$1,lib$1.exports);var libExports$1=lib$1.exports,expressSession={exports:{}},safeBuffer={exports:{}};
|
|
73
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
74
|
+
!function(e,t){var r=require$$0$6,s=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,r){return s(e,t,r)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?e.exports=r:(n(r,t),t.Buffer=i),i.prototype=Object.create(s.prototype),n(s,i),i.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,r)},i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=s(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(safeBuffer,safeBuffer.exports);var safeBufferExports=safeBuffer.exports,cookie$2={};
|
|
75
|
+
/*!
|
|
76
|
+
* cookie
|
|
77
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
78
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
79
|
+
* MIT Licensed
|
|
80
|
+
*/
|
|
81
|
+
cookie$2.parse=parse$1,cookie$2.serialize=serialize;var __toString=Object.prototype.toString,fieldContentRegExp=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function parse$1(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},s=(t||{}).decode||decode,n=0;n<e.length;){var i=e.indexOf("=",n);if(-1===i)break;var a=e.indexOf(";",n);if(-1===a)a=e.length;else if(a<i){n=e.lastIndexOf(";",i-1)+1;continue}var o=e.slice(n,i).trim();if(void 0===r[o]){var c=e.slice(i+1,a).trim();34===c.charCodeAt(0)&&(c=c.slice(1,-1)),r[o]=tryDecode(c,s)}n=a+1}return r}function serialize(e,t,r){var s=r||{},n=s.encode||encode;if("function"!=typeof n)throw new TypeError("option encode is invalid");if(!fieldContentRegExp.test(e))throw new TypeError("argument name is invalid");var i=n(t);if(i&&!fieldContentRegExp.test(i))throw new TypeError("argument val is invalid");var a=e+"="+i;if(null!=s.maxAge){var o=s.maxAge-0;if(isNaN(o)||!isFinite(o))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(o)}if(s.domain){if(!fieldContentRegExp.test(s.domain))throw new TypeError("option domain is invalid");a+="; Domain="+s.domain}if(s.path){if(!fieldContentRegExp.test(s.path))throw new TypeError("option path is invalid");a+="; Path="+s.path}if(s.expires){var c=s.expires;if(!isDate(c)||isNaN(c.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+c.toUTCString()}if(s.httpOnly&&(a+="; HttpOnly"),s.secure&&(a+="; Secure"),s.partitioned&&(a+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():s.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a}function decode(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function encode(e){return encodeURIComponent(e)}function isDate(e){return"[object Date]"===__toString.call(e)||e instanceof Date}function tryDecode(e,t){try{return t(e)}catch(t){return e}}var parseurl$1={exports:{}},url=require$$0$9,parse=url.parse,Url=url.Url;
|
|
82
|
+
/*!
|
|
83
|
+
* parseurl
|
|
84
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
85
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
86
|
+
* MIT Licensed
|
|
87
|
+
*/function parseurl(e){var t=e.url;if(void 0!==t){var r=e._parsedUrl;return fresh(t,r)?r:((r=fastparse(t))._raw=t,e._parsedUrl=r)}}function originalurl(e){var t=e.originalUrl;if("string"!=typeof t)return parseurl(e);var r=e._parsedOriginalUrl;return fresh(t,r)?r:((r=fastparse(t))._raw=t,e._parsedOriginalUrl=r)}function fastparse(e){if("string"!=typeof e||47!==e.charCodeAt(0))return parse(e);for(var t=e,r=null,s=null,n=1;n<e.length;n++)switch(e.charCodeAt(n)){case 63:null===s&&(t=e.substring(0,n),r=e.substring(n+1),s=e.substring(n));break;case 9:case 10:case 12:case 13:case 32:case 35:case 160:case 65279:return parse(e)}var i=void 0!==Url?new Url:{};return i.path=e,i.href=e,i.pathname=t,null!==s&&(i.query=r,i.search=s),i}function fresh(e,t){return"object"==typeof t&&null!==t&&(void 0===Url||t instanceof Url)&&t._raw===e}parseurl$1.exports=parseurl,parseurl$1.exports.original=originalurl;var parseurlExports=parseurl$1.exports,cookieSignature={};!function(e){var t=require$$0$3;function r(e){return t.createHash("sha1").update(e).digest("hex")}e.sign=function(e,r){if("string"!=typeof e)throw new TypeError("Cookie value must be provided as a string.");if(null==r)throw new TypeError("Secret key must be provided.");return e+"."+t.createHmac("sha256",r).update(e).digest("base64").replace(/\=+$/,"")},e.unsign=function(t,s){if("string"!=typeof t)throw new TypeError("Signed cookie string must be provided.");if(null==s)throw new TypeError("Secret key must be provided.");var n=t.slice(0,t.lastIndexOf("."));return r(e.sign(n,s))==r(t)&&n}}(cookieSignature);var uidSafe={exports:{}},randomBytes$2={exports:{}},crypto=require$$0$3,generateAttempts=crypto.randomBytes===crypto.pseudoRandomBytes?1:3;function randomBytes$1(e,t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("argument callback must be a function");if(!t&&!commonjsGlobal.Promise)throw new TypeError("argument callback is required");return t?generateRandomBytes(e,generateAttempts,t):new Promise((function(t,r){generateRandomBytes(e,generateAttempts,(function(e,s){if(e)return r(e);t(s)}))}))}function randomBytesSync(e){for(var t=null,r=0;r<generateAttempts;r++)try{return crypto.randomBytes(e)}catch(e){t=e}throw t}function generateRandomBytes(e,t,r){crypto.randomBytes(e,(function(s,n){return s?--t?void setTimeout(generateRandomBytes.bind(null,e,t,r),10):r(s):r(null,n)}))}randomBytes$2.exports=randomBytes$1,randomBytes$2.exports.sync=randomBytesSync;var randomBytesExports=randomBytes$2.exports,randomBytes=randomBytesExports,EQUAL_END_REGEXP=/=+$/,PLUS_GLOBAL_REGEXP=/\+/g,SLASH_GLOBAL_REGEXP=/\//g;
|
|
88
|
+
/*!
|
|
89
|
+
* uid-safe
|
|
90
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
91
|
+
* Copyright(c) 2015-2017 Douglas Christopher Wilson
|
|
92
|
+
* MIT Licensed
|
|
93
|
+
*/function uid(e,t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("argument callback must be a function");if(!t&&!commonjsGlobal.Promise)throw new TypeError("argument callback is required");return t?generateUid(e,t):new Promise((function(t,r){generateUid(e,(function(e,s){if(e)return r(e);t(s)}))}))}function uidSync(e){return toString(randomBytes.sync(e))}function generateUid(e,t){randomBytes(e,(function(e,r){if(e)return t(e);t(null,toString(r))}))}function toString(e){return e.toString("base64").replace(EQUAL_END_REGEXP,"").replace(PLUS_GLOBAL_REGEXP,"-").replace(SLASH_GLOBAL_REGEXP,"_")}uidSafe.exports=uid,uidSafe.exports.sync=uidSync;var uidSafeExports=uidSafe.exports,cookie$1={exports:{}},cookie=cookie$2,deprecate=depd_1$1("express-session"),Cookie$1=cookie$1.exports=function(e){if(this.path="/",this.maxAge=null,this.httpOnly=!0,e){if("object"!=typeof e)throw new TypeError("argument options must be a object");for(var t in e)"data"!==t&&(this[t]=e[t])}void 0!==this.originalMaxAge&&null!==this.originalMaxAge||(this.originalMaxAge=this.maxAge)};
|
|
94
|
+
/*!
|
|
95
|
+
* Prototype.
|
|
96
|
+
*/
|
|
97
|
+
Cookie$1.prototype={set expires(e){this._expires=e,this.originalMaxAge=this.maxAge},get expires(){return this._expires},set maxAge(e){if(e&&"number"!=typeof e&&!(e instanceof Date))throw new TypeError("maxAge must be a number or Date");e instanceof Date&&deprecate("maxAge as Date; pass number of milliseconds instead"),this.expires="number"==typeof e?new Date(Date.now()+e):e},get maxAge(){return this.expires instanceof Date?this.expires.valueOf()-Date.now():this.expires},get data(){return{originalMaxAge:this.originalMaxAge,partitioned:this.partitioned,priority:this.priority,expires:this._expires,secure:this.secure,httpOnly:this.httpOnly,domain:this.domain,path:this.path,sameSite:this.sameSite}},serialize:function(e,t){return cookie.serialize(e,t,this.data)},toJSON:function(){return this.data}};var cookieExports=cookie$1.exports,session$1=Session$1;
|
|
98
|
+
/*!
|
|
99
|
+
* Connect - session - Session
|
|
100
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
101
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
102
|
+
* MIT Licensed
|
|
103
|
+
*/function Session$1(e,t){if(Object.defineProperty(this,"req",{value:e}),Object.defineProperty(this,"id",{value:e.sessionID}),"object"==typeof t&&null!==t)for(var r in t)r in this||(this[r]=t[r])}function defineMethod(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0})}
|
|
104
|
+
/*!
|
|
105
|
+
* Connect - session - Store
|
|
106
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
107
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
108
|
+
* MIT Licensed
|
|
109
|
+
*/defineMethod(Session$1.prototype,"touch",(function(){return this.resetMaxAge()})),defineMethod(Session$1.prototype,"resetMaxAge",(function(){return this.cookie.maxAge=this.cookie.originalMaxAge,this})),defineMethod(Session$1.prototype,"save",(function(e){return this.req.sessionStore.set(this.id,this,e||function(){}),this})),defineMethod(Session$1.prototype,"reload",(function(e){var t=this.req,r=this.req.sessionStore;return r.get(this.id,(function(s,n){return s?e(s):n?(r.createSession(t,n),void e()):e(new Error("failed to load session"))})),this})),defineMethod(Session$1.prototype,"destroy",(function(e){return delete this.req.session,this.req.sessionStore.destroy(this.id,e),this})),defineMethod(Session$1.prototype,"regenerate",(function(e){return this.req.sessionStore.regenerate(this.req,e),this}));var Cookie=cookieExports,EventEmitter$1=require$$0$5.EventEmitter,Session=session$1,util$2=require$$1$1,store=Store$1;function Store$1(){EventEmitter$1.call(this)}util$2.inherits(Store$1,EventEmitter$1),Store$1.prototype.regenerate=function(e,t){var r=this;this.destroy(e.sessionID,(function(s){r.generate(e),t(s)}))},Store$1.prototype.load=function(e,t){var r=this;this.get(e,(function(s,n){if(s)return t(s);if(!n)return t();var i={sessionID:e,sessionStore:r};t(null,r.createSession(i,n))}))},Store$1.prototype.createSession=function(e,t){var r=t.cookie.expires,s=t.cookie.originalMaxAge;return t.cookie=new Cookie(t.cookie),"string"==typeof r&&(t.cookie.expires=new Date(r)),t.cookie.originalMaxAge=s,e.session=new Session(e,t),e.session};
|
|
110
|
+
/*!
|
|
111
|
+
* express-session
|
|
112
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
113
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
114
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
115
|
+
* MIT Licensed
|
|
116
|
+
*/
|
|
117
|
+
var Store=store,util$1=require$$1$1,defer$1="function"==typeof setImmediate?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))},memory=MemoryStore;function MemoryStore(){Store.call(this),this.sessions=Object.create(null)}function getSession(e){var t=this.sessions[e];if(t){if((t=JSON.parse(t)).cookie){var r="string"==typeof t.cookie.expires?new Date(t.cookie.expires):t.cookie.expires;if(r&&r<=Date.now())return void delete this.sessions[e]}return t}}
|
|
118
|
+
/*!
|
|
119
|
+
* express-session
|
|
120
|
+
* Copyright(c) 2010 Sencha Inc.
|
|
121
|
+
* Copyright(c) 2011 TJ Holowaychuk
|
|
122
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
123
|
+
* MIT Licensed
|
|
124
|
+
*/util$1.inherits(MemoryStore,Store),MemoryStore.prototype.all=function(e){for(var t=Object.keys(this.sessions),r=Object.create(null),s=0;s<t.length;s++){var n=t[s],i=getSession.call(this,n);i&&(r[n]=i)}e&&defer$1(e,null,r)},MemoryStore.prototype.clear=function(e){this.sessions=Object.create(null),e&&defer$1(e)},MemoryStore.prototype.destroy=function(e,t){delete this.sessions[e],t&&defer$1(t)},MemoryStore.prototype.get=function(e,t){defer$1(t,null,getSession.call(this,e))},MemoryStore.prototype.set=function(e,t,r){this.sessions[e]=JSON.stringify(t),r&&defer$1(r)},MemoryStore.prototype.length=function(e){this.all((function(t,r){if(t)return e(t);e(null,Object.keys(r).length)}))},MemoryStore.prototype.touch=function(e,t,r){var s=getSession.call(this,e);s&&(s.cookie=t.cookie,this.sessions[e]=JSON.stringify(s)),r&&defer$1(r)},function(e,t){var r=safeBufferExports.Buffer,s=cookie$2,n=require$$0$3,i=srcExports("express-session"),a=depd_1$1("express-session"),o=onHeaders_1,c=parseurlExports,u=cookieSignature,l=uidSafeExports.sync,p=cookieExports,m=memory,d=session$1,f=store,h=process.env.NODE_ENV;t=e.exports=function(e){var t=e||{},n=t.cookie||{},l=t.genid||S,f=t.name||t.key||"connect.sid",T=t.store||new m,v=t.proxy,b=t.resave,I=Boolean(t.rolling),N=t.saveUninitialized,y=t.secret;if("function"!=typeof l)throw new TypeError("genid option must be a function");void 0===b&&(a("undefined resave option; provide resave option"),b=!0);void 0===N&&(a("undefined saveUninitialized option; provide saveUninitialized option"),N=!0);if(t.unset&&"destroy"!==t.unset&&"keep"!==t.unset)throw new TypeError('unset option must be "destroy" or "keep"');var O="destroy"===t.unset;if(Array.isArray(y)&&0===y.length)throw new TypeError("secret option array must contain one or more strings");y&&!Array.isArray(y)&&(y=[y]);y||a("req.secret; provide secret option");"production"===h&&T instanceof m&&console.warn(_);T.generate=function(e){e.sessionID=l(e),e.session=new d(e),e.session.cookie=new p(n),"auto"===n.secure&&(e.session.cookie.secure=g(e,v))};var $="function"==typeof T.touch,C=!0;return T.on("disconnect",(function(){C=!1})),T.on("connect",(function(){C=!0})),function(e,t,l){if(e.session)l();else{if(!C)return i("store is disconnected"),void l();if(0!==(c.original(e).pathname||"/").indexOf(n.path||"/"))return i("pathname mismatch"),void l();if(y||e.secret){var p,m,d,h=y||[e.secret],_=!1;e.sessionStore=T;var S=e.sessionID=function(e,t,r){var n,o,c=e.headers.cookie;if(c){(n=s.parse(c)[t])&&("s:"===n.substr(0,2)?!1===(o=A(n.slice(2),r))&&(i("cookie signature invalid"),o=void 0):i("cookie unsigned"))}!o&&e.signedCookies&&(o=e.signedCookies[t])&&a("cookie should be available in req.headers.cookie");!o&&e.cookies&&(n=e.cookies[t])&&("s:"===n.substr(0,2)?((o=A(n.slice(2),r))&&a("cookie should be available in req.headers.cookie"),!1===o&&(i("cookie signature invalid"),o=void 0)):i("cookie unsigned"));return o}(e,f,h);o(t,(function(){if(e.session){if(function(e){if("string"!=typeof e.sessionID)return!1;return S!==e.sessionID?N||F(e.session):I||null!=e.session.cookie.expires&&F(e.session)}(e))if(!e.session.cookie.secure||g(e,v)){_||(e.session.touch(),_=!0);try{!function(e,t,r,n,a){var o="s:"+u.sign(r,n),c=s.serialize(t,o,a);i("set-cookie %s",c);var l=e.getHeader("Set-Cookie")||[],p=Array.isArray(l)?l.concat(c):[l,c];e.setHeader("Set-Cookie",p)}(t,f,e.sessionID,h[0],e.session.cookie.data)}catch(e){E(l,e)}}else i("not secured")}else i("no session")}));var L=t.end,D=t.write,P=!1;if(t.end=function(s,n){if(P)return!1;var a;P=!0;var o=!0;function c(){if(o)return a=L.call(t,s,n),void(o=!1);L.call(t)}function u(){if(!o)return a;if(t._header||t._implicitHeader(),null==s)return a=!0;var e=Number(t.getHeader("Content-Length"));return!isNaN(e)&&e>0&&(s=r.isBuffer(s)?s:r.from(s,n),n=void 0,0!==s.length)?(i("split response"),a=D.call(t,s.slice(0,s.length-1)),s=s.slice(s.length-1,s.length),a):(a=D.call(t,s,n),o=!1,a)}return function(e){return e.sessionID&&O&&null==e.session}(e)?(i("destroying"),T.destroy(e.sessionID,(function(e){e&&E(l,e),i("destroyed"),c()})),u()):e.session?(_||(e.session.touch(),_=!0),w(e)?(e.session.save((function(e){e&&E(l,e),c()})),u()):$&&function(e){if("string"!=typeof e.sessionID)return i("session ignored because of bogus req.sessionID %o",e.sessionID),!1;return S===e.sessionID&&!w(e)}(e)?(i("touching"),T.touch(e.sessionID,e.session,(function(e){e&&E(l,e),i("touched"),c()})),u()):L.call(t,s,n)):(i("no session"),L.call(t,s,n))},!e.sessionID)return i("no SID sent, generating session"),x(),void l();i("fetching %s",e.sessionID),T.get(e.sessionID,(function(t,r){if(t&&"ENOENT"!==t.code)return i("error %j",t),void l(t);try{t||!r?(i("no session found"),x()):(i("session found"),function(e,t){T.createSession(e,t),m=e.sessionID,p=R(t),b||(d=p),M(e.session)}(e,r))}catch(e){return void l(e)}l()}))}else l(new Error("secret option required for sessions"))}function x(){T.generate(e),m=e.sessionID,p=R(e.session),M(e.session)}function M(t){var r=t.reload,s=t.save;Object.defineProperty(t,"reload",{configurable:!0,enumerable:!1,value:function(t){i("reloading %s",this.id),r.call(this,function(t,r){return function(){e.session!==t&&M(e.session),r.apply(this,arguments)}}(this,t))},writable:!0}),Object.defineProperty(t,"save",{configurable:!0,enumerable:!1,value:function(){i("saving %s",this.id),d=R(this),s.apply(this,arguments)},writable:!0})}function F(e){return m!==e.id||p!==R(e)}function w(e){return"string"!=typeof e.sessionID?(i("session ignored because of bogus req.sessionID %o",e.sessionID),!1):N||d||S===e.sessionID?(t=e.session,!(m===t.id&&d===R(t))):F(e.session);var t}}},t.Store=f,t.Cookie=p,t.Session=d,t.MemoryStore=m;var _="Warning: connect.session() MemoryStore is not\ndesigned for a production environment, as it will leak\nmemory, and will not scale past a single process.",E="function"==typeof setImmediate?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function S(e){return l(24)}function R(e){var t=JSON.stringify(e,(function(t,r){if(this!==e||"cookie"!==t)return r}));return n.createHash("sha1").update(t,"utf8").digest("hex")}function g(e,t){if(e.connection&&e.connection.encrypted)return!0;if(!1===t)return!1;if(!0!==t)return!0===e.secure;var r=e.headers["x-forwarded-proto"]||"",s=r.indexOf(",");return"https"===(-1!==s?r.substr(0,s).toLowerCase().trim():r.toLowerCase().trim())}function A(e,t){for(var r=0;r<t.length;r++){var s=u.unsign(e,t[r]);if(!1!==s)return s}return!1}}(expressSession,expressSession.exports);var expressSessionExports=expressSession.exports,session=getDefaultExportFromCjs(expressSessionExports);const noop$1=(e,t)=>{};class RedisStore extends expressSessionExports.Store{constructor(e){super(),this.prefix=null==e.prefix?"sess:":e.prefix,this.scanCount=e.scanCount||100,this.serializer=e.serializer||JSON,this.ttl=e.ttl||86400,this.disableTTL=e.disableTTL||!1,this.disableTouch=e.disableTouch||!1,this.client=this.normalizeClient(e.client)}normalizeClient(e){let t="scanIterator"in e;return{get:t=>e.get(t),set:(r,s,n)=>n?t?e.set(r,s,{EX:n}):e.set(r,s,"EX",n):e.set(r,s),del:t=>e.del(t),expire:(t,r)=>e.expire(t,r),mget:r=>t?e.mGet(r):e.mget(r),scanIterator:(r,s)=>t?e.scanIterator({MATCH:r,COUNT:s}):async function*(){let[t,n]=await e.scan("0","MATCH",r,"COUNT",s);for(let e of n)yield e;for(;"0"!==t;){[t,n]=await e.scan(t,"MATCH",r,"COUNT",s);for(let e of n)yield e}}()}}async get(e,t=noop$1){let r=this.prefix+e;try{let e=await this.client.get(r);return e?t(null,await this.serializer.parse(e)):t()}catch(e){return t(e)}}async set(e,t,r=noop$1){let s=this.prefix+e,n=this._getTTL(t);try{let i=this.serializer.stringify(t);return n>0?(this.disableTTL?await this.client.set(s,i):await this.client.set(s,i,n),r()):this.destroy(e,r)}catch(e){return r(e)}}async touch(e,t,r=noop$1){let s=this.prefix+e;if(this.disableTouch||this.disableTTL)return r();try{return await this.client.expire(s,this._getTTL(t)),r()}catch(e){return r(e)}}async destroy(e,t=noop$1){let r=this.prefix+e;try{return await this.client.del([r]),t()}catch(e){return t(e)}}async clear(e=noop$1){try{let t=await this._getAllKeys();return t.length?(await this.client.del(t),e()):e()}catch(t){return e(t)}}async length(e=noop$1){try{return e(null,(await this._getAllKeys()).length)}catch(t){return e(t)}}async ids(e=noop$1){let t=this.prefix.length;try{return e(null,(await this._getAllKeys()).map((e=>e.substring(t))))}catch(t){return e(t)}}async all(e=noop$1){let t=this.prefix.length;try{let r=await this._getAllKeys();return 0===r.length?e(null,[]):e(null,(await this.client.mget(r)).reduce(((e,s,n)=>{if(!s)return e;let i=this.serializer.parse(s);return i.id=r[n].substring(t),e.push(i),e}),[]))}catch(t){return e(t)}}_getTTL(e){if("function"==typeof this.ttl)return this.ttl(e);let t;if(e&&e.cookie&&e.cookie.expires){let r=Number(new Date(e.cookie.expires))-Date.now();t=Math.ceil(r/1e3)}else t=this.ttl;return t}async _getAllKeys(){let e=this.prefix+"*",t=[];for await(let r of this.client.scanIterator(e,this.scanCount))t.push(r);return t}}var dist$6={},dist$5={},client={},commands$6={},commands$5={},APPEND$1={};function transformArguments$5l(e,t){return["APPEND",e,t]}Object.defineProperty(APPEND$1,"__esModule",{value:!0}),APPEND$1.transformArguments=APPEND$1.FIRST_KEY_INDEX=void 0,APPEND$1.FIRST_KEY_INDEX=1,APPEND$1.transformArguments=transformArguments$5l;var BITCOUNT$1={};function transformArguments$5k(e,t){const r=["BITCOUNT",e];return t&&(r.push(t.start.toString(),t.end.toString()),t.mode&&r.push(t.mode)),r}Object.defineProperty(BITCOUNT$1,"__esModule",{value:!0}),BITCOUNT$1.transformArguments=BITCOUNT$1.IS_READ_ONLY=BITCOUNT$1.FIRST_KEY_INDEX=void 0,BITCOUNT$1.FIRST_KEY_INDEX=1,BITCOUNT$1.IS_READ_ONLY=!0,BITCOUNT$1.transformArguments=transformArguments$5k;var BITFIELD_RO$1={};function transformArguments$5j(e,t){const r=["BITFIELD_RO",e];for(const e of t)r.push("GET",e.encoding,e.offset.toString());return r}Object.defineProperty(BITFIELD_RO$1,"__esModule",{value:!0}),BITFIELD_RO$1.transformArguments=BITFIELD_RO$1.IS_READ_ONLY=BITFIELD_RO$1.FIRST_KEY_INDEX=void 0,BITFIELD_RO$1.FIRST_KEY_INDEX=1,BITFIELD_RO$1.IS_READ_ONLY=!0,BITFIELD_RO$1.transformArguments=transformArguments$5j;var BITFIELD$1={};function transformArguments$5i(e,t){const r=["BITFIELD",e];for(const e of t)switch(e.operation){case"GET":r.push("GET",e.encoding,e.offset.toString());break;case"SET":r.push("SET",e.encoding,e.offset.toString(),e.value.toString());break;case"INCRBY":r.push("INCRBY",e.encoding,e.offset.toString(),e.increment.toString());break;case"OVERFLOW":r.push("OVERFLOW",e.behavior)}return r}Object.defineProperty(BITFIELD$1,"__esModule",{value:!0}),BITFIELD$1.transformArguments=BITFIELD$1.FIRST_KEY_INDEX=void 0,BITFIELD$1.FIRST_KEY_INDEX=1,BITFIELD$1.transformArguments=transformArguments$5i;var BITOP$1={},genericTransformers={},GeoReplyWith,CommandFlags,CommandCategories,RedisFunctionFlags;function transformBooleanReply(e){return 1===e}function transformBooleanArrayReply(e){return e.map(transformBooleanReply)}function pushScanArguments(e,t,r){return e.push(t.toString()),r?.MATCH&&e.push("MATCH",r.MATCH),r?.COUNT&&e.push("COUNT",r.COUNT.toString()),e}function transformNumberInfinityReply(e){switch(e.toString()){case"+inf":return 1/0;case"-inf":return-1/0;default:return Number(e)}}function transformNumberInfinityNullReply(e){return null===e?null:transformNumberInfinityReply(e)}function transformNumberInfinityNullArrayReply(e){return e.map(transformNumberInfinityNullReply)}function transformNumberInfinityArgument(e){switch(e){case 1/0:return"+inf";case-1/0:return"-inf";default:return e.toString()}}function transformStringNumberInfinityArgument(e){return"number"!=typeof e?e:transformNumberInfinityArgument(e)}function transformTuplesReply(e){const t=Object.create(null);for(let r=0;r<e.length;r+=2)t[e[r].toString()]=e[r+1];return t}function transformStreamMessageReply([e,t]){return{id:e,message:transformTuplesReply(t)}}function transformStreamMessageNullReply(e){return null===e?null:transformStreamMessageReply(e)}function transformStreamMessagesReply(e){return e.map(transformStreamMessageReply)}function transformStreamMessagesNullReply(e){return e.map(transformStreamMessageNullReply)}function transformStreamsMessagesReply(e){return null===e?null:e.map((([e,t])=>({name:e,messages:transformStreamMessagesReply(t)})))}function transformSortedSetMemberNullReply(e){return e.length?transformSortedSetMemberReply(e):null}function transformSortedSetMemberReply(e){return{value:e[0],score:transformNumberInfinityReply(e[1])}}function transformSortedSetWithScoresReply(e){const t=[];for(let r=0;r<e.length;r+=2)t.push({value:e[r],score:transformNumberInfinityReply(e[r+1])});return t}function transformZMPopArguments(e,t,r,s){return pushVerdictArgument(e,t),e.push(r),s?.COUNT&&e.push("COUNT",s.COUNT.toString()),e}function transformLMPopArguments(e,t,r,s){return pushVerdictArgument(e,t),e.push(r),s?.COUNT&&e.push("COUNT",s.COUNT.toString()),e}function pushGeoCountArgument(e,t){return"number"==typeof t?e.push("COUNT",t.toString()):t&&(e.push("COUNT",t.value.toString()),t.ANY&&e.push("ANY")),e}function pushGeoSearchArguments(e,t,r,s,n){return e.push(t),"string"==typeof r?e.push("FROMMEMBER",r):e.push("FROMLONLAT",r.longitude.toString(),r.latitude.toString()),"radius"in s?e.push("BYRADIUS",s.radius.toString()):e.push("BYBOX",s.width.toString(),s.height.toString()),e.push(s.unit),n?.SORT&&e.push(n.SORT),pushGeoCountArgument(e,n?.COUNT),e}function pushGeoRadiusArguments(e,t,r,s,n,i){return e.push(t),"string"==typeof r?e.push(r):e.push(r.longitude.toString(),r.latitude.toString()),e.push(s.toString(),n),i?.SORT&&e.push(i.SORT),pushGeoCountArgument(e,i?.COUNT),e}function pushGeoRadiusStoreArguments(e,t,r,s,n,i,a){return pushGeoRadiusArguments(e,t,r,s,n,a),a?.STOREDIST?e.push("STOREDIST",i):e.push("STORE",i),e}function transformGeoMembersWithReply(e,t){const r=new Set(t);let s=0;const n=r.has(GeoReplyWith.DISTANCE)&&++s,i=r.has(GeoReplyWith.HASH)&&++s,a=r.has(GeoReplyWith.COORDINATES)&&++s;return e.map((e=>{const t={member:e[0]};if(n&&(t.distance=e[n]),i&&(t.hash=e[i]),a){const[r,s]=e[a];t.coordinates={longitude:r,latitude:s}}return t}))}function transformEXAT(e){return("number"==typeof e?e:Math.floor(e.getTime()/1e3)).toString()}function transformPXAT(e){return("number"==typeof e?e:e.getTime()).toString()}function evalFirstKeyIndex(e){return e?.keys?.[0]}function pushEvalArguments(e,t){return t?.keys?e.push(t.keys.length.toString(),...t.keys):e.push("0"),t?.arguments&&e.push(...t.arguments),e}function pushVerdictArguments(e,t){return Array.isArray(t)?e=e.concat(t):e.push(t),e}function pushVerdictNumberArguments(e,t){if(Array.isArray(t))for(const r of t)e.push(r.toString());else e.push(t.toString());return e}function pushVerdictArgument(e,t){return Array.isArray(t)?e.push(t.length.toString(),...t):e.push("1",t),e}function pushOptionalVerdictArgument(e,t,r){return void 0===r?e:(e.push(t),pushVerdictArgument(e,r))}function transformCommandReply$1([e,t,r,s,n,i,a]){return{name:e,arity:t,flags:new Set(r),firstKeyIndex:s,lastKeyIndex:n,step:i,categories:new Set(a)}}function transformFunctionListItemReply(e){return{libraryName:e[1],engine:e[3],functions:e[5].map((e=>({name:e[1],description:e[3],flags:e[5]})))}}function pushSortArguments(e,t){if(t?.BY&&e.push("BY",t.BY),t?.LIMIT&&e.push("LIMIT",t.LIMIT.offset.toString(),t.LIMIT.count.toString()),t?.GET)for(const r of"string"==typeof t.GET?[t.GET]:t.GET)e.push("GET",r);return t?.DIRECTION&&e.push(t.DIRECTION),t?.ALPHA&&e.push("ALPHA"),e}function pushSlotRangeArguments(e,t){e.push(t.start.toString(),t.end.toString())}function pushSlotRangesArguments(e,t){if(Array.isArray(t))for(const r of t)pushSlotRangeArguments(e,r);else pushSlotRangeArguments(e,t);return e}function transformRangeReply([e,t]){return{start:e,end:t}}Object.defineProperty(genericTransformers,"__esModule",{value:!0}),genericTransformers.transformRangeReply=genericTransformers.pushSlotRangesArguments=genericTransformers.pushSortArguments=genericTransformers.transformFunctionListItemReply=genericTransformers.RedisFunctionFlags=genericTransformers.transformCommandReply=genericTransformers.CommandCategories=genericTransformers.CommandFlags=genericTransformers.pushOptionalVerdictArgument=genericTransformers.pushVerdictArgument=genericTransformers.pushVerdictNumberArguments=genericTransformers.pushVerdictArguments=genericTransformers.pushEvalArguments=genericTransformers.evalFirstKeyIndex=genericTransformers.transformPXAT=genericTransformers.transformEXAT=genericTransformers.transformGeoMembersWithReply=genericTransformers.GeoReplyWith=genericTransformers.pushGeoRadiusStoreArguments=genericTransformers.pushGeoRadiusArguments=genericTransformers.pushGeoSearchArguments=genericTransformers.pushGeoCountArgument=genericTransformers.transformLMPopArguments=genericTransformers.transformZMPopArguments=genericTransformers.transformSortedSetWithScoresReply=genericTransformers.transformSortedSetMemberReply=genericTransformers.transformSortedSetMemberNullReply=genericTransformers.transformStreamsMessagesReply=genericTransformers.transformStreamMessagesNullReply=genericTransformers.transformStreamMessagesReply=genericTransformers.transformStreamMessageNullReply=genericTransformers.transformStreamMessageReply=genericTransformers.transformTuplesReply=genericTransformers.transformStringNumberInfinityArgument=genericTransformers.transformNumberInfinityArgument=genericTransformers.transformNumberInfinityNullArrayReply=genericTransformers.transformNumberInfinityNullReply=genericTransformers.transformNumberInfinityReply=genericTransformers.pushScanArguments=genericTransformers.transformBooleanArrayReply=genericTransformers.transformBooleanReply=void 0,genericTransformers.transformBooleanReply=transformBooleanReply,genericTransformers.transformBooleanArrayReply=transformBooleanArrayReply,genericTransformers.pushScanArguments=pushScanArguments,genericTransformers.transformNumberInfinityReply=transformNumberInfinityReply,genericTransformers.transformNumberInfinityNullReply=transformNumberInfinityNullReply,genericTransformers.transformNumberInfinityNullArrayReply=transformNumberInfinityNullArrayReply,genericTransformers.transformNumberInfinityArgument=transformNumberInfinityArgument,genericTransformers.transformStringNumberInfinityArgument=transformStringNumberInfinityArgument,genericTransformers.transformTuplesReply=transformTuplesReply,genericTransformers.transformStreamMessageReply=transformStreamMessageReply,genericTransformers.transformStreamMessageNullReply=transformStreamMessageNullReply,genericTransformers.transformStreamMessagesReply=transformStreamMessagesReply,genericTransformers.transformStreamMessagesNullReply=transformStreamMessagesNullReply,genericTransformers.transformStreamsMessagesReply=transformStreamsMessagesReply,genericTransformers.transformSortedSetMemberNullReply=transformSortedSetMemberNullReply,genericTransformers.transformSortedSetMemberReply=transformSortedSetMemberReply,genericTransformers.transformSortedSetWithScoresReply=transformSortedSetWithScoresReply,genericTransformers.transformZMPopArguments=transformZMPopArguments,genericTransformers.transformLMPopArguments=transformLMPopArguments,genericTransformers.pushGeoCountArgument=pushGeoCountArgument,genericTransformers.pushGeoSearchArguments=pushGeoSearchArguments,genericTransformers.pushGeoRadiusArguments=pushGeoRadiusArguments,genericTransformers.pushGeoRadiusStoreArguments=pushGeoRadiusStoreArguments,function(e){e.DISTANCE="WITHDIST",e.HASH="WITHHASH",e.COORDINATES="WITHCOORD"}(GeoReplyWith||(genericTransformers.GeoReplyWith=GeoReplyWith={})),genericTransformers.transformGeoMembersWithReply=transformGeoMembersWithReply,genericTransformers.transformEXAT=transformEXAT,genericTransformers.transformPXAT=transformPXAT,genericTransformers.evalFirstKeyIndex=evalFirstKeyIndex,genericTransformers.pushEvalArguments=pushEvalArguments,genericTransformers.pushVerdictArguments=pushVerdictArguments,genericTransformers.pushVerdictNumberArguments=pushVerdictNumberArguments,genericTransformers.pushVerdictArgument=pushVerdictArgument,genericTransformers.pushOptionalVerdictArgument=pushOptionalVerdictArgument,function(e){e.WRITE="write",e.READONLY="readonly",e.DENYOOM="denyoom",e.ADMIN="admin",e.PUBSUB="pubsub",e.NOSCRIPT="noscript",e.RANDOM="random",e.SORT_FOR_SCRIPT="sort_for_script",e.LOADING="loading",e.STALE="stale",e.SKIP_MONITOR="skip_monitor",e.ASKING="asking",e.FAST="fast",e.MOVABLEKEYS="movablekeys"}(CommandFlags||(genericTransformers.CommandFlags=CommandFlags={})),function(e){e.KEYSPACE="@keyspace",e.READ="@read",e.WRITE="@write",e.SET="@set",e.SORTEDSET="@sortedset",e.LIST="@list",e.HASH="@hash",e.STRING="@string",e.BITMAP="@bitmap",e.HYPERLOGLOG="@hyperloglog",e.GEO="@geo",e.STREAM="@stream",e.PUBSUB="@pubsub",e.ADMIN="@admin",e.FAST="@fast",e.SLOW="@slow",e.BLOCKING="@blocking",e.DANGEROUS="@dangerous",e.CONNECTION="@connection",e.TRANSACTION="@transaction",e.SCRIPTING="@scripting"}(CommandCategories||(genericTransformers.CommandCategories=CommandCategories={})),genericTransformers.transformCommandReply=transformCommandReply$1,function(e){e.NO_WRITES="no-writes",e.ALLOW_OOM="allow-oom",e.ALLOW_STALE="allow-stale",e.NO_CLUSTER="no-cluster"}(RedisFunctionFlags||(genericTransformers.RedisFunctionFlags=RedisFunctionFlags={})),genericTransformers.transformFunctionListItemReply=transformFunctionListItemReply,genericTransformers.pushSortArguments=pushSortArguments,genericTransformers.pushSlotRangesArguments=pushSlotRangesArguments,genericTransformers.transformRangeReply=transformRangeReply,Object.defineProperty(BITOP$1,"__esModule",{value:!0}),BITOP$1.transformArguments=BITOP$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1n=genericTransformers;function transformArguments$5h(e,t,r){return(0,generic_transformers_1$1n.pushVerdictArguments)(["BITOP",e,t],r)}BITOP$1.FIRST_KEY_INDEX=2,BITOP$1.transformArguments=transformArguments$5h;var BITPOS$1={};function transformArguments$5g(e,t,r,s,n){const i=["BITPOS",e,t.toString()];return"number"==typeof r&&i.push(r.toString()),"number"==typeof s&&i.push(s.toString()),n&&i.push(n),i}Object.defineProperty(BITPOS$1,"__esModule",{value:!0}),BITPOS$1.transformArguments=BITPOS$1.IS_READ_ONLY=BITPOS$1.FIRST_KEY_INDEX=void 0,BITPOS$1.FIRST_KEY_INDEX=1,BITPOS$1.IS_READ_ONLY=!0,BITPOS$1.transformArguments=transformArguments$5g;var BLMOVE$1={};function transformArguments$5f(e,t,r,s,n){return["BLMOVE",e,t,r,s,n.toString()]}Object.defineProperty(BLMOVE$1,"__esModule",{value:!0}),BLMOVE$1.transformArguments=BLMOVE$1.FIRST_KEY_INDEX=void 0,BLMOVE$1.FIRST_KEY_INDEX=1,BLMOVE$1.transformArguments=transformArguments$5f;var BLMPOP$1={},LMPOP$1={};Object.defineProperty(LMPOP$1,"__esModule",{value:!0}),LMPOP$1.transformArguments=LMPOP$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1m=genericTransformers;function transformArguments$5e(e,t,r){return(0,generic_transformers_1$1m.transformLMPopArguments)(["LMPOP"],e,t,r)}LMPOP$1.FIRST_KEY_INDEX=2,LMPOP$1.transformArguments=transformArguments$5e,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=3,e.transformArguments=function(e,r,s,n){return(0,t.transformLMPopArguments)(["BLMPOP",e.toString()],r,s,n)};var r=LMPOP$1;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformReply}})}(BLMPOP$1);var BLPOP$1={};Object.defineProperty(BLPOP$1,"__esModule",{value:!0}),BLPOP$1.transformReply=BLPOP$1.transformArguments=BLPOP$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1l=genericTransformers;function transformArguments$5d(e,t){const r=(0,generic_transformers_1$1l.pushVerdictArguments)(["BLPOP"],e);return r.push(t.toString()),r}function transformReply$O(e){return null===e?null:{key:e[0],element:e[1]}}BLPOP$1.FIRST_KEY_INDEX=1,BLPOP$1.transformArguments=transformArguments$5d,BLPOP$1.transformReply=transformReply$O;var BRPOP$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r){const s=(0,t.pushVerdictArguments)(["BRPOP"],e);return s.push(r.toString()),s};var r=BLPOP$1;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformReply}})}(BRPOP$1);var BRPOPLPUSH$1={};function transformArguments$5c(e,t,r){return["BRPOPLPUSH",e,t,r.toString()]}Object.defineProperty(BRPOPLPUSH$1,"__esModule",{value:!0}),BRPOPLPUSH$1.transformArguments=BRPOPLPUSH$1.FIRST_KEY_INDEX=void 0,BRPOPLPUSH$1.FIRST_KEY_INDEX=1,BRPOPLPUSH$1.transformArguments=transformArguments$5c;var BZMPOP$1={},ZMPOP$1={};Object.defineProperty(ZMPOP$1,"__esModule",{value:!0}),ZMPOP$1.transformReply=ZMPOP$1.transformArguments=ZMPOP$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1k=genericTransformers;function transformArguments$5b(e,t,r){return(0,generic_transformers_1$1k.transformZMPopArguments)(["ZMPOP"],e,t,r)}function transformReply$N(e){return null===e?null:{key:e[0],elements:e[1].map(generic_transformers_1$1k.transformSortedSetMemberReply)}}ZMPOP$1.FIRST_KEY_INDEX=2,ZMPOP$1.transformArguments=transformArguments$5b,ZMPOP$1.transformReply=transformReply$N,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=3,e.transformArguments=function(e,r,s,n){return(0,t.transformZMPopArguments)(["BZMPOP",e.toString()],r,s,n)};var r=ZMPOP$1;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformReply}})}(BZMPOP$1);var BZPOPMAX$1={};Object.defineProperty(BZPOPMAX$1,"__esModule",{value:!0}),BZPOPMAX$1.transformReply=BZPOPMAX$1.transformArguments=BZPOPMAX$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1j=genericTransformers;function transformArguments$5a(e,t){const r=(0,generic_transformers_1$1j.pushVerdictArguments)(["BZPOPMAX"],e);return r.push(t.toString()),r}function transformReply$M(e){return e?{key:e[0],value:e[1],score:(0,generic_transformers_1$1j.transformNumberInfinityReply)(e[2])}:null}BZPOPMAX$1.FIRST_KEY_INDEX=1,BZPOPMAX$1.transformArguments=transformArguments$5a,BZPOPMAX$1.transformReply=transformReply$M;var BZPOPMIN$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r){const s=(0,t.pushVerdictArguments)(["BZPOPMIN"],e);return s.push(r.toString()),s};var r=BZPOPMAX$1;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformReply}})}(BZPOPMIN$1);var COPY$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){const s=["COPY",e,t];return r?.destinationDb&&s.push("DB",r.destinationDb.toString()),r?.replace&&s.push("REPLACE"),s};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(COPY$1);var DECR$1={};function transformArguments$59(e){return["DECR",e]}Object.defineProperty(DECR$1,"__esModule",{value:!0}),DECR$1.transformArguments=DECR$1.FIRST_KEY_INDEX=void 0,DECR$1.FIRST_KEY_INDEX=1,DECR$1.transformArguments=transformArguments$59;var DECRBY$2={};function transformArguments$58(e,t){return["DECRBY",e,t.toString()]}Object.defineProperty(DECRBY$2,"__esModule",{value:!0}),DECRBY$2.transformArguments=DECRBY$2.FIRST_KEY_INDEX=void 0,DECRBY$2.FIRST_KEY_INDEX=1,DECRBY$2.transformArguments=transformArguments$58;var DEL$4={};Object.defineProperty(DEL$4,"__esModule",{value:!0}),DEL$4.transformArguments=DEL$4.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1i=genericTransformers;function transformArguments$57(e){return(0,generic_transformers_1$1i.pushVerdictArguments)(["DEL"],e)}DEL$4.FIRST_KEY_INDEX=1,DEL$4.transformArguments=transformArguments$57;var DUMP$1={};function transformArguments$56(e){return["DUMP",e]}Object.defineProperty(DUMP$1,"__esModule",{value:!0}),DUMP$1.transformArguments=DUMP$1.FIRST_KEY_INDEX=void 0,DUMP$1.FIRST_KEY_INDEX=1,DUMP$1.transformArguments=transformArguments$56;var EVAL_RO$1={};Object.defineProperty(EVAL_RO$1,"__esModule",{value:!0}),EVAL_RO$1.transformArguments=EVAL_RO$1.IS_READ_ONLY=EVAL_RO$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1h=genericTransformers;function transformArguments$55(e,t){return(0,generic_transformers_1$1h.pushEvalArguments)(["EVAL_RO",e],t)}EVAL_RO$1.FIRST_KEY_INDEX=generic_transformers_1$1h.evalFirstKeyIndex,EVAL_RO$1.IS_READ_ONLY=!0,EVAL_RO$1.transformArguments=transformArguments$55;var EVAL$1={};Object.defineProperty(EVAL$1,"__esModule",{value:!0}),EVAL$1.transformArguments=EVAL$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1g=genericTransformers;function transformArguments$54(e,t){return(0,generic_transformers_1$1g.pushEvalArguments)(["EVAL",e],t)}EVAL$1.FIRST_KEY_INDEX=generic_transformers_1$1g.evalFirstKeyIndex,EVAL$1.transformArguments=transformArguments$54;var EVALSHA_RO$1={};Object.defineProperty(EVALSHA_RO$1,"__esModule",{value:!0}),EVALSHA_RO$1.transformArguments=EVALSHA_RO$1.IS_READ_ONLY=EVALSHA_RO$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1f=genericTransformers;function transformArguments$53(e,t){return(0,generic_transformers_1$1f.pushEvalArguments)(["EVALSHA_RO",e],t)}EVALSHA_RO$1.FIRST_KEY_INDEX=generic_transformers_1$1f.evalFirstKeyIndex,EVALSHA_RO$1.IS_READ_ONLY=!0,EVALSHA_RO$1.transformArguments=transformArguments$53;var EVALSHA$1={};Object.defineProperty(EVALSHA$1,"__esModule",{value:!0}),EVALSHA$1.transformArguments=EVALSHA$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1e=genericTransformers;function transformArguments$52(e,t){return(0,generic_transformers_1$1e.pushEvalArguments)(["EVALSHA",e],t)}EVALSHA$1.FIRST_KEY_INDEX=generic_transformers_1$1e.evalFirstKeyIndex,EVALSHA$1.transformArguments=transformArguments$52;var EXISTS$4={};Object.defineProperty(EXISTS$4,"__esModule",{value:!0}),EXISTS$4.transformArguments=EXISTS$4.IS_READ_ONLY=EXISTS$4.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1d=genericTransformers;function transformArguments$51(e){return(0,generic_transformers_1$1d.pushVerdictArguments)(["EXISTS"],e)}EXISTS$4.FIRST_KEY_INDEX=1,EXISTS$4.IS_READ_ONLY=!0,EXISTS$4.transformArguments=transformArguments$51;var EXPIRE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){const s=["EXPIRE",e,t.toString()];return r&&s.push(r),s};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(EXPIRE$1);var EXPIREAT$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){const n=["EXPIREAT",e,(0,t.transformEXAT)(r)];return s&&n.push(s),n};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanReply}})}(EXPIREAT$1);var EXPIRETIME$1={};function transformArguments$50(e){return["EXPIRETIME",e]}Object.defineProperty(EXPIRETIME$1,"__esModule",{value:!0}),EXPIRETIME$1.transformArguments=EXPIRETIME$1.FIRST_KEY_INDEX=void 0,EXPIRETIME$1.FIRST_KEY_INDEX=1,EXPIRETIME$1.transformArguments=transformArguments$50;var FCALL_RO$1={};Object.defineProperty(FCALL_RO$1,"__esModule",{value:!0}),FCALL_RO$1.transformArguments=FCALL_RO$1.IS_READ_ONLY=FCALL_RO$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1c=genericTransformers;function transformArguments$4$(e,t){return(0,generic_transformers_1$1c.pushEvalArguments)(["FCALL_RO",e],t)}FCALL_RO$1.FIRST_KEY_INDEX=generic_transformers_1$1c.evalFirstKeyIndex,FCALL_RO$1.IS_READ_ONLY=!0,FCALL_RO$1.transformArguments=transformArguments$4$;var FCALL$1={};Object.defineProperty(FCALL$1,"__esModule",{value:!0}),FCALL$1.transformArguments=FCALL$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1b=genericTransformers;function transformArguments$4_(e,t){return(0,generic_transformers_1$1b.pushEvalArguments)(["FCALL",e],t)}FCALL$1.FIRST_KEY_INDEX=generic_transformers_1$1b.evalFirstKeyIndex,FCALL$1.transformArguments=transformArguments$4_;var GEOADD$1={};function transformArguments$4Z(e,t,r){const s=["GEOADD",e];r?.NX?s.push("NX"):r?.XX&&s.push("XX"),r?.CH&&s.push("CH");for(const{longitude:e,latitude:r,member:n}of Array.isArray(t)?t:[t])s.push(e.toString(),r.toString(),n);return s}Object.defineProperty(GEOADD$1,"__esModule",{value:!0}),GEOADD$1.transformArguments=GEOADD$1.FIRST_KEY_INDEX=void 0,GEOADD$1.FIRST_KEY_INDEX=1,GEOADD$1.transformArguments=transformArguments$4Z;var GEODIST$1={};function transformArguments$4Y(e,t,r,s){const n=["GEODIST",e,t,r];return s&&n.push(s),n}function transformReply$L(e){return null===e?null:Number(e)}Object.defineProperty(GEODIST$1,"__esModule",{value:!0}),GEODIST$1.transformReply=GEODIST$1.transformArguments=GEODIST$1.IS_READ_ONLY=GEODIST$1.FIRST_KEY_INDEX=void 0,GEODIST$1.FIRST_KEY_INDEX=1,GEODIST$1.IS_READ_ONLY=!0,GEODIST$1.transformArguments=transformArguments$4Y,GEODIST$1.transformReply=transformReply$L;var GEOHASH$1={};Object.defineProperty(GEOHASH$1,"__esModule",{value:!0}),GEOHASH$1.transformArguments=GEOHASH$1.IS_READ_ONLY=GEOHASH$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$1a=genericTransformers;function transformArguments$4X(e,t){return(0,generic_transformers_1$1a.pushVerdictArguments)(["GEOHASH",e],t)}GEOHASH$1.FIRST_KEY_INDEX=1,GEOHASH$1.IS_READ_ONLY=!0,GEOHASH$1.transformArguments=transformArguments$4X;var GEOPOS$1={};Object.defineProperty(GEOPOS$1,"__esModule",{value:!0}),GEOPOS$1.transformReply=GEOPOS$1.transformArguments=GEOPOS$1.IS_READ_ONLY=GEOPOS$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$19=genericTransformers;function transformArguments$4W(e,t){return(0,generic_transformers_1$19.pushVerdictArguments)(["GEOPOS",e],t)}function transformReply$K(e){return e.map((e=>null===e?null:{longitude:e[0],latitude:e[1]}))}GEOPOS$1.FIRST_KEY_INDEX=1,GEOPOS$1.IS_READ_ONLY=!0,GEOPOS$1.transformArguments=transformArguments$4W,GEOPOS$1.transformReply=transformReply$K;var GEORADIUS_RO_WITH$1={},GEORADIUS_RO$1={};Object.defineProperty(GEORADIUS_RO$1,"__esModule",{value:!0}),GEORADIUS_RO$1.transformArguments=GEORADIUS_RO$1.IS_READ_ONLY=GEORADIUS_RO$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$18=genericTransformers;function transformArguments$4V(e,t,r,s,n){return(0,generic_transformers_1$18.pushGeoRadiusArguments)(["GEORADIUS_RO"],e,t,r,s,n)}GEORADIUS_RO$1.FIRST_KEY_INDEX=1,GEORADIUS_RO$1.IS_READ_ONLY=!0,GEORADIUS_RO$1.transformArguments=transformArguments$4V,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=GEORADIUS_RO$1;var r=GEORADIUS_RO$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i,a){const o=(0,t.transformArguments)(e,r,s,n,a);return o.push(...i),o.preserve=i,o};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformGeoMembersWithReply}})}(GEORADIUS_RO_WITH$1);var GEORADIUS_WITH$1={},GEORADIUS$1={};Object.defineProperty(GEORADIUS$1,"__esModule",{value:!0}),GEORADIUS$1.transformArguments=GEORADIUS$1.IS_READ_ONLY=GEORADIUS$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$17=genericTransformers;function transformArguments$4U(e,t,r,s,n){return(0,generic_transformers_1$17.pushGeoRadiusArguments)(["GEORADIUS"],e,t,r,s,n)}GEORADIUS$1.FIRST_KEY_INDEX=1,GEORADIUS$1.IS_READ_ONLY=!0,GEORADIUS$1.transformArguments=transformArguments$4U,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=GEORADIUS$1;var r=GEORADIUS$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i,a){const o=(0,t.transformArguments)(e,r,s,n,a);return o.push(...i),o.preserve=i,o};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformGeoMembersWithReply}})}(GEORADIUS_WITH$1);var GEORADIUSBYMEMBER_RO_WITH$1={},GEORADIUSBYMEMBER_RO$1={};Object.defineProperty(GEORADIUSBYMEMBER_RO$1,"__esModule",{value:!0}),GEORADIUSBYMEMBER_RO$1.transformArguments=GEORADIUSBYMEMBER_RO$1.IS_READ_ONLY=GEORADIUSBYMEMBER_RO$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$16=genericTransformers;function transformArguments$4T(e,t,r,s,n){return(0,generic_transformers_1$16.pushGeoRadiusArguments)(["GEORADIUSBYMEMBER_RO"],e,t,r,s,n)}GEORADIUSBYMEMBER_RO$1.FIRST_KEY_INDEX=1,GEORADIUSBYMEMBER_RO$1.IS_READ_ONLY=!0,GEORADIUSBYMEMBER_RO$1.transformArguments=transformArguments$4T,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=GEORADIUSBYMEMBER_RO$1;var r=GEORADIUSBYMEMBER_RO$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i,a){const o=(0,t.transformArguments)(e,r,s,n,a);return o.push(...i),o.preserve=i,o};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformGeoMembersWithReply}})}(GEORADIUSBYMEMBER_RO_WITH$1);var GEORADIUSBYMEMBER_WITH$1={},GEORADIUSBYMEMBER$1={};Object.defineProperty(GEORADIUSBYMEMBER$1,"__esModule",{value:!0}),GEORADIUSBYMEMBER$1.transformArguments=GEORADIUSBYMEMBER$1.IS_READ_ONLY=GEORADIUSBYMEMBER$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$15=genericTransformers;function transformArguments$4S(e,t,r,s,n){return(0,generic_transformers_1$15.pushGeoRadiusArguments)(["GEORADIUSBYMEMBER"],e,t,r,s,n)}GEORADIUSBYMEMBER$1.FIRST_KEY_INDEX=1,GEORADIUSBYMEMBER$1.IS_READ_ONLY=!0,GEORADIUSBYMEMBER$1.transformArguments=transformArguments$4S,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=GEORADIUSBYMEMBER$1;var r=GEORADIUSBYMEMBER$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i,a){const o=(0,t.transformArguments)(e,r,s,n,a);return o.push(...i),o.preserve=i,o};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformGeoMembersWithReply}})}(GEORADIUSBYMEMBER_WITH$1);var GEORADIUSBYMEMBERSTORE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;var r=GEORADIUSBYMEMBER$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i,a){return(0,t.pushGeoRadiusStoreArguments)(["GEORADIUSBYMEMBER"],e,r,s,n,i,a)}}(GEORADIUSBYMEMBERSTORE$1);var GEORADIUSSTORE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;var r=GEORADIUS$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i,a){return(0,t.pushGeoRadiusStoreArguments)(["GEORADIUS"],e,r,s,n,i,a)}}(GEORADIUSSTORE$1);var GEOSEARCH_WITH$1={},GEOSEARCH$1={};Object.defineProperty(GEOSEARCH$1,"__esModule",{value:!0}),GEOSEARCH$1.transformArguments=GEOSEARCH$1.IS_READ_ONLY=GEOSEARCH$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$14=genericTransformers;function transformArguments$4R(e,t,r,s){return(0,generic_transformers_1$14.pushGeoSearchArguments)(["GEOSEARCH"],e,t,r,s)}GEOSEARCH$1.FIRST_KEY_INDEX=1,GEOSEARCH$1.IS_READ_ONLY=!0,GEOSEARCH$1.transformArguments=transformArguments$4R,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=GEOSEARCH$1;var r=GEOSEARCH$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i){const a=(0,t.transformArguments)(e,r,s,i);return a.push(...n),a.preserve=n,a};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformGeoMembersWithReply}})}(GEOSEARCH_WITH$1);var GEOSEARCHSTORE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;var r=GEOSEARCH$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n,i){const a=(0,t.pushGeoSearchArguments)(["GEOSEARCHSTORE",e],r,s,n,i);return i?.STOREDIST&&a.push("STOREDIST"),a},e.transformReply=function(e){if("number"!=typeof e)throw new TypeError("https://github.com/redis/redis/issues/9261");return e}}(GEOSEARCHSTORE$1);var GET$3={};function transformArguments$4Q(e){return["GET",e]}Object.defineProperty(GET$3,"__esModule",{value:!0}),GET$3.transformArguments=GET$3.IS_READ_ONLY=GET$3.FIRST_KEY_INDEX=void 0,GET$3.FIRST_KEY_INDEX=1,GET$3.IS_READ_ONLY=!0,GET$3.transformArguments=transformArguments$4Q;var GETBIT$1={};function transformArguments$4P(e,t){return["GETBIT",e,t.toString()]}Object.defineProperty(GETBIT$1,"__esModule",{value:!0}),GETBIT$1.transformArguments=GETBIT$1.IS_READ_ONLY=GETBIT$1.FIRST_KEY_INDEX=void 0,GETBIT$1.FIRST_KEY_INDEX=1,GETBIT$1.IS_READ_ONLY=!0,GETBIT$1.transformArguments=transformArguments$4P;var GETDEL$1={};function transformArguments$4O(e){return["GETDEL",e]}Object.defineProperty(GETDEL$1,"__esModule",{value:!0}),GETDEL$1.transformArguments=GETDEL$1.FIRST_KEY_INDEX=void 0,GETDEL$1.FIRST_KEY_INDEX=1,GETDEL$1.transformArguments=transformArguments$4O;var GETEX$1={};Object.defineProperty(GETEX$1,"__esModule",{value:!0}),GETEX$1.transformArguments=GETEX$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$13=genericTransformers;function transformArguments$4N(e,t){const r=["GETEX",e];return"EX"in t?r.push("EX",t.EX.toString()):"PX"in t?r.push("PX",t.PX.toString()):"EXAT"in t?r.push("EXAT",(0,generic_transformers_1$13.transformEXAT)(t.EXAT)):"PXAT"in t?r.push("PXAT",(0,generic_transformers_1$13.transformPXAT)(t.PXAT)):r.push("PERSIST"),r}GETEX$1.FIRST_KEY_INDEX=1,GETEX$1.transformArguments=transformArguments$4N;var GETRANGE$1={};function transformArguments$4M(e,t,r){return["GETRANGE",e,t.toString(),r.toString()]}Object.defineProperty(GETRANGE$1,"__esModule",{value:!0}),GETRANGE$1.transformArguments=GETRANGE$1.IS_READ_ONLY=GETRANGE$1.FIRST_KEY_INDEX=void 0,GETRANGE$1.FIRST_KEY_INDEX=1,GETRANGE$1.IS_READ_ONLY=!0,GETRANGE$1.transformArguments=transformArguments$4M;var GETSET$1={};function transformArguments$4L(e,t){return["GETSET",e,t]}Object.defineProperty(GETSET$1,"__esModule",{value:!0}),GETSET$1.transformArguments=GETSET$1.FIRST_KEY_INDEX=void 0,GETSET$1.FIRST_KEY_INDEX=1,GETSET$1.transformArguments=transformArguments$4L;var HDEL$1={};Object.defineProperty(HDEL$1,"__esModule",{value:!0}),HDEL$1.transformArguments=HDEL$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$12=genericTransformers;function transformArguments$4K(e,t){return(0,generic_transformers_1$12.pushVerdictArguments)(["HDEL",e],t)}HDEL$1.FIRST_KEY_INDEX=1,HDEL$1.transformArguments=transformArguments$4K;var HEXISTS$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["HEXISTS",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(HEXISTS$1);var HGET$1={};function transformArguments$4J(e,t){return["HGET",e,t]}Object.defineProperty(HGET$1,"__esModule",{value:!0}),HGET$1.transformArguments=HGET$1.IS_READ_ONLY=HGET$1.FIRST_KEY_INDEX=void 0,HGET$1.FIRST_KEY_INDEX=1,HGET$1.IS_READ_ONLY=!0,HGET$1.transformArguments=transformArguments$4J;var HGETALL$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.TRANSFORM_LEGACY_REPLY=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.TRANSFORM_LEGACY_REPLY=!0,e.transformArguments=function(e){return["HGETALL",e]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformTuplesReply}})}(HGETALL$1);var HINCRBY$1={};function transformArguments$4I(e,t,r){return["HINCRBY",e,t,r.toString()]}Object.defineProperty(HINCRBY$1,"__esModule",{value:!0}),HINCRBY$1.transformArguments=HINCRBY$1.FIRST_KEY_INDEX=void 0,HINCRBY$1.FIRST_KEY_INDEX=1,HINCRBY$1.transformArguments=transformArguments$4I;var HINCRBYFLOAT$1={};function transformArguments$4H(e,t,r){return["HINCRBYFLOAT",e,t,r.toString()]}Object.defineProperty(HINCRBYFLOAT$1,"__esModule",{value:!0}),HINCRBYFLOAT$1.transformArguments=HINCRBYFLOAT$1.FIRST_KEY_INDEX=void 0,HINCRBYFLOAT$1.FIRST_KEY_INDEX=1,HINCRBYFLOAT$1.transformArguments=transformArguments$4H;var HKEYS$1={};function transformArguments$4G(e){return["HKEYS",e]}Object.defineProperty(HKEYS$1,"__esModule",{value:!0}),HKEYS$1.transformArguments=HKEYS$1.FIRST_KEY_INDEX=void 0,HKEYS$1.FIRST_KEY_INDEX=1,HKEYS$1.transformArguments=transformArguments$4G;var HLEN$1={};function transformArguments$4F(e){return["HLEN",e]}Object.defineProperty(HLEN$1,"__esModule",{value:!0}),HLEN$1.transformArguments=HLEN$1.FIRST_KEY_INDEX=void 0,HLEN$1.FIRST_KEY_INDEX=1,HLEN$1.transformArguments=transformArguments$4F;var HMGET$1={};Object.defineProperty(HMGET$1,"__esModule",{value:!0}),HMGET$1.transformArguments=HMGET$1.IS_READ_ONLY=HMGET$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$11=genericTransformers;function transformArguments$4E(e,t){return(0,generic_transformers_1$11.pushVerdictArguments)(["HMGET",e],t)}HMGET$1.FIRST_KEY_INDEX=1,HMGET$1.IS_READ_ONLY=!0,HMGET$1.transformArguments=transformArguments$4E;var HRANDFIELD_COUNT_WITHVALUES$1={},HRANDFIELD_COUNT$1={},HRANDFIELD$1={};function transformArguments$4D(e){return["HRANDFIELD",e]}Object.defineProperty(HRANDFIELD$1,"__esModule",{value:!0}),HRANDFIELD$1.transformArguments=HRANDFIELD$1.IS_READ_ONLY=HRANDFIELD$1.FIRST_KEY_INDEX=void 0,HRANDFIELD$1.FIRST_KEY_INDEX=1,HRANDFIELD$1.IS_READ_ONLY=!0,HRANDFIELD$1.transformArguments=transformArguments$4D,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=HRANDFIELD$1;var r=HRANDFIELD$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r){return[...(0,t.transformArguments)(e),r.toString()]}}(HRANDFIELD_COUNT$1),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=HRANDFIELD_COUNT$1;var r=HRANDFIELD_COUNT$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r){return[...(0,t.transformArguments)(e,r),"WITHVALUES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformTuplesReply}})}(HRANDFIELD_COUNT_WITHVALUES$1);var HSCAN$1={};Object.defineProperty(HSCAN$1,"__esModule",{value:!0}),HSCAN$1.transformReply=HSCAN$1.transformArguments=HSCAN$1.IS_READ_ONLY=HSCAN$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$10=genericTransformers;function transformArguments$4C(e,t,r){return(0,generic_transformers_1$10.pushScanArguments)(["HSCAN",e],t,r)}function transformReply$J([e,t]){const r=[];for(let e=0;e<t.length;e+=2)r.push({field:t[e],value:t[e+1]});return{cursor:Number(e),tuples:r}}HSCAN$1.FIRST_KEY_INDEX=1,HSCAN$1.IS_READ_ONLY=!0,HSCAN$1.transformArguments=transformArguments$4C,HSCAN$1.transformReply=transformReply$J;var HSET$1={};function transformArguments$4B(...[e,t,r]){const s=["HSET",e];return"string"==typeof t||"number"==typeof t||Buffer.isBuffer(t)?s.push(convertValue(t),convertValue(r)):t instanceof Map?pushMap(s,t):Array.isArray(t)?pushTuples(s,t):pushObject(s,t),s}function pushMap(e,t){for(const[r,s]of t.entries())e.push(convertValue(r),convertValue(s))}function pushTuples(e,t){for(const r of t)Array.isArray(r)?pushTuples(e,r):e.push(convertValue(r))}function pushObject(e,t){for(const r of Object.keys(t))e.push(convertValue(r),convertValue(t[r]))}function convertValue(e){return"number"==typeof e?e.toString():e}Object.defineProperty(HSET$1,"__esModule",{value:!0}),HSET$1.transformArguments=HSET$1.FIRST_KEY_INDEX=void 0,HSET$1.FIRST_KEY_INDEX=1,HSET$1.transformArguments=transformArguments$4B;var HSETNX$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){return["HSETNX",e,t,r]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(HSETNX$1);var HSTRLEN$1={};function transformArguments$4A(e,t){return["HSTRLEN",e,t]}Object.defineProperty(HSTRLEN$1,"__esModule",{value:!0}),HSTRLEN$1.transformArguments=HSTRLEN$1.FIRST_KEY_INDEX=void 0,HSTRLEN$1.FIRST_KEY_INDEX=1,HSTRLEN$1.transformArguments=transformArguments$4A;var HVALS$1={};function transformArguments$4z(e){return["HVALS",e]}Object.defineProperty(HVALS$1,"__esModule",{value:!0}),HVALS$1.transformArguments=HVALS$1.FIRST_KEY_INDEX=void 0,HVALS$1.FIRST_KEY_INDEX=1,HVALS$1.transformArguments=transformArguments$4z;var INCR$1={};function transformArguments$4y(e){return["INCR",e]}Object.defineProperty(INCR$1,"__esModule",{value:!0}),INCR$1.transformArguments=INCR$1.FIRST_KEY_INDEX=void 0,INCR$1.FIRST_KEY_INDEX=1,INCR$1.transformArguments=transformArguments$4y;var INCRBY$6={};function transformArguments$4x(e,t){return["INCRBY",e,t.toString()]}Object.defineProperty(INCRBY$6,"__esModule",{value:!0}),INCRBY$6.transformArguments=INCRBY$6.FIRST_KEY_INDEX=void 0,INCRBY$6.FIRST_KEY_INDEX=1,INCRBY$6.transformArguments=transformArguments$4x;var INCRBYFLOAT$1={};function transformArguments$4w(e,t){return["INCRBYFLOAT",e,t.toString()]}Object.defineProperty(INCRBYFLOAT$1,"__esModule",{value:!0}),INCRBYFLOAT$1.transformArguments=INCRBYFLOAT$1.FIRST_KEY_INDEX=void 0,INCRBYFLOAT$1.FIRST_KEY_INDEX=1,INCRBYFLOAT$1.transformArguments=transformArguments$4w;var LCS_IDX_WITHMATCHLEN$1={},LCS$1={};function transformArguments$4v(e,t){return["LCS",e,t]}Object.defineProperty(LCS$1,"__esModule",{value:!0}),LCS$1.transformArguments=LCS$1.IS_READ_ONLY=LCS$1.FIRST_KEY_INDEX=void 0,LCS$1.FIRST_KEY_INDEX=1,LCS$1.IS_READ_ONLY=!0,LCS$1.transformArguments=transformArguments$4v,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers,r=LCS$1;var s=LCS$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return s.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return s.IS_READ_ONLY}}),e.transformArguments=function(e,t){const s=(0,r.transformArguments)(e,t);return s.push("IDX","WITHMATCHLEN"),s},e.transformReply=function(e){return{matches:e[1].map((([e,r,s])=>({key1:(0,t.transformRangeReply)(e),key2:(0,t.transformRangeReply)(r),length:s}))),length:e[3]}}}(LCS_IDX_WITHMATCHLEN$1);var LCS_IDX$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers,r=LCS$1;var s=LCS$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return s.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return s.IS_READ_ONLY}}),e.transformArguments=function(e,t){const s=(0,r.transformArguments)(e,t);return s.push("IDX"),s},e.transformReply=function(e){return{matches:e[1].map((([e,r])=>({key1:(0,t.transformRangeReply)(e),key2:(0,t.transformRangeReply)(r)}))),length:e[3]}}}(LCS_IDX$1);var LCS_LEN$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=LCS$1;var r=LCS$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r){const s=(0,t.transformArguments)(e,r);return s.push("LEN"),s}}(LCS_LEN$1);var LINDEX$1={};function transformArguments$4u(e,t){return["LINDEX",e,t.toString()]}Object.defineProperty(LINDEX$1,"__esModule",{value:!0}),LINDEX$1.transformArguments=LINDEX$1.IS_READ_ONLY=LINDEX$1.FIRST_KEY_INDEX=void 0,LINDEX$1.FIRST_KEY_INDEX=1,LINDEX$1.IS_READ_ONLY=!0,LINDEX$1.transformArguments=transformArguments$4u;var LINSERT$1={};function transformArguments$4t(e,t,r,s){return["LINSERT",e,t,r,s]}Object.defineProperty(LINSERT$1,"__esModule",{value:!0}),LINSERT$1.transformArguments=LINSERT$1.FIRST_KEY_INDEX=void 0,LINSERT$1.FIRST_KEY_INDEX=1,LINSERT$1.transformArguments=transformArguments$4t;var LLEN$1={};function transformArguments$4s(e){return["LLEN",e]}Object.defineProperty(LLEN$1,"__esModule",{value:!0}),LLEN$1.transformArguments=LLEN$1.IS_READ_ONLY=LLEN$1.FIRST_KEY_INDEX=void 0,LLEN$1.FIRST_KEY_INDEX=1,LLEN$1.IS_READ_ONLY=!0,LLEN$1.transformArguments=transformArguments$4s;var LMOVE$1={};function transformArguments$4r(e,t,r,s){return["LMOVE",e,t,r,s]}Object.defineProperty(LMOVE$1,"__esModule",{value:!0}),LMOVE$1.transformArguments=LMOVE$1.FIRST_KEY_INDEX=void 0,LMOVE$1.FIRST_KEY_INDEX=1,LMOVE$1.transformArguments=transformArguments$4r;var LPOP_COUNT$1={};function transformArguments$4q(e,t){return["LPOP",e,t.toString()]}Object.defineProperty(LPOP_COUNT$1,"__esModule",{value:!0}),LPOP_COUNT$1.transformArguments=LPOP_COUNT$1.FIRST_KEY_INDEX=void 0,LPOP_COUNT$1.FIRST_KEY_INDEX=1,LPOP_COUNT$1.transformArguments=transformArguments$4q;var LPOP$1={};function transformArguments$4p(e){return["LPOP",e]}Object.defineProperty(LPOP$1,"__esModule",{value:!0}),LPOP$1.transformArguments=LPOP$1.FIRST_KEY_INDEX=void 0,LPOP$1.FIRST_KEY_INDEX=1,LPOP$1.transformArguments=transformArguments$4p;var LPOS_COUNT$1={},LPOS$1={};function transformArguments$4o(e,t,r){const s=["LPOS",e,t];return"number"==typeof r?.RANK&&s.push("RANK",r.RANK.toString()),"number"==typeof r?.MAXLEN&&s.push("MAXLEN",r.MAXLEN.toString()),s}Object.defineProperty(LPOS$1,"__esModule",{value:!0}),LPOS$1.transformArguments=LPOS$1.IS_READ_ONLY=LPOS$1.FIRST_KEY_INDEX=void 0,LPOS$1.FIRST_KEY_INDEX=1,LPOS$1.IS_READ_ONLY=!0,LPOS$1.transformArguments=transformArguments$4o,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;var t=LPOS$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return t.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return t.IS_READ_ONLY}}),e.transformArguments=function(e,t,r,s){const n=["LPOS",e,t];return"number"==typeof s?.RANK&&n.push("RANK",s.RANK.toString()),n.push("COUNT",r.toString()),"number"==typeof s?.MAXLEN&&n.push("MAXLEN",s.MAXLEN.toString()),n}}(LPOS_COUNT$1);var LPUSH$1={};Object.defineProperty(LPUSH$1,"__esModule",{value:!0}),LPUSH$1.transformArguments=LPUSH$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$$=genericTransformers;function transformArguments$4n(e,t){return(0,generic_transformers_1$$.pushVerdictArguments)(["LPUSH",e],t)}LPUSH$1.FIRST_KEY_INDEX=1,LPUSH$1.transformArguments=transformArguments$4n;var LPUSHX$1={};Object.defineProperty(LPUSHX$1,"__esModule",{value:!0}),LPUSHX$1.transformArguments=LPUSHX$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$_=genericTransformers;function transformArguments$4m(e,t){return(0,generic_transformers_1$_.pushVerdictArguments)(["LPUSHX",e],t)}LPUSHX$1.FIRST_KEY_INDEX=1,LPUSHX$1.transformArguments=transformArguments$4m;var LRANGE$1={};function transformArguments$4l(e,t,r){return["LRANGE",e,t.toString(),r.toString()]}Object.defineProperty(LRANGE$1,"__esModule",{value:!0}),LRANGE$1.transformArguments=LRANGE$1.IS_READ_ONLY=LRANGE$1.FIRST_KEY_INDEX=void 0,LRANGE$1.FIRST_KEY_INDEX=1,LRANGE$1.IS_READ_ONLY=!0,LRANGE$1.transformArguments=transformArguments$4l;var LREM$1={};function transformArguments$4k(e,t,r){return["LREM",e,t.toString(),r]}Object.defineProperty(LREM$1,"__esModule",{value:!0}),LREM$1.transformArguments=LREM$1.FIRST_KEY_INDEX=void 0,LREM$1.FIRST_KEY_INDEX=1,LREM$1.transformArguments=transformArguments$4k;var LSET$1={};function transformArguments$4j(e,t,r){return["LSET",e,t.toString(),r]}Object.defineProperty(LSET$1,"__esModule",{value:!0}),LSET$1.transformArguments=LSET$1.FIRST_KEY_INDEX=void 0,LSET$1.FIRST_KEY_INDEX=1,LSET$1.transformArguments=transformArguments$4j;var LTRIM$1={};function transformArguments$4i(e,t,r){return["LTRIM",e,t.toString(),r.toString()]}Object.defineProperty(LTRIM$1,"__esModule",{value:!0}),LTRIM$1.transformArguments=LTRIM$1.FIRST_KEY_INDEX=void 0,LTRIM$1.FIRST_KEY_INDEX=1,LTRIM$1.transformArguments=transformArguments$4i;var MGET$3={};function transformArguments$4h(e){return["MGET",...e]}Object.defineProperty(MGET$3,"__esModule",{value:!0}),MGET$3.transformArguments=MGET$3.IS_READ_ONLY=MGET$3.FIRST_KEY_INDEX=void 0,MGET$3.FIRST_KEY_INDEX=1,MGET$3.IS_READ_ONLY=!0,MGET$3.transformArguments=transformArguments$4h;var MIGRATE$1={};function transformArguments$4g(e,t,r,s,n,i){const a=["MIGRATE",e,t.toString()],o=Array.isArray(r);return o?a.push(""):a.push(r),a.push(s.toString(),n.toString()),i?.COPY&&a.push("COPY"),i?.REPLACE&&a.push("REPLACE"),i?.AUTH&&(i.AUTH.username?a.push("AUTH2",i.AUTH.username,i.AUTH.password):a.push("AUTH",i.AUTH.password)),o&&a.push("KEYS",...r),a}Object.defineProperty(MIGRATE$1,"__esModule",{value:!0}),MIGRATE$1.transformArguments=void 0,MIGRATE$1.transformArguments=transformArguments$4g;var MSET$2={};function transformArguments$4f(e){const t=["MSET"];if(Array.isArray(e))t.push(...e.flat());else for(const r of Object.keys(e))t.push(r,e[r]);return t}Object.defineProperty(MSET$2,"__esModule",{value:!0}),MSET$2.transformArguments=MSET$2.FIRST_KEY_INDEX=void 0,MSET$2.FIRST_KEY_INDEX=1,MSET$2.transformArguments=transformArguments$4f;var MSETNX$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e){const t=["MSETNX"];if(Array.isArray(e))t.push(...e.flat());else for(const r of Object.keys(e))t.push(r,e[r]);return t};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(MSETNX$1);var OBJECT_ENCODING$1={};function transformArguments$4e(e){return["OBJECT","ENCODING",e]}Object.defineProperty(OBJECT_ENCODING$1,"__esModule",{value:!0}),OBJECT_ENCODING$1.transformArguments=OBJECT_ENCODING$1.IS_READ_ONLY=OBJECT_ENCODING$1.FIRST_KEY_INDEX=void 0,OBJECT_ENCODING$1.FIRST_KEY_INDEX=2,OBJECT_ENCODING$1.IS_READ_ONLY=!0,OBJECT_ENCODING$1.transformArguments=transformArguments$4e;var OBJECT_FREQ$1={};function transformArguments$4d(e){return["OBJECT","FREQ",e]}Object.defineProperty(OBJECT_FREQ$1,"__esModule",{value:!0}),OBJECT_FREQ$1.transformArguments=OBJECT_FREQ$1.IS_READ_ONLY=OBJECT_FREQ$1.FIRST_KEY_INDEX=void 0,OBJECT_FREQ$1.FIRST_KEY_INDEX=2,OBJECT_FREQ$1.IS_READ_ONLY=!0,OBJECT_FREQ$1.transformArguments=transformArguments$4d;var OBJECT_IDLETIME$1={};function transformArguments$4c(e){return["OBJECT","IDLETIME",e]}Object.defineProperty(OBJECT_IDLETIME$1,"__esModule",{value:!0}),OBJECT_IDLETIME$1.transformArguments=OBJECT_IDLETIME$1.IS_READ_ONLY=OBJECT_IDLETIME$1.FIRST_KEY_INDEX=void 0,OBJECT_IDLETIME$1.FIRST_KEY_INDEX=2,OBJECT_IDLETIME$1.IS_READ_ONLY=!0,OBJECT_IDLETIME$1.transformArguments=transformArguments$4c;var OBJECT_REFCOUNT$1={};function transformArguments$4b(e){return["OBJECT","REFCOUNT",e]}Object.defineProperty(OBJECT_REFCOUNT$1,"__esModule",{value:!0}),OBJECT_REFCOUNT$1.transformArguments=OBJECT_REFCOUNT$1.IS_READ_ONLY=OBJECT_REFCOUNT$1.FIRST_KEY_INDEX=void 0,OBJECT_REFCOUNT$1.FIRST_KEY_INDEX=2,OBJECT_REFCOUNT$1.IS_READ_ONLY=!0,OBJECT_REFCOUNT$1.transformArguments=transformArguments$4b;var PERSIST$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e){return["PERSIST",e]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(PERSIST$1);var PEXPIRE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){const s=["PEXPIRE",e,t.toString()];return r&&s.push(r),s};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(PEXPIRE$1);var PEXPIREAT$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){const n=["PEXPIREAT",e,(0,t.transformPXAT)(r)];return s&&n.push(s),n};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanReply}})}(PEXPIREAT$1);var PEXPIRETIME$1={};function transformArguments$4a(e){return["PEXPIRETIME",e]}Object.defineProperty(PEXPIRETIME$1,"__esModule",{value:!0}),PEXPIRETIME$1.transformArguments=PEXPIRETIME$1.FIRST_KEY_INDEX=void 0,PEXPIRETIME$1.FIRST_KEY_INDEX=1,PEXPIRETIME$1.transformArguments=transformArguments$4a;var PFADD$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r){return(0,t.pushVerdictArguments)(["PFADD",e],r)};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanReply}})}(PFADD$1);var PFCOUNT$1={};Object.defineProperty(PFCOUNT$1,"__esModule",{value:!0}),PFCOUNT$1.transformArguments=PFCOUNT$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$Z=genericTransformers;function transformArguments$49(e){return(0,generic_transformers_1$Z.pushVerdictArguments)(["PFCOUNT"],e)}PFCOUNT$1.FIRST_KEY_INDEX=1,PFCOUNT$1.transformArguments=transformArguments$49;var PFMERGE$1={};Object.defineProperty(PFMERGE$1,"__esModule",{value:!0}),PFMERGE$1.transformArguments=PFMERGE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$Y=genericTransformers;function transformArguments$48(e,t){return(0,generic_transformers_1$Y.pushVerdictArguments)(["PFMERGE",e],t)}PFMERGE$1.FIRST_KEY_INDEX=1,PFMERGE$1.transformArguments=transformArguments$48;var PSETEX$1={};function transformArguments$47(e,t,r){return["PSETEX",e,t.toString(),r]}Object.defineProperty(PSETEX$1,"__esModule",{value:!0}),PSETEX$1.transformArguments=PSETEX$1.FIRST_KEY_INDEX=void 0,PSETEX$1.FIRST_KEY_INDEX=1,PSETEX$1.transformArguments=transformArguments$47;var PTTL$1={};function transformArguments$46(e){return["PTTL",e]}Object.defineProperty(PTTL$1,"__esModule",{value:!0}),PTTL$1.transformArguments=PTTL$1.IS_READ_ONLY=PTTL$1.FIRST_KEY_INDEX=void 0,PTTL$1.FIRST_KEY_INDEX=1,PTTL$1.IS_READ_ONLY=!0,PTTL$1.transformArguments=transformArguments$46;var PUBLISH$1={};function transformArguments$45(e,t){return["PUBLISH",e,t]}Object.defineProperty(PUBLISH$1,"__esModule",{value:!0}),PUBLISH$1.transformArguments=PUBLISH$1.IS_READ_ONLY=void 0,PUBLISH$1.IS_READ_ONLY=!0,PUBLISH$1.transformArguments=transformArguments$45;var RENAME$1={};function transformArguments$44(e,t){return["RENAME",e,t]}Object.defineProperty(RENAME$1,"__esModule",{value:!0}),RENAME$1.transformArguments=RENAME$1.FIRST_KEY_INDEX=void 0,RENAME$1.FIRST_KEY_INDEX=1,RENAME$1.transformArguments=transformArguments$44;var RENAMENX$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["RENAMENX",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(RENAMENX$1);var RESTORE$1={};function transformArguments$43(e,t,r,s){const n=["RESTORE",e,t.toString(),r];return s?.REPLACE&&n.push("REPLACE"),s?.ABSTTL&&n.push("ABSTTL"),s?.IDLETIME&&n.push("IDLETIME",s.IDLETIME.toString()),s?.FREQ&&n.push("FREQ",s.FREQ.toString()),n}Object.defineProperty(RESTORE$1,"__esModule",{value:!0}),RESTORE$1.transformArguments=RESTORE$1.FIRST_KEY_INDEX=void 0,RESTORE$1.FIRST_KEY_INDEX=1,RESTORE$1.transformArguments=transformArguments$43;var RPOP_COUNT$1={};function transformArguments$42(e,t){return["RPOP",e,t.toString()]}Object.defineProperty(RPOP_COUNT$1,"__esModule",{value:!0}),RPOP_COUNT$1.transformArguments=RPOP_COUNT$1.FIRST_KEY_INDEX=void 0,RPOP_COUNT$1.FIRST_KEY_INDEX=1,RPOP_COUNT$1.transformArguments=transformArguments$42;var RPOP$1={};function transformArguments$41(e){return["RPOP",e]}Object.defineProperty(RPOP$1,"__esModule",{value:!0}),RPOP$1.transformArguments=RPOP$1.FIRST_KEY_INDEX=void 0,RPOP$1.FIRST_KEY_INDEX=1,RPOP$1.transformArguments=transformArguments$41;var RPOPLPUSH$1={};function transformArguments$40(e,t){return["RPOPLPUSH",e,t]}Object.defineProperty(RPOPLPUSH$1,"__esModule",{value:!0}),RPOPLPUSH$1.transformArguments=RPOPLPUSH$1.FIRST_KEY_INDEX=void 0,RPOPLPUSH$1.FIRST_KEY_INDEX=1,RPOPLPUSH$1.transformArguments=transformArguments$40;var RPUSH$1={};Object.defineProperty(RPUSH$1,"__esModule",{value:!0}),RPUSH$1.transformArguments=RPUSH$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$X=genericTransformers;function transformArguments$3$(e,t){return(0,generic_transformers_1$X.pushVerdictArguments)(["RPUSH",e],t)}RPUSH$1.FIRST_KEY_INDEX=1,RPUSH$1.transformArguments=transformArguments$3$;var RPUSHX$1={};Object.defineProperty(RPUSHX$1,"__esModule",{value:!0}),RPUSHX$1.transformArguments=RPUSHX$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$W=genericTransformers;function transformArguments$3_(e,t){return(0,generic_transformers_1$W.pushVerdictArguments)(["RPUSHX",e],t)}RPUSHX$1.FIRST_KEY_INDEX=1,RPUSHX$1.transformArguments=transformArguments$3_;var SADD$1={};Object.defineProperty(SADD$1,"__esModule",{value:!0}),SADD$1.transformArguments=SADD$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$V=genericTransformers;function transformArguments$3Z(e,t){return(0,generic_transformers_1$V.pushVerdictArguments)(["SADD",e],t)}SADD$1.FIRST_KEY_INDEX=1,SADD$1.transformArguments=transformArguments$3Z;var SCARD$1={};function transformArguments$3Y(e){return["SCARD",e]}Object.defineProperty(SCARD$1,"__esModule",{value:!0}),SCARD$1.transformArguments=SCARD$1.FIRST_KEY_INDEX=void 0,SCARD$1.FIRST_KEY_INDEX=1,SCARD$1.transformArguments=transformArguments$3Y;var SDIFF$1={};Object.defineProperty(SDIFF$1,"__esModule",{value:!0}),SDIFF$1.transformArguments=SDIFF$1.IS_READ_ONLY=SDIFF$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$U=genericTransformers;function transformArguments$3X(e){return(0,generic_transformers_1$U.pushVerdictArguments)(["SDIFF"],e)}SDIFF$1.FIRST_KEY_INDEX=1,SDIFF$1.IS_READ_ONLY=!0,SDIFF$1.transformArguments=transformArguments$3X;var SDIFFSTORE$1={};Object.defineProperty(SDIFFSTORE$1,"__esModule",{value:!0}),SDIFFSTORE$1.transformArguments=SDIFFSTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$T=genericTransformers;function transformArguments$3W(e,t){return(0,generic_transformers_1$T.pushVerdictArguments)(["SDIFFSTORE",e],t)}SDIFFSTORE$1.FIRST_KEY_INDEX=1,SDIFFSTORE$1.transformArguments=transformArguments$3W;var SET$2={};function transformArguments$3V(e,t,r){const s=["SET",e,"number"==typeof t?t.toString():t];return void 0!==r?.EX?s.push("EX",r.EX.toString()):void 0!==r?.PX?s.push("PX",r.PX.toString()):void 0!==r?.EXAT?s.push("EXAT",r.EXAT.toString()):void 0!==r?.PXAT?s.push("PXAT",r.PXAT.toString()):r?.KEEPTTL&&s.push("KEEPTTL"),r?.NX?s.push("NX"):r?.XX&&s.push("XX"),r?.GET&&s.push("GET"),s}Object.defineProperty(SET$2,"__esModule",{value:!0}),SET$2.transformArguments=SET$2.FIRST_KEY_INDEX=void 0,SET$2.FIRST_KEY_INDEX=1,SET$2.transformArguments=transformArguments$3V;var SETBIT$1={};function transformArguments$3U(e,t,r){return["SETBIT",e,t.toString(),r.toString()]}Object.defineProperty(SETBIT$1,"__esModule",{value:!0}),SETBIT$1.transformArguments=SETBIT$1.FIRST_KEY_INDEX=void 0,SETBIT$1.FIRST_KEY_INDEX=1,SETBIT$1.transformArguments=transformArguments$3U;var SETEX$1={};function transformArguments$3T(e,t,r){return["SETEX",e,t.toString(),r]}Object.defineProperty(SETEX$1,"__esModule",{value:!0}),SETEX$1.transformArguments=SETEX$1.FIRST_KEY_INDEX=void 0,SETEX$1.FIRST_KEY_INDEX=1,SETEX$1.transformArguments=transformArguments$3T;var SETNX$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["SETNX",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(SETNX$1);var SETRANGE$1={};function transformArguments$3S(e,t,r){return["SETRANGE",e,t.toString(),r]}Object.defineProperty(SETRANGE$1,"__esModule",{value:!0}),SETRANGE$1.transformArguments=SETRANGE$1.FIRST_KEY_INDEX=void 0,SETRANGE$1.FIRST_KEY_INDEX=1,SETRANGE$1.transformArguments=transformArguments$3S;var SINTER$1={};Object.defineProperty(SINTER$1,"__esModule",{value:!0}),SINTER$1.transformArguments=SINTER$1.IS_READ_ONLY=SINTER$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$S=genericTransformers;function transformArguments$3R(e){return(0,generic_transformers_1$S.pushVerdictArguments)(["SINTER"],e)}SINTER$1.FIRST_KEY_INDEX=1,SINTER$1.IS_READ_ONLY=!0,SINTER$1.transformArguments=transformArguments$3R;var SINTERCARD$1={};Object.defineProperty(SINTERCARD$1,"__esModule",{value:!0}),SINTERCARD$1.transformArguments=SINTERCARD$1.IS_READ_ONLY=SINTERCARD$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$R=genericTransformers;function transformArguments$3Q(e,t){const r=(0,generic_transformers_1$R.pushVerdictArgument)(["SINTERCARD"],e);return t&&r.push("LIMIT",t.toString()),r}SINTERCARD$1.FIRST_KEY_INDEX=2,SINTERCARD$1.IS_READ_ONLY=!0,SINTERCARD$1.transformArguments=transformArguments$3Q;var SINTERSTORE$1={};Object.defineProperty(SINTERSTORE$1,"__esModule",{value:!0}),SINTERSTORE$1.transformArguments=SINTERSTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$Q=genericTransformers;function transformArguments$3P(e,t){return(0,generic_transformers_1$Q.pushVerdictArguments)(["SINTERSTORE",e],t)}SINTERSTORE$1.FIRST_KEY_INDEX=1,SINTERSTORE$1.transformArguments=transformArguments$3P;var SISMEMBER$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["SISMEMBER",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(SISMEMBER$1);var SMEMBERS$1={};function transformArguments$3O(e){return["SMEMBERS",e]}Object.defineProperty(SMEMBERS$1,"__esModule",{value:!0}),SMEMBERS$1.transformArguments=SMEMBERS$1.FIRST_KEY_INDEX=void 0,SMEMBERS$1.FIRST_KEY_INDEX=1,SMEMBERS$1.transformArguments=transformArguments$3O;var SMISMEMBER$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["SMISMEMBER",e,...t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanArrayReply}})}(SMISMEMBER$1);var SMOVE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){return["SMOVE",e,t,r]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(SMOVE$1);var SORT_RO$1={};Object.defineProperty(SORT_RO$1,"__esModule",{value:!0}),SORT_RO$1.transformArguments=SORT_RO$1.IS_READ_ONLY=SORT_RO$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$P=genericTransformers;function transformArguments$3N(e,t){return(0,generic_transformers_1$P.pushSortArguments)(["SORT_RO",e],t)}SORT_RO$1.FIRST_KEY_INDEX=1,SORT_RO$1.IS_READ_ONLY=!0,SORT_RO$1.transformArguments=transformArguments$3N;var SORT_STORE$1={},SORT$1={};Object.defineProperty(SORT$1,"__esModule",{value:!0}),SORT$1.transformArguments=SORT$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$O=genericTransformers;function transformArguments$3M(e,t){return(0,generic_transformers_1$O.pushSortArguments)(["SORT",e],t)}SORT$1.FIRST_KEY_INDEX=1,SORT$1.transformArguments=transformArguments$3M,Object.defineProperty(SORT_STORE$1,"__esModule",{value:!0}),SORT_STORE$1.transformArguments=SORT_STORE$1.FIRST_KEY_INDEX=void 0;const SORT_1=SORT$1;function transformArguments$3L(e,t,r){const s=(0,SORT_1.transformArguments)(e,r);return s.push("STORE",t),s}SORT_STORE$1.FIRST_KEY_INDEX=1,SORT_STORE$1.transformArguments=transformArguments$3L;var SPOP$1={};function transformArguments$3K(e,t){const r=["SPOP",e];return"number"==typeof t&&r.push(t.toString()),r}Object.defineProperty(SPOP$1,"__esModule",{value:!0}),SPOP$1.transformArguments=SPOP$1.FIRST_KEY_INDEX=void 0,SPOP$1.FIRST_KEY_INDEX=1,SPOP$1.transformArguments=transformArguments$3K;var SPUBLISH$1={};function transformArguments$3J(e,t){return["SPUBLISH",e,t]}Object.defineProperty(SPUBLISH$1,"__esModule",{value:!0}),SPUBLISH$1.transformArguments=SPUBLISH$1.FIRST_KEY_INDEX=SPUBLISH$1.IS_READ_ONLY=void 0,SPUBLISH$1.IS_READ_ONLY=!0,SPUBLISH$1.FIRST_KEY_INDEX=1,SPUBLISH$1.transformArguments=transformArguments$3J;var SRANDMEMBER_COUNT$1={},SRANDMEMBER$1={};function transformArguments$3I(e){return["SRANDMEMBER",e]}Object.defineProperty(SRANDMEMBER$1,"__esModule",{value:!0}),SRANDMEMBER$1.transformArguments=SRANDMEMBER$1.FIRST_KEY_INDEX=void 0,SRANDMEMBER$1.FIRST_KEY_INDEX=1,SRANDMEMBER$1.transformArguments=transformArguments$3I,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=SRANDMEMBER$1;var r=SRANDMEMBER$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.transformArguments=function(e,r){return[...(0,t.transformArguments)(e),r.toString()]}}(SRANDMEMBER_COUNT$1);var SREM$1={};Object.defineProperty(SREM$1,"__esModule",{value:!0}),SREM$1.transformArguments=SREM$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$N=genericTransformers;function transformArguments$3H(e,t){return(0,generic_transformers_1$N.pushVerdictArguments)(["SREM",e],t)}SREM$1.FIRST_KEY_INDEX=1,SREM$1.transformArguments=transformArguments$3H;var SSCAN$1={};Object.defineProperty(SSCAN$1,"__esModule",{value:!0}),SSCAN$1.transformReply=SSCAN$1.transformArguments=SSCAN$1.IS_READ_ONLY=SSCAN$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$M=genericTransformers;function transformArguments$3G(e,t,r){return(0,generic_transformers_1$M.pushScanArguments)(["SSCAN",e],t,r)}function transformReply$I([e,t]){return{cursor:Number(e),members:t}}SSCAN$1.FIRST_KEY_INDEX=1,SSCAN$1.IS_READ_ONLY=!0,SSCAN$1.transformArguments=transformArguments$3G,SSCAN$1.transformReply=transformReply$I;var STRLEN$2={};function transformArguments$3F(e){return["STRLEN",e]}Object.defineProperty(STRLEN$2,"__esModule",{value:!0}),STRLEN$2.transformArguments=STRLEN$2.IS_READ_ONLY=STRLEN$2.FIRST_KEY_INDEX=void 0,STRLEN$2.FIRST_KEY_INDEX=1,STRLEN$2.IS_READ_ONLY=!0,STRLEN$2.transformArguments=transformArguments$3F;var SUNION$1={};Object.defineProperty(SUNION$1,"__esModule",{value:!0}),SUNION$1.transformArguments=SUNION$1.IS_READ_ONLY=SUNION$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$L=genericTransformers;function transformArguments$3E(e){return(0,generic_transformers_1$L.pushVerdictArguments)(["SUNION"],e)}SUNION$1.FIRST_KEY_INDEX=1,SUNION$1.IS_READ_ONLY=!0,SUNION$1.transformArguments=transformArguments$3E;var SUNIONSTORE$1={};Object.defineProperty(SUNIONSTORE$1,"__esModule",{value:!0}),SUNIONSTORE$1.transformArguments=SUNIONSTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$K=genericTransformers;function transformArguments$3D(e,t){return(0,generic_transformers_1$K.pushVerdictArguments)(["SUNIONSTORE",e],t)}SUNIONSTORE$1.FIRST_KEY_INDEX=1,SUNIONSTORE$1.transformArguments=transformArguments$3D;var TOUCH$1={};Object.defineProperty(TOUCH$1,"__esModule",{value:!0}),TOUCH$1.transformArguments=TOUCH$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$J=genericTransformers;function transformArguments$3C(e){return(0,generic_transformers_1$J.pushVerdictArguments)(["TOUCH"],e)}TOUCH$1.FIRST_KEY_INDEX=1,TOUCH$1.transformArguments=transformArguments$3C;var TTL$1={};function transformArguments$3B(e){return["TTL",e]}Object.defineProperty(TTL$1,"__esModule",{value:!0}),TTL$1.transformArguments=TTL$1.IS_READ_ONLY=TTL$1.FIRST_KEY_INDEX=void 0,TTL$1.FIRST_KEY_INDEX=1,TTL$1.IS_READ_ONLY=!0,TTL$1.transformArguments=transformArguments$3B;var TYPE$2={};function transformArguments$3A(e){return["TYPE",e]}Object.defineProperty(TYPE$2,"__esModule",{value:!0}),TYPE$2.transformArguments=TYPE$2.IS_READ_ONLY=TYPE$2.FIRST_KEY_INDEX=void 0,TYPE$2.FIRST_KEY_INDEX=1,TYPE$2.IS_READ_ONLY=!0,TYPE$2.transformArguments=transformArguments$3A;var UNLINK$1={};Object.defineProperty(UNLINK$1,"__esModule",{value:!0}),UNLINK$1.transformArguments=UNLINK$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$I=genericTransformers;function transformArguments$3z(e){return(0,generic_transformers_1$I.pushVerdictArguments)(["UNLINK"],e)}UNLINK$1.FIRST_KEY_INDEX=1,UNLINK$1.transformArguments=transformArguments$3z;var WATCH$1={};Object.defineProperty(WATCH$1,"__esModule",{value:!0}),WATCH$1.transformArguments=WATCH$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$H=genericTransformers;function transformArguments$3y(e){return(0,generic_transformers_1$H.pushVerdictArguments)(["WATCH"],e)}WATCH$1.FIRST_KEY_INDEX=1,WATCH$1.transformArguments=transformArguments$3y;var XACK$1={};Object.defineProperty(XACK$1,"__esModule",{value:!0}),XACK$1.transformArguments=XACK$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$G=genericTransformers;function transformArguments$3x(e,t,r){return(0,generic_transformers_1$G.pushVerdictArguments)(["XACK",e,t],r)}XACK$1.FIRST_KEY_INDEX=1,XACK$1.transformArguments=transformArguments$3x;var XADD$1={};function transformArguments$3w(e,t,r,s){const n=["XADD",e];s?.NOMKSTREAM&&n.push("NOMKSTREAM"),s?.TRIM&&(s.TRIM.strategy&&n.push(s.TRIM.strategy),s.TRIM.strategyModifier&&n.push(s.TRIM.strategyModifier),n.push(s.TRIM.threshold.toString()),s.TRIM.limit&&n.push("LIMIT",s.TRIM.limit.toString())),n.push(t);for(const[e,t]of Object.entries(r))n.push(e,t);return n}Object.defineProperty(XADD$1,"__esModule",{value:!0}),XADD$1.transformArguments=XADD$1.FIRST_KEY_INDEX=void 0,XADD$1.FIRST_KEY_INDEX=1,XADD$1.transformArguments=transformArguments$3w;var XAUTOCLAIM_JUSTID$1={},XAUTOCLAIM$1={};Object.defineProperty(XAUTOCLAIM$1,"__esModule",{value:!0}),XAUTOCLAIM$1.transformReply=XAUTOCLAIM$1.transformArguments=XAUTOCLAIM$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$F=genericTransformers;function transformArguments$3v(e,t,r,s,n,i){const a=["XAUTOCLAIM",e,t,r,s.toString(),n];return i?.COUNT&&a.push("COUNT",i.COUNT.toString()),a}function transformReply$H(e){return{nextId:e[0],messages:(0,generic_transformers_1$F.transformStreamMessagesNullReply)(e[1])}}XAUTOCLAIM$1.FIRST_KEY_INDEX=1,XAUTOCLAIM$1.transformArguments=transformArguments$3v,XAUTOCLAIM$1.transformReply=transformReply$H,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=XAUTOCLAIM$1;var r=XAUTOCLAIM$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"JUSTID"]},e.transformReply=function(e){return{nextId:e[0],messages:e[1]}}}(XAUTOCLAIM_JUSTID$1);var XCLAIM_JUSTID$1={},XCLAIM$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s,n,i,a){const o=(0,t.pushVerdictArguments)(["XCLAIM",e,r,s,n.toString()],i);return a?.IDLE&&o.push("IDLE",a.IDLE.toString()),a?.TIME&&o.push("TIME",("number"==typeof a.TIME?a.TIME:a.TIME.getTime()).toString()),a?.RETRYCOUNT&&o.push("RETRYCOUNT",a.RETRYCOUNT.toString()),a?.FORCE&&o.push("FORCE"),o};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformStreamMessagesNullReply}})}(XCLAIM$1),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=XCLAIM$1;var r=XCLAIM$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"JUSTID"]}}(XCLAIM_JUSTID$1);var XDEL$1={};Object.defineProperty(XDEL$1,"__esModule",{value:!0}),XDEL$1.transformArguments=XDEL$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$E=genericTransformers;function transformArguments$3u(e,t){return(0,generic_transformers_1$E.pushVerdictArguments)(["XDEL",e],t)}XDEL$1.FIRST_KEY_INDEX=1,XDEL$1.transformArguments=transformArguments$3u;var XGROUP_CREATE$1={};function transformArguments$3t(e,t,r,s){const n=["XGROUP","CREATE",e,t,r];return s?.MKSTREAM&&n.push("MKSTREAM"),n}Object.defineProperty(XGROUP_CREATE$1,"__esModule",{value:!0}),XGROUP_CREATE$1.transformArguments=XGROUP_CREATE$1.FIRST_KEY_INDEX=void 0,XGROUP_CREATE$1.FIRST_KEY_INDEX=2,XGROUP_CREATE$1.transformArguments=transformArguments$3t;var XGROUP_CREATECONSUMER$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=2,e.transformArguments=function(e,t,r){return["XGROUP","CREATECONSUMER",e,t,r]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(XGROUP_CREATECONSUMER$1);var XGROUP_DELCONSUMER$1={};function transformArguments$3s(e,t,r){return["XGROUP","DELCONSUMER",e,t,r]}Object.defineProperty(XGROUP_DELCONSUMER$1,"__esModule",{value:!0}),XGROUP_DELCONSUMER$1.transformArguments=XGROUP_DELCONSUMER$1.FIRST_KEY_INDEX=void 0,XGROUP_DELCONSUMER$1.FIRST_KEY_INDEX=2,XGROUP_DELCONSUMER$1.transformArguments=transformArguments$3s;var XGROUP_DESTROY$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=2,e.transformArguments=function(e,t){return["XGROUP","DESTROY",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(XGROUP_DESTROY$1);var XGROUP_SETID$1={};function transformArguments$3r(e,t,r){return["XGROUP","SETID",e,t,r]}Object.defineProperty(XGROUP_SETID$1,"__esModule",{value:!0}),XGROUP_SETID$1.transformArguments=XGROUP_SETID$1.FIRST_KEY_INDEX=void 0,XGROUP_SETID$1.FIRST_KEY_INDEX=2,XGROUP_SETID$1.transformArguments=transformArguments$3r;var XINFO_CONSUMERS$1={};function transformArguments$3q(e,t){return["XINFO","CONSUMERS",e,t]}function transformReply$G(e){return e.map((e=>({name:e[1],pending:e[3],idle:e[5],inactive:e[7]})))}Object.defineProperty(XINFO_CONSUMERS$1,"__esModule",{value:!0}),XINFO_CONSUMERS$1.transformReply=XINFO_CONSUMERS$1.transformArguments=XINFO_CONSUMERS$1.IS_READ_ONLY=XINFO_CONSUMERS$1.FIRST_KEY_INDEX=void 0,XINFO_CONSUMERS$1.FIRST_KEY_INDEX=2,XINFO_CONSUMERS$1.IS_READ_ONLY=!0,XINFO_CONSUMERS$1.transformArguments=transformArguments$3q,XINFO_CONSUMERS$1.transformReply=transformReply$G;var XINFO_GROUPS$1={};function transformArguments$3p(e){return["XINFO","GROUPS",e]}function transformReply$F(e){return e.map((e=>({name:e[1],consumers:e[3],pending:e[5],lastDeliveredId:e[7]})))}Object.defineProperty(XINFO_GROUPS$1,"__esModule",{value:!0}),XINFO_GROUPS$1.transformReply=XINFO_GROUPS$1.transformArguments=XINFO_GROUPS$1.IS_READ_ONLY=XINFO_GROUPS$1.FIRST_KEY_INDEX=void 0,XINFO_GROUPS$1.FIRST_KEY_INDEX=2,XINFO_GROUPS$1.IS_READ_ONLY=!0,XINFO_GROUPS$1.transformArguments=transformArguments$3p,XINFO_GROUPS$1.transformReply=transformReply$F;var XINFO_STREAM$1={};Object.defineProperty(XINFO_STREAM$1,"__esModule",{value:!0}),XINFO_STREAM$1.transformReply=XINFO_STREAM$1.transformArguments=XINFO_STREAM$1.IS_READ_ONLY=XINFO_STREAM$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$D=genericTransformers;function transformArguments$3o(e){return["XINFO","STREAM",e]}function transformReply$E(e){const t={};for(let r=0;r<e.length;r+=2)switch(e[r]){case"length":t.length=e[r+1];break;case"radix-tree-keys":t.radixTreeKeys=e[r+1];break;case"radix-tree-nodes":t.radixTreeNodes=e[r+1];break;case"groups":t.groups=e[r+1];break;case"last-generated-id":t.lastGeneratedId=e[r+1];break;case"first-entry":t.firstEntry=e[r+1]?{id:e[r+1][0],message:(0,generic_transformers_1$D.transformTuplesReply)(e[r+1][1])}:null;break;case"last-entry":t.lastEntry=e[r+1]?{id:e[r+1][0],message:(0,generic_transformers_1$D.transformTuplesReply)(e[r+1][1])}:null}return t}XINFO_STREAM$1.FIRST_KEY_INDEX=2,XINFO_STREAM$1.IS_READ_ONLY=!0,XINFO_STREAM$1.transformArguments=transformArguments$3o,XINFO_STREAM$1.transformReply=transformReply$E;var XLEN$1={};function transformArguments$3n(e){return["XLEN",e]}Object.defineProperty(XLEN$1,"__esModule",{value:!0}),XLEN$1.transformArguments=XLEN$1.IS_READ_ONLY=XLEN$1.FIRST_KEY_INDEX=void 0,XLEN$1.FIRST_KEY_INDEX=1,XLEN$1.IS_READ_ONLY=!0,XLEN$1.transformArguments=transformArguments$3n;var XPENDING_RANGE$1={};function transformArguments$3m(e,t,r,s,n,i){const a=["XPENDING",e,t];return i?.IDLE&&a.push("IDLE",i.IDLE.toString()),a.push(r,s,n.toString()),i?.consumer&&a.push(i.consumer),a}function transformReply$D(e){return e.map((([e,t,r,s])=>({id:e,owner:t,millisecondsSinceLastDelivery:r,deliveriesCounter:s})))}Object.defineProperty(XPENDING_RANGE$1,"__esModule",{value:!0}),XPENDING_RANGE$1.transformReply=XPENDING_RANGE$1.transformArguments=XPENDING_RANGE$1.IS_READ_ONLY=XPENDING_RANGE$1.FIRST_KEY_INDEX=void 0,XPENDING_RANGE$1.FIRST_KEY_INDEX=1,XPENDING_RANGE$1.IS_READ_ONLY=!0,XPENDING_RANGE$1.transformArguments=transformArguments$3m,XPENDING_RANGE$1.transformReply=transformReply$D;var XPENDING$1={};function transformArguments$3l(e,t){return["XPENDING",e,t]}function transformReply$C(e){return{pending:e[0],firstId:e[1],lastId:e[2],consumers:null===e[3]?null:e[3].map((([e,t])=>({name:e,deliveriesCounter:Number(t)})))}}Object.defineProperty(XPENDING$1,"__esModule",{value:!0}),XPENDING$1.transformReply=XPENDING$1.transformArguments=XPENDING$1.IS_READ_ONLY=XPENDING$1.FIRST_KEY_INDEX=void 0,XPENDING$1.FIRST_KEY_INDEX=1,XPENDING$1.IS_READ_ONLY=!0,XPENDING$1.transformArguments=transformArguments$3l,XPENDING$1.transformReply=transformReply$C;var XRANGE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t,r,s){const n=["XRANGE",e,t,r];return s?.COUNT&&n.push("COUNT",s.COUNT.toString()),n};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformStreamMessagesReply}})}(XRANGE$1);var XREAD$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;e.FIRST_KEY_INDEX=e=>Array.isArray(e)?e[0].key:e.key,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){const r=["XREAD"];t?.COUNT&&r.push("COUNT",t.COUNT.toString()),"number"==typeof t?.BLOCK&&r.push("BLOCK",t.BLOCK.toString()),r.push("STREAMS");const s=Array.isArray(e)?e:[e],n=r.length;for(let e=0;e<s.length;e++){const t=s[e];r[n+e]=t.key,r[n+s.length+e]=t.id}return r};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformStreamsMessagesReply}})}(XREAD$1);var XREADGROUP$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;e.FIRST_KEY_INDEX=(e,t,r)=>Array.isArray(r)?r[0].key:r.key,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t,r,s){const n=["XREADGROUP","GROUP",e,t];s?.COUNT&&n.push("COUNT",s.COUNT.toString()),"number"==typeof s?.BLOCK&&n.push("BLOCK",s.BLOCK.toString()),s?.NOACK&&n.push("NOACK"),n.push("STREAMS");const i=Array.isArray(r)?r:[r],a=n.length;for(let e=0;e<i.length;e++){const t=i[e];n[a+e]=t.key,n[a+i.length+e]=t.id}return n};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformStreamsMessagesReply}})}(XREADGROUP$1);var XREVRANGE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t,r,s){const n=["XREVRANGE",e,t,r];return s?.COUNT&&n.push("COUNT",s.COUNT.toString()),n};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformStreamMessagesReply}})}(XREVRANGE$1);var XSETID$1={};function transformArguments$3k(e,t,r){const s=["XSETID",e,t];return r?.ENTRIESADDED&&s.push("ENTRIESADDED",r.ENTRIESADDED.toString()),r?.MAXDELETEDID&&s.push("MAXDELETEDID",r.MAXDELETEDID),s}Object.defineProperty(XSETID$1,"__esModule",{value:!0}),XSETID$1.transformArguments=XSETID$1.FIRST_KEY_INDEX=void 0,XSETID$1.FIRST_KEY_INDEX=1,XSETID$1.transformArguments=transformArguments$3k;var XTRIM$1={};function transformArguments$3j(e,t,r,s){const n=["XTRIM",e,t];return s?.strategyModifier&&n.push(s.strategyModifier),n.push(r.toString()),s?.LIMIT&&n.push("LIMIT",s.LIMIT.toString()),n}Object.defineProperty(XTRIM$1,"__esModule",{value:!0}),XTRIM$1.transformArguments=XTRIM$1.FIRST_KEY_INDEX=void 0,XTRIM$1.FIRST_KEY_INDEX=1,XTRIM$1.transformArguments=transformArguments$3j;var ZADD$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){const n=["ZADD",e];s?.NX?n.push("NX"):(s?.XX&&n.push("XX"),s?.GT?n.push("GT"):s?.LT&&n.push("LT")),s?.CH&&n.push("CH"),s?.INCR&&n.push("INCR");for(const{score:e,value:s}of Array.isArray(r)?r:[r])n.push((0,t.transformNumberInfinityArgument)(e),s);return n};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformNumberInfinityReply}})}(ZADD$1);var ZCARD$1={};function transformArguments$3i(e){return["ZCARD",e]}Object.defineProperty(ZCARD$1,"__esModule",{value:!0}),ZCARD$1.transformArguments=ZCARD$1.IS_READ_ONLY=ZCARD$1.FIRST_KEY_INDEX=void 0,ZCARD$1.FIRST_KEY_INDEX=1,ZCARD$1.IS_READ_ONLY=!0,ZCARD$1.transformArguments=transformArguments$3i;var ZCOUNT$1={};Object.defineProperty(ZCOUNT$1,"__esModule",{value:!0}),ZCOUNT$1.transformArguments=ZCOUNT$1.IS_READ_ONLY=ZCOUNT$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$C=genericTransformers;function transformArguments$3h(e,t,r){return["ZCOUNT",e,(0,generic_transformers_1$C.transformStringNumberInfinityArgument)(t),(0,generic_transformers_1$C.transformStringNumberInfinityArgument)(r)]}ZCOUNT$1.FIRST_KEY_INDEX=1,ZCOUNT$1.IS_READ_ONLY=!0,ZCOUNT$1.transformArguments=transformArguments$3h;var ZDIFF_WITHSCORES$1={},ZDIFF$1={};Object.defineProperty(ZDIFF$1,"__esModule",{value:!0}),ZDIFF$1.transformArguments=ZDIFF$1.IS_READ_ONLY=ZDIFF$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$B=genericTransformers;function transformArguments$3g(e){return(0,generic_transformers_1$B.pushVerdictArgument)(["ZDIFF"],e)}ZDIFF$1.FIRST_KEY_INDEX=2,ZDIFF$1.IS_READ_ONLY=!0,ZDIFF$1.transformArguments=transformArguments$3g,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZDIFF$1;var r=ZDIFF$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"WITHSCORES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZDIFF_WITHSCORES$1);var ZDIFFSTORE$1={};Object.defineProperty(ZDIFFSTORE$1,"__esModule",{value:!0}),ZDIFFSTORE$1.transformArguments=ZDIFFSTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$A=genericTransformers;function transformArguments$3f(e,t){return(0,generic_transformers_1$A.pushVerdictArgument)(["ZDIFFSTORE",e],t)}ZDIFFSTORE$1.FIRST_KEY_INDEX=1,ZDIFFSTORE$1.transformArguments=transformArguments$3f;var ZINCRBY$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){return["ZINCRBY",e,(0,t.transformNumberInfinityArgument)(r),s]};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformNumberInfinityReply}})}(ZINCRBY$1);var ZINTER_WITHSCORES$1={},ZINTER$1={};Object.defineProperty(ZINTER$1,"__esModule",{value:!0}),ZINTER$1.transformArguments=ZINTER$1.IS_READ_ONLY=ZINTER$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$z=genericTransformers;function transformArguments$3e(e,t){const r=(0,generic_transformers_1$z.pushVerdictArgument)(["ZINTER"],e);return t?.WEIGHTS&&r.push("WEIGHTS",...t.WEIGHTS.map((e=>e.toString()))),t?.AGGREGATE&&r.push("AGGREGATE",t.AGGREGATE),r}ZINTER$1.FIRST_KEY_INDEX=2,ZINTER$1.IS_READ_ONLY=!0,ZINTER$1.transformArguments=transformArguments$3e,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZINTER$1;var r=ZINTER$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"WITHSCORES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZINTER_WITHSCORES$1);var ZINTERCARD$1={};Object.defineProperty(ZINTERCARD$1,"__esModule",{value:!0}),ZINTERCARD$1.transformArguments=ZINTERCARD$1.IS_READ_ONLY=ZINTERCARD$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$y=genericTransformers;function transformArguments$3d(e,t){const r=(0,generic_transformers_1$y.pushVerdictArgument)(["ZINTERCARD"],e);return t&&r.push("LIMIT",t.toString()),r}ZINTERCARD$1.FIRST_KEY_INDEX=2,ZINTERCARD$1.IS_READ_ONLY=!0,ZINTERCARD$1.transformArguments=transformArguments$3d;var ZINTERSTORE$1={};Object.defineProperty(ZINTERSTORE$1,"__esModule",{value:!0}),ZINTERSTORE$1.transformArguments=ZINTERSTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$x=genericTransformers;function transformArguments$3c(e,t,r){const s=(0,generic_transformers_1$x.pushVerdictArgument)(["ZINTERSTORE",e],t);return r?.WEIGHTS&&s.push("WEIGHTS",...r.WEIGHTS.map((e=>e.toString()))),r?.AGGREGATE&&s.push("AGGREGATE",r.AGGREGATE),s}ZINTERSTORE$1.FIRST_KEY_INDEX=1,ZINTERSTORE$1.transformArguments=transformArguments$3c;var ZLEXCOUNT$1={};function transformArguments$3b(e,t,r){return["ZLEXCOUNT",e,t,r]}Object.defineProperty(ZLEXCOUNT$1,"__esModule",{value:!0}),ZLEXCOUNT$1.transformArguments=ZLEXCOUNT$1.IS_READ_ONLY=ZLEXCOUNT$1.FIRST_KEY_INDEX=void 0,ZLEXCOUNT$1.FIRST_KEY_INDEX=1,ZLEXCOUNT$1.IS_READ_ONLY=!0,ZLEXCOUNT$1.transformArguments=transformArguments$3b;var ZMSCORE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,r){return(0,t.pushVerdictArguments)(["ZMSCORE",e],r)};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformNumberInfinityNullArrayReply}})}(ZMSCORE$1);var ZPOPMAX_COUNT$1={},ZPOPMAX$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e){return["ZPOPMAX",e]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformSortedSetMemberNullReply}})}(ZPOPMAX$1),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=ZPOPMAX$1;var r=ZPOPMAX$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.transformArguments=function(e,r){return[...(0,t.transformArguments)(e),r.toString()]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZPOPMAX_COUNT$1);var ZPOPMIN_COUNT$1={},ZPOPMIN$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e){return["ZPOPMIN",e]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformSortedSetMemberNullReply}})}(ZPOPMIN$1),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=ZPOPMIN$1;var r=ZPOPMIN$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.transformArguments=function(e,r){return[...(0,t.transformArguments)(e),r.toString()]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZPOPMIN_COUNT$1);var ZRANDMEMBER_COUNT_WITHSCORES$1={},ZRANDMEMBER_COUNT$1={},ZRANDMEMBER$1={};function transformArguments$3a(e){return["ZRANDMEMBER",e]}Object.defineProperty(ZRANDMEMBER$1,"__esModule",{value:!0}),ZRANDMEMBER$1.transformArguments=ZRANDMEMBER$1.IS_READ_ONLY=ZRANDMEMBER$1.FIRST_KEY_INDEX=void 0,ZRANDMEMBER$1.FIRST_KEY_INDEX=1,ZRANDMEMBER$1.IS_READ_ONLY=!0,ZRANDMEMBER$1.transformArguments=transformArguments$3a,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZRANDMEMBER$1;var r=ZRANDMEMBER$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r){return[...(0,t.transformArguments)(e),r.toString()]}}(ZRANDMEMBER_COUNT$1),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZRANDMEMBER_COUNT$1;var r=ZRANDMEMBER_COUNT$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"WITHSCORES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZRANDMEMBER_COUNT_WITHSCORES$1);var ZRANGE_WITHSCORES$1={},ZRANGE$1={};Object.defineProperty(ZRANGE$1,"__esModule",{value:!0}),ZRANGE$1.transformArguments=ZRANGE$1.IS_READ_ONLY=ZRANGE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$w=genericTransformers;function transformArguments$39(e,t,r,s){const n=["ZRANGE",e,(0,generic_transformers_1$w.transformStringNumberInfinityArgument)(t),(0,generic_transformers_1$w.transformStringNumberInfinityArgument)(r)];switch(s?.BY){case"SCORE":n.push("BYSCORE");break;case"LEX":n.push("BYLEX")}return s?.REV&&n.push("REV"),s?.LIMIT&&n.push("LIMIT",s.LIMIT.offset.toString(),s.LIMIT.count.toString()),n}ZRANGE$1.FIRST_KEY_INDEX=1,ZRANGE$1.IS_READ_ONLY=!0,ZRANGE$1.transformArguments=transformArguments$39,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZRANGE$1;var r=ZRANGE$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"WITHSCORES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZRANGE_WITHSCORES$1);var ZRANGEBYLEX$1={};Object.defineProperty(ZRANGEBYLEX$1,"__esModule",{value:!0}),ZRANGEBYLEX$1.transformArguments=ZRANGEBYLEX$1.IS_READ_ONLY=ZRANGEBYLEX$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$v=genericTransformers;function transformArguments$38(e,t,r,s){const n=["ZRANGEBYLEX",e,(0,generic_transformers_1$v.transformStringNumberInfinityArgument)(t),(0,generic_transformers_1$v.transformStringNumberInfinityArgument)(r)];return s?.LIMIT&&n.push("LIMIT",s.LIMIT.offset.toString(),s.LIMIT.count.toString()),n}ZRANGEBYLEX$1.FIRST_KEY_INDEX=1,ZRANGEBYLEX$1.IS_READ_ONLY=!0,ZRANGEBYLEX$1.transformArguments=transformArguments$38;var ZRANGEBYSCORE_WITHSCORES$1={},ZRANGEBYSCORE$1={};Object.defineProperty(ZRANGEBYSCORE$1,"__esModule",{value:!0}),ZRANGEBYSCORE$1.transformArguments=ZRANGEBYSCORE$1.IS_READ_ONLY=ZRANGEBYSCORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$u=genericTransformers;function transformArguments$37(e,t,r,s){const n=["ZRANGEBYSCORE",e,(0,generic_transformers_1$u.transformStringNumberInfinityArgument)(t),(0,generic_transformers_1$u.transformStringNumberInfinityArgument)(r)];return s?.LIMIT&&n.push("LIMIT",s.LIMIT.offset.toString(),s.LIMIT.count.toString()),n}ZRANGEBYSCORE$1.FIRST_KEY_INDEX=1,ZRANGEBYSCORE$1.IS_READ_ONLY=!0,ZRANGEBYSCORE$1.transformArguments=transformArguments$37,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZRANGEBYSCORE$1;var r=ZRANGEBYSCORE$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s,n){return[...(0,t.transformArguments)(e,r,s,n),"WITHSCORES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZRANGEBYSCORE_WITHSCORES$1);var ZRANGESTORE$1={};Object.defineProperty(ZRANGESTORE$1,"__esModule",{value:!0}),ZRANGESTORE$1.transformReply=ZRANGESTORE$1.transformArguments=ZRANGESTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$t=genericTransformers;function transformArguments$36(e,t,r,s,n){const i=["ZRANGESTORE",e,t,(0,generic_transformers_1$t.transformStringNumberInfinityArgument)(r),(0,generic_transformers_1$t.transformStringNumberInfinityArgument)(s)];switch(n?.BY){case"SCORE":i.push("BYSCORE");break;case"LEX":i.push("BYLEX")}return n?.REV&&i.push("REV"),n?.LIMIT&&i.push("LIMIT",n.LIMIT.offset.toString(),n.LIMIT.count.toString()),n?.WITHSCORES&&i.push("WITHSCORES"),i}function transformReply$B(e){if("number"!=typeof e)throw new TypeError("Upgrade to Redis 6.2.5 and up (https://github.com/redis/redis/pull/9089)");return e}ZRANGESTORE$1.FIRST_KEY_INDEX=1,ZRANGESTORE$1.transformArguments=transformArguments$36,ZRANGESTORE$1.transformReply=transformReply$B;var ZRANK$1={};function transformArguments$35(e,t){return["ZRANK",e,t]}Object.defineProperty(ZRANK$1,"__esModule",{value:!0}),ZRANK$1.transformArguments=ZRANK$1.IS_READ_ONLY=ZRANK$1.FIRST_KEY_INDEX=void 0,ZRANK$1.FIRST_KEY_INDEX=1,ZRANK$1.IS_READ_ONLY=!0,ZRANK$1.transformArguments=transformArguments$35;var ZREM$1={};Object.defineProperty(ZREM$1,"__esModule",{value:!0}),ZREM$1.transformArguments=ZREM$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$s=genericTransformers;function transformArguments$34(e,t){return(0,generic_transformers_1$s.pushVerdictArguments)(["ZREM",e],t)}ZREM$1.FIRST_KEY_INDEX=1,ZREM$1.transformArguments=transformArguments$34;var ZREMRANGEBYLEX$1={};Object.defineProperty(ZREMRANGEBYLEX$1,"__esModule",{value:!0}),ZREMRANGEBYLEX$1.transformArguments=ZREMRANGEBYLEX$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$r=genericTransformers;function transformArguments$33(e,t,r){return["ZREMRANGEBYLEX",e,(0,generic_transformers_1$r.transformStringNumberInfinityArgument)(t),(0,generic_transformers_1$r.transformStringNumberInfinityArgument)(r)]}ZREMRANGEBYLEX$1.FIRST_KEY_INDEX=1,ZREMRANGEBYLEX$1.transformArguments=transformArguments$33;var ZREMRANGEBYRANK$1={};function transformArguments$32(e,t,r){return["ZREMRANGEBYRANK",e,t.toString(),r.toString()]}Object.defineProperty(ZREMRANGEBYRANK$1,"__esModule",{value:!0}),ZREMRANGEBYRANK$1.transformArguments=ZREMRANGEBYRANK$1.FIRST_KEY_INDEX=void 0,ZREMRANGEBYRANK$1.FIRST_KEY_INDEX=1,ZREMRANGEBYRANK$1.transformArguments=transformArguments$32;var ZREMRANGEBYSCORE$1={};Object.defineProperty(ZREMRANGEBYSCORE$1,"__esModule",{value:!0}),ZREMRANGEBYSCORE$1.transformArguments=ZREMRANGEBYSCORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$q=genericTransformers;function transformArguments$31(e,t,r){return["ZREMRANGEBYSCORE",e,(0,generic_transformers_1$q.transformStringNumberInfinityArgument)(t),(0,generic_transformers_1$q.transformStringNumberInfinityArgument)(r)]}ZREMRANGEBYSCORE$1.FIRST_KEY_INDEX=1,ZREMRANGEBYSCORE$1.transformArguments=transformArguments$31;var ZREVRANK$1={};function transformArguments$30(e,t){return["ZREVRANK",e,t]}Object.defineProperty(ZREVRANK$1,"__esModule",{value:!0}),ZREVRANK$1.transformArguments=ZREVRANK$1.IS_READ_ONLY=ZREVRANK$1.FIRST_KEY_INDEX=void 0,ZREVRANK$1.FIRST_KEY_INDEX=1,ZREVRANK$1.IS_READ_ONLY=!0,ZREVRANK$1.transformArguments=transformArguments$30;var ZSCAN$1={};Object.defineProperty(ZSCAN$1,"__esModule",{value:!0}),ZSCAN$1.transformReply=ZSCAN$1.transformArguments=ZSCAN$1.IS_READ_ONLY=ZSCAN$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$p=genericTransformers;function transformArguments$2$(e,t,r){return(0,generic_transformers_1$p.pushScanArguments)(["ZSCAN",e],t,r)}function transformReply$A([e,t]){const r=[];for(let e=0;e<t.length;e+=2)r.push({value:t[e],score:(0,generic_transformers_1$p.transformNumberInfinityReply)(t[e+1])});return{cursor:Number(e),members:r}}ZSCAN$1.FIRST_KEY_INDEX=1,ZSCAN$1.IS_READ_ONLY=!0,ZSCAN$1.transformArguments=transformArguments$2$,ZSCAN$1.transformReply=transformReply$A;var ZSCORE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){return["ZSCORE",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformNumberInfinityNullReply}})}(ZSCORE$1);var ZUNION_WITHSCORES$1={},ZUNION$1={};Object.defineProperty(ZUNION$1,"__esModule",{value:!0}),ZUNION$1.transformArguments=ZUNION$1.IS_READ_ONLY=ZUNION$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$o=genericTransformers;function transformArguments$2_(e,t){const r=(0,generic_transformers_1$o.pushVerdictArgument)(["ZUNION"],e);return t?.WEIGHTS&&r.push("WEIGHTS",...t.WEIGHTS.map((e=>e.toString()))),t?.AGGREGATE&&r.push("AGGREGATE",t.AGGREGATE),r}ZUNION$1.FIRST_KEY_INDEX=2,ZUNION$1.IS_READ_ONLY=!0,ZUNION$1.transformArguments=transformArguments$2_,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=ZUNION$1;var r=ZUNION$1;Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(...e){return[...(0,t.transformArguments)(...e),"WITHSCORES"]};var s=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformSortedSetWithScoresReply}})}(ZUNION_WITHSCORES$1);var ZUNIONSTORE$1={};Object.defineProperty(ZUNIONSTORE$1,"__esModule",{value:!0}),ZUNIONSTORE$1.transformArguments=ZUNIONSTORE$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$n=genericTransformers;function transformArguments$2Z(e,t,r){const s=(0,generic_transformers_1$n.pushVerdictArgument)(["ZUNIONSTORE",e],t);return r?.WEIGHTS&&s.push("WEIGHTS",...r.WEIGHTS.map((e=>e.toString()))),r?.AGGREGATE&&s.push("AGGREGATE",r.AGGREGATE),s}ZUNIONSTORE$1.FIRST_KEY_INDEX=1,ZUNIONSTORE$1.transformArguments=transformArguments$2Z,Object.defineProperty(commands$5,"__esModule",{value:!0});const APPEND=APPEND$1,BITCOUNT=BITCOUNT$1,BITFIELD_RO=BITFIELD_RO$1,BITFIELD=BITFIELD$1,BITOP=BITOP$1,BITPOS=BITPOS$1,BLMOVE=BLMOVE$1,BLMPOP=BLMPOP$1,BLPOP=BLPOP$1,BRPOP=BRPOP$1,BRPOPLPUSH=BRPOPLPUSH$1,BZMPOP=BZMPOP$1,BZPOPMAX=BZPOPMAX$1,BZPOPMIN=BZPOPMIN$1,COPY=COPY$1,DECR=DECR$1,DECRBY$1=DECRBY$2,DEL$3=DEL$4,DUMP=DUMP$1,EVAL_RO=EVAL_RO$1,EVAL=EVAL$1,EVALSHA_RO=EVALSHA_RO$1,EVALSHA=EVALSHA$1,EXISTS$3=EXISTS$4,EXPIRE=EXPIRE$1,EXPIREAT=EXPIREAT$1,EXPIRETIME=EXPIRETIME$1,FCALL_RO=FCALL_RO$1,FCALL=FCALL$1,GEOADD=GEOADD$1,GEODIST=GEODIST$1,GEOHASH=GEOHASH$1,GEOPOS=GEOPOS$1,GEORADIUS_RO_WITH=GEORADIUS_RO_WITH$1,GEORADIUS_RO=GEORADIUS_RO$1,GEORADIUS_WITH=GEORADIUS_WITH$1,GEORADIUS=GEORADIUS$1,GEORADIUSBYMEMBER_RO_WITH=GEORADIUSBYMEMBER_RO_WITH$1,GEORADIUSBYMEMBER_RO=GEORADIUSBYMEMBER_RO$1,GEORADIUSBYMEMBER_WITH=GEORADIUSBYMEMBER_WITH$1,GEORADIUSBYMEMBER=GEORADIUSBYMEMBER$1,GEORADIUSBYMEMBERSTORE=GEORADIUSBYMEMBERSTORE$1,GEORADIUSSTORE=GEORADIUSSTORE$1,GEOSEARCH_WITH=GEOSEARCH_WITH$1,GEOSEARCH=GEOSEARCH$1,GEOSEARCHSTORE=GEOSEARCHSTORE$1,GET$2=GET$3,GETBIT=GETBIT$1,GETDEL=GETDEL$1,GETEX=GETEX$1,GETRANGE=GETRANGE$1,GETSET=GETSET$1,HDEL=HDEL$1,HEXISTS=HEXISTS$1,HGET=HGET$1,HGETALL=HGETALL$1,HINCRBY=HINCRBY$1,HINCRBYFLOAT=HINCRBYFLOAT$1,HKEYS=HKEYS$1,HLEN=HLEN$1,HMGET=HMGET$1,HRANDFIELD_COUNT_WITHVALUES=HRANDFIELD_COUNT_WITHVALUES$1,HRANDFIELD_COUNT=HRANDFIELD_COUNT$1,HRANDFIELD=HRANDFIELD$1,HSCAN=HSCAN$1,HSET=HSET$1,HSETNX=HSETNX$1,HSTRLEN=HSTRLEN$1,HVALS=HVALS$1,INCR=INCR$1,INCRBY$5=INCRBY$6,INCRBYFLOAT=INCRBYFLOAT$1,LCS_IDX_WITHMATCHLEN=LCS_IDX_WITHMATCHLEN$1,LCS_IDX=LCS_IDX$1,LCS_LEN=LCS_LEN$1,LCS=LCS$1,LINDEX=LINDEX$1,LINSERT=LINSERT$1,LLEN=LLEN$1,LMOVE=LMOVE$1,LMPOP=LMPOP$1,LPOP_COUNT=LPOP_COUNT$1,LPOP=LPOP$1,LPOS_COUNT=LPOS_COUNT$1,LPOS=LPOS$1,LPUSH=LPUSH$1,LPUSHX=LPUSHX$1,LRANGE=LRANGE$1,LREM=LREM$1,LSET=LSET$1,LTRIM=LTRIM$1,MGET$2=MGET$3,MIGRATE=MIGRATE$1,MSET$1=MSET$2,MSETNX=MSETNX$1,OBJECT_ENCODING=OBJECT_ENCODING$1,OBJECT_FREQ=OBJECT_FREQ$1,OBJECT_IDLETIME=OBJECT_IDLETIME$1,OBJECT_REFCOUNT=OBJECT_REFCOUNT$1,PERSIST=PERSIST$1,PEXPIRE=PEXPIRE$1,PEXPIREAT=PEXPIREAT$1,PEXPIRETIME=PEXPIRETIME$1,PFADD=PFADD$1,PFCOUNT=PFCOUNT$1,PFMERGE=PFMERGE$1,PSETEX=PSETEX$1,PTTL=PTTL$1,PUBLISH=PUBLISH$1,RENAME=RENAME$1,RENAMENX=RENAMENX$1,RESTORE=RESTORE$1,RPOP_COUNT=RPOP_COUNT$1,RPOP=RPOP$1,RPOPLPUSH=RPOPLPUSH$1,RPUSH=RPUSH$1,RPUSHX=RPUSHX$1,SADD=SADD$1,SCARD=SCARD$1,SDIFF=SDIFF$1,SDIFFSTORE=SDIFFSTORE$1,SET$1=SET$2,SETBIT=SETBIT$1,SETEX=SETEX$1,SETNX=SETNX$1,SETRANGE=SETRANGE$1,SINTER=SINTER$1,SINTERCARD=SINTERCARD$1,SINTERSTORE=SINTERSTORE$1,SISMEMBER=SISMEMBER$1,SMEMBERS=SMEMBERS$1,SMISMEMBER=SMISMEMBER$1,SMOVE=SMOVE$1,SORT_RO=SORT_RO$1,SORT_STORE=SORT_STORE$1,SORT=SORT$1,SPOP=SPOP$1,SPUBLISH=SPUBLISH$1,SRANDMEMBER_COUNT=SRANDMEMBER_COUNT$1,SRANDMEMBER=SRANDMEMBER$1,SREM=SREM$1,SSCAN=SSCAN$1,STRLEN$1=STRLEN$2,SUNION=SUNION$1,SUNIONSTORE=SUNIONSTORE$1,TOUCH=TOUCH$1,TTL=TTL$1,TYPE$1=TYPE$2,UNLINK=UNLINK$1,WATCH=WATCH$1,XACK=XACK$1,XADD=XADD$1,XAUTOCLAIM_JUSTID=XAUTOCLAIM_JUSTID$1,XAUTOCLAIM=XAUTOCLAIM$1,XCLAIM_JUSTID=XCLAIM_JUSTID$1,XCLAIM=XCLAIM$1,XDEL=XDEL$1,XGROUP_CREATE=XGROUP_CREATE$1,XGROUP_CREATECONSUMER=XGROUP_CREATECONSUMER$1,XGROUP_DELCONSUMER=XGROUP_DELCONSUMER$1,XGROUP_DESTROY=XGROUP_DESTROY$1,XGROUP_SETID=XGROUP_SETID$1,XINFO_CONSUMERS=XINFO_CONSUMERS$1,XINFO_GROUPS=XINFO_GROUPS$1,XINFO_STREAM=XINFO_STREAM$1,XLEN=XLEN$1,XPENDING_RANGE=XPENDING_RANGE$1,XPENDING=XPENDING$1,XRANGE=XRANGE$1,XREAD=XREAD$1,XREADGROUP=XREADGROUP$1,XREVRANGE=XREVRANGE$1,XSETID=XSETID$1,XTRIM=XTRIM$1,ZADD=ZADD$1,ZCARD=ZCARD$1,ZCOUNT=ZCOUNT$1,ZDIFF_WITHSCORES=ZDIFF_WITHSCORES$1,ZDIFF=ZDIFF$1,ZDIFFSTORE=ZDIFFSTORE$1,ZINCRBY=ZINCRBY$1,ZINTER_WITHSCORES=ZINTER_WITHSCORES$1,ZINTER=ZINTER$1,ZINTERCARD=ZINTERCARD$1,ZINTERSTORE=ZINTERSTORE$1,ZLEXCOUNT=ZLEXCOUNT$1,ZMPOP=ZMPOP$1,ZMSCORE=ZMSCORE$1,ZPOPMAX_COUNT=ZPOPMAX_COUNT$1,ZPOPMAX=ZPOPMAX$1,ZPOPMIN_COUNT=ZPOPMIN_COUNT$1,ZPOPMIN=ZPOPMIN$1,ZRANDMEMBER_COUNT_WITHSCORES=ZRANDMEMBER_COUNT_WITHSCORES$1,ZRANDMEMBER_COUNT=ZRANDMEMBER_COUNT$1,ZRANDMEMBER=ZRANDMEMBER$1,ZRANGE_WITHSCORES=ZRANGE_WITHSCORES$1,ZRANGE=ZRANGE$1,ZRANGEBYLEX=ZRANGEBYLEX$1,ZRANGEBYSCORE_WITHSCORES=ZRANGEBYSCORE_WITHSCORES$1,ZRANGEBYSCORE=ZRANGEBYSCORE$1,ZRANGESTORE=ZRANGESTORE$1,ZRANK=ZRANK$1,ZREM=ZREM$1,ZREMRANGEBYLEX=ZREMRANGEBYLEX$1,ZREMRANGEBYRANK=ZREMRANGEBYRANK$1,ZREMRANGEBYSCORE=ZREMRANGEBYSCORE$1,ZREVRANK=ZREVRANK$1,ZSCAN=ZSCAN$1,ZSCORE=ZSCORE$1,ZUNION_WITHSCORES=ZUNION_WITHSCORES$1,ZUNION=ZUNION$1,ZUNIONSTORE=ZUNIONSTORE$1;commands$5.default={APPEND:APPEND,append:APPEND,BITCOUNT:BITCOUNT,bitCount:BITCOUNT,BITFIELD_RO:BITFIELD_RO,bitFieldRo:BITFIELD_RO,BITFIELD:BITFIELD,bitField:BITFIELD,BITOP:BITOP,bitOp:BITOP,BITPOS:BITPOS,bitPos:BITPOS,BLMOVE:BLMOVE,blMove:BLMOVE,BLMPOP:BLMPOP,blmPop:BLMPOP,BLPOP:BLPOP,blPop:BLPOP,BRPOP:BRPOP,brPop:BRPOP,BRPOPLPUSH:BRPOPLPUSH,brPopLPush:BRPOPLPUSH,BZMPOP:BZMPOP,bzmPop:BZMPOP,BZPOPMAX:BZPOPMAX,bzPopMax:BZPOPMAX,BZPOPMIN:BZPOPMIN,bzPopMin:BZPOPMIN,COPY:COPY,copy:COPY,DECR:DECR,decr:DECR,DECRBY:DECRBY$1,decrBy:DECRBY$1,DEL:DEL$3,del:DEL$3,DUMP:DUMP,dump:DUMP,EVAL_RO:EVAL_RO,evalRo:EVAL_RO,EVAL:EVAL,eval:EVAL,EVALSHA:EVALSHA,evalSha:EVALSHA,EVALSHA_RO:EVALSHA_RO,evalShaRo:EVALSHA_RO,EXISTS:EXISTS$3,exists:EXISTS$3,EXPIRE:EXPIRE,expire:EXPIRE,EXPIREAT:EXPIREAT,expireAt:EXPIREAT,EXPIRETIME:EXPIRETIME,expireTime:EXPIRETIME,FCALL_RO:FCALL_RO,fCallRo:FCALL_RO,FCALL:FCALL,fCall:FCALL,GEOADD:GEOADD,geoAdd:GEOADD,GEODIST:GEODIST,geoDist:GEODIST,GEOHASH:GEOHASH,geoHash:GEOHASH,GEOPOS:GEOPOS,geoPos:GEOPOS,GEORADIUS_RO_WITH:GEORADIUS_RO_WITH,geoRadiusRoWith:GEORADIUS_RO_WITH,GEORADIUS_RO:GEORADIUS_RO,geoRadiusRo:GEORADIUS_RO,GEORADIUS_WITH:GEORADIUS_WITH,geoRadiusWith:GEORADIUS_WITH,GEORADIUS:GEORADIUS,geoRadius:GEORADIUS,GEORADIUSBYMEMBER_RO_WITH:GEORADIUSBYMEMBER_RO_WITH,geoRadiusByMemberRoWith:GEORADIUSBYMEMBER_RO_WITH,GEORADIUSBYMEMBER_RO:GEORADIUSBYMEMBER_RO,geoRadiusByMemberRo:GEORADIUSBYMEMBER_RO,GEORADIUSBYMEMBER_WITH:GEORADIUSBYMEMBER_WITH,geoRadiusByMemberWith:GEORADIUSBYMEMBER_WITH,GEORADIUSBYMEMBER:GEORADIUSBYMEMBER,geoRadiusByMember:GEORADIUSBYMEMBER,GEORADIUSBYMEMBERSTORE:GEORADIUSBYMEMBERSTORE,geoRadiusByMemberStore:GEORADIUSBYMEMBERSTORE,GEORADIUSSTORE:GEORADIUSSTORE,geoRadiusStore:GEORADIUSSTORE,GEOSEARCH_WITH:GEOSEARCH_WITH,geoSearchWith:GEOSEARCH_WITH,GEOSEARCH:GEOSEARCH,geoSearch:GEOSEARCH,GEOSEARCHSTORE:GEOSEARCHSTORE,geoSearchStore:GEOSEARCHSTORE,GET:GET$2,get:GET$2,GETBIT:GETBIT,getBit:GETBIT,GETDEL:GETDEL,getDel:GETDEL,GETEX:GETEX,getEx:GETEX,GETRANGE:GETRANGE,getRange:GETRANGE,GETSET:GETSET,getSet:GETSET,HDEL:HDEL,hDel:HDEL,HEXISTS:HEXISTS,hExists:HEXISTS,HGET:HGET,hGet:HGET,HGETALL:HGETALL,hGetAll:HGETALL,HINCRBY:HINCRBY,hIncrBy:HINCRBY,HINCRBYFLOAT:HINCRBYFLOAT,hIncrByFloat:HINCRBYFLOAT,HKEYS:HKEYS,hKeys:HKEYS,HLEN:HLEN,hLen:HLEN,HMGET:HMGET,hmGet:HMGET,HRANDFIELD_COUNT_WITHVALUES:HRANDFIELD_COUNT_WITHVALUES,hRandFieldCountWithValues:HRANDFIELD_COUNT_WITHVALUES,HRANDFIELD_COUNT:HRANDFIELD_COUNT,hRandFieldCount:HRANDFIELD_COUNT,HRANDFIELD:HRANDFIELD,hRandField:HRANDFIELD,HSCAN:HSCAN,hScan:HSCAN,HSET:HSET,hSet:HSET,HSETNX:HSETNX,hSetNX:HSETNX,HSTRLEN:HSTRLEN,hStrLen:HSTRLEN,HVALS:HVALS,hVals:HVALS,INCR:INCR,incr:INCR,INCRBY:INCRBY$5,incrBy:INCRBY$5,INCRBYFLOAT:INCRBYFLOAT,incrByFloat:INCRBYFLOAT,LCS_IDX_WITHMATCHLEN:LCS_IDX_WITHMATCHLEN,lcsIdxWithMatchLen:LCS_IDX_WITHMATCHLEN,LCS_IDX:LCS_IDX,lcsIdx:LCS_IDX,LCS_LEN:LCS_LEN,lcsLen:LCS_LEN,LCS:LCS,lcs:LCS,LINDEX:LINDEX,lIndex:LINDEX,LINSERT:LINSERT,lInsert:LINSERT,LLEN:LLEN,lLen:LLEN,LMOVE:LMOVE,lMove:LMOVE,LMPOP:LMPOP,lmPop:LMPOP,LPOP_COUNT:LPOP_COUNT,lPopCount:LPOP_COUNT,LPOP:LPOP,lPop:LPOP,LPOS_COUNT:LPOS_COUNT,lPosCount:LPOS_COUNT,LPOS:LPOS,lPos:LPOS,LPUSH:LPUSH,lPush:LPUSH,LPUSHX:LPUSHX,lPushX:LPUSHX,LRANGE:LRANGE,lRange:LRANGE,LREM:LREM,lRem:LREM,LSET:LSET,lSet:LSET,LTRIM:LTRIM,lTrim:LTRIM,MGET:MGET$2,mGet:MGET$2,MIGRATE:MIGRATE,migrate:MIGRATE,MSET:MSET$1,mSet:MSET$1,MSETNX:MSETNX,mSetNX:MSETNX,OBJECT_ENCODING:OBJECT_ENCODING,objectEncoding:OBJECT_ENCODING,OBJECT_FREQ:OBJECT_FREQ,objectFreq:OBJECT_FREQ,OBJECT_IDLETIME:OBJECT_IDLETIME,objectIdleTime:OBJECT_IDLETIME,OBJECT_REFCOUNT:OBJECT_REFCOUNT,objectRefCount:OBJECT_REFCOUNT,PERSIST:PERSIST,persist:PERSIST,PEXPIRE:PEXPIRE,pExpire:PEXPIRE,PEXPIREAT:PEXPIREAT,pExpireAt:PEXPIREAT,PEXPIRETIME:PEXPIRETIME,pExpireTime:PEXPIRETIME,PFADD:PFADD,pfAdd:PFADD,PFCOUNT:PFCOUNT,pfCount:PFCOUNT,PFMERGE:PFMERGE,pfMerge:PFMERGE,PSETEX:PSETEX,pSetEx:PSETEX,PTTL:PTTL,pTTL:PTTL,PUBLISH:PUBLISH,publish:PUBLISH,RENAME:RENAME,rename:RENAME,RENAMENX:RENAMENX,renameNX:RENAMENX,RESTORE:RESTORE,restore:RESTORE,RPOP_COUNT:RPOP_COUNT,rPopCount:RPOP_COUNT,RPOP:RPOP,rPop:RPOP,RPOPLPUSH:RPOPLPUSH,rPopLPush:RPOPLPUSH,RPUSH:RPUSH,rPush:RPUSH,RPUSHX:RPUSHX,rPushX:RPUSHX,SADD:SADD,sAdd:SADD,SCARD:SCARD,sCard:SCARD,SDIFF:SDIFF,sDiff:SDIFF,SDIFFSTORE:SDIFFSTORE,sDiffStore:SDIFFSTORE,SINTER:SINTER,sInter:SINTER,SINTERCARD:SINTERCARD,sInterCard:SINTERCARD,SINTERSTORE:SINTERSTORE,sInterStore:SINTERSTORE,SET:SET$1,set:SET$1,SETBIT:SETBIT,setBit:SETBIT,SETEX:SETEX,setEx:SETEX,SETNX:SETNX,setNX:SETNX,SETRANGE:SETRANGE,setRange:SETRANGE,SISMEMBER:SISMEMBER,sIsMember:SISMEMBER,SMEMBERS:SMEMBERS,sMembers:SMEMBERS,SMISMEMBER:SMISMEMBER,smIsMember:SMISMEMBER,SMOVE:SMOVE,sMove:SMOVE,SORT_RO:SORT_RO,sortRo:SORT_RO,SORT_STORE:SORT_STORE,sortStore:SORT_STORE,SORT:SORT,sort:SORT,SPOP:SPOP,sPop:SPOP,SPUBLISH:SPUBLISH,sPublish:SPUBLISH,SRANDMEMBER_COUNT:SRANDMEMBER_COUNT,sRandMemberCount:SRANDMEMBER_COUNT,SRANDMEMBER:SRANDMEMBER,sRandMember:SRANDMEMBER,SREM:SREM,sRem:SREM,SSCAN:SSCAN,sScan:SSCAN,STRLEN:STRLEN$1,strLen:STRLEN$1,SUNION:SUNION,sUnion:SUNION,SUNIONSTORE:SUNIONSTORE,sUnionStore:SUNIONSTORE,TOUCH:TOUCH,touch:TOUCH,TTL:TTL,ttl:TTL,TYPE:TYPE$1,type:TYPE$1,UNLINK:UNLINK,unlink:UNLINK,WATCH:WATCH,watch:WATCH,XACK:XACK,xAck:XACK,XADD:XADD,xAdd:XADD,XAUTOCLAIM_JUSTID:XAUTOCLAIM_JUSTID,xAutoClaimJustId:XAUTOCLAIM_JUSTID,XAUTOCLAIM:XAUTOCLAIM,xAutoClaim:XAUTOCLAIM,XCLAIM:XCLAIM,xClaim:XCLAIM,XCLAIM_JUSTID:XCLAIM_JUSTID,xClaimJustId:XCLAIM_JUSTID,XDEL:XDEL,xDel:XDEL,XGROUP_CREATE:XGROUP_CREATE,xGroupCreate:XGROUP_CREATE,XGROUP_CREATECONSUMER:XGROUP_CREATECONSUMER,xGroupCreateConsumer:XGROUP_CREATECONSUMER,XGROUP_DELCONSUMER:XGROUP_DELCONSUMER,xGroupDelConsumer:XGROUP_DELCONSUMER,XGROUP_DESTROY:XGROUP_DESTROY,xGroupDestroy:XGROUP_DESTROY,XGROUP_SETID:XGROUP_SETID,xGroupSetId:XGROUP_SETID,XINFO_CONSUMERS:XINFO_CONSUMERS,xInfoConsumers:XINFO_CONSUMERS,XINFO_GROUPS:XINFO_GROUPS,xInfoGroups:XINFO_GROUPS,XINFO_STREAM:XINFO_STREAM,xInfoStream:XINFO_STREAM,XLEN:XLEN,xLen:XLEN,XPENDING_RANGE:XPENDING_RANGE,xPendingRange:XPENDING_RANGE,XPENDING:XPENDING,xPending:XPENDING,XRANGE:XRANGE,xRange:XRANGE,XREAD:XREAD,xRead:XREAD,XREADGROUP:XREADGROUP,xReadGroup:XREADGROUP,XREVRANGE:XREVRANGE,xRevRange:XREVRANGE,XSETID:XSETID,xSetId:XSETID,XTRIM:XTRIM,xTrim:XTRIM,ZADD:ZADD,zAdd:ZADD,ZCARD:ZCARD,zCard:ZCARD,ZCOUNT:ZCOUNT,zCount:ZCOUNT,ZDIFF_WITHSCORES:ZDIFF_WITHSCORES,zDiffWithScores:ZDIFF_WITHSCORES,ZDIFF:ZDIFF,zDiff:ZDIFF,ZDIFFSTORE:ZDIFFSTORE,zDiffStore:ZDIFFSTORE,ZINCRBY:ZINCRBY,zIncrBy:ZINCRBY,ZINTER_WITHSCORES:ZINTER_WITHSCORES,zInterWithScores:ZINTER_WITHSCORES,ZINTER:ZINTER,zInter:ZINTER,ZINTERCARD:ZINTERCARD,zInterCard:ZINTERCARD,ZINTERSTORE:ZINTERSTORE,zInterStore:ZINTERSTORE,ZLEXCOUNT:ZLEXCOUNT,zLexCount:ZLEXCOUNT,ZMPOP:ZMPOP,zmPop:ZMPOP,ZMSCORE:ZMSCORE,zmScore:ZMSCORE,ZPOPMAX_COUNT:ZPOPMAX_COUNT,zPopMaxCount:ZPOPMAX_COUNT,ZPOPMAX:ZPOPMAX,zPopMax:ZPOPMAX,ZPOPMIN_COUNT:ZPOPMIN_COUNT,zPopMinCount:ZPOPMIN_COUNT,ZPOPMIN:ZPOPMIN,zPopMin:ZPOPMIN,ZRANDMEMBER_COUNT_WITHSCORES:ZRANDMEMBER_COUNT_WITHSCORES,zRandMemberCountWithScores:ZRANDMEMBER_COUNT_WITHSCORES,ZRANDMEMBER_COUNT:ZRANDMEMBER_COUNT,zRandMemberCount:ZRANDMEMBER_COUNT,ZRANDMEMBER:ZRANDMEMBER,zRandMember:ZRANDMEMBER,ZRANGE_WITHSCORES:ZRANGE_WITHSCORES,zRangeWithScores:ZRANGE_WITHSCORES,ZRANGE:ZRANGE,zRange:ZRANGE,ZRANGEBYLEX:ZRANGEBYLEX,zRangeByLex:ZRANGEBYLEX,ZRANGEBYSCORE_WITHSCORES:ZRANGEBYSCORE_WITHSCORES,zRangeByScoreWithScores:ZRANGEBYSCORE_WITHSCORES,ZRANGEBYSCORE:ZRANGEBYSCORE,zRangeByScore:ZRANGEBYSCORE,ZRANGESTORE:ZRANGESTORE,zRangeStore:ZRANGESTORE,ZRANK:ZRANK,zRank:ZRANK,ZREM:ZREM,zRem:ZREM,ZREMRANGEBYLEX:ZREMRANGEBYLEX,zRemRangeByLex:ZREMRANGEBYLEX,ZREMRANGEBYRANK:ZREMRANGEBYRANK,zRemRangeByRank:ZREMRANGEBYRANK,ZREMRANGEBYSCORE:ZREMRANGEBYSCORE,zRemRangeByScore:ZREMRANGEBYSCORE,ZREVRANK:ZREVRANK,zRevRank:ZREVRANK,ZSCAN:ZSCAN,zScan:ZSCAN,ZSCORE:ZSCORE,zScore:ZSCORE,ZUNION_WITHSCORES:ZUNION_WITHSCORES,zUnionWithScores:ZUNION_WITHSCORES,ZUNION:ZUNION,zUnion:ZUNION,ZUNIONSTORE:ZUNIONSTORE,zUnionStore:ZUNIONSTORE};var ACL_CAT$1={};function transformArguments$2Y(e){const t=["ACL","CAT"];return e&&t.push(e),t}Object.defineProperty(ACL_CAT$1,"__esModule",{value:!0}),ACL_CAT$1.transformArguments=void 0,ACL_CAT$1.transformArguments=transformArguments$2Y;var ACL_DELUSER$1={};Object.defineProperty(ACL_DELUSER$1,"__esModule",{value:!0}),ACL_DELUSER$1.transformArguments=void 0;const generic_transformers_1$m=genericTransformers;function transformArguments$2X(e){return(0,generic_transformers_1$m.pushVerdictArguments)(["ACL","DELUSER"],e)}ACL_DELUSER$1.transformArguments=transformArguments$2X;var ACL_DRYRUN$1={};function transformArguments$2W(e,t){return["ACL","DRYRUN",e,...t]}Object.defineProperty(ACL_DRYRUN$1,"__esModule",{value:!0}),ACL_DRYRUN$1.transformArguments=ACL_DRYRUN$1.IS_READ_ONLY=void 0,ACL_DRYRUN$1.IS_READ_ONLY=!0,ACL_DRYRUN$1.transformArguments=transformArguments$2W;var ACL_GENPASS$1={};function transformArguments$2V(e){const t=["ACL","GENPASS"];return e&&t.push(e.toString()),t}Object.defineProperty(ACL_GENPASS$1,"__esModule",{value:!0}),ACL_GENPASS$1.transformArguments=void 0,ACL_GENPASS$1.transformArguments=transformArguments$2V;var ACL_GETUSER$1={};function transformArguments$2U(e){return["ACL","GETUSER",e]}function transformReply$z(e){return{flags:e[1],passwords:e[3],commands:e[5],keys:e[7],channels:e[9],selectors:e[11]}}Object.defineProperty(ACL_GETUSER$1,"__esModule",{value:!0}),ACL_GETUSER$1.transformReply=ACL_GETUSER$1.transformArguments=void 0,ACL_GETUSER$1.transformArguments=transformArguments$2U,ACL_GETUSER$1.transformReply=transformReply$z;var ACL_LIST$1={};function transformArguments$2T(){return["ACL","LIST"]}Object.defineProperty(ACL_LIST$1,"__esModule",{value:!0}),ACL_LIST$1.transformArguments=void 0,ACL_LIST$1.transformArguments=transformArguments$2T;var ACL_LOAD$1={};function transformArguments$2S(){return["ACL","LOAD"]}Object.defineProperty(ACL_LOAD$1,"__esModule",{value:!0}),ACL_LOAD$1.transformArguments=void 0,ACL_LOAD$1.transformArguments=transformArguments$2S;var ACL_LOG_RESET$1={};function transformArguments$2R(){return["ACL","LOG","RESET"]}Object.defineProperty(ACL_LOG_RESET$1,"__esModule",{value:!0}),ACL_LOG_RESET$1.transformArguments=void 0,ACL_LOG_RESET$1.transformArguments=transformArguments$2R;var ACL_LOG$1={};function transformArguments$2Q(e){const t=["ACL","LOG"];return e&&t.push(e.toString()),t}function transformReply$y(e){return e.map((e=>({count:e[1],reason:e[3],context:e[5],object:e[7],username:e[9],ageSeconds:Number(e[11]),clientInfo:e[13]})))}Object.defineProperty(ACL_LOG$1,"__esModule",{value:!0}),ACL_LOG$1.transformReply=ACL_LOG$1.transformArguments=void 0,ACL_LOG$1.transformArguments=transformArguments$2Q,ACL_LOG$1.transformReply=transformReply$y;var ACL_SAVE$1={};function transformArguments$2P(){return["ACL","SAVE"]}Object.defineProperty(ACL_SAVE$1,"__esModule",{value:!0}),ACL_SAVE$1.transformArguments=void 0,ACL_SAVE$1.transformArguments=transformArguments$2P;var ACL_SETUSER$1={};Object.defineProperty(ACL_SETUSER$1,"__esModule",{value:!0}),ACL_SETUSER$1.transformArguments=void 0;const generic_transformers_1$l=genericTransformers;function transformArguments$2O(e,t){return(0,generic_transformers_1$l.pushVerdictArguments)(["ACL","SETUSER",e],t)}ACL_SETUSER$1.transformArguments=transformArguments$2O;var ACL_USERS$1={};function transformArguments$2N(){return["ACL","USERS"]}Object.defineProperty(ACL_USERS$1,"__esModule",{value:!0}),ACL_USERS$1.transformArguments=void 0,ACL_USERS$1.transformArguments=transformArguments$2N;var ACL_WHOAMI$1={};function transformArguments$2M(){return["ACL","WHOAMI"]}Object.defineProperty(ACL_WHOAMI$1,"__esModule",{value:!0}),ACL_WHOAMI$1.transformArguments=void 0,ACL_WHOAMI$1.transformArguments=transformArguments$2M;var ASKING$1={};function transformArguments$2L(){return["ASKING"]}Object.defineProperty(ASKING$1,"__esModule",{value:!0}),ASKING$1.transformArguments=void 0,ASKING$1.transformArguments=transformArguments$2L;var AUTH$1={};function transformArguments$2K({username:e,password:t}){return e?["AUTH",e,t]:["AUTH",t]}Object.defineProperty(AUTH$1,"__esModule",{value:!0}),AUTH$1.transformArguments=void 0,AUTH$1.transformArguments=transformArguments$2K;var BGREWRITEAOF$1={};function transformArguments$2J(){return["BGREWRITEAOF"]}Object.defineProperty(BGREWRITEAOF$1,"__esModule",{value:!0}),BGREWRITEAOF$1.transformArguments=void 0,BGREWRITEAOF$1.transformArguments=transformArguments$2J;var BGSAVE$1={};function transformArguments$2I(e){const t=["BGSAVE"];return e?.SCHEDULE&&t.push("SCHEDULE"),t}Object.defineProperty(BGSAVE$1,"__esModule",{value:!0}),BGSAVE$1.transformArguments=void 0,BGSAVE$1.transformArguments=transformArguments$2I;var CLIENT_CACHING$1={};function transformArguments$2H(e){return["CLIENT","CACHING",e?"YES":"NO"]}Object.defineProperty(CLIENT_CACHING$1,"__esModule",{value:!0}),CLIENT_CACHING$1.transformArguments=void 0,CLIENT_CACHING$1.transformArguments=transformArguments$2H;var CLIENT_GETNAME$1={};function transformArguments$2G(){return["CLIENT","GETNAME"]}Object.defineProperty(CLIENT_GETNAME$1,"__esModule",{value:!0}),CLIENT_GETNAME$1.transformArguments=void 0,CLIENT_GETNAME$1.transformArguments=transformArguments$2G;var CLIENT_GETREDIR$1={};function transformArguments$2F(){return["CLIENT","GETREDIR"]}Object.defineProperty(CLIENT_GETREDIR$1,"__esModule",{value:!0}),CLIENT_GETREDIR$1.transformArguments=void 0,CLIENT_GETREDIR$1.transformArguments=transformArguments$2F;var CLIENT_ID$1={};function transformArguments$2E(){return["CLIENT","ID"]}Object.defineProperty(CLIENT_ID$1,"__esModule",{value:!0}),CLIENT_ID$1.transformArguments=CLIENT_ID$1.IS_READ_ONLY=void 0,CLIENT_ID$1.IS_READ_ONLY=!0,CLIENT_ID$1.transformArguments=transformArguments$2E;var CLIENT_KILL$1={},ClientKillFilters;function transformArguments$2D(e){const t=["CLIENT","KILL"];if(Array.isArray(e))for(const r of e)pushFilter(t,r);else pushFilter(t,e);return t}function pushFilter(e,t){if(t!==ClientKillFilters.SKIP_ME)switch(e.push(t.filter),t.filter){case ClientKillFilters.ADDRESS:e.push(t.address);break;case ClientKillFilters.LOCAL_ADDRESS:e.push(t.localAddress);break;case ClientKillFilters.ID:e.push("number"==typeof t.id?t.id.toString():t.id);break;case ClientKillFilters.TYPE:e.push(t.type);break;case ClientKillFilters.USER:e.push(t.username);break;case ClientKillFilters.SKIP_ME:e.push(t.skipMe?"yes":"no")}else e.push("SKIPME")}Object.defineProperty(CLIENT_KILL$1,"__esModule",{value:!0}),CLIENT_KILL$1.transformArguments=CLIENT_KILL$1.ClientKillFilters=void 0,function(e){e.ADDRESS="ADDR",e.LOCAL_ADDRESS="LADDR",e.ID="ID",e.TYPE="TYPE",e.USER="USER",e.SKIP_ME="SKIPME"}(ClientKillFilters||(CLIENT_KILL$1.ClientKillFilters=ClientKillFilters={})),CLIENT_KILL$1.transformArguments=transformArguments$2D;var CLIENT_LIST$1={},CLIENT_INFO$1={};function transformArguments$2C(){return["CLIENT","INFO"]}Object.defineProperty(CLIENT_INFO$1,"__esModule",{value:!0}),CLIENT_INFO$1.transformReply=CLIENT_INFO$1.transformArguments=CLIENT_INFO$1.IS_READ_ONLY=void 0,CLIENT_INFO$1.IS_READ_ONLY=!0,CLIENT_INFO$1.transformArguments=transformArguments$2C;const CLIENT_INFO_REGEX=/([^\s=]+)=([^\s]*)/g;function transformReply$x(e){const t={};for(const r of e.matchAll(CLIENT_INFO_REGEX))t[r[1]]=r[2];const r={id:Number(t.id),addr:t.addr,fd:Number(t.fd),name:t.name,age:Number(t.age),idle:Number(t.idle),flags:t.flags,db:Number(t.db),sub:Number(t.sub),psub:Number(t.psub),multi:Number(t.multi),qbuf:Number(t.qbuf),qbufFree:Number(t["qbuf-free"]),argvMem:Number(t["argv-mem"]),obl:Number(t.obl),oll:Number(t.oll),omem:Number(t.omem),totMem:Number(t["tot-mem"]),events:t.events,cmd:t.cmd,user:t.user,libName:t["lib-name"],libVer:t["lib-ver"]};return void 0!==t.laddr&&(r.laddr=t.laddr),void 0!==t.redir&&(r.redir=Number(t.redir)),void 0!==t.ssub&&(r.ssub=Number(t.ssub)),void 0!==t["multi-mem"]&&(r.multiMem=Number(t["multi-mem"])),void 0!==t.resp&&(r.resp=Number(t.resp)),r}CLIENT_INFO$1.transformReply=transformReply$x,Object.defineProperty(CLIENT_LIST$1,"__esModule",{value:!0}),CLIENT_LIST$1.transformReply=CLIENT_LIST$1.transformArguments=CLIENT_LIST$1.IS_READ_ONLY=void 0;const generic_transformers_1$k=genericTransformers,CLIENT_INFO_1=CLIENT_INFO$1;function transformArguments$2B(e){let t=["CLIENT","LIST"];return e&&(void 0!==e.TYPE?t.push("TYPE",e.TYPE):(t.push("ID"),t=(0,generic_transformers_1$k.pushVerdictArguments)(t,e.ID))),t}function transformReply$w(e){const t=e.split("\n"),r=t.length-1,s=[];for(let e=0;e<r;e++)s.push((0,CLIENT_INFO_1.transformReply)(t[e]));return s}CLIENT_LIST$1.IS_READ_ONLY=!0,CLIENT_LIST$1.transformArguments=transformArguments$2B,CLIENT_LIST$1.transformReply=transformReply$w;var CLIENT_NOEVICT={};function transformArguments$2A(e){return["CLIENT","NO-EVICT",e?"ON":"OFF"]}Object.defineProperty(CLIENT_NOEVICT,"__esModule",{value:!0}),CLIENT_NOEVICT.transformArguments=void 0,CLIENT_NOEVICT.transformArguments=transformArguments$2A;var CLIENT_NOTOUCH={};function transformArguments$2z(e){return["CLIENT","NO-TOUCH",e?"ON":"OFF"]}Object.defineProperty(CLIENT_NOTOUCH,"__esModule",{value:!0}),CLIENT_NOTOUCH.transformArguments=void 0,CLIENT_NOTOUCH.transformArguments=transformArguments$2z;var CLIENT_PAUSE$1={};function transformArguments$2y(e,t){const r=["CLIENT","PAUSE",e.toString()];return t&&r.push(t),r}Object.defineProperty(CLIENT_PAUSE$1,"__esModule",{value:!0}),CLIENT_PAUSE$1.transformArguments=void 0,CLIENT_PAUSE$1.transformArguments=transformArguments$2y;var CLIENT_SETNAME$1={};function transformArguments$2x(e){return["CLIENT","SETNAME",e]}Object.defineProperty(CLIENT_SETNAME$1,"__esModule",{value:!0}),CLIENT_SETNAME$1.transformArguments=void 0,CLIENT_SETNAME$1.transformArguments=transformArguments$2x;var CLIENT_TRACKING$1={};function transformArguments$2w(e,t){const r=["CLIENT","TRACKING",e?"ON":"OFF"];if(e){if(t?.REDIRECT&&r.push("REDIRECT",t.REDIRECT.toString()),isBroadcast(t)){if(r.push("BCAST"),t?.PREFIX)if(Array.isArray(t.PREFIX))for(const e of t.PREFIX)r.push("PREFIX",e);else r.push("PREFIX",t.PREFIX)}else isOptIn(t)?r.push("OPTIN"):isOptOut(t)&&r.push("OPTOUT");t?.NOLOOP&&r.push("NOLOOP")}return r}function isBroadcast(e){return!0===e?.BCAST}function isOptIn(e){return!0===e?.OPTIN}function isOptOut(e){return!0===e?.OPTOUT}Object.defineProperty(CLIENT_TRACKING$1,"__esModule",{value:!0}),CLIENT_TRACKING$1.transformArguments=void 0,CLIENT_TRACKING$1.transformArguments=transformArguments$2w;var CLIENT_TRACKINGINFO$1={};function transformArguments$2v(){return["CLIENT","TRACKINGINFO"]}function transformReply$v(e){return{flags:new Set(e[1]),redirect:e[3],prefixes:e[5]}}Object.defineProperty(CLIENT_TRACKINGINFO$1,"__esModule",{value:!0}),CLIENT_TRACKINGINFO$1.transformReply=CLIENT_TRACKINGINFO$1.transformArguments=void 0,CLIENT_TRACKINGINFO$1.transformArguments=transformArguments$2v,CLIENT_TRACKINGINFO$1.transformReply=transformReply$v;var CLIENT_UNPAUSE$1={};function transformArguments$2u(){return["CLIENT","UNPAUSE"]}Object.defineProperty(CLIENT_UNPAUSE$1,"__esModule",{value:!0}),CLIENT_UNPAUSE$1.transformArguments=void 0,CLIENT_UNPAUSE$1.transformArguments=transformArguments$2u;var CLUSTER_ADDSLOTS$1={};Object.defineProperty(CLUSTER_ADDSLOTS$1,"__esModule",{value:!0}),CLUSTER_ADDSLOTS$1.transformArguments=void 0;const generic_transformers_1$j=genericTransformers;function transformArguments$2t(e){return(0,generic_transformers_1$j.pushVerdictNumberArguments)(["CLUSTER","ADDSLOTS"],e)}CLUSTER_ADDSLOTS$1.transformArguments=transformArguments$2t;var CLUSTER_ADDSLOTSRANGE$1={};Object.defineProperty(CLUSTER_ADDSLOTSRANGE$1,"__esModule",{value:!0}),CLUSTER_ADDSLOTSRANGE$1.transformArguments=void 0;const generic_transformers_1$i=genericTransformers;function transformArguments$2s(e){return(0,generic_transformers_1$i.pushSlotRangesArguments)(["CLUSTER","ADDSLOTSRANGE"],e)}CLUSTER_ADDSLOTSRANGE$1.transformArguments=transformArguments$2s;var CLUSTER_BUMPEPOCH$1={};function transformArguments$2r(){return["CLUSTER","BUMPEPOCH"]}Object.defineProperty(CLUSTER_BUMPEPOCH$1,"__esModule",{value:!0}),CLUSTER_BUMPEPOCH$1.transformArguments=void 0,CLUSTER_BUMPEPOCH$1.transformArguments=transformArguments$2r;var CLUSTER_COUNTFAILUREREPORTS={};function transformArguments$2q(e){return["CLUSTER","COUNT-FAILURE-REPORTS",e]}Object.defineProperty(CLUSTER_COUNTFAILUREREPORTS,"__esModule",{value:!0}),CLUSTER_COUNTFAILUREREPORTS.transformArguments=void 0,CLUSTER_COUNTFAILUREREPORTS.transformArguments=transformArguments$2q;var CLUSTER_COUNTKEYSINSLOT$1={};function transformArguments$2p(e){return["CLUSTER","COUNTKEYSINSLOT",e.toString()]}Object.defineProperty(CLUSTER_COUNTKEYSINSLOT$1,"__esModule",{value:!0}),CLUSTER_COUNTKEYSINSLOT$1.transformArguments=void 0,CLUSTER_COUNTKEYSINSLOT$1.transformArguments=transformArguments$2p;var CLUSTER_DELSLOTS$1={};Object.defineProperty(CLUSTER_DELSLOTS$1,"__esModule",{value:!0}),CLUSTER_DELSLOTS$1.transformArguments=void 0;const generic_transformers_1$h=genericTransformers;function transformArguments$2o(e){return(0,generic_transformers_1$h.pushVerdictNumberArguments)(["CLUSTER","DELSLOTS"],e)}CLUSTER_DELSLOTS$1.transformArguments=transformArguments$2o;var CLUSTER_DELSLOTSRANGE$1={};Object.defineProperty(CLUSTER_DELSLOTSRANGE$1,"__esModule",{value:!0}),CLUSTER_DELSLOTSRANGE$1.transformArguments=void 0;const generic_transformers_1$g=genericTransformers;function transformArguments$2n(e){return(0,generic_transformers_1$g.pushSlotRangesArguments)(["CLUSTER","DELSLOTSRANGE"],e)}CLUSTER_DELSLOTSRANGE$1.transformArguments=transformArguments$2n;var CLUSTER_FAILOVER$1={},FailoverModes;function transformArguments$2m(e){const t=["CLUSTER","FAILOVER"];return e&&t.push(e),t}Object.defineProperty(CLUSTER_FAILOVER$1,"__esModule",{value:!0}),CLUSTER_FAILOVER$1.transformArguments=CLUSTER_FAILOVER$1.FailoverModes=void 0,function(e){e.FORCE="FORCE",e.TAKEOVER="TAKEOVER"}(FailoverModes||(CLUSTER_FAILOVER$1.FailoverModes=FailoverModes={})),CLUSTER_FAILOVER$1.transformArguments=transformArguments$2m;var CLUSTER_FLUSHSLOTS$1={};function transformArguments$2l(){return["CLUSTER","FLUSHSLOTS"]}Object.defineProperty(CLUSTER_FLUSHSLOTS$1,"__esModule",{value:!0}),CLUSTER_FLUSHSLOTS$1.transformArguments=void 0,CLUSTER_FLUSHSLOTS$1.transformArguments=transformArguments$2l;var CLUSTER_FORGET$1={};function transformArguments$2k(e){return["CLUSTER","FORGET",e]}Object.defineProperty(CLUSTER_FORGET$1,"__esModule",{value:!0}),CLUSTER_FORGET$1.transformArguments=void 0,CLUSTER_FORGET$1.transformArguments=transformArguments$2k;var CLUSTER_GETKEYSINSLOT$1={};function transformArguments$2j(e,t){return["CLUSTER","GETKEYSINSLOT",e.toString(),t.toString()]}Object.defineProperty(CLUSTER_GETKEYSINSLOT$1,"__esModule",{value:!0}),CLUSTER_GETKEYSINSLOT$1.transformArguments=void 0,CLUSTER_GETKEYSINSLOT$1.transformArguments=transformArguments$2j;var CLUSTER_INFO$1={};function transformArguments$2i(){return["CLUSTER","INFO"]}function transformReply$u(e){const t=e.split("\r\n");return{state:extractLineValue(t[0]),slots:{assigned:Number(extractLineValue(t[1])),ok:Number(extractLineValue(t[2])),pfail:Number(extractLineValue(t[3])),fail:Number(extractLineValue(t[4]))},knownNodes:Number(extractLineValue(t[5])),size:Number(extractLineValue(t[6])),currentEpoch:Number(extractLineValue(t[7])),myEpoch:Number(extractLineValue(t[8])),stats:{messagesSent:Number(extractLineValue(t[9])),messagesReceived:Number(extractLineValue(t[10]))}}}function extractLineValue(e){return e.substring(e.indexOf(":")+1)}Object.defineProperty(CLUSTER_INFO$1,"__esModule",{value:!0}),CLUSTER_INFO$1.extractLineValue=CLUSTER_INFO$1.transformReply=CLUSTER_INFO$1.transformArguments=void 0,CLUSTER_INFO$1.transformArguments=transformArguments$2i,CLUSTER_INFO$1.transformReply=transformReply$u,CLUSTER_INFO$1.extractLineValue=extractLineValue;var CLUSTER_KEYSLOT$1={};function transformArguments$2h(e){return["CLUSTER","KEYSLOT",e]}Object.defineProperty(CLUSTER_KEYSLOT$1,"__esModule",{value:!0}),CLUSTER_KEYSLOT$1.transformArguments=void 0,CLUSTER_KEYSLOT$1.transformArguments=transformArguments$2h;var CLUSTER_LINKS$1={};function transformArguments$2g(){return["CLUSTER","LINKS"]}function transformReply$t(e){return e.map((e=>({direction:e[1],node:e[3],createTime:Number(e[5]),events:e[7],sendBufferAllocated:Number(e[9]),sendBufferUsed:Number(e[11])})))}Object.defineProperty(CLUSTER_LINKS$1,"__esModule",{value:!0}),CLUSTER_LINKS$1.transformReply=CLUSTER_LINKS$1.transformArguments=void 0,CLUSTER_LINKS$1.transformArguments=transformArguments$2g,CLUSTER_LINKS$1.transformReply=transformReply$t;var CLUSTER_MEET$1={};function transformArguments$2f(e,t){return["CLUSTER","MEET",e,t.toString()]}Object.defineProperty(CLUSTER_MEET$1,"__esModule",{value:!0}),CLUSTER_MEET$1.transformArguments=void 0,CLUSTER_MEET$1.transformArguments=transformArguments$2f;var CLUSTER_MYID$1={};function transformArguments$2e(){return["CLUSTER","MYID"]}Object.defineProperty(CLUSTER_MYID$1,"__esModule",{value:!0}),CLUSTER_MYID$1.transformArguments=void 0,CLUSTER_MYID$1.transformArguments=transformArguments$2e;var CLUSTER_MYSHARDID$1={};function transformArguments$2d(){return["CLUSTER","MYSHARDID"]}Object.defineProperty(CLUSTER_MYSHARDID$1,"__esModule",{value:!0}),CLUSTER_MYSHARDID$1.transformArguments=CLUSTER_MYSHARDID$1.IS_READ_ONLY=void 0,CLUSTER_MYSHARDID$1.IS_READ_ONLY=!0,CLUSTER_MYSHARDID$1.transformArguments=transformArguments$2d;var CLUSTER_NODES$1={},RedisClusterNodeLinkStates;function transformArguments$2c(){return["CLUSTER","NODES"]}function transformReply$s(e){const t=e.split("\n");t.pop();const r=new Map,s=new Map;for(const e of t){const[t,n,i,a,o,c,u,l,...p]=e.split(" "),m={id:t,address:n,...transformNodeAddress(n),flags:i.split(","),pingSent:Number(o),pongRecv:Number(c),configEpoch:Number(u),linkState:l};if("-"===a){let e=s.get(t);e||(e=[],s.set(t,e)),r.set(t,{...m,slots:p.map((e=>{const[t,r]=e.split("-",2),s=Number(t);return{from:s,to:r?Number(r):s}})),replicas:e})}else{const e=s.get(a);e?e.push(m):s.set(a,[m])}}return[...r.values()]}function transformNodeAddress(e){const t=e.lastIndexOf(":"),r=e.indexOf("@",t),s=e.substring(0,t);return-1===r?{host:s,port:Number(e.substring(t+1)),cport:null}:{host:e.substring(0,t),port:Number(e.substring(t+1,r)),cport:Number(e.substring(r+1))}}Object.defineProperty(CLUSTER_NODES$1,"__esModule",{value:!0}),CLUSTER_NODES$1.transformReply=CLUSTER_NODES$1.RedisClusterNodeLinkStates=CLUSTER_NODES$1.transformArguments=void 0,CLUSTER_NODES$1.transformArguments=transformArguments$2c,function(e){e.CONNECTED="connected",e.DISCONNECTED="disconnected"}(RedisClusterNodeLinkStates||(CLUSTER_NODES$1.RedisClusterNodeLinkStates=RedisClusterNodeLinkStates={})),CLUSTER_NODES$1.transformReply=transformReply$s;var CLUSTER_REPLICAS$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=void 0,e.transformArguments=function(e){return["CLUSTER","REPLICAS",e]};var t=CLUSTER_NODES$1;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformReply}})}(CLUSTER_REPLICAS$1);var CLUSTER_REPLICATE$1={};function transformArguments$2b(e){return["CLUSTER","REPLICATE",e]}Object.defineProperty(CLUSTER_REPLICATE$1,"__esModule",{value:!0}),CLUSTER_REPLICATE$1.transformArguments=void 0,CLUSTER_REPLICATE$1.transformArguments=transformArguments$2b;var CLUSTER_RESET$1={};function transformArguments$2a(e){const t=["CLUSTER","RESET"];return e&&t.push(e),t}Object.defineProperty(CLUSTER_RESET$1,"__esModule",{value:!0}),CLUSTER_RESET$1.transformArguments=void 0,CLUSTER_RESET$1.transformArguments=transformArguments$2a;var CLUSTER_SAVECONFIG$1={};function transformArguments$29(){return["CLUSTER","SAVECONFIG"]}Object.defineProperty(CLUSTER_SAVECONFIG$1,"__esModule",{value:!0}),CLUSTER_SAVECONFIG$1.transformArguments=void 0,CLUSTER_SAVECONFIG$1.transformArguments=transformArguments$29;var CLUSTER_SETCONFIGEPOCH={};function transformArguments$28(e){return["CLUSTER","SET-CONFIG-EPOCH",e.toString()]}Object.defineProperty(CLUSTER_SETCONFIGEPOCH,"__esModule",{value:!0}),CLUSTER_SETCONFIGEPOCH.transformArguments=void 0,CLUSTER_SETCONFIGEPOCH.transformArguments=transformArguments$28;var CLUSTER_SETSLOT$1={},ClusterSlotStates;function transformArguments$27(e,t,r){const s=["CLUSTER","SETSLOT",e.toString(),t];return r&&s.push(r),s}Object.defineProperty(CLUSTER_SETSLOT$1,"__esModule",{value:!0}),CLUSTER_SETSLOT$1.transformArguments=CLUSTER_SETSLOT$1.ClusterSlotStates=void 0,function(e){e.IMPORTING="IMPORTING",e.MIGRATING="MIGRATING",e.STABLE="STABLE",e.NODE="NODE"}(ClusterSlotStates||(CLUSTER_SETSLOT$1.ClusterSlotStates=ClusterSlotStates={})),CLUSTER_SETSLOT$1.transformArguments=transformArguments$27;var CLUSTER_SLOTS$1={};function transformArguments$26(){return["CLUSTER","SLOTS"]}function transformReply$r(e){return e.map((([e,t,r,...s])=>({from:e,to:t,master:transformNode(r),replicas:s.map(transformNode)})))}function transformNode([e,t,r]){return{ip:e,port:t,id:r}}Object.defineProperty(CLUSTER_SLOTS$1,"__esModule",{value:!0}),CLUSTER_SLOTS$1.transformReply=CLUSTER_SLOTS$1.transformArguments=void 0,CLUSTER_SLOTS$1.transformArguments=transformArguments$26,CLUSTER_SLOTS$1.transformReply=transformReply$r;var COMMAND_COUNT$1={};function transformArguments$25(){return["COMMAND","COUNT"]}Object.defineProperty(COMMAND_COUNT$1,"__esModule",{value:!0}),COMMAND_COUNT$1.transformArguments=COMMAND_COUNT$1.IS_READ_ONLY=void 0,COMMAND_COUNT$1.IS_READ_ONLY=!0,COMMAND_COUNT$1.transformArguments=transformArguments$25;var COMMAND_GETKEYS$1={};function transformArguments$24(e){return["COMMAND","GETKEYS",...e]}Object.defineProperty(COMMAND_GETKEYS$1,"__esModule",{value:!0}),COMMAND_GETKEYS$1.transformArguments=COMMAND_GETKEYS$1.IS_READ_ONLY=void 0,COMMAND_GETKEYS$1.IS_READ_ONLY=!0,COMMAND_GETKEYS$1.transformArguments=transformArguments$24;var COMMAND_GETKEYSANDFLAGS$1={};function transformArguments$23(e){return["COMMAND","GETKEYSANDFLAGS",...e]}function transformReply$q(e){return e.map((([e,t])=>({key:e,flags:t})))}Object.defineProperty(COMMAND_GETKEYSANDFLAGS$1,"__esModule",{value:!0}),COMMAND_GETKEYSANDFLAGS$1.transformReply=COMMAND_GETKEYSANDFLAGS$1.transformArguments=COMMAND_GETKEYSANDFLAGS$1.IS_READ_ONLY=void 0,COMMAND_GETKEYSANDFLAGS$1.IS_READ_ONLY=!0,COMMAND_GETKEYSANDFLAGS$1.transformArguments=transformArguments$23,COMMAND_GETKEYSANDFLAGS$1.transformReply=transformReply$q;var COMMAND_INFO$1={};Object.defineProperty(COMMAND_INFO$1,"__esModule",{value:!0}),COMMAND_INFO$1.transformReply=COMMAND_INFO$1.transformArguments=COMMAND_INFO$1.IS_READ_ONLY=void 0;const generic_transformers_1$f=genericTransformers;function transformArguments$22(e){return["COMMAND","INFO",...e]}function transformReply$p(e){return e.map((e=>e?(0,generic_transformers_1$f.transformCommandReply)(e):null))}COMMAND_INFO$1.IS_READ_ONLY=!0,COMMAND_INFO$1.transformArguments=transformArguments$22,COMMAND_INFO$1.transformReply=transformReply$p;var COMMAND_LIST$1={},FilterBy;function transformArguments$21(e){const t=["COMMAND","LIST"];return e&&t.push("FILTERBY",e.filterBy,e.value),t}Object.defineProperty(COMMAND_LIST$1,"__esModule",{value:!0}),COMMAND_LIST$1.transformArguments=COMMAND_LIST$1.FilterBy=COMMAND_LIST$1.IS_READ_ONLY=void 0,COMMAND_LIST$1.IS_READ_ONLY=!0,function(e){e.MODULE="MODULE",e.ACLCAT="ACLCAT",e.PATTERN="PATTERN"}(FilterBy||(COMMAND_LIST$1.FilterBy=FilterBy={})),COMMAND_LIST$1.transformArguments=transformArguments$21;var COMMAND$1={};Object.defineProperty(COMMAND$1,"__esModule",{value:!0}),COMMAND$1.transformReply=COMMAND$1.transformArguments=COMMAND$1.IS_READ_ONLY=void 0;const generic_transformers_1$e=genericTransformers;function transformArguments$20(){return["COMMAND"]}function transformReply$o(e){return e.map(generic_transformers_1$e.transformCommandReply)}COMMAND$1.IS_READ_ONLY=!0,COMMAND$1.transformArguments=transformArguments$20,COMMAND$1.transformReply=transformReply$o;var CONFIG_GET$3={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=void 0,e.transformArguments=function(e){return["CONFIG","GET",e]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformTuplesReply}})}(CONFIG_GET$3);var CONFIG_RESETSTAT={};function transformArguments$1$(){return["CONFIG","RESETSTAT"]}Object.defineProperty(CONFIG_RESETSTAT,"__esModule",{value:!0}),CONFIG_RESETSTAT.transformArguments=void 0,CONFIG_RESETSTAT.transformArguments=transformArguments$1$;var CONFIG_REWRITE$1={};function transformArguments$1_(){return["CONFIG","REWRITE"]}Object.defineProperty(CONFIG_REWRITE$1,"__esModule",{value:!0}),CONFIG_REWRITE$1.transformArguments=void 0,CONFIG_REWRITE$1.transformArguments=transformArguments$1_;var CONFIG_SET$3={};function transformArguments$1Z(...[e,t]){const r=["CONFIG","SET"];if("string"==typeof e)r.push(e,t);else for(const[t,s]of Object.entries(e))r.push(t,s);return r}Object.defineProperty(CONFIG_SET$3,"__esModule",{value:!0}),CONFIG_SET$3.transformArguments=void 0,CONFIG_SET$3.transformArguments=transformArguments$1Z;var DBSIZE$1={};function transformArguments$1Y(){return["DBSIZE"]}Object.defineProperty(DBSIZE$1,"__esModule",{value:!0}),DBSIZE$1.transformArguments=DBSIZE$1.IS_READ_ONLY=void 0,DBSIZE$1.IS_READ_ONLY=!0,DBSIZE$1.transformArguments=transformArguments$1Y;var DISCARD$1={};function transformArguments$1X(){return["DISCARD"]}Object.defineProperty(DISCARD$1,"__esModule",{value:!0}),DISCARD$1.transformArguments=void 0,DISCARD$1.transformArguments=transformArguments$1X;var ECHO$1={};function transformArguments$1W(e){return["ECHO",e]}Object.defineProperty(ECHO$1,"__esModule",{value:!0}),ECHO$1.transformArguments=ECHO$1.IS_READ_ONLY=void 0,ECHO$1.IS_READ_ONLY=!0,ECHO$1.transformArguments=transformArguments$1W;var FAILOVER$1={};function transformArguments$1V(e){const t=["FAILOVER"];return e?.TO&&(t.push("TO",e.TO.host,e.TO.port.toString()),e.TO.FORCE&&t.push("FORCE")),e?.ABORT&&t.push("ABORT"),e?.TIMEOUT&&t.push("TIMEOUT",e.TIMEOUT.toString()),t}Object.defineProperty(FAILOVER$1,"__esModule",{value:!0}),FAILOVER$1.transformArguments=void 0,FAILOVER$1.transformArguments=transformArguments$1V;var FLUSHALL$1={},RedisFlushModes;function transformArguments$1U(e){const t=["FLUSHALL"];return e&&t.push(e),t}Object.defineProperty(FLUSHALL$1,"__esModule",{value:!0}),FLUSHALL$1.transformArguments=FLUSHALL$1.RedisFlushModes=void 0,function(e){e.ASYNC="ASYNC",e.SYNC="SYNC"}(RedisFlushModes||(FLUSHALL$1.RedisFlushModes=RedisFlushModes={})),FLUSHALL$1.transformArguments=transformArguments$1U;var FLUSHDB$1={};function transformArguments$1T(e){const t=["FLUSHDB"];return e&&t.push(e),t}Object.defineProperty(FLUSHDB$1,"__esModule",{value:!0}),FLUSHDB$1.transformArguments=void 0,FLUSHDB$1.transformArguments=transformArguments$1T;var FUNCTION_DELETE$1={};function transformArguments$1S(e){return["FUNCTION","DELETE",e]}Object.defineProperty(FUNCTION_DELETE$1,"__esModule",{value:!0}),FUNCTION_DELETE$1.transformArguments=void 0,FUNCTION_DELETE$1.transformArguments=transformArguments$1S;var FUNCTION_DUMP$1={};function transformArguments$1R(){return["FUNCTION","DUMP"]}Object.defineProperty(FUNCTION_DUMP$1,"__esModule",{value:!0}),FUNCTION_DUMP$1.transformArguments=void 0,FUNCTION_DUMP$1.transformArguments=transformArguments$1R;var FUNCTION_FLUSH$1={};function transformArguments$1Q(e){const t=["FUNCTION","FLUSH"];return e&&t.push(e),t}Object.defineProperty(FUNCTION_FLUSH$1,"__esModule",{value:!0}),FUNCTION_FLUSH$1.transformArguments=void 0,FUNCTION_FLUSH$1.transformArguments=transformArguments$1Q;var FUNCTION_KILL$1={};function transformArguments$1P(){return["FUNCTION","KILL"]}Object.defineProperty(FUNCTION_KILL$1,"__esModule",{value:!0}),FUNCTION_KILL$1.transformArguments=void 0,FUNCTION_KILL$1.transformArguments=transformArguments$1P;var FUNCTION_LIST_WITHCODE$1={},FUNCTION_LIST$1={};Object.defineProperty(FUNCTION_LIST$1,"__esModule",{value:!0}),FUNCTION_LIST$1.transformReply=FUNCTION_LIST$1.transformArguments=void 0;const generic_transformers_1$d=genericTransformers;function transformArguments$1O(e){const t=["FUNCTION","LIST"];return e&&t.push(e),t}function transformReply$n(e){return e.map(generic_transformers_1$d.transformFunctionListItemReply)}FUNCTION_LIST$1.transformArguments=transformArguments$1O,FUNCTION_LIST$1.transformReply=transformReply$n,Object.defineProperty(FUNCTION_LIST_WITHCODE$1,"__esModule",{value:!0}),FUNCTION_LIST_WITHCODE$1.transformReply=FUNCTION_LIST_WITHCODE$1.transformArguments=void 0;const FUNCTION_LIST_1=FUNCTION_LIST$1,generic_transformers_1$c=genericTransformers;function transformArguments$1N(e){const t=(0,FUNCTION_LIST_1.transformArguments)(e);return t.push("WITHCODE"),t}function transformReply$m(e){return e.map((e=>({...(0,generic_transformers_1$c.transformFunctionListItemReply)(e),libraryCode:e[7]})))}FUNCTION_LIST_WITHCODE$1.transformArguments=transformArguments$1N,FUNCTION_LIST_WITHCODE$1.transformReply=transformReply$m;var FUNCTION_LOAD$1={};function transformArguments$1M(e,t){const r=["FUNCTION","LOAD"];return t?.REPLACE&&r.push("REPLACE"),r.push(e),r}Object.defineProperty(FUNCTION_LOAD$1,"__esModule",{value:!0}),FUNCTION_LOAD$1.transformArguments=void 0,FUNCTION_LOAD$1.transformArguments=transformArguments$1M;var FUNCTION_RESTORE$1={};function transformArguments$1L(e,t){const r=["FUNCTION","RESTORE",e];return t&&r.push(t),r}Object.defineProperty(FUNCTION_RESTORE$1,"__esModule",{value:!0}),FUNCTION_RESTORE$1.transformArguments=void 0,FUNCTION_RESTORE$1.transformArguments=transformArguments$1L;var FUNCTION_STATS$1={};function transformArguments$1K(){return["FUNCTION","STATS"]}function transformReply$l(e){const t=Object.create(null);for(let r=0;r<e[3].length;r++)t[e[3][r]]={librariesCount:e[3][++r][1],functionsCount:e[3][r][3]};return{runningScript:null===e[1]?null:{name:e[1][1],command:e[1][3],durationMs:e[1][5]},engines:t}}Object.defineProperty(FUNCTION_STATS$1,"__esModule",{value:!0}),FUNCTION_STATS$1.transformReply=FUNCTION_STATS$1.transformArguments=void 0,FUNCTION_STATS$1.transformArguments=transformArguments$1K,FUNCTION_STATS$1.transformReply=transformReply$l;var HELLO$1={};function transformArguments$1J(e){const t=["HELLO"];return e&&(t.push(e.protover.toString()),e.auth&&t.push("AUTH",e.auth.username,e.auth.password),e.clientName&&t.push("SETNAME",e.clientName)),t}function transformReply$k(e){return{server:e[1],version:e[3],proto:e[5],id:e[7],mode:e[9],role:e[11],modules:e[13]}}Object.defineProperty(HELLO$1,"__esModule",{value:!0}),HELLO$1.transformReply=HELLO$1.transformArguments=void 0,HELLO$1.transformArguments=transformArguments$1J,HELLO$1.transformReply=transformReply$k;var INFO$b={};function transformArguments$1I(e){const t=["INFO"];return e&&t.push(e),t}Object.defineProperty(INFO$b,"__esModule",{value:!0}),INFO$b.transformArguments=INFO$b.IS_READ_ONLY=void 0,INFO$b.IS_READ_ONLY=!0,INFO$b.transformArguments=transformArguments$1I;var KEYS$1={};function transformArguments$1H(e){return["KEYS",e]}Object.defineProperty(KEYS$1,"__esModule",{value:!0}),KEYS$1.transformArguments=void 0,KEYS$1.transformArguments=transformArguments$1H;var LASTSAVE$1={};function transformArguments$1G(){return["LASTSAVE"]}function transformReply$j(e){return new Date(e)}Object.defineProperty(LASTSAVE$1,"__esModule",{value:!0}),LASTSAVE$1.transformReply=LASTSAVE$1.transformArguments=LASTSAVE$1.IS_READ_ONLY=void 0,LASTSAVE$1.IS_READ_ONLY=!0,LASTSAVE$1.transformArguments=transformArguments$1G,LASTSAVE$1.transformReply=transformReply$j;var LATENCY_DOCTOR$1={};function transformArguments$1F(){return["LATENCY","DOCTOR"]}Object.defineProperty(LATENCY_DOCTOR$1,"__esModule",{value:!0}),LATENCY_DOCTOR$1.transformArguments=void 0,LATENCY_DOCTOR$1.transformArguments=transformArguments$1F;var LATENCY_GRAPH$1={};function transformArguments$1E(e){return["LATENCY","GRAPH",e]}Object.defineProperty(LATENCY_GRAPH$1,"__esModule",{value:!0}),LATENCY_GRAPH$1.transformArguments=void 0,LATENCY_GRAPH$1.transformArguments=transformArguments$1E;var LATENCY_HISTORY$1={};function transformArguments$1D(e){return["LATENCY","HISTORY",e]}Object.defineProperty(LATENCY_HISTORY$1,"__esModule",{value:!0}),LATENCY_HISTORY$1.transformArguments=void 0,LATENCY_HISTORY$1.transformArguments=transformArguments$1D;var LATENCY_LATEST$1={};function transformArguments$1C(){return["LATENCY","LATEST"]}Object.defineProperty(LATENCY_LATEST$1,"__esModule",{value:!0}),LATENCY_LATEST$1.transformArguments=void 0,LATENCY_LATEST$1.transformArguments=transformArguments$1C;var LOLWUT$1={};function transformArguments$1B(e,...t){const r=["LOLWUT"];return e&&r.push("VERSION",e.toString(),...t.map(String)),r}Object.defineProperty(LOLWUT$1,"__esModule",{value:!0}),LOLWUT$1.transformArguments=LOLWUT$1.IS_READ_ONLY=void 0,LOLWUT$1.IS_READ_ONLY=!0,LOLWUT$1.transformArguments=transformArguments$1B;var MEMORY_DOCTOR$1={};function transformArguments$1A(){return["MEMORY","DOCTOR"]}Object.defineProperty(MEMORY_DOCTOR$1,"__esModule",{value:!0}),MEMORY_DOCTOR$1.transformArguments=void 0,MEMORY_DOCTOR$1.transformArguments=transformArguments$1A;var MEMORY_MALLOCSTATS={};function transformArguments$1z(){return["MEMORY","MALLOC-STATS"]}Object.defineProperty(MEMORY_MALLOCSTATS,"__esModule",{value:!0}),MEMORY_MALLOCSTATS.transformArguments=void 0,MEMORY_MALLOCSTATS.transformArguments=transformArguments$1z;var MEMORY_PURGE$1={};function transformArguments$1y(){return["MEMORY","PURGE"]}Object.defineProperty(MEMORY_PURGE$1,"__esModule",{value:!0}),MEMORY_PURGE$1.transformArguments=void 0,MEMORY_PURGE$1.transformArguments=transformArguments$1y;var MEMORY_STATS$1={};function transformArguments$1x(){return["MEMORY","STATS"]}Object.defineProperty(MEMORY_STATS$1,"__esModule",{value:!0}),MEMORY_STATS$1.transformReply=MEMORY_STATS$1.transformArguments=void 0,MEMORY_STATS$1.transformArguments=transformArguments$1x;const FIELDS_MAPPING={"peak.allocated":"peakAllocated","total.allocated":"totalAllocated","startup.allocated":"startupAllocated","replication.backlog":"replicationBacklog","clients.slaves":"clientsReplicas","clients.normal":"clientsNormal","aof.buffer":"aofBuffer","lua.caches":"luaCaches","overhead.total":"overheadTotal","keys.count":"keysCount","keys.bytes-per-key":"keysBytesPerKey","dataset.bytes":"datasetBytes","dataset.percentage":"datasetPercentage","peak.percentage":"peakPercentage","allocator.allocated":"allocatorAllocated","allocator.active":"allocatorActive","allocator.resident":"allocatorResident","allocator-fragmentation.ratio":"allocatorFragmentationRatio","allocator-fragmentation.bytes":"allocatorFragmentationBytes","allocator-rss.ratio":"allocatorRssRatio","allocator-rss.bytes":"allocatorRssBytes","rss-overhead.ratio":"rssOverheadRatio","rss-overhead.bytes":"rssOverheadBytes",fragmentation:"fragmentation","fragmentation.bytes":"fragmentationBytes"},DB_FIELDS_MAPPING={"overhead.hashtable.main":"overheadHashtableMain","overhead.hashtable.expires":"overheadHashtableExpires"};function transformReply$i(e){const t={db:{}};for(let r=0;r<e.length;r+=2){const s=e[r];if(s.startsWith("db.")){const n=e[r+1],i={};for(let e=0;e<n.length;e+=2)i[DB_FIELDS_MAPPING[n[e]]]=n[e+1];t.db[s.substring(3)]=i}else t[FIELDS_MAPPING[s]]=Number(e[r+1])}return t}MEMORY_STATS$1.transformReply=transformReply$i;var MEMORY_USAGE$1={};function transformArguments$1w(e,t){const r=["MEMORY","USAGE",e];return t?.SAMPLES&&r.push("SAMPLES",t.SAMPLES.toString()),r}Object.defineProperty(MEMORY_USAGE$1,"__esModule",{value:!0}),MEMORY_USAGE$1.transformArguments=MEMORY_USAGE$1.IS_READ_ONLY=MEMORY_USAGE$1.FIRST_KEY_INDEX=void 0,MEMORY_USAGE$1.FIRST_KEY_INDEX=1,MEMORY_USAGE$1.IS_READ_ONLY=!0,MEMORY_USAGE$1.transformArguments=transformArguments$1w;var MODULE_LIST$1={};function transformArguments$1v(){return["MODULE","LIST"]}Object.defineProperty(MODULE_LIST$1,"__esModule",{value:!0}),MODULE_LIST$1.transformArguments=void 0,MODULE_LIST$1.transformArguments=transformArguments$1v;var MODULE_LOAD$1={};function transformArguments$1u(e,t){const r=["MODULE","LOAD",e];return t&&r.push(...t),r}Object.defineProperty(MODULE_LOAD$1,"__esModule",{value:!0}),MODULE_LOAD$1.transformArguments=void 0,MODULE_LOAD$1.transformArguments=transformArguments$1u;var MODULE_UNLOAD$1={};function transformArguments$1t(e){return["MODULE","UNLOAD",e]}Object.defineProperty(MODULE_UNLOAD$1,"__esModule",{value:!0}),MODULE_UNLOAD$1.transformArguments=void 0,MODULE_UNLOAD$1.transformArguments=transformArguments$1t;var MOVE$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["MOVE",e,t.toString()]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(MOVE$1);var PING$1={};function transformArguments$1s(e){const t=["PING"];return e&&t.push(e),t}Object.defineProperty(PING$1,"__esModule",{value:!0}),PING$1.transformArguments=void 0,PING$1.transformArguments=transformArguments$1s;var PUBSUB_CHANNELS$1={};function transformArguments$1r(e){const t=["PUBSUB","CHANNELS"];return e&&t.push(e),t}Object.defineProperty(PUBSUB_CHANNELS$1,"__esModule",{value:!0}),PUBSUB_CHANNELS$1.transformArguments=PUBSUB_CHANNELS$1.IS_READ_ONLY=void 0,PUBSUB_CHANNELS$1.IS_READ_ONLY=!0,PUBSUB_CHANNELS$1.transformArguments=transformArguments$1r;var PUBSUB_NUMPAT$1={};function transformArguments$1q(){return["PUBSUB","NUMPAT"]}Object.defineProperty(PUBSUB_NUMPAT$1,"__esModule",{value:!0}),PUBSUB_NUMPAT$1.transformArguments=PUBSUB_NUMPAT$1.IS_READ_ONLY=void 0,PUBSUB_NUMPAT$1.IS_READ_ONLY=!0,PUBSUB_NUMPAT$1.transformArguments=transformArguments$1q;var PUBSUB_NUMSUB$1={};Object.defineProperty(PUBSUB_NUMSUB$1,"__esModule",{value:!0}),PUBSUB_NUMSUB$1.transformReply=PUBSUB_NUMSUB$1.transformArguments=PUBSUB_NUMSUB$1.IS_READ_ONLY=void 0;const generic_transformers_1$b=genericTransformers;function transformArguments$1p(e){const t=["PUBSUB","NUMSUB"];return e?(0,generic_transformers_1$b.pushVerdictArguments)(t,e):t}function transformReply$h(e){const t=Object.create(null);for(let r=0;r<e.length;r+=2)t[e[r]]=e[r+1];return t}PUBSUB_NUMSUB$1.IS_READ_ONLY=!0,PUBSUB_NUMSUB$1.transformArguments=transformArguments$1p,PUBSUB_NUMSUB$1.transformReply=transformReply$h;var PUBSUB_SHARDCHANNELS$1={};function transformArguments$1o(e){const t=["PUBSUB","SHARDCHANNELS"];return e&&t.push(e),t}Object.defineProperty(PUBSUB_SHARDCHANNELS$1,"__esModule",{value:!0}),PUBSUB_SHARDCHANNELS$1.transformArguments=PUBSUB_SHARDCHANNELS$1.IS_READ_ONLY=void 0,PUBSUB_SHARDCHANNELS$1.IS_READ_ONLY=!0,PUBSUB_SHARDCHANNELS$1.transformArguments=transformArguments$1o;var PUBSUB_SHARDNUMSUB$1={};Object.defineProperty(PUBSUB_SHARDNUMSUB$1,"__esModule",{value:!0}),PUBSUB_SHARDNUMSUB$1.transformReply=PUBSUB_SHARDNUMSUB$1.transformArguments=PUBSUB_SHARDNUMSUB$1.IS_READ_ONLY=void 0;const generic_transformers_1$a=genericTransformers;function transformArguments$1n(e){const t=["PUBSUB","SHARDNUMSUB"];return e?(0,generic_transformers_1$a.pushVerdictArguments)(t,e):t}function transformReply$g(e){const t=Object.create(null);for(let r=0;r<e.length;r+=2)t[e[r]]=e[r+1];return t}PUBSUB_SHARDNUMSUB$1.IS_READ_ONLY=!0,PUBSUB_SHARDNUMSUB$1.transformArguments=transformArguments$1n,PUBSUB_SHARDNUMSUB$1.transformReply=transformReply$g;var RANDOMKEY$1={};function transformArguments$1m(){return["RANDOMKEY"]}Object.defineProperty(RANDOMKEY$1,"__esModule",{value:!0}),RANDOMKEY$1.transformArguments=RANDOMKEY$1.IS_READ_ONLY=void 0,RANDOMKEY$1.IS_READ_ONLY=!0,RANDOMKEY$1.transformArguments=transformArguments$1m;var READONLY$1={};function transformArguments$1l(){return["READONLY"]}Object.defineProperty(READONLY$1,"__esModule",{value:!0}),READONLY$1.transformArguments=void 0,READONLY$1.transformArguments=transformArguments$1l;var READWRITE$1={};function transformArguments$1k(){return["READWRITE"]}Object.defineProperty(READWRITE$1,"__esModule",{value:!0}),READWRITE$1.transformArguments=void 0,READWRITE$1.transformArguments=transformArguments$1k;var REPLICAOF$1={};function transformArguments$1j(e,t){return["REPLICAOF",e,t.toString()]}Object.defineProperty(REPLICAOF$1,"__esModule",{value:!0}),REPLICAOF$1.transformArguments=void 0,REPLICAOF$1.transformArguments=transformArguments$1j;var RESTOREASKING={};function transformArguments$1i(){return["RESTORE-ASKING"]}Object.defineProperty(RESTOREASKING,"__esModule",{value:!0}),RESTOREASKING.transformArguments=void 0,RESTOREASKING.transformArguments=transformArguments$1i;var ROLE$1={};function transformArguments$1h(){return["ROLE"]}function transformReply$f(e){switch(e[0]){case"master":return{role:"master",replicationOffest:e[1],replicas:e[2].map((([e,t,r])=>({ip:e,port:Number(t),replicationOffest:Number(r)})))};case"slave":return{role:"slave",master:{ip:e[1],port:e[2]},state:e[3],dataReceived:e[4]};case"sentinel":return{role:"sentinel",masterNames:e[1]}}}Object.defineProperty(ROLE$1,"__esModule",{value:!0}),ROLE$1.transformReply=ROLE$1.transformArguments=ROLE$1.IS_READ_ONLY=void 0,ROLE$1.IS_READ_ONLY=!0,ROLE$1.transformArguments=transformArguments$1h,ROLE$1.transformReply=transformReply$f;var SAVE$1={};function transformArguments$1g(){return["SAVE"]}Object.defineProperty(SAVE$1,"__esModule",{value:!0}),SAVE$1.transformArguments=void 0,SAVE$1.transformArguments=transformArguments$1g;var SCAN$1={};Object.defineProperty(SCAN$1,"__esModule",{value:!0}),SCAN$1.transformReply=SCAN$1.transformArguments=SCAN$1.IS_READ_ONLY=void 0;const generic_transformers_1$9=genericTransformers;function transformArguments$1f(e,t){const r=(0,generic_transformers_1$9.pushScanArguments)(["SCAN"],e,t);return t?.TYPE&&r.push("TYPE",t.TYPE),r}function transformReply$e([e,t]){return{cursor:Number(e),keys:t}}SCAN$1.IS_READ_ONLY=!0,SCAN$1.transformArguments=transformArguments$1f,SCAN$1.transformReply=transformReply$e;var SCRIPT_DEBUG$1={};function transformArguments$1e(e){return["SCRIPT","DEBUG",e]}Object.defineProperty(SCRIPT_DEBUG$1,"__esModule",{value:!0}),SCRIPT_DEBUG$1.transformArguments=void 0,SCRIPT_DEBUG$1.transformArguments=transformArguments$1e;var SCRIPT_EXISTS$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=void 0;const t=genericTransformers;e.transformArguments=function(e){return(0,t.pushVerdictArguments)(["SCRIPT","EXISTS"],e)};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanArrayReply}})}(SCRIPT_EXISTS$1);var SCRIPT_FLUSH$1={};function transformArguments$1d(e){const t=["SCRIPT","FLUSH"];return e&&t.push(e),t}Object.defineProperty(SCRIPT_FLUSH$1,"__esModule",{value:!0}),SCRIPT_FLUSH$1.transformArguments=void 0,SCRIPT_FLUSH$1.transformArguments=transformArguments$1d;var SCRIPT_KILL$1={};function transformArguments$1c(){return["SCRIPT","KILL"]}Object.defineProperty(SCRIPT_KILL$1,"__esModule",{value:!0}),SCRIPT_KILL$1.transformArguments=void 0,SCRIPT_KILL$1.transformArguments=transformArguments$1c;var SCRIPT_LOAD$1={};function transformArguments$1b(e){return["SCRIPT","LOAD",e]}Object.defineProperty(SCRIPT_LOAD$1,"__esModule",{value:!0}),SCRIPT_LOAD$1.transformArguments=void 0,SCRIPT_LOAD$1.transformArguments=transformArguments$1b;var SHUTDOWN$1={};function transformArguments$1a(e){const t=["SHUTDOWN"];return e&&t.push(e),t}Object.defineProperty(SHUTDOWN$1,"__esModule",{value:!0}),SHUTDOWN$1.transformArguments=void 0,SHUTDOWN$1.transformArguments=transformArguments$1a;var SWAPDB$1={};function transformArguments$19(e,t){return["SWAPDB",e.toString(),t.toString()]}Object.defineProperty(SWAPDB$1,"__esModule",{value:!0}),SWAPDB$1.transformArguments=void 0,SWAPDB$1.transformArguments=transformArguments$19;var TIME$1={};function transformArguments$18(){return["TIME"]}function transformReply$d(e){const t=Number(e[0]),r=Number(e[1]),s=new Date(1e3*t+r/1e3);return s.microseconds=r,s}Object.defineProperty(TIME$1,"__esModule",{value:!0}),TIME$1.transformReply=TIME$1.transformArguments=void 0,TIME$1.transformArguments=transformArguments$18,TIME$1.transformReply=transformReply$d;var UNWATCH$1={};function transformArguments$17(){return["UNWATCH"]}Object.defineProperty(UNWATCH$1,"__esModule",{value:!0}),UNWATCH$1.transformArguments=void 0,UNWATCH$1.transformArguments=transformArguments$17;var WAIT$1={};function transformArguments$16(e,t){return["WAIT",e.toString(),t.toString()]}Object.defineProperty(WAIT$1,"__esModule",{value:!0}),WAIT$1.transformArguments=WAIT$1.FIRST_KEY_INDEX=void 0,WAIT$1.FIRST_KEY_INDEX=1,WAIT$1.transformArguments=transformArguments$16,Object.defineProperty(commands$6,"__esModule",{value:!0});const commands_1$2=commands$5,ACL_CAT=ACL_CAT$1,ACL_DELUSER=ACL_DELUSER$1,ACL_DRYRUN=ACL_DRYRUN$1,ACL_GENPASS=ACL_GENPASS$1,ACL_GETUSER=ACL_GETUSER$1,ACL_LIST=ACL_LIST$1,ACL_LOAD=ACL_LOAD$1,ACL_LOG_RESET=ACL_LOG_RESET$1,ACL_LOG=ACL_LOG$1,ACL_SAVE=ACL_SAVE$1,ACL_SETUSER=ACL_SETUSER$1,ACL_USERS=ACL_USERS$1,ACL_WHOAMI=ACL_WHOAMI$1,ASKING=ASKING$1,AUTH=AUTH$1,BGREWRITEAOF=BGREWRITEAOF$1,BGSAVE=BGSAVE$1,CLIENT_CACHING=CLIENT_CACHING$1,CLIENT_GETNAME=CLIENT_GETNAME$1,CLIENT_GETREDIR=CLIENT_GETREDIR$1,CLIENT_ID=CLIENT_ID$1,CLIENT_KILL=CLIENT_KILL$1,CLIENT_LIST=CLIENT_LIST$1,CLIENT_NO_EVICT=CLIENT_NOEVICT,CLIENT_NO_TOUCH=CLIENT_NOTOUCH,CLIENT_PAUSE=CLIENT_PAUSE$1,CLIENT_SETNAME=CLIENT_SETNAME$1,CLIENT_TRACKING=CLIENT_TRACKING$1,CLIENT_TRACKINGINFO=CLIENT_TRACKINGINFO$1,CLIENT_UNPAUSE=CLIENT_UNPAUSE$1,CLIENT_INFO=CLIENT_INFO$1,CLUSTER_ADDSLOTS=CLUSTER_ADDSLOTS$1,CLUSTER_ADDSLOTSRANGE=CLUSTER_ADDSLOTSRANGE$1,CLUSTER_BUMPEPOCH=CLUSTER_BUMPEPOCH$1,CLUSTER_COUNT_FAILURE_REPORTS=CLUSTER_COUNTFAILUREREPORTS,CLUSTER_COUNTKEYSINSLOT=CLUSTER_COUNTKEYSINSLOT$1,CLUSTER_DELSLOTS=CLUSTER_DELSLOTS$1,CLUSTER_DELSLOTSRANGE=CLUSTER_DELSLOTSRANGE$1,CLUSTER_FAILOVER=CLUSTER_FAILOVER$1,CLUSTER_FLUSHSLOTS=CLUSTER_FLUSHSLOTS$1,CLUSTER_FORGET=CLUSTER_FORGET$1,CLUSTER_GETKEYSINSLOT=CLUSTER_GETKEYSINSLOT$1,CLUSTER_INFO=CLUSTER_INFO$1,CLUSTER_KEYSLOT=CLUSTER_KEYSLOT$1,CLUSTER_LINKS=CLUSTER_LINKS$1,CLUSTER_MEET=CLUSTER_MEET$1,CLUSTER_MYID=CLUSTER_MYID$1,CLUSTER_MYSHARDID=CLUSTER_MYSHARDID$1,CLUSTER_NODES=CLUSTER_NODES$1,CLUSTER_REPLICAS=CLUSTER_REPLICAS$1,CLUSTER_REPLICATE=CLUSTER_REPLICATE$1,CLUSTER_RESET=CLUSTER_RESET$1,CLUSTER_SAVECONFIG=CLUSTER_SAVECONFIG$1,CLUSTER_SET_CONFIG_EPOCH=CLUSTER_SETCONFIGEPOCH,CLUSTER_SETSLOT=CLUSTER_SETSLOT$1,CLUSTER_SLOTS=CLUSTER_SLOTS$1,COMMAND_COUNT=COMMAND_COUNT$1,COMMAND_GETKEYS=COMMAND_GETKEYS$1,COMMAND_GETKEYSANDFLAGS=COMMAND_GETKEYSANDFLAGS$1,COMMAND_INFO=COMMAND_INFO$1,COMMAND_LIST=COMMAND_LIST$1,COMMAND=COMMAND$1,CONFIG_GET$2=CONFIG_GET$3,CONFIG_RESETASTAT=CONFIG_RESETSTAT,CONFIG_REWRITE=CONFIG_REWRITE$1,CONFIG_SET$2=CONFIG_SET$3,DBSIZE=DBSIZE$1,DISCARD=DISCARD$1,ECHO=ECHO$1,FAILOVER=FAILOVER$1,FLUSHALL=FLUSHALL$1,FLUSHDB=FLUSHDB$1,FUNCTION_DELETE=FUNCTION_DELETE$1,FUNCTION_DUMP=FUNCTION_DUMP$1,FUNCTION_FLUSH=FUNCTION_FLUSH$1,FUNCTION_KILL=FUNCTION_KILL$1,FUNCTION_LIST_WITHCODE=FUNCTION_LIST_WITHCODE$1,FUNCTION_LIST=FUNCTION_LIST$1,FUNCTION_LOAD=FUNCTION_LOAD$1,FUNCTION_RESTORE=FUNCTION_RESTORE$1,FUNCTION_STATS=FUNCTION_STATS$1,HELLO=HELLO$1,INFO$a=INFO$b,KEYS=KEYS$1,LASTSAVE=LASTSAVE$1,LATENCY_DOCTOR=LATENCY_DOCTOR$1,LATENCY_GRAPH=LATENCY_GRAPH$1,LATENCY_HISTORY=LATENCY_HISTORY$1,LATENCY_LATEST=LATENCY_LATEST$1,LOLWUT=LOLWUT$1,MEMORY_DOCTOR=MEMORY_DOCTOR$1,MEMORY_MALLOC_STATS=MEMORY_MALLOCSTATS,MEMORY_PURGE=MEMORY_PURGE$1,MEMORY_STATS=MEMORY_STATS$1,MEMORY_USAGE=MEMORY_USAGE$1,MODULE_LIST=MODULE_LIST$1,MODULE_LOAD=MODULE_LOAD$1,MODULE_UNLOAD=MODULE_UNLOAD$1,MOVE=MOVE$1,PING=PING$1,PUBSUB_CHANNELS=PUBSUB_CHANNELS$1,PUBSUB_NUMPAT=PUBSUB_NUMPAT$1,PUBSUB_NUMSUB=PUBSUB_NUMSUB$1,PUBSUB_SHARDCHANNELS=PUBSUB_SHARDCHANNELS$1,PUBSUB_SHARDNUMSUB=PUBSUB_SHARDNUMSUB$1,RANDOMKEY=RANDOMKEY$1,READONLY=READONLY$1,READWRITE=READWRITE$1,REPLICAOF=REPLICAOF$1,RESTORE_ASKING=RESTOREASKING,ROLE=ROLE$1,SAVE=SAVE$1,SCAN=SCAN$1,SCRIPT_DEBUG=SCRIPT_DEBUG$1,SCRIPT_EXISTS=SCRIPT_EXISTS$1,SCRIPT_FLUSH=SCRIPT_FLUSH$1,SCRIPT_KILL=SCRIPT_KILL$1,SCRIPT_LOAD=SCRIPT_LOAD$1,SHUTDOWN=SHUTDOWN$1,SWAPDB=SWAPDB$1,TIME=TIME$1,UNWATCH=UNWATCH$1,WAIT=WAIT$1;commands$6.default={...commands_1$2.default,ACL_CAT:ACL_CAT,aclCat:ACL_CAT,ACL_DELUSER:ACL_DELUSER,aclDelUser:ACL_DELUSER,ACL_DRYRUN:ACL_DRYRUN,aclDryRun:ACL_DRYRUN,ACL_GENPASS:ACL_GENPASS,aclGenPass:ACL_GENPASS,ACL_GETUSER:ACL_GETUSER,aclGetUser:ACL_GETUSER,ACL_LIST:ACL_LIST,aclList:ACL_LIST,ACL_LOAD:ACL_LOAD,aclLoad:ACL_LOAD,ACL_LOG_RESET:ACL_LOG_RESET,aclLogReset:ACL_LOG_RESET,ACL_LOG:ACL_LOG,aclLog:ACL_LOG,ACL_SAVE:ACL_SAVE,aclSave:ACL_SAVE,ACL_SETUSER:ACL_SETUSER,aclSetUser:ACL_SETUSER,ACL_USERS:ACL_USERS,aclUsers:ACL_USERS,ACL_WHOAMI:ACL_WHOAMI,aclWhoAmI:ACL_WHOAMI,ASKING:ASKING,asking:ASKING,AUTH:AUTH,auth:AUTH,BGREWRITEAOF:BGREWRITEAOF,bgRewriteAof:BGREWRITEAOF,BGSAVE:BGSAVE,bgSave:BGSAVE,CLIENT_CACHING:CLIENT_CACHING,clientCaching:CLIENT_CACHING,CLIENT_GETNAME:CLIENT_GETNAME,clientGetName:CLIENT_GETNAME,CLIENT_GETREDIR:CLIENT_GETREDIR,clientGetRedir:CLIENT_GETREDIR,CLIENT_ID:CLIENT_ID,clientId:CLIENT_ID,CLIENT_KILL:CLIENT_KILL,clientKill:CLIENT_KILL,"CLIENT_NO-EVICT":CLIENT_NO_EVICT,clientNoEvict:CLIENT_NO_EVICT,"CLIENT_NO-TOUCH":CLIENT_NO_TOUCH,clientNoTouch:CLIENT_NO_TOUCH,CLIENT_LIST:CLIENT_LIST,clientList:CLIENT_LIST,CLIENT_PAUSE:CLIENT_PAUSE,clientPause:CLIENT_PAUSE,CLIENT_SETNAME:CLIENT_SETNAME,clientSetName:CLIENT_SETNAME,CLIENT_TRACKING:CLIENT_TRACKING,clientTracking:CLIENT_TRACKING,CLIENT_TRACKINGINFO:CLIENT_TRACKINGINFO,clientTrackingInfo:CLIENT_TRACKINGINFO,CLIENT_UNPAUSE:CLIENT_UNPAUSE,clientUnpause:CLIENT_UNPAUSE,CLIENT_INFO:CLIENT_INFO,clientInfo:CLIENT_INFO,CLUSTER_ADDSLOTS:CLUSTER_ADDSLOTS,clusterAddSlots:CLUSTER_ADDSLOTS,CLUSTER_ADDSLOTSRANGE:CLUSTER_ADDSLOTSRANGE,clusterAddSlotsRange:CLUSTER_ADDSLOTSRANGE,CLUSTER_BUMPEPOCH:CLUSTER_BUMPEPOCH,clusterBumpEpoch:CLUSTER_BUMPEPOCH,CLUSTER_COUNT_FAILURE_REPORTS:CLUSTER_COUNT_FAILURE_REPORTS,clusterCountFailureReports:CLUSTER_COUNT_FAILURE_REPORTS,CLUSTER_COUNTKEYSINSLOT:CLUSTER_COUNTKEYSINSLOT,clusterCountKeysInSlot:CLUSTER_COUNTKEYSINSLOT,CLUSTER_DELSLOTS:CLUSTER_DELSLOTS,clusterDelSlots:CLUSTER_DELSLOTS,CLUSTER_DELSLOTSRANGE:CLUSTER_DELSLOTSRANGE,clusterDelSlotsRange:CLUSTER_DELSLOTSRANGE,CLUSTER_FAILOVER:CLUSTER_FAILOVER,clusterFailover:CLUSTER_FAILOVER,CLUSTER_FLUSHSLOTS:CLUSTER_FLUSHSLOTS,clusterFlushSlots:CLUSTER_FLUSHSLOTS,CLUSTER_FORGET:CLUSTER_FORGET,clusterForget:CLUSTER_FORGET,CLUSTER_GETKEYSINSLOT:CLUSTER_GETKEYSINSLOT,clusterGetKeysInSlot:CLUSTER_GETKEYSINSLOT,CLUSTER_INFO:CLUSTER_INFO,clusterInfo:CLUSTER_INFO,CLUSTER_KEYSLOT:CLUSTER_KEYSLOT,clusterKeySlot:CLUSTER_KEYSLOT,CLUSTER_LINKS:CLUSTER_LINKS,clusterLinks:CLUSTER_LINKS,CLUSTER_MEET:CLUSTER_MEET,clusterMeet:CLUSTER_MEET,CLUSTER_MYID:CLUSTER_MYID,clusterMyId:CLUSTER_MYID,CLUSTER_MYSHARDID:CLUSTER_MYSHARDID,clusterMyShardId:CLUSTER_MYSHARDID,CLUSTER_NODES:CLUSTER_NODES,clusterNodes:CLUSTER_NODES,CLUSTER_REPLICAS:CLUSTER_REPLICAS,clusterReplicas:CLUSTER_REPLICAS,CLUSTER_REPLICATE:CLUSTER_REPLICATE,clusterReplicate:CLUSTER_REPLICATE,CLUSTER_RESET:CLUSTER_RESET,clusterReset:CLUSTER_RESET,CLUSTER_SAVECONFIG:CLUSTER_SAVECONFIG,clusterSaveConfig:CLUSTER_SAVECONFIG,CLUSTER_SET_CONFIG_EPOCH:CLUSTER_SET_CONFIG_EPOCH,clusterSetConfigEpoch:CLUSTER_SET_CONFIG_EPOCH,CLUSTER_SETSLOT:CLUSTER_SETSLOT,clusterSetSlot:CLUSTER_SETSLOT,CLUSTER_SLOTS:CLUSTER_SLOTS,clusterSlots:CLUSTER_SLOTS,COMMAND_COUNT:COMMAND_COUNT,commandCount:COMMAND_COUNT,COMMAND_GETKEYS:COMMAND_GETKEYS,commandGetKeys:COMMAND_GETKEYS,COMMAND_GETKEYSANDFLAGS:COMMAND_GETKEYSANDFLAGS,commandGetKeysAndFlags:COMMAND_GETKEYSANDFLAGS,COMMAND_INFO:COMMAND_INFO,commandInfo:COMMAND_INFO,COMMAND_LIST:COMMAND_LIST,commandList:COMMAND_LIST,COMMAND:COMMAND,command:COMMAND,CONFIG_GET:CONFIG_GET$2,configGet:CONFIG_GET$2,CONFIG_RESETASTAT:CONFIG_RESETASTAT,configResetStat:CONFIG_RESETASTAT,CONFIG_REWRITE:CONFIG_REWRITE,configRewrite:CONFIG_REWRITE,CONFIG_SET:CONFIG_SET$2,configSet:CONFIG_SET$2,DBSIZE:DBSIZE,dbSize:DBSIZE,DISCARD:DISCARD,discard:DISCARD,ECHO:ECHO,echo:ECHO,FAILOVER:FAILOVER,failover:FAILOVER,FLUSHALL:FLUSHALL,flushAll:FLUSHALL,FLUSHDB:FLUSHDB,flushDb:FLUSHDB,FUNCTION_DELETE:FUNCTION_DELETE,functionDelete:FUNCTION_DELETE,FUNCTION_DUMP:FUNCTION_DUMP,functionDump:FUNCTION_DUMP,FUNCTION_FLUSH:FUNCTION_FLUSH,functionFlush:FUNCTION_FLUSH,FUNCTION_KILL:FUNCTION_KILL,functionKill:FUNCTION_KILL,FUNCTION_LIST_WITHCODE:FUNCTION_LIST_WITHCODE,functionListWithCode:FUNCTION_LIST_WITHCODE,FUNCTION_LIST:FUNCTION_LIST,functionList:FUNCTION_LIST,FUNCTION_LOAD:FUNCTION_LOAD,functionLoad:FUNCTION_LOAD,FUNCTION_RESTORE:FUNCTION_RESTORE,functionRestore:FUNCTION_RESTORE,FUNCTION_STATS:FUNCTION_STATS,functionStats:FUNCTION_STATS,HELLO:HELLO,hello:HELLO,INFO:INFO$a,info:INFO$a,KEYS:KEYS,keys:KEYS,LASTSAVE:LASTSAVE,lastSave:LASTSAVE,LATENCY_DOCTOR:LATENCY_DOCTOR,latencyDoctor:LATENCY_DOCTOR,LATENCY_GRAPH:LATENCY_GRAPH,latencyGraph:LATENCY_GRAPH,LATENCY_HISTORY:LATENCY_HISTORY,latencyHistory:LATENCY_HISTORY,LATENCY_LATEST:LATENCY_LATEST,latencyLatest:LATENCY_LATEST,LOLWUT:LOLWUT,lolwut:LOLWUT,MEMORY_DOCTOR:MEMORY_DOCTOR,memoryDoctor:MEMORY_DOCTOR,"MEMORY_MALLOC-STATS":MEMORY_MALLOC_STATS,memoryMallocStats:MEMORY_MALLOC_STATS,MEMORY_PURGE:MEMORY_PURGE,memoryPurge:MEMORY_PURGE,MEMORY_STATS:MEMORY_STATS,memoryStats:MEMORY_STATS,MEMORY_USAGE:MEMORY_USAGE,memoryUsage:MEMORY_USAGE,MODULE_LIST:MODULE_LIST,moduleList:MODULE_LIST,MODULE_LOAD:MODULE_LOAD,moduleLoad:MODULE_LOAD,MODULE_UNLOAD:MODULE_UNLOAD,moduleUnload:MODULE_UNLOAD,MOVE:MOVE,move:MOVE,PING:PING,ping:PING,PUBSUB_CHANNELS:PUBSUB_CHANNELS,pubSubChannels:PUBSUB_CHANNELS,PUBSUB_NUMPAT:PUBSUB_NUMPAT,pubSubNumPat:PUBSUB_NUMPAT,PUBSUB_NUMSUB:PUBSUB_NUMSUB,pubSubNumSub:PUBSUB_NUMSUB,PUBSUB_SHARDCHANNELS:PUBSUB_SHARDCHANNELS,pubSubShardChannels:PUBSUB_SHARDCHANNELS,PUBSUB_SHARDNUMSUB:PUBSUB_SHARDNUMSUB,pubSubShardNumSub:PUBSUB_SHARDNUMSUB,RANDOMKEY:RANDOMKEY,randomKey:RANDOMKEY,READONLY:READONLY,readonly:READONLY,READWRITE:READWRITE,readwrite:READWRITE,REPLICAOF:REPLICAOF,replicaOf:REPLICAOF,"RESTORE-ASKING":RESTORE_ASKING,restoreAsking:RESTORE_ASKING,ROLE:ROLE,role:ROLE,SAVE:SAVE,save:SAVE,SCAN:SCAN,scan:SCAN,SCRIPT_DEBUG:SCRIPT_DEBUG,scriptDebug:SCRIPT_DEBUG,SCRIPT_EXISTS:SCRIPT_EXISTS,scriptExists:SCRIPT_EXISTS,SCRIPT_FLUSH:SCRIPT_FLUSH,scriptFlush:SCRIPT_FLUSH,SCRIPT_KILL:SCRIPT_KILL,scriptKill:SCRIPT_KILL,SCRIPT_LOAD:SCRIPT_LOAD,scriptLoad:SCRIPT_LOAD,SHUTDOWN:SHUTDOWN,shutdown:SHUTDOWN,SWAPDB:SWAPDB,swapDb:SWAPDB,TIME:TIME,time:TIME,UNWATCH:UNWATCH,unwatch:UNWATCH,WAIT:WAIT,wait:WAIT};var socket={},errors$2={};Object.defineProperty(errors$2,"__esModule",{value:!0}),errors$2.MultiErrorReply=errors$2.ErrorReply=errors$2.ReconnectStrategyError=errors$2.RootNodesUnavailableError=errors$2.SocketClosedUnexpectedlyError=errors$2.DisconnectsClientError=errors$2.ClientOfflineError=errors$2.ClientClosedError=errors$2.ConnectionTimeoutError=errors$2.WatchError=errors$2.AbortError=void 0;class AbortError extends Error{constructor(){super("The command was aborted")}}errors$2.AbortError=AbortError;class WatchError extends Error{constructor(){super("One (or more) of the watched keys has been changed")}}errors$2.WatchError=WatchError;class ConnectionTimeoutError extends Error{constructor(){super("Connection timeout")}}errors$2.ConnectionTimeoutError=ConnectionTimeoutError;class ClientClosedError extends Error{constructor(){super("The client is closed")}}errors$2.ClientClosedError=ClientClosedError;class ClientOfflineError extends Error{constructor(){super("The client is offline")}}errors$2.ClientOfflineError=ClientOfflineError;class DisconnectsClientError extends Error{constructor(){super("Disconnects client")}}errors$2.DisconnectsClientError=DisconnectsClientError;class SocketClosedUnexpectedlyError extends Error{constructor(){super("Socket closed unexpectedly")}}errors$2.SocketClosedUnexpectedlyError=SocketClosedUnexpectedlyError;class RootNodesUnavailableError extends Error{constructor(){super("All the root nodes are unavailable")}}errors$2.RootNodesUnavailableError=RootNodesUnavailableError;class ReconnectStrategyError extends Error{constructor(e,t){super(e.message),Object.defineProperty(this,"originalError",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"socketError",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.originalError=e,this.socketError=t}}errors$2.ReconnectStrategyError=ReconnectStrategyError;class ErrorReply extends Error{constructor(e){super(e),this.stack=void 0}}errors$2.ErrorReply=ErrorReply;class MultiErrorReply extends ErrorReply{constructor(e,t){super(`${t.length} commands failed, see .replies and .errorIndexes for more information`),Object.defineProperty(this,"replies",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"errorIndexes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.replies=e,this.errorIndexes=t}*errors(){for(const e of this.errorIndexes)yield this.replies[e]}}errors$2.MultiErrorReply=MultiErrorReply;var utils$1={};function promiseTimeout(e){return new Promise((t=>setTimeout(t,e)))}Object.defineProperty(utils$1,"__esModule",{value:!0}),utils$1.promiseTimeout=void 0,utils$1.promiseTimeout=promiseTimeout;var __classPrivateFieldGet$6=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet$6=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},_RedisSocket_instances,_a$4,_RedisSocket_initiateOptions,_RedisSocket_isTlsSocket,_RedisSocket_initiator,_RedisSocket_options,_RedisSocket_socket,_RedisSocket_isOpen,_RedisSocket_isReady,_RedisSocket_writableNeedDrain,_RedisSocket_isSocketUnrefed,_RedisSocket_reconnectStrategy,_RedisSocket_shouldReconnect,_RedisSocket_connect,_RedisSocket_createSocket,_RedisSocket_createNetSocket,_RedisSocket_createTlsSocket,_RedisSocket_onSocketError,_RedisSocket_disconnect,_RedisSocket_isCorked;Object.defineProperty(socket,"__esModule",{value:!0});const events_1$1=require$$0$5,net=require$$4,tls=require$$2,errors_1$5=errors$2,utils_1=utils$1;class RedisSocket extends events_1$1.EventEmitter{get isOpen(){return __classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f")}get isReady(){return __classPrivateFieldGet$6(this,_RedisSocket_isReady,"f")}get writableNeedDrain(){return __classPrivateFieldGet$6(this,_RedisSocket_writableNeedDrain,"f")}constructor(e,t){super(),_RedisSocket_instances.add(this),_RedisSocket_initiator.set(this,void 0),_RedisSocket_options.set(this,void 0),_RedisSocket_socket.set(this,void 0),_RedisSocket_isOpen.set(this,!1),_RedisSocket_isReady.set(this,!1),_RedisSocket_writableNeedDrain.set(this,!1),_RedisSocket_isSocketUnrefed.set(this,!1),_RedisSocket_isCorked.set(this,!1),__classPrivateFieldSet$6(this,_RedisSocket_initiator,e,"f"),__classPrivateFieldSet$6(this,_RedisSocket_options,__classPrivateFieldGet$6(_a$4,_a$4,"m",_RedisSocket_initiateOptions).call(_a$4,t),"f")}async connect(){if(__classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f"))throw new Error("Socket already opened");return __classPrivateFieldSet$6(this,_RedisSocket_isOpen,!0,"f"),__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_connect).call(this)}writeCommand(e){if(!__classPrivateFieldGet$6(this,_RedisSocket_socket,"f"))throw new errors_1$5.ClientClosedError;for(const t of e)__classPrivateFieldSet$6(this,_RedisSocket_writableNeedDrain,!__classPrivateFieldGet$6(this,_RedisSocket_socket,"f").write(t),"f")}disconnect(){if(!__classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f"))throw new errors_1$5.ClientClosedError;__classPrivateFieldSet$6(this,_RedisSocket_isOpen,!1,"f"),__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_disconnect).call(this)}async quit(e){if(!__classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f"))throw new errors_1$5.ClientClosedError;__classPrivateFieldSet$6(this,_RedisSocket_isOpen,!1,"f");const t=await e();return __classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_disconnect).call(this),t}cork(){__classPrivateFieldGet$6(this,_RedisSocket_socket,"f")&&!__classPrivateFieldGet$6(this,_RedisSocket_isCorked,"f")&&(__classPrivateFieldGet$6(this,_RedisSocket_socket,"f").cork(),__classPrivateFieldSet$6(this,_RedisSocket_isCorked,!0,"f"),setImmediate((()=>{__classPrivateFieldGet$6(this,_RedisSocket_socket,"f")?.uncork(),__classPrivateFieldSet$6(this,_RedisSocket_isCorked,!1,"f")})))}ref(){__classPrivateFieldSet$6(this,_RedisSocket_isSocketUnrefed,!1,"f"),__classPrivateFieldGet$6(this,_RedisSocket_socket,"f")?.ref()}unref(){__classPrivateFieldSet$6(this,_RedisSocket_isSocketUnrefed,!0,"f"),__classPrivateFieldGet$6(this,_RedisSocket_socket,"f")?.unref()}}_a$4=RedisSocket,_RedisSocket_initiator=new WeakMap,_RedisSocket_options=new WeakMap,_RedisSocket_socket=new WeakMap,_RedisSocket_isOpen=new WeakMap,_RedisSocket_isReady=new WeakMap,_RedisSocket_writableNeedDrain=new WeakMap,_RedisSocket_isSocketUnrefed=new WeakMap,_RedisSocket_isCorked=new WeakMap,_RedisSocket_instances=new WeakSet,_RedisSocket_initiateOptions=function(e){var t,r;return e??(e={}),e.path||((t=e).port??(t.port=6379),(r=e).host??(r.host="localhost")),e.connectTimeout??(e.connectTimeout=5e3),e.keepAlive??(e.keepAlive=5e3),e.noDelay??(e.noDelay=!0),e},_RedisSocket_isTlsSocket=function(e){return!0===e.tls},_RedisSocket_reconnectStrategy=function(e,t){if(!1===__classPrivateFieldGet$6(this,_RedisSocket_options,"f").reconnectStrategy)return!1;if("number"==typeof __classPrivateFieldGet$6(this,_RedisSocket_options,"f").reconnectStrategy)return __classPrivateFieldGet$6(this,_RedisSocket_options,"f").reconnectStrategy;if(__classPrivateFieldGet$6(this,_RedisSocket_options,"f").reconnectStrategy)try{const r=__classPrivateFieldGet$6(this,_RedisSocket_options,"f").reconnectStrategy(e,t);if(!1!==r&&!(r instanceof Error)&&"number"!=typeof r)throw new TypeError(`Reconnect strategy should return \`false | Error | number\`, got ${r} instead`);return r}catch(e){this.emit("error",e)}return Math.min(50*e,500)},_RedisSocket_shouldReconnect=function(e,t){const r=__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_reconnectStrategy).call(this,e,t);return!1===r?(__classPrivateFieldSet$6(this,_RedisSocket_isOpen,!1,"f"),this.emit("error",t),t):r instanceof Error?(__classPrivateFieldSet$6(this,_RedisSocket_isOpen,!1,"f"),this.emit("error",t),new errors_1$5.ReconnectStrategyError(r,t)):r},_RedisSocket_connect=async function(){let e=0;do{try{__classPrivateFieldSet$6(this,_RedisSocket_socket,await __classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_createSocket).call(this),"f"),__classPrivateFieldSet$6(this,_RedisSocket_writableNeedDrain,!1,"f"),this.emit("connect");try{await __classPrivateFieldGet$6(this,_RedisSocket_initiator,"f").call(this)}catch(e){throw __classPrivateFieldGet$6(this,_RedisSocket_socket,"f").destroy(),__classPrivateFieldSet$6(this,_RedisSocket_socket,void 0,"f"),e}__classPrivateFieldSet$6(this,_RedisSocket_isReady,!0,"f"),this.emit("ready")}catch(t){const r=__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_shouldReconnect).call(this,e++,t);if("number"!=typeof r)throw r;this.emit("error",t),await(0,utils_1.promiseTimeout)(r),this.emit("reconnecting")}}while(__classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f")&&!__classPrivateFieldGet$6(this,_RedisSocket_isReady,"f"))},_RedisSocket_createSocket=function(){return new Promise(((e,t)=>{const{connectEvent:r,socket:s}=__classPrivateFieldGet$6(_a$4,_a$4,"m",_RedisSocket_isTlsSocket).call(_a$4,__classPrivateFieldGet$6(this,_RedisSocket_options,"f"))?__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_createTlsSocket).call(this):__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_createNetSocket).call(this);__classPrivateFieldGet$6(this,_RedisSocket_options,"f").connectTimeout&&s.setTimeout(__classPrivateFieldGet$6(this,_RedisSocket_options,"f").connectTimeout,(()=>s.destroy(new errors_1$5.ConnectionTimeoutError))),__classPrivateFieldGet$6(this,_RedisSocket_isSocketUnrefed,"f")&&s.unref(),s.setNoDelay(__classPrivateFieldGet$6(this,_RedisSocket_options,"f").noDelay).once("error",t).once(r,(()=>{s.setTimeout(0).setKeepAlive(!1!==__classPrivateFieldGet$6(this,_RedisSocket_options,"f").keepAlive,__classPrivateFieldGet$6(this,_RedisSocket_options,"f").keepAlive||0).off("error",t).once("error",(e=>__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_onSocketError).call(this,e))).once("close",(e=>{!e&&__classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f")&&__classPrivateFieldGet$6(this,_RedisSocket_socket,"f")===s&&__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_onSocketError).call(this,new errors_1$5.SocketClosedUnexpectedlyError)})).on("drain",(()=>{__classPrivateFieldSet$6(this,_RedisSocket_writableNeedDrain,!1,"f"),this.emit("drain")})).on("data",(e=>this.emit("data",e))),e(s)}))}))},_RedisSocket_createNetSocket=function(){return{connectEvent:"connect",socket:net.connect(__classPrivateFieldGet$6(this,_RedisSocket_options,"f"))}},_RedisSocket_createTlsSocket=function(){return{connectEvent:"secureConnect",socket:tls.connect(__classPrivateFieldGet$6(this,_RedisSocket_options,"f"))}},_RedisSocket_onSocketError=function(e){const t=__classPrivateFieldGet$6(this,_RedisSocket_isReady,"f");__classPrivateFieldSet$6(this,_RedisSocket_isReady,!1,"f"),this.emit("error",e),t&&__classPrivateFieldGet$6(this,_RedisSocket_isOpen,"f")&&"number"==typeof __classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_shouldReconnect).call(this,0,e)&&(this.emit("reconnecting"),__classPrivateFieldGet$6(this,_RedisSocket_instances,"m",_RedisSocket_connect).call(this).catch((()=>{})))},_RedisSocket_disconnect=function(){__classPrivateFieldSet$6(this,_RedisSocket_isReady,!1,"f"),__classPrivateFieldGet$6(this,_RedisSocket_socket,"f")&&(__classPrivateFieldGet$6(this,_RedisSocket_socket,"f").destroy(),__classPrivateFieldSet$6(this,_RedisSocket_socket,void 0,"f")),this.emit("end")},socket.default=RedisSocket;var commandsQueue={},iterator,hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,iterator=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),iterator}var yallist=Yallist;function Yallist(e){var t=this;if(t instanceof Yallist||(t=new Yallist),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist.Node=Node,Yallist.create=Yallist,Yallist.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist.prototype.map=function(e,t){t=t||this;for(var r=new Yallist,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var n=0;null!==s;n++)r=e(r,s.value,n),s=s.next;return r},Yallist.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var n=this.length-1;null!==s;n--)r=e(r,s.value,n),s=s.prev;return r},Yallist.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,n=this.head;null!==n&&s<e;s++)n=n.next;for(;null!==n&&s<t;s++,n=n.next)r.push(n.value);return r},Yallist.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,n=this.tail;null!==n&&s>t;s--)n=n.prev;for(;null!==n&&s>e;s--,n=n.prev)r.push(n.value);return r},Yallist.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,n=this.head;null!==n&&s<e;s++)n=n.next;var i=[];for(s=0;n&&s<t;s++)i.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(s=0;s<r.length;s++)n=insert(this,n,r[s]);return i},Yallist.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{requireIterator()(Yallist)}catch(e){}var decoder={},buffer={};Object.defineProperty(buffer,"__esModule",{value:!0});class BufferComposer{constructor(){Object.defineProperty(this,"chunks",{enumerable:!0,configurable:!0,writable:!0,value:[]})}write(e){this.chunks.push(e)}end(e){return this.write(e),Buffer.concat(this.chunks.splice(0))}reset(){this.chunks=[]}}buffer.default=BufferComposer;var string={};Object.defineProperty(string,"__esModule",{value:!0});const string_decoder_1=require$$0$a;class StringComposer{constructor(){Object.defineProperty(this,"decoder",{enumerable:!0,configurable:!0,writable:!0,value:new string_decoder_1.StringDecoder}),Object.defineProperty(this,"string",{enumerable:!0,configurable:!0,writable:!0,value:""})}write(e){this.string+=this.decoder.write(e)}end(e){const t=this.string+this.decoder.end(e);return this.string="",t}reset(){this.string=""}}string.default=StringComposer,Object.defineProperty(decoder,"__esModule",{value:!0});const errors_1$4=errors$2,buffer_1=buffer,string_1=string;var Types,ASCII;!function(e){e[e.SIMPLE_STRING=43]="SIMPLE_STRING",e[e.ERROR=45]="ERROR",e[e.INTEGER=58]="INTEGER",e[e.BULK_STRING=36]="BULK_STRING",e[e.ARRAY=42]="ARRAY"}(Types||(Types={})),function(e){e[e.CR=13]="CR",e[e.ZERO=48]="ZERO",e[e.MINUS=45]="MINUS"}(ASCII||(ASCII={}));class RESP2Decoder{constructor(e){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"cursor",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bufferComposer",{enumerable:!0,configurable:!0,writable:!0,value:new buffer_1.default}),Object.defineProperty(this,"stringComposer",{enumerable:!0,configurable:!0,writable:!0,value:new string_1.default}),Object.defineProperty(this,"currentStringComposer",{enumerable:!0,configurable:!0,writable:!0,value:this.stringComposer}),Object.defineProperty(this,"integer",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"isNegativeInteger",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bulkStringRemainingLength",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"arraysInProcess",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"initializeArray",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"arrayItemType",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}reset(){this.cursor=0,this.type=void 0,this.bufferComposer.reset(),this.stringComposer.reset(),this.currentStringComposer=this.stringComposer}write(e){for(;this.cursor<e.length&&(this.type||(this.currentStringComposer=this.options.returnStringsAsBuffers()?this.bufferComposer:this.stringComposer,this.type=e[this.cursor],!(++this.cursor>=e.length)));){const t=this.parseType(e,this.type);if(void 0===t)break;this.type=void 0,this.options.onReply(t)}this.cursor-=e.length}parseType(e,t,r){switch(t){case Types.SIMPLE_STRING:return this.parseSimpleString(e);case Types.ERROR:return this.parseError(e);case Types.INTEGER:return this.parseInteger(e);case Types.BULK_STRING:return this.parseBulkString(e);case Types.ARRAY:return this.parseArray(e,r)}}compose(e,t){for(let r=this.cursor;r<e.length;r++)if(e[r]===ASCII.CR){const s=t.end(e.subarray(this.cursor,r));return this.cursor=r+2,s}const r=e.subarray(this.cursor);t.write(r),this.cursor=e.length}parseSimpleString(e){return this.compose(e,this.currentStringComposer)}parseError(e){const t=this.compose(e,this.stringComposer);if(void 0!==t)return new errors_1$4.ErrorReply(t)}parseInteger(e){if(void 0!==this.isNegativeInteger||(this.isNegativeInteger=e[this.cursor]===ASCII.MINUS,!this.isNegativeInteger||++this.cursor!==e.length))do{const t=e[this.cursor];if(t===ASCII.CR){const e=this.isNegativeInteger?-this.integer:this.integer;return this.integer=0,this.isNegativeInteger=void 0,this.cursor+=2,e}this.integer=10*this.integer+t-ASCII.ZERO}while(++this.cursor<e.length)}parseBulkString(e){if(void 0===this.bulkStringRemainingLength){const t=this.parseInteger(e);if(void 0===t)return;if(-1===t)return null;if(this.bulkStringRemainingLength=t,this.cursor>=e.length)return}const t=this.cursor+this.bulkStringRemainingLength;if(e.length>=t){const r=this.currentStringComposer.end(e.subarray(this.cursor,t));return this.bulkStringRemainingLength=void 0,this.cursor=t+2,r}const r=e.subarray(this.cursor);this.currentStringComposer.write(r),this.bulkStringRemainingLength-=r.length,this.cursor=e.length}parseArray(e,t=0){if(this.initializeArray||this.arraysInProcess.length===t){const r=this.parseInteger(e);if(void 0===r)return void(this.initializeArray=!0);if(this.initializeArray=!1,this.arrayItemType=void 0,-1===r)return this.returnArrayReply(null,t,e);if(0===r)return this.returnArrayReply([],t,e);this.arraysInProcess.push({array:new Array(r),pushCounter:0})}for(;this.cursor<e.length&&(this.arrayItemType||(this.arrayItemType=e[this.cursor],!(++this.cursor>=e.length)));){const r=this.parseType(e,this.arrayItemType,t+1);if(void 0===r)break;this.arrayItemType=void 0;const s=this.pushArrayItem(r,t);if(void 0!==s)return s}}returnArrayReply(e,t,r){return this.arraysInProcess.length<=t?e:this.pushArrayItem(e,t,r)}pushArrayItem(e,t,r){const s=this.arraysInProcess[this.arraysInProcess.length-1];return s.array[s.pushCounter]=e,++s.pushCounter===s.array.length?this.returnArrayReply(this.arraysInProcess.pop().array,t,r):r&&r.length>this.cursor?this.parseArray(r,t):void 0}}decoder.default=RESP2Decoder;var encoder={};Object.defineProperty(encoder,"__esModule",{value:!0});const CRLF="\r\n";function encodeCommand(e){const t=[];let r="*"+e.length+CRLF;for(let s=0;s<e.length;s++){const n=e[s];if("string"==typeof n)r+="$"+Buffer.byteLength(n)+CRLF+n+CRLF;else{if(!(n instanceof Buffer))throw new TypeError("Invalid argument type");t.push(r+"$"+n.length.toString()+CRLF,n),r=CRLF}}return t.push(r),t}encoder.default=encodeCommand;var pubSub={},__classPrivateFieldGet$5=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet$5=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},_PubSub_instances,_a$3,_PubSub_channelsArray,_PubSub_listenersSet,_PubSub_subscribing,_PubSub_isActive,_PubSub_listeners,_PubSub_extendChannelListeners,_PubSub_unsubscribeCommand,_PubSub_updateIsActive,_PubSub_emitPubSubMessage,PubSubType;Object.defineProperty(pubSub,"__esModule",{value:!0}),pubSub.PubSub=pubSub.PubSubType=void 0,function(e){e.CHANNELS="CHANNELS",e.PATTERNS="PATTERNS",e.SHARDED="SHARDED"}(PubSubType||(pubSub.PubSubType=PubSubType={}));const COMMANDS={[PubSubType.CHANNELS]:{subscribe:Buffer.from("subscribe"),unsubscribe:Buffer.from("unsubscribe"),message:Buffer.from("message")},[PubSubType.PATTERNS]:{subscribe:Buffer.from("psubscribe"),unsubscribe:Buffer.from("punsubscribe"),message:Buffer.from("pmessage")},[PubSubType.SHARDED]:{subscribe:Buffer.from("ssubscribe"),unsubscribe:Buffer.from("sunsubscribe"),message:Buffer.from("smessage")}};class PubSub{constructor(){_PubSub_instances.add(this),_PubSub_subscribing.set(this,0),_PubSub_isActive.set(this,!1),_PubSub_listeners.set(this,{[PubSubType.CHANNELS]:new Map,[PubSubType.PATTERNS]:new Map,[PubSubType.SHARDED]:new Map})}static isStatusReply(e){return COMMANDS[PubSubType.CHANNELS].subscribe.equals(e[0])||COMMANDS[PubSubType.CHANNELS].unsubscribe.equals(e[0])||COMMANDS[PubSubType.PATTERNS].subscribe.equals(e[0])||COMMANDS[PubSubType.PATTERNS].unsubscribe.equals(e[0])||COMMANDS[PubSubType.SHARDED].subscribe.equals(e[0])}static isShardedUnsubscribe(e){return COMMANDS[PubSubType.SHARDED].unsubscribe.equals(e[0])}get isActive(){return __classPrivateFieldGet$5(this,_PubSub_isActive,"f")}subscribe(e,t,r,s){var n;const i=[COMMANDS[e].subscribe],a=__classPrivateFieldGet$5(_a$3,_a$3,"m",_PubSub_channelsArray).call(_a$3,t);for(const t of a){let r=__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].get(t);r&&!r.unsubscribing||i.push(t)}if(1!==i.length)return __classPrivateFieldSet$5(this,_PubSub_isActive,!0,"f"),__classPrivateFieldSet$5(this,_PubSub_subscribing,(n=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),++n),"f"),{args:i,channelsCounter:i.length-1,resolve:()=>{var t;__classPrivateFieldSet$5(this,_PubSub_subscribing,(t=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),--t),"f");for(const t of a){let n=__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].get(t);n||(n={unsubscribing:!1,buffers:new Set,strings:new Set},__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].set(t,n)),__classPrivateFieldGet$5(_a$3,_a$3,"m",_PubSub_listenersSet).call(_a$3,n,s).add(r)}},reject:()=>{var e;__classPrivateFieldSet$5(this,_PubSub_subscribing,(e=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),--e),"f"),__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_updateIsActive).call(this)}};for(const t of a)__classPrivateFieldGet$5(_a$3,_a$3,"m",_PubSub_listenersSet).call(_a$3,__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].get(t),s).add(r)}extendChannelListeners(e,t,r){var s;if(__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_extendChannelListeners).call(this,e,t,r))return __classPrivateFieldSet$5(this,_PubSub_isActive,!0,"f"),__classPrivateFieldSet$5(this,_PubSub_subscribing,(s=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),++s),"f"),{args:[COMMANDS[e].subscribe,t],channelsCounter:1,resolve:()=>{var e,t;return __classPrivateFieldSet$5(this,_PubSub_subscribing,(t=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),e=t--,t),"f"),e},reject:()=>{var e;__classPrivateFieldSet$5(this,_PubSub_subscribing,(e=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),--e),"f"),__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_updateIsActive).call(this)}}}extendTypeListeners(e,t){var r;const s=[COMMANDS[e].subscribe];for(const[r,n]of t)__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_extendChannelListeners).call(this,e,r,n)&&s.push(r);if(1!==s.length)return __classPrivateFieldSet$5(this,_PubSub_isActive,!0,"f"),__classPrivateFieldSet$5(this,_PubSub_subscribing,(r=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),++r),"f"),{args:s,channelsCounter:s.length-1,resolve:()=>{var e,t;return __classPrivateFieldSet$5(this,_PubSub_subscribing,(t=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),e=t--,t),"f"),e},reject:()=>{var e;__classPrivateFieldSet$5(this,_PubSub_subscribing,(e=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),--e),"f"),__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_updateIsActive).call(this)}}}unsubscribe(e,t,r,s){const n=__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e];if(!t)return __classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_unsubscribeCommand).call(this,[COMMANDS[e].unsubscribe],NaN,(()=>n.clear()));const i=__classPrivateFieldGet$5(_a$3,_a$3,"m",_PubSub_channelsArray).call(_a$3,t);if(!r)return __classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_unsubscribeCommand).call(this,[COMMANDS[e].unsubscribe,...i],i.length,(()=>{for(const e of i)n.delete(e)}));const a=[COMMANDS[e].unsubscribe];for(const e of i){const t=n.get(e);if(t){let e,n;s?(e=t.buffers,n=t.strings):(e=t.strings,n=t.buffers);if(0!==(e.has(r)?e.size-1:e.size)||0!==n.size)continue;t.unsubscribing=!0}a.push(e)}if(1!==a.length)return __classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_unsubscribeCommand).call(this,a,a.length-1,(()=>{for(const e of i){const t=n.get(e);t&&((s?t.buffers:t.strings).delete(r),0===t.buffers.size&&0===t.strings.size&&n.delete(e))}}));for(const e of i)__classPrivateFieldGet$5(_a$3,_a$3,"m",_PubSub_listenersSet).call(_a$3,n.get(e),s).delete(r)}reset(){__classPrivateFieldSet$5(this,_PubSub_isActive,!1,"f"),__classPrivateFieldSet$5(this,_PubSub_subscribing,0,"f")}resubscribe(){var e;const t=[];for(const[r,s]of Object.entries(__classPrivateFieldGet$5(this,_PubSub_listeners,"f"))){if(!s.size)continue;__classPrivateFieldSet$5(this,_PubSub_isActive,!0,"f"),__classPrivateFieldSet$5(this,_PubSub_subscribing,(e=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),++e),"f");const n=()=>{var e,t;return __classPrivateFieldSet$5(this,_PubSub_subscribing,(t=__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),e=t--,t),"f"),e};t.push({args:[COMMANDS[r].subscribe,...s.keys()],channelsCounter:s.size,resolve:n,reject:n})}return t}handleMessageReply(e){return COMMANDS[PubSubType.CHANNELS].message.equals(e[0])?(__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_emitPubSubMessage).call(this,PubSubType.CHANNELS,e[2],e[1]),!0):COMMANDS[PubSubType.PATTERNS].message.equals(e[0])?(__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_emitPubSubMessage).call(this,PubSubType.PATTERNS,e[3],e[2],e[1]),!0):!!COMMANDS[PubSubType.SHARDED].message.equals(e[0])&&(__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_emitPubSubMessage).call(this,PubSubType.SHARDED,e[2],e[1]),!0)}removeShardedListeners(e){const t=__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[PubSubType.SHARDED].get(e);return __classPrivateFieldGet$5(this,_PubSub_listeners,"f")[PubSubType.SHARDED].delete(e),__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_updateIsActive).call(this),t}getTypeListeners(e){return __classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e]}}pubSub.PubSub=PubSub,_a$3=PubSub,_PubSub_subscribing=new WeakMap,_PubSub_isActive=new WeakMap,_PubSub_listeners=new WeakMap,_PubSub_instances=new WeakSet,_PubSub_channelsArray=function(e){return Array.isArray(e)?e:[e]},_PubSub_listenersSet=function(e,t){return t?e.buffers:e.strings},_PubSub_extendChannelListeners=function(e,t,r){const s=__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].get(t);if(!s)return __classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].set(t,r),!0;for(const e of r.buffers)s.buffers.add(e);for(const e of r.strings)s.strings.add(e);return!1},_PubSub_unsubscribeCommand=function(e,t,r){return{args:e,channelsCounter:t,resolve:()=>{r(),__classPrivateFieldGet$5(this,_PubSub_instances,"m",_PubSub_updateIsActive).call(this)},reject:void 0}},_PubSub_updateIsActive=function(){__classPrivateFieldSet$5(this,_PubSub_isActive,0!==__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[PubSubType.CHANNELS].size||0!==__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[PubSubType.PATTERNS].size||0!==__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[PubSubType.SHARDED].size||0!==__classPrivateFieldGet$5(this,_PubSub_subscribing,"f"),"f")},_PubSub_emitPubSubMessage=function(e,t,r,s){const n=(s??r).toString(),i=__classPrivateFieldGet$5(this,_PubSub_listeners,"f")[e].get(n);if(!i)return;for(const e of i.buffers)e(t,r);if(!i.strings.size)return;const a=s?r.toString():n,o="__redis__:invalidate"===a?null===t?null:t.map((e=>e.toString())):t.toString();for(const e of i.strings)e(o,a)};var __classPrivateFieldGet$4=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet$4=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},_RedisCommandsQueue_instances,_a$2,_RedisCommandsQueue_flushQueue,_RedisCommandsQueue_maxLength,_RedisCommandsQueue_waitingToBeSent,_RedisCommandsQueue_waitingForReply,_RedisCommandsQueue_onShardedChannelMoved,_RedisCommandsQueue_pubSub,_RedisCommandsQueue_chainInExecution,_RedisCommandsQueue_decoder,_RedisCommandsQueue_pushPubSubCommand;Object.defineProperty(commandsQueue,"__esModule",{value:!0});const LinkedList=yallist,errors_1$3=errors$2,decoder_1=decoder,encoder_1=encoder,pub_sub_1$2=pubSub,PONG=Buffer.from("pong");class RedisCommandsQueue{get isPubSubActive(){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").isActive}constructor(e,t){_RedisCommandsQueue_instances.add(this),_RedisCommandsQueue_maxLength.set(this,void 0),_RedisCommandsQueue_waitingToBeSent.set(this,new LinkedList),_RedisCommandsQueue_waitingForReply.set(this,new LinkedList),_RedisCommandsQueue_onShardedChannelMoved.set(this,void 0),_RedisCommandsQueue_pubSub.set(this,new pub_sub_1$2.PubSub),_RedisCommandsQueue_chainInExecution.set(this,void 0),_RedisCommandsQueue_decoder.set(this,new decoder_1.default({returnStringsAsBuffers:()=>!!__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").head?.value.returnBuffers||__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").isActive,onReply:e=>{if(__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").isActive&&Array.isArray(e)){if(__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").handleMessageReply(e))return;const t=pub_sub_1$2.PubSub.isShardedUnsubscribe(e);if(t&&!__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").length){const t=e[1].toString();return void __classPrivateFieldGet$4(this,_RedisCommandsQueue_onShardedChannelMoved,"f").call(this,t,__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").removeShardedListeners(t))}if(t||pub_sub_1$2.PubSub.isStatusReply(e)){const t=__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").head.value;return void((Number.isNaN(t.channelsCounter)&&0===e[2]||0==--t.channelsCounter)&&__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").shift().resolve())}if(PONG.equals(e[0])){const{resolve:t,returnBuffers:r}=__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").shift(),s=0===e[1].length?e[0]:e[1];return void t(r?s:s.toString())}}const{resolve:t,reject:r}=__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").shift();e instanceof errors_1$3.ErrorReply?r(e):t(e)}})),__classPrivateFieldSet$4(this,_RedisCommandsQueue_maxLength,e,"f"),__classPrivateFieldSet$4(this,_RedisCommandsQueue_onShardedChannelMoved,t,"f")}addCommand(e,t){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_maxLength,"f")&&__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").length+__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").length>=__classPrivateFieldGet$4(this,_RedisCommandsQueue_maxLength,"f")?Promise.reject(new Error("The queue is full")):t?.signal?.aborted?Promise.reject(new errors_1$3.AbortError):new Promise(((r,s)=>{const n=new LinkedList.Node({args:e,chainId:t?.chainId,returnBuffers:t?.returnBuffers,resolve:r,reject:s});if(t?.signal){const e=()=>{__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").removeNode(n),n.value.reject(new errors_1$3.AbortError)};n.value.abort={signal:t.signal,listener:e},t.signal.addEventListener("abort",e,{once:!0})}t?.asap?__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").unshiftNode(n):__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").pushNode(n)}))}subscribe(e,t,r,s){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_instances,"m",_RedisCommandsQueue_pushPubSubCommand).call(this,__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").subscribe(e,t,r,s))}unsubscribe(e,t,r,s){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_instances,"m",_RedisCommandsQueue_pushPubSubCommand).call(this,__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").unsubscribe(e,t,r,s))}resubscribe(){const e=__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").resubscribe();if(e.length)return Promise.all(e.map((e=>__classPrivateFieldGet$4(this,_RedisCommandsQueue_instances,"m",_RedisCommandsQueue_pushPubSubCommand).call(this,e))))}extendPubSubChannelListeners(e,t,r){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_instances,"m",_RedisCommandsQueue_pushPubSubCommand).call(this,__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").extendChannelListeners(e,t,r))}extendPubSubListeners(e,t){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_instances,"m",_RedisCommandsQueue_pushPubSubCommand).call(this,__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").extendTypeListeners(e,t))}getPubSubListeners(e){return __classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").getTypeListeners(e)}getCommandToSend(){const e=__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").shift();if(!e)return;let t;try{t=(0,encoder_1.default)(e.args)}catch(t){return void e.reject(t)}return __classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f").push({resolve:e.resolve,reject:e.reject,channelsCounter:e.channelsCounter,returnBuffers:e.returnBuffers}),__classPrivateFieldSet$4(this,_RedisCommandsQueue_chainInExecution,e.chainId,"f"),t}onReplyChunk(e){__classPrivateFieldGet$4(this,_RedisCommandsQueue_decoder,"f").write(e)}flushWaitingForReply(e){if(__classPrivateFieldGet$4(this,_RedisCommandsQueue_decoder,"f").reset(),__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").reset(),__classPrivateFieldGet$4(_a$2,_a$2,"m",_RedisCommandsQueue_flushQueue).call(_a$2,__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f"),e),__classPrivateFieldGet$4(this,_RedisCommandsQueue_chainInExecution,"f")){for(;__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").head?.value.chainId===__classPrivateFieldGet$4(this,_RedisCommandsQueue_chainInExecution,"f");)__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").shift();__classPrivateFieldSet$4(this,_RedisCommandsQueue_chainInExecution,void 0,"f")}}flushAll(e){__classPrivateFieldGet$4(this,_RedisCommandsQueue_decoder,"f").reset(),__classPrivateFieldGet$4(this,_RedisCommandsQueue_pubSub,"f").reset(),__classPrivateFieldGet$4(_a$2,_a$2,"m",_RedisCommandsQueue_flushQueue).call(_a$2,__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingForReply,"f"),e),__classPrivateFieldGet$4(_a$2,_a$2,"m",_RedisCommandsQueue_flushQueue).call(_a$2,__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f"),e)}}_a$2=RedisCommandsQueue,_RedisCommandsQueue_maxLength=new WeakMap,_RedisCommandsQueue_waitingToBeSent=new WeakMap,_RedisCommandsQueue_waitingForReply=new WeakMap,_RedisCommandsQueue_onShardedChannelMoved=new WeakMap,_RedisCommandsQueue_pubSub=new WeakMap,_RedisCommandsQueue_chainInExecution=new WeakMap,_RedisCommandsQueue_decoder=new WeakMap,_RedisCommandsQueue_instances=new WeakSet,_RedisCommandsQueue_flushQueue=function(e,t){for(;e.length;)e.shift().reject(t)},_RedisCommandsQueue_pushPubSubCommand=function(e){if(void 0!==e)return new Promise(((t,r)=>{__classPrivateFieldGet$4(this,_RedisCommandsQueue_waitingToBeSent,"f").push({args:e.args,channelsCounter:e.channelsCounter,returnBuffers:!0,resolve:()=>{e.resolve(),t()},reject:t=>{e.reject?.(),r(t)}})}))},commandsQueue.default=RedisCommandsQueue;var multiCommand$2={},multiCommand$1={},commander={},commandOptions$1={};Object.defineProperty(commandOptions$1,"__esModule",{value:!0}),commandOptions$1.isCommandOptions=commandOptions$1.commandOptions=void 0;const symbol=Symbol("Command Options");function commandOptions(e){return e[symbol]=!0,e}function isCommandOptions(e){return!0===e?.[symbol]}commandOptions$1.commandOptions=commandOptions,commandOptions$1.isCommandOptions=isCommandOptions,Object.defineProperty(commander,"__esModule",{value:!0}),commander.fCallArguments=commander.transformCommandReply=commander.transformLegacyCommandArguments=commander.transformCommandArguments=commander.attachExtensions=commander.attachCommands=void 0;const command_options_1$1=commandOptions$1;function attachCommands({BaseClass:e,commands:t,executor:r}){for(const[s,n]of Object.entries(t))e.prototype[s]=function(...e){return r.call(this,n,e,s)}}function attachExtensions(e){let t;return e.modules&&(t=attachWithNamespaces({BaseClass:e.BaseClass,namespaces:e.modules,executor:e.modulesExecutor})),e.functions&&(t=attachWithNamespaces({BaseClass:t??e.BaseClass,namespaces:e.functions,executor:e.functionsExecutor})),e.scripts&&(t??(t=class extends e.BaseClass{}),attachCommands({BaseClass:t,commands:e.scripts,executor:e.scriptsExecutor})),t??e.BaseClass}function attachWithNamespaces({BaseClass:e,namespaces:t,executor:r}){const s=class extends e{constructor(...e){super(...e);for(const e of Object.keys(t))this[e]=Object.create(this[e],{self:{value:this}})}};for(const[e,n]of Object.entries(t)){s.prototype[e]={};for(const[t,i]of Object.entries(n))s.prototype[e][t]=function(...e){return r.call(this.self,i,e,t)}}return s}function transformCommandArguments(e,t){let r;return(0,command_options_1$1.isCommandOptions)(t[0])&&(r=t[0],t=t.slice(1)),{jsArgs:t,args:e.transformArguments(...t),options:r}}function transformLegacyCommandArguments(e){return e.flat().map((e=>"number"==typeof e||e instanceof Date?e.toString():e))}function transformCommandReply(e,t,r){return e.transformReply?e.transformReply(t,r):t}function fCallArguments(e,t,r){const s=[t.IS_READ_ONLY?"FCALL_RO":"FCALL",e];return void 0!==t.NUMBER_OF_KEYS&&s.push(t.NUMBER_OF_KEYS.toString()),s.push(...r),s}commander.attachCommands=attachCommands,commander.attachExtensions=attachExtensions,commander.transformCommandArguments=transformCommandArguments,commander.transformLegacyCommandArguments=transformLegacyCommandArguments,commander.transformCommandReply=transformCommandReply,commander.fCallArguments=fCallArguments,Object.defineProperty(multiCommand$1,"__esModule",{value:!0});const commander_1$2=commander,errors_1$2=errors$2;class RedisMultiCommand{constructor(){Object.defineProperty(this,"queue",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"scriptsInUse",{enumerable:!0,configurable:!0,writable:!0,value:new Set})}static generateChainId(){return Symbol("RedisMultiCommand Chain Id")}addCommand(e,t){this.queue.push({args:e,transformReply:t})}addFunction(e,t,r){const s=(0,commander_1$2.fCallArguments)(e,t,t.transformArguments(...r));return this.queue.push({args:s,transformReply:t.transformReply}),s}addScript(e,t){const r=[];this.scriptsInUse.has(e.SHA1)?r.push("EVALSHA",e.SHA1):(this.scriptsInUse.add(e.SHA1),r.push("EVAL",e.SCRIPT)),void 0!==e.NUMBER_OF_KEYS&&r.push(e.NUMBER_OF_KEYS.toString());const s=e.transformArguments(...t);return r.push(...s),s.preserve&&(r.preserve=s.preserve),this.addCommand(r,e.transformReply),r}handleExecReplies(e){const t=e[e.length-1];if(null===t)throw new errors_1$2.WatchError;return this.transformReplies(t)}transformReplies(e){const t=[],r=e.map(((e,r)=>{if(e instanceof errors_1$2.ErrorReply)return t.push(r),e;const{transformReply:s,args:n}=this.queue[r];return s?s(e,n.preserve):e}));if(t.length)throw new errors_1$2.MultiErrorReply(r,t);return r}}multiCommand$1.default=RedisMultiCommand;var __classPrivateFieldSet$3=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},__classPrivateFieldGet$3=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},_RedisClientMultiCommand_instances,_RedisClientMultiCommand_multi,_RedisClientMultiCommand_executor,_RedisClientMultiCommand_selectedDB,_RedisClientMultiCommand_legacyMode,_RedisClientMultiCommand_defineLegacyCommand;Object.defineProperty(multiCommand$2,"__esModule",{value:!0});const commands_1$1=commands$6,multi_command_1$1=multiCommand$1,commander_1$1=commander;class RedisClientMultiCommand{static extend(e){return(0,commander_1$1.attachExtensions)({BaseClass:RedisClientMultiCommand,modulesExecutor:RedisClientMultiCommand.prototype.commandsExecutor,modules:e?.modules,functionsExecutor:RedisClientMultiCommand.prototype.functionsExecutor,functions:e?.functions,scriptsExecutor:RedisClientMultiCommand.prototype.scriptsExecutor,scripts:e?.scripts})}constructor(e,t=!1){_RedisClientMultiCommand_instances.add(this),_RedisClientMultiCommand_multi.set(this,new multi_command_1$1.default),_RedisClientMultiCommand_executor.set(this,void 0),Object.defineProperty(this,"v4",{enumerable:!0,configurable:!0,writable:!0,value:{}}),_RedisClientMultiCommand_selectedDB.set(this,void 0),Object.defineProperty(this,"select",{enumerable:!0,configurable:!0,writable:!0,value:this.SELECT}),Object.defineProperty(this,"EXEC",{enumerable:!0,configurable:!0,writable:!0,value:this.exec}),__classPrivateFieldSet$3(this,_RedisClientMultiCommand_executor,e,"f"),t&&__classPrivateFieldGet$3(this,_RedisClientMultiCommand_instances,"m",_RedisClientMultiCommand_legacyMode).call(this)}commandsExecutor(e,t){return this.addCommand(e.transformArguments(...t),e.transformReply)}SELECT(e,t){return __classPrivateFieldSet$3(this,_RedisClientMultiCommand_selectedDB,e,"f"),this.addCommand(["SELECT",e.toString()],t)}addCommand(e,t){return __classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").addCommand(e,t),this}functionsExecutor(e,t,r){return __classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").addFunction(r,e,t),this}scriptsExecutor(e,t){return __classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").addScript(e,t),this}async exec(e=!1){return e?this.execAsPipeline():__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").handleExecReplies(await __classPrivateFieldGet$3(this,_RedisClientMultiCommand_executor,"f").call(this,__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").queue,__classPrivateFieldGet$3(this,_RedisClientMultiCommand_selectedDB,"f"),multi_command_1$1.default.generateChainId()))}async execAsPipeline(){return 0===__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").queue.length?[]:__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").transformReplies(await __classPrivateFieldGet$3(this,_RedisClientMultiCommand_executor,"f").call(this,__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").queue,__classPrivateFieldGet$3(this,_RedisClientMultiCommand_selectedDB,"f")))}}_RedisClientMultiCommand_multi=new WeakMap,_RedisClientMultiCommand_executor=new WeakMap,_RedisClientMultiCommand_selectedDB=new WeakMap,_RedisClientMultiCommand_instances=new WeakSet,_RedisClientMultiCommand_legacyMode=function(){var e;this.v4.addCommand=this.addCommand.bind(this),this.addCommand=(...e)=>(__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").addCommand((0,commander_1$1.transformLegacyCommandArguments)(e)),this),this.v4.exec=this.exec.bind(this),this.exec=e=>{this.v4.exec().then((t=>{e&&e(null,t)})).catch((t=>{e&&e(t)}))};for(const[t,r]of Object.entries(commands_1$1.default))__classPrivateFieldGet$3(this,_RedisClientMultiCommand_instances,"m",_RedisClientMultiCommand_defineLegacyCommand).call(this,t,r),this[e=t.toLowerCase()]??(this[e]=this[t])},_RedisClientMultiCommand_defineLegacyCommand=function(e,t){this.v4[e]=this[e].bind(this.v4),this[e]=t&&t.TRANSFORM_LEGACY_REPLY&&t.transformReply?(...r)=>(__classPrivateFieldGet$3(this,_RedisClientMultiCommand_multi,"f").addCommand([e,...(0,commander_1$1.transformLegacyCommandArguments)(r)],t.transformReply),this):(...t)=>this.addCommand(e,...t)},multiCommand$2.default=RedisClientMultiCommand,(0,commander_1$1.attachCommands)({BaseClass:RedisClientMultiCommand,commands:commands_1$1.default,executor:RedisClientMultiCommand.prototype.commandsExecutor});var factoryValidator$1=function(e){if("function"!=typeof e.create)throw new TypeError("factory.create must be a function");if("function"!=typeof e.destroy)throw new TypeError("factory.destroy must be a function");if(void 0!==e.validate&&"function"!=typeof e.validate)throw new TypeError("factory.validate must be a function")};let PoolDefaults$1=class{constructor(){this.fifo=!0,this.priorityRange=1,this.testOnBorrow=!1,this.testOnReturn=!1,this.autostart=!0,this.evictionRunIntervalMillis=0,this.numTestsPerEvictionRun=3,this.softIdleTimeoutMillis=-1,this.idleTimeoutMillis=3e4,this.acquireTimeoutMillis=null,this.destroyTimeoutMillis=null,this.maxWaitingClients=null,this.min=null,this.max=null,this.Promise=Promise}};var PoolDefaults_1=PoolDefaults$1;const PoolDefaults=PoolDefaults_1;let PoolOptions$1=class{constructor(e){const t=new PoolDefaults;e=e||{},this.fifo="boolean"==typeof e.fifo?e.fifo:t.fifo,this.priorityRange=e.priorityRange||t.priorityRange,this.testOnBorrow="boolean"==typeof e.testOnBorrow?e.testOnBorrow:t.testOnBorrow,this.testOnReturn="boolean"==typeof e.testOnReturn?e.testOnReturn:t.testOnReturn,this.autostart="boolean"==typeof e.autostart?e.autostart:t.autostart,e.acquireTimeoutMillis&&(this.acquireTimeoutMillis=parseInt(e.acquireTimeoutMillis,10)),e.destroyTimeoutMillis&&(this.destroyTimeoutMillis=parseInt(e.destroyTimeoutMillis,10)),void 0!==e.maxWaitingClients&&(this.maxWaitingClients=parseInt(e.maxWaitingClients,10)),this.max=parseInt(e.max,10),this.min=parseInt(e.min,10),this.max=Math.max(isNaN(this.max)?1:this.max,1),this.min=Math.min(isNaN(this.min)?0:this.min,this.max),this.evictionRunIntervalMillis=e.evictionRunIntervalMillis||t.evictionRunIntervalMillis,this.numTestsPerEvictionRun=e.numTestsPerEvictionRun||t.numTestsPerEvictionRun,this.softIdleTimeoutMillis=e.softIdleTimeoutMillis||t.softIdleTimeoutMillis,this.idleTimeoutMillis=e.idleTimeoutMillis||t.idleTimeoutMillis,this.Promise=null!=e.Promise?e.Promise:t.Promise}};var PoolOptions_1=PoolOptions$1;let Deferred$3=class e{constructor(t){this._state=e.PENDING,this._resolve=void 0,this._reject=void 0,this._promise=new t(((e,t)=>{this._resolve=e,this._reject=t}))}get state(){return this._state}get promise(){return this._promise}reject(t){this._state===e.PENDING&&(this._state=e.REJECTED,this._reject(t))}resolve(t){this._state===e.PENDING&&(this._state=e.FULFILLED,this._resolve(t))}};Deferred$3.PENDING="PENDING",Deferred$3.FULFILLED="FULFILLED",Deferred$3.REJECTED="REJECTED";var Deferred_1=Deferred$3;class ExtendableError extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}}class TimeoutError extends ExtendableError{constructor(e){super(e)}}var errors$1={TimeoutError:TimeoutError};const Deferred$2=Deferred_1,errors=errors$1;function fbind(e,t){return function(){return e.apply(t,arguments)}}let ResourceRequest$1=class e extends Deferred$2{constructor(e,t){super(t),this._creationTimestamp=Date.now(),this._timeout=null,void 0!==e&&this.setTimeout(e)}setTimeout(t){if(this._state!==e.PENDING)return;const r=parseInt(t,10);if(isNaN(r)||r<=0)throw new Error("delay must be a positive int");const s=Date.now()-this._creationTimestamp;this._timeout&&this.removeTimeout(),this._timeout=setTimeout(fbind(this._fireTimeout,this),Math.max(r-s,0))}removeTimeout(){this._timeout&&clearTimeout(this._timeout),this._timeout=null}_fireTimeout(){this.reject(new errors.TimeoutError("ResourceRequest timed out"))}reject(e){this.removeTimeout(),super.reject(e)}resolve(e){this.removeTimeout(),super.resolve(e)}};var ResourceRequest_1=ResourceRequest$1;const Deferred$1=Deferred_1;let ResourceLoan$1=class extends Deferred$1{constructor(e,t){super(t),this._creationTimestamp=Date.now(),this.pooledResource=e}reject(){}};var ResourceLoan_1=ResourceLoan$1;const PooledResourceStateEnum$1={ALLOCATED:"ALLOCATED",IDLE:"IDLE",INVALID:"INVALID",RETURNING:"RETURNING",VALIDATION:"VALIDATION"};var PooledResourceStateEnum_1=PooledResourceStateEnum$1;const PooledResourceStateEnum=PooledResourceStateEnum_1;let PooledResource$1=class{constructor(e){this.creationTime=Date.now(),this.lastReturnTime=null,this.lastBorrowTime=null,this.lastIdleTime=null,this.obj=e,this.state=PooledResourceStateEnum.IDLE}allocate(){this.lastBorrowTime=Date.now(),this.state=PooledResourceStateEnum.ALLOCATED}deallocate(){this.lastReturnTime=Date.now(),this.state=PooledResourceStateEnum.IDLE}invalidate(){this.state=PooledResourceStateEnum.INVALID}test(){this.state=PooledResourceStateEnum.VALIDATION}idle(){this.lastIdleTime=Date.now(),this.state=PooledResourceStateEnum.IDLE}returning(){this.state=PooledResourceStateEnum.RETURNING}};var PooledResource_1=PooledResource$1;let DefaultEvictor$1=class{evict(e,t,r){const s=Date.now()-t.lastIdleTime;return e.softIdleTimeoutMillis>0&&e.softIdleTimeoutMillis<s&&e.min<r||e.idleTimeoutMillis<s}};var DefaultEvictor_1=DefaultEvictor$1;let DoublyLinkedList$2=class{constructor(){this.head=null,this.tail=null,this.length=0}insertBeginning(e){null===this.head?(this.head=e,this.tail=e,e.prev=null,e.next=null,this.length++):this.insertBefore(this.head,e)}insertEnd(e){null===this.tail?this.insertBeginning(e):this.insertAfter(this.tail,e)}insertAfter(e,t){t.prev=e,t.next=e.next,null===e.next?this.tail=t:e.next.prev=t,e.next=t,this.length++}insertBefore(e,t){t.prev=e.prev,t.next=e,null===e.prev?this.head=t:e.prev.next=t,e.prev=t,this.length++}remove(e){null===e.prev?this.head=e.next:e.prev.next=e.next,null===e.next?this.tail=e.prev:e.next.prev=e.prev,e.prev=null,e.next=null,this.length--}static createNode(e){return{prev:null,next:null,data:e}}};var DoublyLinkedList_1=DoublyLinkedList$2;let DoublyLinkedListIterator$1=class{constructor(e,t){this._list=e,this._direction=!0===t?"prev":"next",this._startPosition=!0===t?"tail":"head",this._started=!1,this._cursor=null,this._done=!1}_start(){this._cursor=this._list[this._startPosition],this._started=!0}_advanceCursor(){if(!1===this._started)return this._started=!0,void(this._cursor=this._list[this._startPosition]);this._cursor=this._cursor[this._direction]}reset(){this._done=!1,this._started=!1,this._cursor=null}remove(){if(!1===this._started||!0===this._done||this._isCursorDetached())return!1;this._list.remove(this._cursor)}next(){return!0===this._done?{done:!0}:(this._advanceCursor(),null===this._cursor||this._isCursorDetached()?(this._done=!0,{done:!0}):{value:this._cursor,done:!1})}_isCursorDetached(){return null===this._cursor.prev&&null===this._cursor.next&&this._list.tail!==this._cursor&&this._list.head!==this._cursor}};var DoublyLinkedListIterator_1=DoublyLinkedListIterator$1;const DoublyLinkedListIterator=DoublyLinkedListIterator_1;let DequeIterator$1=class extends DoublyLinkedListIterator{next(){const e=super.next();return e.value&&(e.value=e.value.data),e}};var DequeIterator_1=DequeIterator$1;const DoublyLinkedList$1=DoublyLinkedList_1,DequeIterator=DequeIterator_1;let Deque$2=class{constructor(){this._list=new DoublyLinkedList$1}shift(){if(0===this.length)return;const e=this._list.head;return this._list.remove(e),e.data}unshift(e){const t=DoublyLinkedList$1.createNode(e);this._list.insertBeginning(t)}push(e){const t=DoublyLinkedList$1.createNode(e);this._list.insertEnd(t)}pop(){if(0===this.length)return;const e=this._list.tail;return this._list.remove(e),e.data}[Symbol.iterator](){return new DequeIterator(this._list)}iterator(){return new DequeIterator(this._list)}reverseIterator(){return new DequeIterator(this._list,!0)}get head(){if(0===this.length)return;return this._list.head.data}get tail(){if(0===this.length)return;return this._list.tail.data}get length(){return this._list.length}};var Deque_1=Deque$2;const DoublyLinkedList=DoublyLinkedList_1,Deque$1=Deque_1;let Queue$1=class extends Deque$1{push(e){const t=DoublyLinkedList.createNode(e);e.promise.catch(this._createTimeoutRejectionHandler(t)),this._list.insertEnd(t)}_createTimeoutRejectionHandler(e){return t=>{"TimeoutError"===t.name&&this._list.remove(e)}}};var Queue_1=Queue$1;const Queue=Queue_1;let PriorityQueue$1=class{constructor(e){this._size=Math.max(0|+e,1),this._slots=[];for(let e=0;e<this._size;e++)this._slots.push(new Queue)}get length(){let e=0;for(let t=0,r=this._slots.length;t<r;t++)e+=this._slots[t].length;return e}enqueue(e,t){(t=t&&0|+t||0)&&(t<0||t>=this._size)&&(t=this._size-1),this._slots[t].push(e)}dequeue(){for(let e=0,t=this._slots.length;e<t;e+=1)if(this._slots[e].length)return this._slots[e].shift()}get head(){for(let e=0,t=this._slots.length;e<t;e+=1)if(this._slots[e].length>0)return this._slots[e].head}get tail(){for(let e=this._slots.length-1;e>=0;e--)if(this._slots[e].length>0)return this._slots[e].tail}};var PriorityQueue_1=PriorityQueue$1,utils={};function noop(){}utils.reflector=function(e){return e.then(noop,noop)};const EventEmitter=require$$0$5.EventEmitter,factoryValidator=factoryValidator$1,PoolOptions=PoolOptions_1,ResourceRequest=ResourceRequest_1,ResourceLoan=ResourceLoan_1,PooledResource=PooledResource_1,Deferred=Deferred_1,reflector=utils.reflector,FACTORY_CREATE_ERROR="factoryCreateError",FACTORY_DESTROY_ERROR="factoryDestroyError";let Pool$1=class extends EventEmitter{constructor(e,t,r,s,n){super(),factoryValidator(s),this._config=new PoolOptions(n),this._Promise=this._config.Promise,this._factory=s,this._draining=!1,this._started=!1,this._waitingClientsQueue=new r(this._config.priorityRange),this._factoryCreateOperations=new Set,this._factoryDestroyOperations=new Set,this._availableObjects=new t,this._testOnBorrowResources=new Set,this._testOnReturnResources=new Set,this._validationOperations=new Set,this._allObjects=new Set,this._resourceLoans=new Map,this._evictionIterator=this._availableObjects.iterator(),this._evictor=new e,this._scheduledEviction=null,!0===this._config.autostart&&this.start()}_destroy(e){e.invalidate(),this._allObjects.delete(e);const t=this._factory.destroy(e.obj),r=this._config.destroyTimeoutMillis?this._Promise.resolve(this._applyDestroyTimeout(t)):this._Promise.resolve(t);this._trackOperation(r,this._factoryDestroyOperations).catch((e=>{this.emit(FACTORY_DESTROY_ERROR,e)})),this._ensureMinimum()}_applyDestroyTimeout(e){const t=new this._Promise(((e,t)=>{setTimeout((()=>{t(new Error("destroy timed out"))}),this._config.destroyTimeoutMillis).unref()}));return this._Promise.race([t,e])}_testOnBorrow(){if(this._availableObjects.length<1)return!1;const e=this._availableObjects.shift();e.test(),this._testOnBorrowResources.add(e);const t=this._factory.validate(e.obj),r=this._Promise.resolve(t);return this._trackOperation(r,this._validationOperations).then((t=>{if(this._testOnBorrowResources.delete(e),!1===t)return e.invalidate(),this._destroy(e),void this._dispense();this._dispatchPooledResourceToNextWaitingClient(e)})),!0}_dispatchResource(){if(this._availableObjects.length<1)return!1;const e=this._availableObjects.shift();return this._dispatchPooledResourceToNextWaitingClient(e),!1}_dispense(){const e=this._waitingClientsQueue.length;if(e<1)return;const t=e-this._potentiallyAllocableResourceCount,r=Math.min(this.spareResourceCapacity,t);for(let e=0;r>e;e++)this._createResource();if(!0===this._config.testOnBorrow){const t=e-this._testOnBorrowResources.size,r=Math.min(this._availableObjects.length,t);for(let e=0;r>e;e++)this._testOnBorrow()}if(!1===this._config.testOnBorrow){const t=Math.min(this._availableObjects.length,e);for(let e=0;t>e;e++)this._dispatchResource()}}_dispatchPooledResourceToNextWaitingClient(e){const t=this._waitingClientsQueue.dequeue();if(void 0===t||t.state!==Deferred.PENDING)return this._addPooledResourceToAvailableObjects(e),!1;const r=new ResourceLoan(e,this._Promise);return this._resourceLoans.set(e.obj,r),e.allocate(),t.resolve(e.obj),!0}_trackOperation(e,t){return t.add(e),e.then((r=>(t.delete(e),this._Promise.resolve(r))),(r=>(t.delete(e),this._Promise.reject(r))))}_createResource(){const e=this._factory.create(),t=this._Promise.resolve(e).then((e=>{const t=new PooledResource(e);this._allObjects.add(t),this._addPooledResourceToAvailableObjects(t)}));this._trackOperation(t,this._factoryCreateOperations).then((()=>(this._dispense(),null))).catch((e=>{this.emit(FACTORY_CREATE_ERROR,e),this._dispense()}))}_ensureMinimum(){if(!0===this._draining)return;const e=this._config.min-this._count;for(let t=0;t<e;t++)this._createResource()}_evict(){const e=Math.min(this._config.numTestsPerEvictionRun,this._availableObjects.length),t={softIdleTimeoutMillis:this._config.softIdleTimeoutMillis,idleTimeoutMillis:this._config.idleTimeoutMillis,min:this._config.min};for(let r=0;r<e;){const e=this._evictionIterator.next();if(!0===e.done&&this._availableObjects.length<1)return void this._evictionIterator.reset();if(!0===e.done&&this._availableObjects.length>0){this._evictionIterator.reset();continue}const s=e.value;r++,!0===this._evictor.evict(t,s,this._availableObjects.length)&&(this._evictionIterator.remove(),this._destroy(s))}}_scheduleEvictorRun(){this._config.evictionRunIntervalMillis>0&&(this._scheduledEviction=setTimeout((()=>{this._evict(),this._scheduleEvictorRun()}),this._config.evictionRunIntervalMillis).unref())}_descheduleEvictorRun(){this._scheduledEviction&&clearTimeout(this._scheduledEviction),this._scheduledEviction=null}start(){!0!==this._draining&&!0!==this._started&&(this._started=!0,this._scheduleEvictorRun(),this._ensureMinimum())}acquire(e){if(!1===this._started&&!1===this._config.autostart&&this.start(),this._draining)return this._Promise.reject(new Error("pool is draining and cannot accept work"));if(this.spareResourceCapacity<1&&this._availableObjects.length<1&&void 0!==this._config.maxWaitingClients&&this._waitingClientsQueue.length>=this._config.maxWaitingClients)return this._Promise.reject(new Error("max waitingClients count exceeded"));const t=new ResourceRequest(this._config.acquireTimeoutMillis,this._Promise);return this._waitingClientsQueue.enqueue(t,e),this._dispense(),t.promise}use(e,t){return this.acquire(t).then((t=>e(t).then((e=>(this.release(t),e)),(e=>{throw this.destroy(t),e}))))}isBorrowedResource(e){return this._resourceLoans.has(e)}release(e){const t=this._resourceLoans.get(e);if(void 0===t)return this._Promise.reject(new Error("Resource not currently part of this pool"));this._resourceLoans.delete(e),t.resolve();const r=t.pooledResource;return r.deallocate(),this._addPooledResourceToAvailableObjects(r),this._dispense(),this._Promise.resolve()}destroy(e){const t=this._resourceLoans.get(e);if(void 0===t)return this._Promise.reject(new Error("Resource not currently part of this pool"));this._resourceLoans.delete(e),t.resolve();const r=t.pooledResource;return r.deallocate(),this._destroy(r),this._dispense(),this._Promise.resolve()}_addPooledResourceToAvailableObjects(e){e.idle(),!0===this._config.fifo?this._availableObjects.push(e):this._availableObjects.unshift(e)}drain(){return this._draining=!0,this.__allResourceRequestsSettled().then((()=>this.__allResourcesReturned())).then((()=>{this._descheduleEvictorRun()}))}__allResourceRequestsSettled(){return this._waitingClientsQueue.length>0?reflector(this._waitingClientsQueue.tail.promise):this._Promise.resolve()}__allResourcesReturned(){const e=Array.from(this._resourceLoans.values()).map((e=>e.promise)).map(reflector);return this._Promise.all(e)}clear(){const e=Array.from(this._factoryCreateOperations).map(reflector);return this._Promise.all(e).then((()=>{for(const e of this._availableObjects)this._destroy(e);const e=Array.from(this._factoryDestroyOperations).map(reflector);return reflector(this._Promise.all(e))}))}ready(){return new this._Promise((e=>{const t=()=>{this.available>=this.min?e():setTimeout(t,100)};t()}))}get _potentiallyAllocableResourceCount(){return this._availableObjects.length+this._testOnBorrowResources.size+this._testOnReturnResources.size+this._factoryCreateOperations.size}get _count(){return this._allObjects.size+this._factoryCreateOperations.size}get spareResourceCapacity(){return this._config.max-(this._allObjects.size+this._factoryCreateOperations.size)}get size(){return this._count}get available(){return this._availableObjects.length}get borrowed(){return this._resourceLoans.size}get pending(){return this._waitingClientsQueue.length}get max(){return this._config.max}get min(){return this._config.min}};var Pool_1=Pool$1;const Pool=Pool_1,Deque=Deque_1,PriorityQueue=PriorityQueue_1,DefaultEvictor=DefaultEvictor_1;var genericPool={Pool:Pool,Deque:Deque,PriorityQueue:PriorityQueue,DefaultEvictor:DefaultEvictor,createPool:function(e,t){return new Pool(DefaultEvictor,Deque,PriorityQueue,e,t)}},name="@redis/client",version="1.5.13",license="MIT",main="./dist/index.js",types$1="./dist/index.d.ts",files=["dist/"],scripts={test:"nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'",build:"tsc",lint:"eslint ./*.ts ./lib/**/*.ts",documentation:"typedoc"},dependencies={"cluster-key-slot":"1.1.2","generic-pool":"3.9.0",yallist:"4.0.0"},devDependencies={"@istanbuljs/nyc-config-typescript":"^1.0.2","@redis/test-utils":"*","@types/node":"^20.6.2","@types/sinon":"^10.0.16","@types/yallist":"^4.0.1","@typescript-eslint/eslint-plugin":"^6.7.2","@typescript-eslint/parser":"^6.7.2",eslint:"^8.49.0",nyc:"^15.1.0","release-it":"^16.1.5",sinon:"^16.0.0","source-map-support":"^0.5.21","ts-node":"^10.9.1",typedoc:"^0.25.1",typescript:"^5.2.2"},engines={node:">=14"},repository={type:"git",url:"git://github.com/redis/node-redis.git"},bugs={url:"https://github.com/redis/node-redis/issues"},homepage="https://github.com/redis/node-redis/tree/master/packages/client",keywords=["redis"],require$$11={name:name,version:version,license:license,main:main,types:types$1,files:files,scripts:scripts,dependencies:dependencies,devDependencies:devDependencies,engines:engines,repository:repository,bugs:bugs,homepage:homepage,keywords:keywords},__classPrivateFieldGet$2=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet$2=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},_RedisClient_instances,_a$1,_RedisClient_options,_RedisClient_socket,_RedisClient_queue,_RedisClient_isolationPool,_RedisClient_v4,_RedisClient_selectedDB,_RedisClient_initiateOptions,_RedisClient_initiateQueue,_RedisClient_initiateSocket,_RedisClient_initiateIsolationPool,_RedisClient_legacyMode,_RedisClient_legacySendCommand,_RedisClient_defineLegacyCommand,_RedisClient_pingTimer,_RedisClient_setPingTimer,_RedisClient_sendCommand,_RedisClient_pubSubCommand,_RedisClient_tick,_RedisClient_addMultiCommands,_RedisClient_destroyIsolationPool;Object.defineProperty(client,"__esModule",{value:!0});const commands_1=commands$6,socket_1=socket,commands_queue_1=commandsQueue,multi_command_1=multiCommand$2,events_1=require$$0$5,command_options_1=commandOptions$1,commander_1=commander,generic_pool_1=genericPool,errors_1$1=errors$2,url_1=require$$0$9,pub_sub_1$1=pubSub,package_json_1=require$$11;class RedisClient extends events_1.EventEmitter{static commandOptions(e){return(0,command_options_1.commandOptions)(e)}static extend(e){const t=(0,commander_1.attachExtensions)({BaseClass:_a$1,modulesExecutor:_a$1.prototype.commandsExecutor,modules:e?.modules,functionsExecutor:_a$1.prototype.functionsExecuter,functions:e?.functions,scriptsExecutor:_a$1.prototype.scriptsExecuter,scripts:e?.scripts});return t!==_a$1&&(t.prototype.Multi=multi_command_1.default.extend(e)),t}static create(e){return new(_a$1.extend(e))(e)}static parseURL(e){const{hostname:t,port:r,protocol:s,username:n,password:i,pathname:a}=new url_1.URL(e),o={socket:{host:t}};if("rediss:"===s)o.socket.tls=!0;else if("redis:"!==s)throw new TypeError("Invalid protocol");if(r&&(o.socket.port=Number(r)),n&&(o.username=decodeURIComponent(n)),i&&(o.password=decodeURIComponent(i)),a.length>1){const e=Number(a.substring(1));if(isNaN(e))throw new TypeError("Invalid pathname");o.database=e}return o}get options(){return __classPrivateFieldGet$2(this,_RedisClient_options,"f")}get isOpen(){return __classPrivateFieldGet$2(this,_RedisClient_socket,"f").isOpen}get isReady(){return __classPrivateFieldGet$2(this,_RedisClient_socket,"f").isReady}get isPubSubActive(){return __classPrivateFieldGet$2(this,_RedisClient_queue,"f").isPubSubActive}get v4(){if(!__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.legacyMode)throw new Error('the client is not in "legacy mode"');return __classPrivateFieldGet$2(this,_RedisClient_v4,"f")}constructor(e){super(),_RedisClient_instances.add(this),Object.defineProperty(this,"commandOptions",{enumerable:!0,configurable:!0,writable:!0,value:_a$1.commandOptions}),_RedisClient_options.set(this,void 0),_RedisClient_socket.set(this,void 0),_RedisClient_queue.set(this,void 0),_RedisClient_isolationPool.set(this,void 0),_RedisClient_v4.set(this,{}),_RedisClient_selectedDB.set(this,0),_RedisClient_pingTimer.set(this,void 0),Object.defineProperty(this,"select",{enumerable:!0,configurable:!0,writable:!0,value:this.SELECT}),Object.defineProperty(this,"subscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.SUBSCRIBE}),Object.defineProperty(this,"unsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.UNSUBSCRIBE}),Object.defineProperty(this,"pSubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.PSUBSCRIBE}),Object.defineProperty(this,"pUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.PUNSUBSCRIBE}),Object.defineProperty(this,"sSubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.SSUBSCRIBE}),Object.defineProperty(this,"sUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.SUNSUBSCRIBE}),Object.defineProperty(this,"quit",{enumerable:!0,configurable:!0,writable:!0,value:this.QUIT}),Object.defineProperty(this,"multi",{enumerable:!0,configurable:!0,writable:!0,value:this.MULTI}),__classPrivateFieldSet$2(this,_RedisClient_options,__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_initiateOptions).call(this,e),"f"),__classPrivateFieldSet$2(this,_RedisClient_queue,__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_initiateQueue).call(this),"f"),__classPrivateFieldSet$2(this,_RedisClient_socket,__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_initiateSocket).call(this),"f"),__classPrivateFieldSet$2(this,_RedisClient_isolationPool,__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_initiateIsolationPool).call(this),"f"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_legacyMode).call(this)}duplicate(e){return new(Object.getPrototypeOf(this).constructor)({...__classPrivateFieldGet$2(this,_RedisClient_options,"f"),...e})}async connect(){return __classPrivateFieldSet$2(this,_RedisClient_isolationPool,__classPrivateFieldGet$2(this,_RedisClient_isolationPool,"f")??__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_initiateIsolationPool).call(this),"f"),await __classPrivateFieldGet$2(this,_RedisClient_socket,"f").connect(),this}async commandsExecutor(e,t){const{args:r,options:s}=(0,commander_1.transformCommandArguments)(e,t);return(0,commander_1.transformCommandReply)(e,await __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,r,s),r.preserve)}sendCommand(e,t){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,e,t)}async functionsExecuter(e,t,r){const{args:s,options:n}=(0,commander_1.transformCommandArguments)(e,t);return(0,commander_1.transformCommandReply)(e,await this.executeFunction(r,e,s,n),s.preserve)}executeFunction(e,t,r,s){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,(0,commander_1.fCallArguments)(e,t,r),s)}async scriptsExecuter(e,t){const{args:r,options:s}=(0,commander_1.transformCommandArguments)(e,t);return(0,commander_1.transformCommandReply)(e,await this.executeScript(e,r,s),r.preserve)}async executeScript(e,t,r){const s=["EVALSHA",e.SHA1];void 0!==e.NUMBER_OF_KEYS&&s.push(e.NUMBER_OF_KEYS.toString()),s.push(...t);try{return await __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,s,r)}catch(t){if(!t?.message?.startsWith?.("NOSCRIPT"))throw t;return s[0]="EVAL",s[1]=e.SCRIPT,__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,s,r)}}async SELECT(e,t){(0,command_options_1.isCommandOptions)(e)||(t=e,e=null),await __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,["SELECT",t.toString()],e),__classPrivateFieldSet$2(this,_RedisClient_selectedDB,t,"f")}SUBSCRIBE(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").subscribe(pub_sub_1$1.PubSubType.CHANNELS,e,t,r))}UNSUBSCRIBE(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").unsubscribe(pub_sub_1$1.PubSubType.CHANNELS,e,t,r))}PSUBSCRIBE(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").subscribe(pub_sub_1$1.PubSubType.PATTERNS,e,t,r))}PUNSUBSCRIBE(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").unsubscribe(pub_sub_1$1.PubSubType.PATTERNS,e,t,r))}SSUBSCRIBE(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").subscribe(pub_sub_1$1.PubSubType.SHARDED,e,t,r))}SUNSUBSCRIBE(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").unsubscribe(pub_sub_1$1.PubSubType.SHARDED,e,t,r))}getPubSubListeners(e){return __classPrivateFieldGet$2(this,_RedisClient_queue,"f").getPubSubListeners(e)}extendPubSubChannelListeners(e,t,r){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").extendPubSubChannelListeners(e,t,r))}extendPubSubListeners(e,t){return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_pubSubCommand).call(this,__classPrivateFieldGet$2(this,_RedisClient_queue,"f").extendPubSubListeners(e,t))}QUIT(){return __classPrivateFieldGet$2(this,_RedisClient_socket,"f").quit((async()=>{__classPrivateFieldGet$2(this,_RedisClient_pingTimer,"f")&&clearTimeout(__classPrivateFieldGet$2(this,_RedisClient_pingTimer,"f"));const e=__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(["QUIT"]);__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this);const[t]=await Promise.all([e,__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_destroyIsolationPool).call(this)]);return t}))}executeIsolated(e){return __classPrivateFieldGet$2(this,_RedisClient_isolationPool,"f")?__classPrivateFieldGet$2(this,_RedisClient_isolationPool,"f").use(e):Promise.reject(new errors_1$1.ClientClosedError)}MULTI(){return new this.Multi(this.multiExecutor.bind(this),__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.legacyMode)}async multiExecutor(e,t,r){if(!__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isOpen)return Promise.reject(new errors_1$1.ClientClosedError);const s=r?Promise.all([__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(["MULTI"],{chainId:r}),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_addMultiCommands).call(this,e,r),__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(["EXEC"],{chainId:r})]):__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_addMultiCommands).call(this,e);__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this);const n=await s;return void 0!==t&&__classPrivateFieldSet$2(this,_RedisClient_selectedDB,t,"f"),n}async*scanIterator(e){let t=0;do{const r=await this.scan(t,e);t=r.cursor;for(const e of r.keys)yield e}while(0!==t)}async*hScanIterator(e,t){let r=0;do{const s=await this.hScan(e,r,t);r=s.cursor;for(const e of s.tuples)yield e}while(0!==r)}async*sScanIterator(e,t){let r=0;do{const s=await this.sScan(e,r,t);r=s.cursor;for(const e of s.members)yield e}while(0!==r)}async*zScanIterator(e,t){let r=0;do{const s=await this.zScan(e,r,t);r=s.cursor;for(const e of s.members)yield e}while(0!==r)}async disconnect(){__classPrivateFieldGet$2(this,_RedisClient_pingTimer,"f")&&clearTimeout(__classPrivateFieldGet$2(this,_RedisClient_pingTimer,"f")),__classPrivateFieldGet$2(this,_RedisClient_queue,"f").flushAll(new errors_1$1.DisconnectsClientError),__classPrivateFieldGet$2(this,_RedisClient_socket,"f").disconnect(),await __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_destroyIsolationPool).call(this)}ref(){__classPrivateFieldGet$2(this,_RedisClient_socket,"f").ref()}unref(){__classPrivateFieldGet$2(this,_RedisClient_socket,"f").unref()}}_a$1=RedisClient,_RedisClient_options=new WeakMap,_RedisClient_socket=new WeakMap,_RedisClient_queue=new WeakMap,_RedisClient_isolationPool=new WeakMap,_RedisClient_v4=new WeakMap,_RedisClient_selectedDB=new WeakMap,_RedisClient_pingTimer=new WeakMap,_RedisClient_instances=new WeakSet,_RedisClient_initiateOptions=function(e){if(e?.url){const t=_a$1.parseURL(e.url);e.socket&&(t.socket=Object.assign(e.socket,t.socket)),Object.assign(e,t)}return e?.database&&__classPrivateFieldSet$2(this,_RedisClient_selectedDB,e.database,"f"),e},_RedisClient_initiateQueue=function(){return new commands_queue_1.default(__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.commandsQueueMaxLength,((e,t)=>this.emit("sharded-channel-moved",e,t)))},_RedisClient_initiateSocket=function(){return new socket_1.default((async()=>{const e=[];0!==__classPrivateFieldGet$2(this,_RedisClient_selectedDB,"f")&&e.push(__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(["SELECT",__classPrivateFieldGet$2(this,_RedisClient_selectedDB,"f").toString()],{asap:!0})),__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.readonly&&e.push(__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(commands_1.default.READONLY.transformArguments(),{asap:!0})),__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.disableClientInfo||(e.push(__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(["CLIENT","SETINFO","LIB-VER",package_json_1.version],{asap:!0}).catch((e=>{if(!(e instanceof errors_1$1.ErrorReply))throw e}))),e.push(__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(["CLIENT","SETINFO","LIB-NAME",__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.clientInfoTag?`node-redis(${__classPrivateFieldGet$2(this,_RedisClient_options,"f").clientInfoTag})`:"node-redis"],{asap:!0}).catch((e=>{if(!(e instanceof errors_1$1.ErrorReply))throw e})))),__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.name&&e.push(__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(commands_1.default.CLIENT_SETNAME.transformArguments(__classPrivateFieldGet$2(this,_RedisClient_options,"f").name),{asap:!0})),(__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.username||__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.password)&&e.push(__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(commands_1.default.AUTH.transformArguments({username:__classPrivateFieldGet$2(this,_RedisClient_options,"f").username,password:__classPrivateFieldGet$2(this,_RedisClient_options,"f").password??""}),{asap:!0}));const t=__classPrivateFieldGet$2(this,_RedisClient_queue,"f").resubscribe();t&&e.push(t),e.length&&(__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this,!0),await Promise.all(e))}),__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.socket).on("data",(e=>__classPrivateFieldGet$2(this,_RedisClient_queue,"f").onReplyChunk(e))).on("error",(e=>{this.emit("error",e),__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isOpen&&!__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.disableOfflineQueue?__classPrivateFieldGet$2(this,_RedisClient_queue,"f").flushWaitingForReply(e):__classPrivateFieldGet$2(this,_RedisClient_queue,"f").flushAll(e)})).on("connect",(()=>{this.emit("connect")})).on("ready",(()=>{this.emit("ready"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_setPingTimer).call(this),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this)})).on("reconnecting",(()=>this.emit("reconnecting"))).on("drain",(()=>__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this))).on("end",(()=>this.emit("end")))},_RedisClient_initiateIsolationPool=function(){return(0,generic_pool_1.createPool)({create:async()=>{const e=this.duplicate({isolationPoolOptions:void 0}).on("error",(e=>this.emit("error",e)));return await e.connect(),e},destroy:e=>e.disconnect()},__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.isolationPoolOptions)},_RedisClient_legacyMode=function(){var e;if(__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.legacyMode){__classPrivateFieldGet$2(this,_RedisClient_v4,"f").sendCommand=__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).bind(this),this.sendCommand=(...e)=>{const t=__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_legacySendCommand).call(this,...e);t&&t.promise.then((e=>t.callback(null,e))).catch((e=>t.callback(e)))};for(const[t,r]of Object.entries(commands_1.default))__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,t,r),this[e=t.toLowerCase()]??(this[e]=this[t]);__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"SELECT"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"select"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"SUBSCRIBE"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"subscribe"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"PSUBSCRIBE"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"pSubscribe"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"UNSUBSCRIBE"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"unsubscribe"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"PUNSUBSCRIBE"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"pUnsubscribe"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"QUIT"),__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_defineLegacyCommand).call(this,"quit")}},_RedisClient_legacySendCommand=function(...e){const t="function"==typeof e[e.length-1]?e.pop():void 0,r=__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,(0,commander_1.transformLegacyCommandArguments)(e));if(t)return{promise:r,callback:t};r.catch((e=>this.emit("error",e)))},_RedisClient_defineLegacyCommand=function(e,t){__classPrivateFieldGet$2(this,_RedisClient_v4,"f")[e]=this[e].bind(this),this[e]=t&&t.TRANSFORM_LEGACY_REPLY&&t.transformReply?(...r)=>{const s=__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_legacySendCommand).call(this,e,...r);s&&s.promise.then((e=>s.callback(null,t.transformReply(e)))).catch((e=>s.callback(e)))}:(...t)=>this.sendCommand(e,...t)},_RedisClient_setPingTimer=function e(){__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.pingInterval&&__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isReady&&(clearTimeout(__classPrivateFieldGet$2(this,_RedisClient_pingTimer,"f")),__classPrivateFieldSet$2(this,_RedisClient_pingTimer,setTimeout((()=>{__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isReady&&__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_sendCommand).call(this,["PING"]).then((e=>this.emit("ping-interval",e))).catch((e=>this.emit("error",e))).finally((()=>__classPrivateFieldGet$2(this,_RedisClient_instances,"m",e).call(this)))}),__classPrivateFieldGet$2(this,_RedisClient_options,"f").pingInterval),"f"))},_RedisClient_sendCommand=function(e,t){if(!__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isOpen)return Promise.reject(new errors_1$1.ClientClosedError);if(t?.isolated)return this.executeIsolated((r=>r.sendCommand(e,{...t,isolated:!1})));if(!__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isReady&&__classPrivateFieldGet$2(this,_RedisClient_options,"f")?.disableOfflineQueue)return Promise.reject(new errors_1$1.ClientOfflineError);const r=__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(e,t);return __classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this),r},_RedisClient_pubSubCommand=function(e){return void 0===e?Promise.resolve():(__classPrivateFieldGet$2(this,_RedisClient_instances,"m",_RedisClient_tick).call(this),e)},_RedisClient_tick=function(e=!1){if(!__classPrivateFieldGet$2(this,_RedisClient_socket,"f").writableNeedDrain&&(e||__classPrivateFieldGet$2(this,_RedisClient_socket,"f").isReady))for(__classPrivateFieldGet$2(this,_RedisClient_socket,"f").cork();!__classPrivateFieldGet$2(this,_RedisClient_socket,"f").writableNeedDrain;){const e=__classPrivateFieldGet$2(this,_RedisClient_queue,"f").getCommandToSend();if(void 0===e)break;__classPrivateFieldGet$2(this,_RedisClient_socket,"f").writeCommand(e)}},_RedisClient_addMultiCommands=function(e,t){return Promise.all(e.map((({args:e})=>__classPrivateFieldGet$2(this,_RedisClient_queue,"f").addCommand(e,{chainId:t}))))},_RedisClient_destroyIsolationPool=async function(){await __classPrivateFieldGet$2(this,_RedisClient_isolationPool,"f").drain(),await __classPrivateFieldGet$2(this,_RedisClient_isolationPool,"f").clear(),__classPrivateFieldSet$2(this,_RedisClient_isolationPool,void 0,"f")},client.default=RedisClient,(0,commander_1.attachCommands)({BaseClass:RedisClient,commands:commands_1.default,executor:RedisClient.prototype.commandsExecutor}),RedisClient.prototype.Multi=multi_command_1.default;var cluster={},clusterSlots={},lib={exports:{}},lookup=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],toUTF8Array=function(e){for(var t,r=0,s=0,n=[],i=e.length;r<i;r++)(t=e.charCodeAt(r))<128?n[s++]=t:t<2048?(n[s++]=t>>6|192,n[s++]=63&t|128):55296==(64512&t)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++r)),n[s++]=t>>18|240,n[s++]=t>>12&63|128,n[s++]=t>>6&63|128,n[s++]=63&t|128):(n[s++]=t>>12|224,n[s++]=t>>6&63|128,n[s++]=63&t|128);return n},generate=lib.exports=function(e){for(var t,r=0,s=-1,n=0,i=0,a="string"==typeof e?toUTF8Array(e):e,o=a.length;r<o;){if(t=a[r++],-1===s)123===t&&(s=r);else if(125!==t)i=lookup[255&(t^i>>8)]^i<<8;else if(r-1!==s)return 16383&i;n=lookup[255&(t^n>>8)]^n<<8}return 16383&n};lib.exports.generateMulti=function(e){for(var t=1,r=e.length,s=generate(e[0]);t<r;)if(generate(e[t++])!==s)return-1;return s};var libExports=lib.exports,__classPrivateFieldGet$1=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet$1=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},_RedisClusterSlots_instances,_a,_RedisClusterSlots_SLOTS,_RedisClusterSlots_options,_RedisClusterSlots_Client,_RedisClusterSlots_emit,_RedisClusterSlots_isOpen,_RedisClusterSlots_discoverWithRootNodes,_RedisClusterSlots_resetSlots,_RedisClusterSlots_discover,_RedisClusterSlots_getShards,_RedisClusterSlots_getNodeAddress,_RedisClusterSlots_clientOptionsDefaults,_RedisClusterSlots_initiateSlotNode,_RedisClusterSlots_createClient,_RedisClusterSlots_createNodeClient,_RedisClusterSlots_runningRediscoverPromise,_RedisClusterSlots_rediscover,_RedisClusterSlots_destroy,_RedisClusterSlots_execOnNodeClient,_RedisClusterSlots_iterateAllNodes,_RedisClusterSlots_randomNodeIterator,_RedisClusterSlots_slotNodesIterator,_RedisClusterSlots_initiatePubSubClient,_RedisClusterSlots_initiateShardedPubSubClient;Object.defineProperty(clusterSlots,"__esModule",{value:!0});const client_1=client,errors_1=errors$2,util_1=require$$1$1,pub_sub_1=pubSub,calculateSlot=libExports;class RedisClusterSlots{get isOpen(){return __classPrivateFieldGet$1(this,_RedisClusterSlots_isOpen,"f")}constructor(e,t){_RedisClusterSlots_instances.add(this),_RedisClusterSlots_options.set(this,void 0),_RedisClusterSlots_Client.set(this,void 0),_RedisClusterSlots_emit.set(this,void 0),Object.defineProperty(this,"slots",{enumerable:!0,configurable:!0,writable:!0,value:new Array(__classPrivateFieldGet$1(_a,_a,"f",_RedisClusterSlots_SLOTS))}),Object.defineProperty(this,"shards",{enumerable:!0,configurable:!0,writable:!0,value:new Array}),Object.defineProperty(this,"masters",{enumerable:!0,configurable:!0,writable:!0,value:new Array}),Object.defineProperty(this,"replicas",{enumerable:!0,configurable:!0,writable:!0,value:new Array}),Object.defineProperty(this,"nodeByAddress",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"pubSubNode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),_RedisClusterSlots_isOpen.set(this,!1),_RedisClusterSlots_runningRediscoverPromise.set(this,void 0),_RedisClusterSlots_randomNodeIterator.set(this,void 0),__classPrivateFieldSet$1(this,_RedisClusterSlots_options,e,"f"),__classPrivateFieldSet$1(this,_RedisClusterSlots_Client,client_1.default.extend(e),"f"),__classPrivateFieldSet$1(this,_RedisClusterSlots_emit,t,"f")}async connect(){if(__classPrivateFieldGet$1(this,_RedisClusterSlots_isOpen,"f"))throw new Error("Cluster already open");__classPrivateFieldSet$1(this,_RedisClusterSlots_isOpen,!0,"f");try{await __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_discoverWithRootNodes).call(this)}catch(e){throw __classPrivateFieldSet$1(this,_RedisClusterSlots_isOpen,!1,"f"),e}}nodeClient(e){return e.client??__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_createNodeClient).call(this,e)}async rediscover(e){return __classPrivateFieldSet$1(this,_RedisClusterSlots_runningRediscoverPromise,__classPrivateFieldGet$1(this,_RedisClusterSlots_runningRediscoverPromise,"f")??__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_rediscover).call(this,e).finally((()=>__classPrivateFieldSet$1(this,_RedisClusterSlots_runningRediscoverPromise,void 0,"f"))),"f"),__classPrivateFieldGet$1(this,_RedisClusterSlots_runningRediscoverPromise,"f")}quit(){return __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_destroy).call(this,(e=>e.quit()))}disconnect(){return __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_destroy).call(this,(e=>e.disconnect()))}getClient(e,t){if(!e)return this.nodeClient(this.getRandomNode());const r=calculateSlot(e);return t?this.nodeClient(this.getSlotRandomNode(r)):this.nodeClient(this.slots[r].master)}getRandomNode(){return __classPrivateFieldSet$1(this,_RedisClusterSlots_randomNodeIterator,__classPrivateFieldGet$1(this,_RedisClusterSlots_randomNodeIterator,"f")??__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_iterateAllNodes).call(this),"f"),__classPrivateFieldGet$1(this,_RedisClusterSlots_randomNodeIterator,"f").next().value}getSlotRandomNode(e){const t=this.slots[e];return t.replicas?.length?(t.nodesIterator??(t.nodesIterator=__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_slotNodesIterator).call(this,t)),t.nodesIterator.next().value):t.master}getMasterByAddress(e){const t=this.nodeByAddress.get(e);if(t)return this.nodeClient(t)}getPubSubClient(){return this.pubSubNode?this.pubSubNode.client:__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_initiatePubSubClient).call(this)}async executeUnsubscribeCommand(e){const t=await this.getPubSubClient();await e(t),!t.isPubSubActive&&t.isOpen&&(await t.disconnect(),this.pubSubNode=void 0)}getShardedPubSubClient(e){const{master:t}=this.slots[calculateSlot(e)];return t.pubSubClient??__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_initiateShardedPubSubClient).call(this,t)}async executeShardedUnsubscribeCommand(e,t){const{master:r}=this.slots[calculateSlot(e)];if(!r.pubSubClient)return Promise.resolve();const s=await r.pubSubClient;await t(s),!s.isPubSubActive&&s.isOpen&&(await s.disconnect(),r.pubSubClient=void 0)}}_a=RedisClusterSlots,_RedisClusterSlots_options=new WeakMap,_RedisClusterSlots_Client=new WeakMap,_RedisClusterSlots_emit=new WeakMap,_RedisClusterSlots_isOpen=new WeakMap,_RedisClusterSlots_runningRediscoverPromise=new WeakMap,_RedisClusterSlots_randomNodeIterator=new WeakMap,_RedisClusterSlots_instances=new WeakSet,_RedisClusterSlots_discoverWithRootNodes=async function(){let e=Math.floor(Math.random()*__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").rootNodes.length);for(let t=e;t<__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").rootNodes.length;t++)if(await __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_discover).call(this,__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").rootNodes[t]))return;for(let t=0;t<e;t++)if(await __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_discover).call(this,__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").rootNodes[t]))return;throw new errors_1.RootNodesUnavailableError},_RedisClusterSlots_resetSlots=function(){this.slots=new Array(__classPrivateFieldGet$1(_a,_a,"f",_RedisClusterSlots_SLOTS)),this.shards=[],this.masters=[],this.replicas=[],__classPrivateFieldSet$1(this,_RedisClusterSlots_randomNodeIterator,void 0,"f")},_RedisClusterSlots_discover=async function(e){__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_resetSlots).call(this);const t=new Set;try{const r=await __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_getShards).call(this,e),s=[],n=!0!==__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").minimizeConnections;for(const{from:e,to:i,master:a,replicas:o}of r){const r={master:__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_initiateSlotNode).call(this,a,!1,n,t,s)};__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").useReplicas&&(r.replicas=o.map((e=>__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_initiateSlotNode).call(this,e,!0,n,t,s)))),this.shards.push(r);for(let t=e;t<=i;t++)this.slots[t]=r}if(this.pubSubNode&&!t.has(this.pubSubNode.address))if(util_1.types.isPromise(this.pubSubNode.client))s.push(this.pubSubNode.client.then((e=>e.disconnect()))),this.pubSubNode=void 0;else{s.push(this.pubSubNode.client.disconnect());const e=this.pubSubNode.client.getPubSubListeners(pub_sub_1.PubSubType.CHANNELS),t=this.pubSubNode.client.getPubSubListeners(pub_sub_1.PubSubType.PATTERNS);(e.size||t.size)&&s.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_initiatePubSubClient).call(this,{[pub_sub_1.PubSubType.CHANNELS]:e,[pub_sub_1.PubSubType.PATTERNS]:t}))}for(const[e,r]of this.nodeByAddress.entries()){if(t.has(e))continue;r.client&&s.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_execOnNodeClient).call(this,r.client,(e=>e.disconnect())));const{pubSubClient:n}=r;n&&s.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_execOnNodeClient).call(this,n,(e=>e.disconnect()))),this.nodeByAddress.delete(e)}return await Promise.all(s),!0}catch(e){return __classPrivateFieldGet$1(this,_RedisClusterSlots_emit,"f").call(this,"error",e),!1}},_RedisClusterSlots_getShards=async function(e){const t=new(__classPrivateFieldGet$1(this,_RedisClusterSlots_Client,"f"))(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_clientOptionsDefaults).call(this,e,!0));t.on("error",(e=>__classPrivateFieldGet$1(this,_RedisClusterSlots_emit,"f").call(this,"error",e))),await t.connect();try{return await t.clusterSlots()}finally{await t.disconnect()}},_RedisClusterSlots_getNodeAddress=function(e){switch(typeof __classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").nodeAddressMap){case"object":return __classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").nodeAddressMap[e];case"function":return __classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").nodeAddressMap(e)}},_RedisClusterSlots_clientOptionsDefaults=function(e,t){let r;if(__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").defaults){let t;t=__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").defaults.socket?e?.socket?{...__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").defaults.socket,...e.socket}:__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").defaults.socket:e?.socket,r={...__classPrivateFieldGet$1(this,_RedisClusterSlots_options,"f").defaults,...e,socket:t}}else r=e;return t&&(r??(r={}),r.socket??(r.socket={}),r.socket.reconnectStrategy=!1),r},_RedisClusterSlots_initiateSlotNode=function({id:e,ip:t,port:r},s,n,i,a){const o=`${t}:${r}`;i.add(o);let c=this.nodeByAddress.get(o);return c||(c={id:e,host:t,port:r,address:o,readonly:s,client:void 0},n&&a.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_createNodeClient).call(this,c)),this.nodeByAddress.set(o,c)),(s?this.replicas:this.masters).push(c),c},_RedisClusterSlots_createClient=async function(e,t=e.readonly){const r=new(__classPrivateFieldGet$1(this,_RedisClusterSlots_Client,"f"))(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_clientOptionsDefaults).call(this,{socket:__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_getNodeAddress).call(this,e.address)??{host:e.host,port:e.port},readonly:t}));return r.on("error",(e=>__classPrivateFieldGet$1(this,_RedisClusterSlots_emit,"f").call(this,"error",e))),await r.connect(),r},_RedisClusterSlots_createNodeClient=function(e){const t=__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_createClient).call(this,e).then((t=>(e.client=t,t))).catch((t=>{throw e.client=void 0,t}));return e.client=t,t},_RedisClusterSlots_rediscover=async function(e){if(!await __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_discover).call(this,e.options))return __classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_discoverWithRootNodes).call(this)},_RedisClusterSlots_destroy=async function(e){__classPrivateFieldSet$1(this,_RedisClusterSlots_isOpen,!1,"f");const t=[];for(const{master:r,replicas:s}of this.shards)if(r.client&&t.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_execOnNodeClient).call(this,r.client,e)),r.pubSubClient&&t.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_execOnNodeClient).call(this,r.pubSubClient,e)),s)for(const{client:r}of s)r&&t.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_execOnNodeClient).call(this,r,e));this.pubSubNode&&(t.push(__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_execOnNodeClient).call(this,this.pubSubNode.client,e)),this.pubSubNode=void 0),__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_resetSlots).call(this),this.nodeByAddress.clear(),await Promise.allSettled(t)},_RedisClusterSlots_execOnNodeClient=function(e,t){return util_1.types.isPromise(e)?e.then(t):t(e)},_RedisClusterSlots_iterateAllNodes=function*(){let e=Math.floor(Math.random()*(this.masters.length+this.replicas.length));if(e<this.masters.length){do{yield this.masters[e]}while(++e<this.masters.length);for(const e of this.replicas)yield e}else{e-=this.masters.length;do{yield this.replicas[e]}while(++e<this.replicas.length)}for(;;){for(const e of this.masters)yield e;for(const e of this.replicas)yield e}},_RedisClusterSlots_slotNodesIterator=function*(e){let t=Math.floor(Math.random()*(1+e.replicas.length));if(t<e.replicas.length)do{yield e.replicas[t]}while(++t<e.replicas.length);for(;;){yield e.master;for(const t of e.replicas)yield t}},_RedisClusterSlots_initiatePubSubClient=async function(e){const t=Math.floor(Math.random()*(this.masters.length+this.replicas.length)),r=t<this.masters.length?this.masters[t]:this.replicas[t-this.masters.length];return this.pubSubNode={address:r.address,client:__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_createClient).call(this,r,!0).then((async t=>(e&&await Promise.all([t.extendPubSubListeners(pub_sub_1.PubSubType.CHANNELS,e[pub_sub_1.PubSubType.CHANNELS]),t.extendPubSubListeners(pub_sub_1.PubSubType.PATTERNS,e[pub_sub_1.PubSubType.PATTERNS])]),this.pubSubNode.client=t,t))).catch((e=>{throw this.pubSubNode=void 0,e}))},this.pubSubNode.client},_RedisClusterSlots_initiateShardedPubSubClient=function(e){const t=__classPrivateFieldGet$1(this,_RedisClusterSlots_instances,"m",_RedisClusterSlots_createClient).call(this,e,!0).then((t=>(t.on("server-sunsubscribe",(async(e,r)=>{try{await this.rediscover(t);(await this.getShardedPubSubClient(e)).extendPubSubChannelListeners(pub_sub_1.PubSubType.SHARDED,e,r)}catch(t){__classPrivateFieldGet$1(this,_RedisClusterSlots_emit,"f").call(this,"sharded-shannel-moved-error",t,e,r)}})),e.pubSubClient=t,t))).catch((t=>{throw e.pubSubClient=void 0,t}));return e.pubSubClient=t,t},_RedisClusterSlots_SLOTS={value:16384},clusterSlots.default=RedisClusterSlots;var multiCommand={},hasRequiredMultiCommand,hasRequiredCluster;function requireMultiCommand(){if(hasRequiredMultiCommand)return multiCommand;hasRequiredMultiCommand=1;var e,t,r,s=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},n=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)};Object.defineProperty(multiCommand,"__esModule",{value:!0});const i=commands$5,a=multiCommand$1,o=commander,c=requireCluster();class u{static extend(e){return(0,o.attachExtensions)({BaseClass:u,modulesExecutor:u.prototype.commandsExecutor,modules:e?.modules,functionsExecutor:u.prototype.functionsExecutor,functions:e?.functions,scriptsExecutor:u.prototype.scriptsExecutor,scripts:e?.scripts})}constructor(n,i){e.set(this,new a.default),t.set(this,void 0),r.set(this,void 0),Object.defineProperty(this,"EXEC",{enumerable:!0,configurable:!0,writable:!0,value:this.exec}),s(this,t,n,"f"),s(this,r,i,"f")}commandsExecutor(e,t){const i=e.transformArguments(...t);return s(this,r,n(this,r,"f")??c.default.extractFirstKey(e,t,i),"f"),this.addCommand(void 0,i,e.transformReply)}addCommand(t,i,a){return s(this,r,n(this,r,"f")??t,"f"),n(this,e,"f").addCommand(i,a),this}functionsExecutor(t,i,a){const o=n(this,e,"f").addFunction(a,t,i);return s(this,r,n(this,r,"f")??c.default.extractFirstKey(t,i,o),"f"),this}scriptsExecutor(t,i){const a=n(this,e,"f").addScript(t,i);return s(this,r,n(this,r,"f")??c.default.extractFirstKey(t,i,a),"f"),this}async exec(s=!1){return s?this.execAsPipeline():n(this,e,"f").handleExecReplies(await n(this,t,"f").call(this,n(this,e,"f").queue,n(this,r,"f"),a.default.generateChainId()))}async execAsPipeline(){return n(this,e,"f").transformReplies(await n(this,t,"f").call(this,n(this,e,"f").queue,n(this,r,"f")))}}return e=new WeakMap,t=new WeakMap,r=new WeakMap,multiCommand.default=u,(0,o.attachCommands)({BaseClass:u,commands:i.default,executor:u.prototype.commandsExecutor}),multiCommand}function requireCluster(){if(hasRequiredCluster)return cluster;hasRequiredCluster=1;var e,t,r,s,n,i=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},a=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r};Object.defineProperty(cluster,"__esModule",{value:!0});const o=commands$5,c=clusterSlots,u=commander,l=require$$0$5,p=requireMultiCommand(),m=errors$2;class d extends l.EventEmitter{static extractFirstKey(e,t,r){if(void 0!==e.FIRST_KEY_INDEX)return"number"==typeof e.FIRST_KEY_INDEX?r[e.FIRST_KEY_INDEX]:e.FIRST_KEY_INDEX(...t)}static create(e){return new((0,u.attachExtensions)({BaseClass:d,modulesExecutor:d.prototype.commandsExecutor,modules:e?.modules,functionsExecutor:d.prototype.functionsExecutor,functions:e?.functions,scriptsExecutor:d.prototype.scriptsExecutor,scripts:e?.scripts}))(e)}get slots(){return i(this,r,"f").slots}get shards(){return i(this,r,"f").shards}get masters(){return i(this,r,"f").masters}get replicas(){return i(this,r,"f").replicas}get nodeByAddress(){return i(this,r,"f").nodeByAddress}get pubSubNode(){return i(this,r,"f").pubSubNode}get isOpen(){return i(this,r,"f").isOpen}constructor(n){super(),e.add(this),t.set(this,void 0),r.set(this,void 0),s.set(this,void 0),Object.defineProperty(this,"multi",{enumerable:!0,configurable:!0,writable:!0,value:this.MULTI}),Object.defineProperty(this,"subscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.SUBSCRIBE}),Object.defineProperty(this,"unsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.UNSUBSCRIBE}),Object.defineProperty(this,"pSubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.PSUBSCRIBE}),Object.defineProperty(this,"pUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.PUNSUBSCRIBE}),Object.defineProperty(this,"sSubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.SSUBSCRIBE}),Object.defineProperty(this,"sUnsubscribe",{enumerable:!0,configurable:!0,writable:!0,value:this.SUNSUBSCRIBE}),a(this,t,n,"f"),a(this,r,new c.default(n,this.emit.bind(this)),"f"),a(this,s,p.default.extend(n),"f")}duplicate(e){return new(Object.getPrototypeOf(this).constructor)({...i(this,t,"f"),...e})}connect(){return i(this,r,"f").connect()}async commandsExecutor(e,t){const{jsArgs:r,args:s,options:n}=(0,u.transformCommandArguments)(e,t);return(0,u.transformCommandReply)(e,await this.sendCommand(d.extractFirstKey(e,r,s),e.IS_READ_ONLY,s,n),s.preserve)}async sendCommand(t,r,s,a){return i(this,e,"m",n).call(this,t,r,(e=>e.sendCommand(s,a)))}async functionsExecutor(e,t,r){const{args:s,options:n}=(0,u.transformCommandArguments)(e,t);return(0,u.transformCommandReply)(e,await this.executeFunction(r,e,t,s,n),s.preserve)}async executeFunction(t,r,s,a,o){return i(this,e,"m",n).call(this,d.extractFirstKey(r,s,a),r.IS_READ_ONLY,(e=>e.executeFunction(t,r,a,o)))}async scriptsExecutor(e,t){const{args:r,options:s}=(0,u.transformCommandArguments)(e,t);return(0,u.transformCommandReply)(e,await this.executeScript(e,t,r,s),r.preserve)}async executeScript(t,r,s,a){return i(this,e,"m",n).call(this,d.extractFirstKey(t,r,s),t.IS_READ_ONLY,(e=>e.executeScript(t,s,a)))}MULTI(t){return new(i(this,s,"f"))(((t,r,s)=>i(this,e,"m",n).call(this,r,!1,(e=>e.multiExecutor(t,void 0,s)))),t)}async SUBSCRIBE(e,t,s){return(await i(this,r,"f").getPubSubClient()).SUBSCRIBE(e,t,s)}async UNSUBSCRIBE(e,t,s){return i(this,r,"f").executeUnsubscribeCommand((r=>r.UNSUBSCRIBE(e,t,s)))}async PSUBSCRIBE(e,t,s){return(await i(this,r,"f").getPubSubClient()).PSUBSCRIBE(e,t,s)}async PUNSUBSCRIBE(e,t,s){return i(this,r,"f").executeUnsubscribeCommand((r=>r.PUNSUBSCRIBE(e,t,s)))}async SSUBSCRIBE(e,s,n){const a=i(this,t,"f").maxCommandRedirections??16,o=Array.isArray(e)?e[0]:e;let c=await i(this,r,"f").getShardedPubSubClient(o);for(let t=0;;t++)try{return await c.SSUBSCRIBE(e,s,n)}catch(e){if(++t>a||!(e instanceof m.ErrorReply))throw e;if(e.message.startsWith("MOVED")){await i(this,r,"f").rediscover(c),c=await i(this,r,"f").getShardedPubSubClient(o);continue}throw e}}SUNSUBSCRIBE(e,t,s){return i(this,r,"f").executeShardedUnsubscribeCommand(Array.isArray(e)?e[0]:e,(r=>r.SUNSUBSCRIBE(e,t,s)))}quit(){return i(this,r,"f").quit()}disconnect(){return i(this,r,"f").disconnect()}nodeClient(e){return i(this,r,"f").nodeClient(e)}getRandomNode(){return i(this,r,"f").getRandomNode()}getSlotRandomNode(e){return i(this,r,"f").getSlotRandomNode(e)}getMasters(){return this.masters}getSlotMaster(e){return this.slots[e].master}}return t=new WeakMap,r=new WeakMap,s=new WeakMap,e=new WeakSet,n=async function(e,s,n){const a=i(this,t,"f").maxCommandRedirections??16;let o=await i(this,r,"f").getClient(e,s);for(let t=0;;t++)try{return await n(o)}catch(n){if(++t>a||!(n instanceof m.ErrorReply))throw n;if(n.message.startsWith("ASK")){const e=n.message.substring(n.message.lastIndexOf(" ")+1);let t=await i(this,r,"f").getMasterByAddress(e);if(t||(await i(this,r,"f").rediscover(o),t=await i(this,r,"f").getMasterByAddress(e)),!t)throw new Error(`Cannot find node ${e}`);await t.asking(),o=t;continue}if(n.message.startsWith("MOVED")){await i(this,r,"f").rediscover(o),o=await i(this,r,"f").getClient(e,s);continue}throw n}},cluster.default=d,(0,u.attachCommands)({BaseClass:d,commands:o.default,executor:d.prototype.commandsExecutor}),cluster}var luaScript={};Object.defineProperty(luaScript,"__esModule",{value:!0}),luaScript.scriptSha1=luaScript.defineScript=void 0;const crypto_1=require$$0$3;function defineScript(e){return{...e,SHA1:scriptSha1(e.SCRIPT)}}function scriptSha1(e){return(0,crypto_1.createHash)("sha1").update(e).digest("hex")}luaScript.defineScript=defineScript,luaScript.scriptSha1=scriptSha1,function(e){var t=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),r=commonjsGlobal&&commonjsGlobal.__exportStar||function(e,r){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(r,s)||t(r,e,s)};Object.defineProperty(e,"__esModule",{value:!0}),e.RedisFlushModes=e.GeoReplyWith=e.defineScript=e.createCluster=e.commandOptions=e.createClient=void 0;const s=client,n=requireCluster();e.createClient=s.default.create,e.commandOptions=s.default.commandOptions,e.createCluster=n.default.create;var i=luaScript;Object.defineProperty(e,"defineScript",{enumerable:!0,get:function(){return i.defineScript}}),r(errors$2,e);var a=genericTransformers;Object.defineProperty(e,"GeoReplyWith",{enumerable:!0,get:function(){return a.GeoReplyWith}});var o=FLUSHALL$1;Object.defineProperty(e,"RedisFlushModes",{enumerable:!0,get:function(){return o.RedisFlushModes}})}(dist$5);var dist$4={},commands$4={},bloom={},ADD$6={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["BF.ADD",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(ADD$6);var CARD$1={};function transformArguments$15(e){return["BF.CARD",e]}Object.defineProperty(CARD$1,"__esModule",{value:!0}),CARD$1.transformArguments=CARD$1.IS_READ_ONLY=CARD$1.FIRST_KEY_INDEX=void 0,CARD$1.FIRST_KEY_INDEX=1,CARD$1.IS_READ_ONLY=!0,CARD$1.transformArguments=transformArguments$15;var EXISTS$2={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){return["BF.EXISTS",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(EXISTS$2);var INFO$9={};function transformArguments$14(e){return["BF.INFO",e]}function transformReply$c(e){return{capacity:e[1],size:e[3],numberOfFilters:e[5],numberOfInsertedItems:e[7],expansionRate:e[9]}}Object.defineProperty(INFO$9,"__esModule",{value:!0}),INFO$9.transformReply=INFO$9.transformArguments=INFO$9.IS_READ_ONLY=INFO$9.FIRST_KEY_INDEX=void 0,INFO$9.FIRST_KEY_INDEX=1,INFO$9.IS_READ_ONLY=!0,INFO$9.transformArguments=transformArguments$14,INFO$9.transformReply=transformReply$c;var INSERT$2={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){const n=["BF.INSERT",e];return s?.CAPACITY&&n.push("CAPACITY",s.CAPACITY.toString()),s?.ERROR&&n.push("ERROR",s.ERROR.toString()),s?.EXPANSION&&n.push("EXPANSION",s.EXPANSION.toString()),s?.NOCREATE&&n.push("NOCREATE"),s?.NONSCALING&&n.push("NONSCALING"),n.push("ITEMS"),(0,t.pushVerdictArguments)(n,r)};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanArrayReply}})}(INSERT$2);var LOADCHUNK$2={};function transformArguments$13(e,t,r){return["BF.LOADCHUNK",e,t.toString(),r]}Object.defineProperty(LOADCHUNK$2,"__esModule",{value:!0}),LOADCHUNK$2.transformArguments=LOADCHUNK$2.FIRST_KEY_INDEX=void 0,LOADCHUNK$2.FIRST_KEY_INDEX=1,LOADCHUNK$2.transformArguments=transformArguments$13;var MADD$2={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["BF.MADD",e,...t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanArrayReply}})}(MADD$2);var MEXISTS$1={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){return["BF.MEXISTS",e,...t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanArrayReply}})}(MEXISTS$1);var RESERVE$4={};function transformArguments$12(e,t,r,s){const n=["BF.RESERVE",e,t.toString(),r.toString()];return s?.EXPANSION&&n.push("EXPANSION",s.EXPANSION.toString()),s?.NONSCALING&&n.push("NONSCALING"),n}Object.defineProperty(RESERVE$4,"__esModule",{value:!0}),RESERVE$4.transformArguments=RESERVE$4.FIRST_KEY_INDEX=void 0,RESERVE$4.FIRST_KEY_INDEX=1,RESERVE$4.transformArguments=transformArguments$12;var SCANDUMP$2={};function transformArguments$11(e,t){return["BF.SCANDUMP",e,t.toString()]}function transformReply$b([e,t]){return{iterator:e,chunk:t}}Object.defineProperty(SCANDUMP$2,"__esModule",{value:!0}),SCANDUMP$2.transformReply=SCANDUMP$2.transformArguments=SCANDUMP$2.IS_READ_ONLY=SCANDUMP$2.FIRST_KEY_INDEX=void 0,SCANDUMP$2.FIRST_KEY_INDEX=1,SCANDUMP$2.IS_READ_ONLY=!0,SCANDUMP$2.transformArguments=transformArguments$11,SCANDUMP$2.transformReply=transformReply$b,Object.defineProperty(bloom,"__esModule",{value:!0});const ADD$5=ADD$6,CARD=CARD$1,EXISTS$1=EXISTS$2,INFO$8=INFO$9,INSERT$1=INSERT$2,LOADCHUNK$1=LOADCHUNK$2,MADD$1=MADD$2,MEXISTS=MEXISTS$1,RESERVE$3=RESERVE$4,SCANDUMP$1=SCANDUMP$2;bloom.default={ADD:ADD$5,add:ADD$5,CARD:CARD,card:CARD,EXISTS:EXISTS$1,exists:EXISTS$1,INFO:INFO$8,info:INFO$8,INSERT:INSERT$1,insert:INSERT$1,LOADCHUNK:LOADCHUNK$1,loadChunk:LOADCHUNK$1,MADD:MADD$1,mAdd:MADD$1,MEXISTS:MEXISTS,mExists:MEXISTS,RESERVE:RESERVE$3,reserve:RESERVE$3,SCANDUMP:SCANDUMP$1,scanDump:SCANDUMP$1};var countMinSketch={},INCRBY$4={};function transformArguments$10(e,t){const r=["CMS.INCRBY",e];if(Array.isArray(t))for(const e of t)pushIncrByItem$1(r,e);else pushIncrByItem$1(r,t);return r}function pushIncrByItem$1(e,{item:t,incrementBy:r}){e.push(t,r.toString())}Object.defineProperty(INCRBY$4,"__esModule",{value:!0}),INCRBY$4.transformArguments=INCRBY$4.FIRST_KEY_INDEX=void 0,INCRBY$4.FIRST_KEY_INDEX=1,INCRBY$4.transformArguments=transformArguments$10;var INFO$7={};function transformArguments$$(e){return["CMS.INFO",e]}function transformReply$a(e){return{width:e[1],depth:e[3],count:e[5]}}Object.defineProperty(INFO$7,"__esModule",{value:!0}),INFO$7.transformReply=INFO$7.transformArguments=INFO$7.IS_READ_ONLY=INFO$7.FIRST_KEY_INDEX=void 0,INFO$7.FIRST_KEY_INDEX=1,INFO$7.IS_READ_ONLY=!0,INFO$7.transformArguments=transformArguments$$,INFO$7.transformReply=transformReply$a;var INITBYDIM$1={};function transformArguments$_(e,t,r){return["CMS.INITBYDIM",e,t.toString(),r.toString()]}Object.defineProperty(INITBYDIM$1,"__esModule",{value:!0}),INITBYDIM$1.transformArguments=INITBYDIM$1.FIRST_KEY_INDEX=void 0,INITBYDIM$1.FIRST_KEY_INDEX=1,INITBYDIM$1.transformArguments=transformArguments$_;var INITBYPROB$1={};function transformArguments$Z(e,t,r){return["CMS.INITBYPROB",e,t.toString(),r.toString()]}Object.defineProperty(INITBYPROB$1,"__esModule",{value:!0}),INITBYPROB$1.transformArguments=INITBYPROB$1.FIRST_KEY_INDEX=void 0,INITBYPROB$1.FIRST_KEY_INDEX=1,INITBYPROB$1.transformArguments=transformArguments$Z;var MERGE$3={};function transformArguments$Y(e,t){const r=["CMS.MERGE",e,t.length.toString()];if(isStringSketches(t))r.push(...t);else{for(const e of t)r.push(e.name);r.push("WEIGHTS");for(const e of t)r.push(e.weight.toString())}return r}function isStringSketches(e){return"string"==typeof e[0]}Object.defineProperty(MERGE$3,"__esModule",{value:!0}),MERGE$3.transformArguments=MERGE$3.FIRST_KEY_INDEX=void 0,MERGE$3.FIRST_KEY_INDEX=1,MERGE$3.transformArguments=transformArguments$Y;var QUERY$4={};Object.defineProperty(QUERY$4,"__esModule",{value:!0}),QUERY$4.transformArguments=QUERY$4.IS_READ_ONLY=QUERY$4.FIRST_KEY_INDEX=void 0;const generic_transformers_1$8=genericTransformers;function transformArguments$X(e,t){return(0,generic_transformers_1$8.pushVerdictArguments)(["CMS.QUERY",e],t)}QUERY$4.FIRST_KEY_INDEX=1,QUERY$4.IS_READ_ONLY=!0,QUERY$4.transformArguments=transformArguments$X,Object.defineProperty(countMinSketch,"__esModule",{value:!0});const INCRBY$3=INCRBY$4,INFO$6=INFO$7,INITBYDIM=INITBYDIM$1,INITBYPROB=INITBYPROB$1,MERGE$2=MERGE$3,QUERY$3=QUERY$4;countMinSketch.default={INCRBY:INCRBY$3,incrBy:INCRBY$3,INFO:INFO$6,info:INFO$6,INITBYDIM:INITBYDIM,initByDim:INITBYDIM,INITBYPROB:INITBYPROB,initByProb:INITBYPROB,MERGE:MERGE$2,merge:MERGE$2,QUERY:QUERY$3,query:QUERY$3};var cuckoo={},ADD$4={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["CF.ADD",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(ADD$4);var ADDNX={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["CF.ADDNX",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(ADDNX);var COUNT$2={};function transformArguments$W(e,t){return["CF.COUNT",e,t]}Object.defineProperty(COUNT$2,"__esModule",{value:!0}),COUNT$2.transformArguments=COUNT$2.FIRST_KEY_INDEX=void 0,COUNT$2.FIRST_KEY_INDEX=1,COUNT$2.transformArguments=transformArguments$W;var DEL$2={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t){return["CF.DEL",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(DEL$2);var EXISTS={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){return["CF.EXISTS",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(EXISTS);var INFO$5={};function transformArguments$V(e){return["CF.INFO",e]}function transformReply$9(e){return{size:e[1],numberOfBuckets:e[3],numberOfFilters:e[5],numberOfInsertedItems:e[7],numberOfDeletedItems:e[9],bucketSize:e[11],expansionRate:e[13],maxIteration:e[15]}}Object.defineProperty(INFO$5,"__esModule",{value:!0}),INFO$5.transformReply=INFO$5.transformArguments=INFO$5.IS_READ_ONLY=INFO$5.FIRST_KEY_INDEX=void 0,INFO$5.FIRST_KEY_INDEX=1,INFO$5.IS_READ_ONLY=!0,INFO$5.transformArguments=transformArguments$V,INFO$5.transformReply=transformReply$9;var INSERT={},hasRequiredINSERT;function requireINSERT(){return hasRequiredINSERT||(hasRequiredINSERT=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=requireCuckoo();e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){return(0,t.pushInsertOptions)(["CF.INSERT",e],r,s)};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanArrayReply}})}(INSERT)),INSERT}var INSERTNX={},hasRequiredINSERTNX;function requireINSERTNX(){return hasRequiredINSERTNX||(hasRequiredINSERTNX=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0;const t=requireCuckoo();e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,r,s){return(0,t.pushInsertOptions)(["CF.INSERTNX",e],r,s)};var r=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformBooleanArrayReply}})}(INSERTNX)),INSERTNX}var LOADCHUNK={};function transformArguments$U(e,t,r){return["CF.LOADCHUNK",e,t.toString(),r]}Object.defineProperty(LOADCHUNK,"__esModule",{value:!0}),LOADCHUNK.transformArguments=LOADCHUNK.FIRST_KEY_INDEX=void 0,LOADCHUNK.FIRST_KEY_INDEX=1,LOADCHUNK.transformArguments=transformArguments$U;var RESERVE$2={};function transformArguments$T(e,t,r){const s=["CF.RESERVE",e,t.toString()];return r?.BUCKETSIZE&&s.push("BUCKETSIZE",r.BUCKETSIZE.toString()),r?.MAXITERATIONS&&s.push("MAXITERATIONS",r.MAXITERATIONS.toString()),r?.EXPANSION&&s.push("EXPANSION",r.EXPANSION.toString()),s}Object.defineProperty(RESERVE$2,"__esModule",{value:!0}),RESERVE$2.transformArguments=RESERVE$2.FIRST_KEY_INDEX=void 0,RESERVE$2.FIRST_KEY_INDEX=1,RESERVE$2.transformArguments=transformArguments$T;var SCANDUMP={},hasRequiredCuckoo;function transformArguments$S(e,t){return["CF.SCANDUMP",e,t.toString()]}function transformReply$8([e,t]){return{iterator:e,chunk:t}}function requireCuckoo(){if(hasRequiredCuckoo)return cuckoo;hasRequiredCuckoo=1,Object.defineProperty(cuckoo,"__esModule",{value:!0}),cuckoo.pushInsertOptions=void 0;const e=ADD$4,t=ADDNX,r=COUNT$2,s=DEL$2,n=EXISTS,i=INFO$5,a=requireINSERT(),o=requireINSERTNX(),c=LOADCHUNK,u=RESERVE$2,l=SCANDUMP,p=genericTransformers;return cuckoo.default={ADD:e,add:e,ADDNX:t,addNX:t,COUNT:r,count:r,DEL:s,del:s,EXISTS:n,exists:n,INFO:i,info:i,INSERT:a,insert:a,INSERTNX:o,insertNX:o,LOADCHUNK:c,loadChunk:c,RESERVE:u,reserve:u,SCANDUMP:l,scanDump:l},cuckoo.pushInsertOptions=function(e,t,r){return r?.CAPACITY&&(e.push("CAPACITY"),e.push(r.CAPACITY.toString())),r?.NOCREATE&&e.push("NOCREATE"),e.push("ITEMS"),(0,p.pushVerdictArguments)(e,t)},cuckoo}Object.defineProperty(SCANDUMP,"__esModule",{value:!0}),SCANDUMP.transformReply=SCANDUMP.transformArguments=SCANDUMP.FIRST_KEY_INDEX=void 0,SCANDUMP.FIRST_KEY_INDEX=1,SCANDUMP.transformArguments=transformArguments$S,SCANDUMP.transformReply=transformReply$8;var tDigest={},ADD$3={};function transformArguments$R(e,t){const r=["TDIGEST.ADD",e];for(const e of t)r.push(e.toString());return r}Object.defineProperty(ADD$3,"__esModule",{value:!0}),ADD$3.transformArguments=ADD$3.FIRST_KEY_INDEX=void 0,ADD$3.FIRST_KEY_INDEX=1,ADD$3.transformArguments=transformArguments$R;var BYRANK={},hasRequiredBYRANK;function requireBYRANK(){return hasRequiredBYRANK||(hasRequiredBYRANK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){const r=["TDIGEST.BYRANK",e];for(const e of t)r.push(e.toString());return r};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoublesReply}})}(BYRANK)),BYRANK}var BYREVRANK={},hasRequiredBYREVRANK;function requireBYREVRANK(){return hasRequiredBYREVRANK||(hasRequiredBYREVRANK=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){const r=["TDIGEST.BYREVRANK",e];for(const e of t)r.push(e.toString());return r};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoublesReply}})}(BYREVRANK)),BYREVRANK}var CDF={},hasRequiredCDF;function requireCDF(){return hasRequiredCDF||(hasRequiredCDF=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){const r=["TDIGEST.CDF",e];for(const e of t)r.push(e.toString());return r};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoublesReply}})}(CDF)),CDF}var CREATE$2={},hasRequiredCREATE$2;function requireCREATE$2(){if(hasRequiredCREATE$2)return CREATE$2;hasRequiredCREATE$2=1,Object.defineProperty(CREATE$2,"__esModule",{value:!0}),CREATE$2.transformArguments=CREATE$2.FIRST_KEY_INDEX=void 0;const e=requireTDigest();return CREATE$2.FIRST_KEY_INDEX=1,CREATE$2.transformArguments=function(t,r){return(0,e.pushCompressionArgument)(["TDIGEST.CREATE",t],r)},CREATE$2}var INFO$4={};function transformArguments$Q(e){return["TDIGEST.INFO",e]}function transformReply$7(e){return{comperssion:e[1],capacity:e[3],mergedNodes:e[5],unmergedNodes:e[7],mergedWeight:Number(e[9]),unmergedWeight:Number(e[11]),totalCompression:e[13]}}Object.defineProperty(INFO$4,"__esModule",{value:!0}),INFO$4.transformReply=INFO$4.transformArguments=INFO$4.IS_READ_ONLY=INFO$4.FIRST_KEY_INDEX=void 0,INFO$4.FIRST_KEY_INDEX=1,INFO$4.IS_READ_ONLY=!0,INFO$4.transformArguments=transformArguments$Q,INFO$4.transformReply=transformReply$7;var MAX={},hasRequiredMAX;function requireMAX(){return hasRequiredMAX||(hasRequiredMAX=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e){return["TDIGEST.MAX",e]};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoubleReply}})}(MAX)),MAX}var MERGE$1={},hasRequiredMERGE$1;function requireMERGE$1(){if(hasRequiredMERGE$1)return MERGE$1;hasRequiredMERGE$1=1,Object.defineProperty(MERGE$1,"__esModule",{value:!0}),MERGE$1.transformArguments=MERGE$1.FIRST_KEY_INDEX=void 0;const e=genericTransformers,t=requireTDigest();return MERGE$1.FIRST_KEY_INDEX=1,MERGE$1.transformArguments=function(r,s,n){const i=(0,e.pushVerdictArgument)(["TDIGEST.MERGE",r],s);return(0,t.pushCompressionArgument)(i,n),n?.OVERRIDE&&i.push("OVERRIDE"),i},MERGE$1}var MIN={},hasRequiredMIN;function requireMIN(){return hasRequiredMIN||(hasRequiredMIN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e){return["TDIGEST.MIN",e]};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoubleReply}})}(MIN)),MIN}var QUANTILE={},hasRequiredQUANTILE;function requireQUANTILE(){return hasRequiredQUANTILE||(hasRequiredQUANTILE=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t){const r=["TDIGEST.QUANTILE",e];for(const e of t)r.push(e.toString());return r};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoublesReply}})}(QUANTILE)),QUANTILE}var RANK={};function transformArguments$P(e,t){const r=["TDIGEST.RANK",e];for(const e of t)r.push(e.toString());return r}Object.defineProperty(RANK,"__esModule",{value:!0}),RANK.transformArguments=RANK.IS_READ_ONLY=RANK.FIRST_KEY_INDEX=void 0,RANK.FIRST_KEY_INDEX=1,RANK.IS_READ_ONLY=!0,RANK.transformArguments=transformArguments$P;var RESET={};function transformArguments$O(e){return["TDIGEST.RESET",e]}Object.defineProperty(RESET,"__esModule",{value:!0}),RESET.transformArguments=RESET.FIRST_KEY_INDEX=void 0,RESET.FIRST_KEY_INDEX=1,RESET.transformArguments=transformArguments$O;var REVRANK={};function transformArguments$N(e,t){const r=["TDIGEST.REVRANK",e];for(const e of t)r.push(e.toString());return r}Object.defineProperty(REVRANK,"__esModule",{value:!0}),REVRANK.transformArguments=REVRANK.IS_READ_ONLY=REVRANK.FIRST_KEY_INDEX=void 0,REVRANK.FIRST_KEY_INDEX=1,REVRANK.IS_READ_ONLY=!0,REVRANK.transformArguments=transformArguments$N;var TRIMMED_MEAN={},hasRequiredTRIMMED_MEAN,hasRequiredTDigest;function requireTRIMMED_MEAN(){return hasRequiredTRIMMED_MEAN||(hasRequiredTRIMMED_MEAN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t,r){return["TDIGEST.TRIMMED_MEAN",e,t.toString(),r.toString()]};var t=requireTDigest();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformDoubleReply}})}(TRIMMED_MEAN)),TRIMMED_MEAN}function requireTDigest(){if(hasRequiredTDigest)return tDigest;hasRequiredTDigest=1,Object.defineProperty(tDigest,"__esModule",{value:!0}),tDigest.transformDoublesReply=tDigest.transformDoubleReply=tDigest.pushCompressionArgument=void 0;const e=ADD$3,t=requireBYRANK(),r=requireBYREVRANK(),s=requireCDF(),n=requireCREATE$2(),i=INFO$4,a=requireMAX(),o=requireMERGE$1(),c=requireMIN(),u=requireQUANTILE(),l=RANK,p=RESET,m=REVRANK,d=requireTRIMMED_MEAN();function f(e){switch(e){case"inf":return 1/0;case"-inf":return-1/0;case"nan":return NaN;default:return parseFloat(e)}}return tDigest.default={ADD:e,add:e,BYRANK:t,byRank:t,BYREVRANK:r,byRevRank:r,CDF:s,cdf:s,CREATE:n,create:n,INFO:i,info:i,MAX:a,max:a,MERGE:o,merge:o,MIN:c,min:c,QUANTILE:u,quantile:u,RANK:l,rank:l,RESET:p,reset:p,REVRANK:m,revRank:m,TRIMMED_MEAN:d,trimmedMean:d},tDigest.pushCompressionArgument=function(e,t){return t?.COMPRESSION&&e.push("COMPRESSION",t.COMPRESSION.toString()),e},tDigest.transformDoubleReply=f,tDigest.transformDoublesReply=function(e){return e.map(f)},tDigest}var topK={},ADD$2={};Object.defineProperty(ADD$2,"__esModule",{value:!0}),ADD$2.transformArguments=ADD$2.FIRST_KEY_INDEX=void 0;const generic_transformers_1$7=genericTransformers;function transformArguments$M(e,t){return(0,generic_transformers_1$7.pushVerdictArguments)(["TOPK.ADD",e],t)}ADD$2.FIRST_KEY_INDEX=1,ADD$2.transformArguments=transformArguments$M;var COUNT$1={};Object.defineProperty(COUNT$1,"__esModule",{value:!0}),COUNT$1.transformArguments=COUNT$1.IS_READ_ONLY=COUNT$1.FIRST_KEY_INDEX=void 0;const generic_transformers_1$6=genericTransformers;function transformArguments$L(e,t){return(0,generic_transformers_1$6.pushVerdictArguments)(["TOPK.COUNT",e],t)}COUNT$1.FIRST_KEY_INDEX=1,COUNT$1.IS_READ_ONLY=!0,COUNT$1.transformArguments=transformArguments$L;var INCRBY$2={};function transformArguments$K(e,t){const r=["TOPK.INCRBY",e];if(Array.isArray(t))for(const e of t)pushIncrByItem(r,e);else pushIncrByItem(r,t);return r}function pushIncrByItem(e,{item:t,incrementBy:r}){e.push(t,r.toString())}Object.defineProperty(INCRBY$2,"__esModule",{value:!0}),INCRBY$2.transformArguments=INCRBY$2.FIRST_KEY_INDEX=void 0,INCRBY$2.FIRST_KEY_INDEX=1,INCRBY$2.transformArguments=transformArguments$K;var INFO$3={};function transformArguments$J(e){return["TOPK.INFO",e]}function transformReply$6(e){return{k:e[1],width:e[3],depth:e[5],decay:Number(e[7])}}Object.defineProperty(INFO$3,"__esModule",{value:!0}),INFO$3.transformReply=INFO$3.transformArguments=INFO$3.IS_READ_ONLY=INFO$3.FIRST_KEY_INDEX=void 0,INFO$3.FIRST_KEY_INDEX=1,INFO$3.IS_READ_ONLY=!0,INFO$3.transformArguments=transformArguments$J,INFO$3.transformReply=transformReply$6;var LIST_WITHCOUNT$1={};function transformArguments$I(e){return["TOPK.LIST",e,"WITHCOUNT"]}function transformReply$5(e){const t=[];for(let r=0;r<e.length;r++)t.push({item:e[r],count:e[++r]});return t}Object.defineProperty(LIST_WITHCOUNT$1,"__esModule",{value:!0}),LIST_WITHCOUNT$1.transformReply=LIST_WITHCOUNT$1.transformArguments=LIST_WITHCOUNT$1.IS_READ_ONLY=LIST_WITHCOUNT$1.FIRST_KEY_INDEX=void 0,LIST_WITHCOUNT$1.FIRST_KEY_INDEX=1,LIST_WITHCOUNT$1.IS_READ_ONLY=!0,LIST_WITHCOUNT$1.transformArguments=transformArguments$I,LIST_WITHCOUNT$1.transformReply=transformReply$5;var LIST$2={};function transformArguments$H(e){return["TOPK.LIST",e]}Object.defineProperty(LIST$2,"__esModule",{value:!0}),LIST$2.transformArguments=LIST$2.IS_READ_ONLY=LIST$2.FIRST_KEY_INDEX=void 0,LIST$2.FIRST_KEY_INDEX=1,LIST$2.IS_READ_ONLY=!0,LIST$2.transformArguments=transformArguments$H;var QUERY$2={};Object.defineProperty(QUERY$2,"__esModule",{value:!0}),QUERY$2.transformArguments=QUERY$2.IS_READ_ONLY=QUERY$2.FIRST_KEY_INDEX=void 0;const generic_transformers_1$5=genericTransformers;function transformArguments$G(e,t){return(0,generic_transformers_1$5.pushVerdictArguments)(["TOPK.QUERY",e],t)}QUERY$2.FIRST_KEY_INDEX=1,QUERY$2.IS_READ_ONLY=!0,QUERY$2.transformArguments=transformArguments$G;var RESERVE$1={};function transformArguments$F(e,t,r){const s=["TOPK.RESERVE",e,t.toString()];return r&&s.push(r.width.toString(),r.depth.toString(),r.decay.toString()),s}Object.defineProperty(RESERVE$1,"__esModule",{value:!0}),RESERVE$1.transformArguments=RESERVE$1.IS_READ_ONLY=RESERVE$1.FIRST_KEY_INDEX=void 0,RESERVE$1.FIRST_KEY_INDEX=1,RESERVE$1.IS_READ_ONLY=!0,RESERVE$1.transformArguments=transformArguments$F,Object.defineProperty(topK,"__esModule",{value:!0});const ADD$1=ADD$2,COUNT=COUNT$1,INCRBY$1=INCRBY$2,INFO$2=INFO$3,LIST_WITHCOUNT=LIST_WITHCOUNT$1,LIST$1=LIST$2,QUERY$1=QUERY$2,RESERVE=RESERVE$1;topK.default={ADD:ADD$1,add:ADD$1,COUNT:COUNT,count:COUNT,INCRBY:INCRBY$1,incrBy:INCRBY$1,INFO:INFO$2,info:INFO$2,LIST_WITHCOUNT:LIST_WITHCOUNT,listWithCount:LIST_WITHCOUNT,LIST:LIST$1,list:LIST$1,QUERY:QUERY$1,query:QUERY$1,RESERVE:RESERVE,reserve:RESERVE},Object.defineProperty(commands$4,"__esModule",{value:!0});const bloom_1=bloom,count_min_sketch_1=countMinSketch,cuckoo_1=requireCuckoo(),t_digest_1=requireTDigest(),top_k_1=topK;commands$4.default={bf:bloom_1.default,cms:count_min_sketch_1.default,cf:cuckoo_1.default,tDigest:t_digest_1.default,topK:top_k_1.default},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=commands$4;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}(dist$4);var dist$3={},commands$3={},CONFIG_GET$1={};function transformArguments$E(e){return["GRAPH.CONFIG","GET",e]}Object.defineProperty(CONFIG_GET$1,"__esModule",{value:!0}),CONFIG_GET$1.transformArguments=CONFIG_GET$1.IS_READ_ONLY=void 0,CONFIG_GET$1.IS_READ_ONLY=!0,CONFIG_GET$1.transformArguments=transformArguments$E;var CONFIG_SET$1={};function transformArguments$D(e,t){return["GRAPH.CONFIG","SET",e,t.toString()]}Object.defineProperty(CONFIG_SET$1,"__esModule",{value:!0}),CONFIG_SET$1.transformArguments=void 0,CONFIG_SET$1.transformArguments=transformArguments$D;var DELETE={};function transformArguments$C(e){return["GRAPH.DELETE",e]}Object.defineProperty(DELETE,"__esModule",{value:!0}),DELETE.transformArguments=DELETE.FIRST_KEY_INDEX=void 0,DELETE.FIRST_KEY_INDEX=1,DELETE.transformArguments=transformArguments$C;var EXPLAIN$1={};function transformArguments$B(e,t){return["GRAPH.EXPLAIN",e,t]}Object.defineProperty(EXPLAIN$1,"__esModule",{value:!0}),EXPLAIN$1.transformArguments=EXPLAIN$1.IS_READ_ONLY=EXPLAIN$1.FIRST_KEY_INDEX=void 0,EXPLAIN$1.FIRST_KEY_INDEX=1,EXPLAIN$1.IS_READ_ONLY=!0,EXPLAIN$1.transformArguments=transformArguments$B;var LIST={};function transformArguments$A(){return["GRAPH.LIST"]}Object.defineProperty(LIST,"__esModule",{value:!0}),LIST.transformArguments=LIST.IS_READ_ONLY=void 0,LIST.IS_READ_ONLY=!0,LIST.transformArguments=transformArguments$A;var PROFILE={};function transformArguments$z(e,t){return["GRAPH.PROFILE",e,t]}Object.defineProperty(PROFILE,"__esModule",{value:!0}),PROFILE.transformArguments=PROFILE.IS_READ_ONLY=PROFILE.FIRST_KEY_INDEX=void 0,PROFILE.FIRST_KEY_INDEX=1,PROFILE.IS_READ_ONLY=!0,PROFILE.transformArguments=transformArguments$z;var QUERY={},hasRequiredQUERY;function requireQUERY(){if(hasRequiredQUERY)return QUERY;hasRequiredQUERY=1,Object.defineProperty(QUERY,"__esModule",{value:!0}),QUERY.transformReply=QUERY.transformArguments=QUERY.FIRST_KEY_INDEX=void 0;const e=requireCommands$3();return QUERY.FIRST_KEY_INDEX=1,QUERY.transformArguments=function(t,r,s,n){return(0,e.pushQueryArguments)(["GRAPH.QUERY"],t,r,s,n)},QUERY.transformReply=function(e){return 1===e.length?{headers:void 0,data:void 0,metadata:e[0]}:{headers:e[0],data:e[1],metadata:e[2]}},QUERY}var RO_QUERY={},hasRequiredRO_QUERY;function requireRO_QUERY(){return hasRequiredRO_QUERY||(hasRequiredRO_QUERY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=requireCommands$3();var r=requireQUERY();Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.IS_READ_ONLY=!0,e.transformArguments=function(e,r,s,n){return(0,t.pushQueryArguments)(["GRAPH.RO_QUERY"],e,r,s,n)};var s=requireQUERY();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return s.transformReply}})}(RO_QUERY)),RO_QUERY}var SLOWLOG={},hasRequiredCommands$3;function transformArguments$y(e){return["GRAPH.SLOWLOG",e]}function transformReply$4(e){return e.map((([e,t,r,s])=>({timestamp:new Date(1e3*Number(e)),command:t,query:r,took:Number(s)})))}function requireCommands$3(){if(hasRequiredCommands$3)return commands$3;hasRequiredCommands$3=1,Object.defineProperty(commands$3,"__esModule",{value:!0}),commands$3.pushQueryArguments=void 0;const e=CONFIG_GET$1,t=CONFIG_SET$1,r=DELETE,s=EXPLAIN$1,n=LIST,i=PROFILE,a=requireQUERY(),o=requireRO_QUERY(),c=SLOWLOG;function u(e,t){e.push("TIMEOUT",t.toString())}function l(e){if(null===e)return"null";switch(typeof e){case"string":return`"${e.replace(/["\\]/g,"\\$&")}"`;case"number":case"boolean":return e.toString()}if(Array.isArray(e))return`[${e.map(l).join(",")}]`;if("object"==typeof e){const t=[];for(const[r,s]of Object.entries(e))t.push(`${r}:${l(s)}`);return`{${t.join(",")}}`}throw new TypeError(`Unexpected param type ${typeof e} ${e}`)}return commands$3.default={CONFIG_GET:e,configGet:e,CONFIG_SET:t,configSet:t,DELETE:r,delete:r,EXPLAIN:s,explain:s,LIST:n,list:n,PROFILE:i,profile:i,QUERY:a,query:a,RO_QUERY:o,roQuery:o,SLOWLOG:c,slowLog:c},commands$3.pushQueryArguments=function(e,t,r,s,n){return e.push(t),"number"==typeof s?(e.push(r),u(e,s)):(e.push(s?.params?`CYPHER ${function(e){const t=[];for(const[r,s]of Object.entries(e))t.push(`${r}=${l(s)}`);return t.join(" ")}(s.params)} ${r}`:r),void 0!==s?.TIMEOUT&&u(e,s.TIMEOUT)),n&&e.push("--compact"),e},commands$3}Object.defineProperty(SLOWLOG,"__esModule",{value:!0}),SLOWLOG.transformReply=SLOWLOG.transformArguments=SLOWLOG.FIRST_KEY_INDEX=SLOWLOG.IS_READ_ONLY=void 0,SLOWLOG.IS_READ_ONLY=!0,SLOWLOG.FIRST_KEY_INDEX=1,SLOWLOG.transformArguments=transformArguments$y,SLOWLOG.transformReply=transformReply$4;var graph={},__classPrivateFieldSet=commonjsGlobal&&commonjsGlobal.__classPrivateFieldSet||function(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},__classPrivateFieldGet=commonjsGlobal&&commonjsGlobal.__classPrivateFieldGet||function(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},_Graph_instances,_Graph_client,_Graph_name,_Graph_metadata,_Graph_setMetadataPromise,_Graph_updateMetadata,_Graph_setMetadata,_Graph_cleanMetadataArray,_Graph_getMetadata,_Graph_getMetadataAsync,_Graph_parseReply,_Graph_parseValue,_Graph_parseEdge,_Graph_parseNode,_Graph_parseProperties,GraphValueTypes;Object.defineProperty(graph,"__esModule",{value:!0}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NULL=1]="NULL",e[e.STRING=2]="STRING",e[e.INTEGER=3]="INTEGER",e[e.BOOLEAN=4]="BOOLEAN",e[e.DOUBLE=5]="DOUBLE",e[e.ARRAY=6]="ARRAY",e[e.EDGE=7]="EDGE",e[e.NODE=8]="NODE",e[e.PATH=9]="PATH",e[e.MAP=10]="MAP",e[e.POINT=11]="POINT"}(GraphValueTypes||(GraphValueTypes={}));class Graph{constructor(e,t){_Graph_instances.add(this),_Graph_client.set(this,void 0),_Graph_name.set(this,void 0),_Graph_metadata.set(this,void 0),_Graph_setMetadataPromise.set(this,void 0),__classPrivateFieldSet(this,_Graph_client,e,"f"),__classPrivateFieldSet(this,_Graph_name,t,"f")}async query(e,t){return __classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseReply).call(this,await __classPrivateFieldGet(this,_Graph_client,"f").graph.query(__classPrivateFieldGet(this,_Graph_name,"f"),e,t,!0))}async roQuery(e,t){return __classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseReply).call(this,await __classPrivateFieldGet(this,_Graph_client,"f").graph.roQuery(__classPrivateFieldGet(this,_Graph_name,"f"),e,t,!0))}}_Graph_client=new WeakMap,_Graph_name=new WeakMap,_Graph_metadata=new WeakMap,_Graph_setMetadataPromise=new WeakMap,_Graph_instances=new WeakSet,_Graph_updateMetadata=function(){return __classPrivateFieldSet(this,_Graph_setMetadataPromise,__classPrivateFieldGet(this,_Graph_setMetadataPromise,"f")??__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_setMetadata).call(this).finally((()=>__classPrivateFieldSet(this,_Graph_setMetadataPromise,void 0,"f"))),"f"),__classPrivateFieldGet(this,_Graph_setMetadataPromise,"f")},_Graph_setMetadata=async function(){const[e,t,r]=await Promise.all([__classPrivateFieldGet(this,_Graph_client,"f").graph.roQuery(__classPrivateFieldGet(this,_Graph_name,"f"),"CALL db.labels()"),__classPrivateFieldGet(this,_Graph_client,"f").graph.roQuery(__classPrivateFieldGet(this,_Graph_name,"f"),"CALL db.relationshipTypes()"),__classPrivateFieldGet(this,_Graph_client,"f").graph.roQuery(__classPrivateFieldGet(this,_Graph_name,"f"),"CALL db.propertyKeys()")]);return __classPrivateFieldSet(this,_Graph_metadata,{labels:__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_cleanMetadataArray).call(this,e.data),relationshipTypes:__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_cleanMetadataArray).call(this,t.data),propertyKeys:__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_cleanMetadataArray).call(this,r.data)},"f"),__classPrivateFieldGet(this,_Graph_metadata,"f")},_Graph_cleanMetadataArray=function(e){return e.map((([e])=>e))},_Graph_getMetadata=function(e,t){return __classPrivateFieldGet(this,_Graph_metadata,"f")?.[e][t]??__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_getMetadataAsync).call(this,e,t)},_Graph_getMetadataAsync=async function(e,t){const r=(await __classPrivateFieldGet(this,_Graph_instances,"m",_Graph_updateMetadata).call(this))[e][t];if(void 0===r)throw new Error(`Cannot find value from ${e}[${t}]`);return r},_Graph_parseReply=async function(e){if(!e.data)return e;const t=[],r={metadata:e.metadata,data:e.data.map((r=>{const s={};for(let n=0;n<r.length;n++)s[e.headers[n][1]]=__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseValue).call(this,r[n],t);return s}))};return t.length&&await Promise.all(t),r},_Graph_parseValue=function e([t,r],s){switch(t){case GraphValueTypes.NULL:return null;case GraphValueTypes.STRING:case GraphValueTypes.INTEGER:return r;case GraphValueTypes.BOOLEAN:return"true"===r;case GraphValueTypes.DOUBLE:return parseFloat(r);case GraphValueTypes.ARRAY:return r.map((t=>__classPrivateFieldGet(this,_Graph_instances,"m",e).call(this,t,s)));case GraphValueTypes.EDGE:return __classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseEdge).call(this,r,s);case GraphValueTypes.NODE:return __classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseNode).call(this,r,s);case GraphValueTypes.PATH:return{nodes:r[0][1].map((([,e])=>__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseNode).call(this,e,s))),edges:r[1][1].map((([,e])=>__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseEdge).call(this,e,s)))};case GraphValueTypes.MAP:const n={};for(let t=0;t<r.length;t++)n[r[t++]]=__classPrivateFieldGet(this,_Graph_instances,"m",e).call(this,r[t],s);return n;case GraphValueTypes.POINT:return{latitude:parseFloat(r[0]),longitude:parseFloat(r[1])};default:throw new Error(`unknown scalar type: ${t}`)}},_Graph_parseEdge=function([e,t,r,s,n],i){const a={id:e,sourceId:r,destinationId:s,properties:__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseProperties).call(this,n,i)},o=__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_getMetadata).call(this,"relationshipTypes",t);return o instanceof Promise?i.push(o.then((e=>a.relationshipType=e))):a.relationshipType=o,a},_Graph_parseNode=function([e,t,r],s){const n=new Array(t.length);for(let e=0;e<t.length;e++){const r=__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_getMetadata).call(this,"labels",t[e]);r instanceof Promise?s.push(r.then((t=>n[e]=t))):n[e]=r}return{id:e,labels:n,properties:__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseProperties).call(this,r,s)}},_Graph_parseProperties=function(e,t){const r={};for(const[s,n,i]of e){const e=__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_parseValue).call(this,[n,i],t),a=__classPrivateFieldGet(this,_Graph_instances,"m",_Graph_getMetadata).call(this,"propertyKeys",s);a instanceof Promise?t.push(a.then((t=>r[t]=e))):r[a]=e}return r},graph.default=Graph,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.default=void 0;var t=requireCommands$3();Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}});var r=graph;Object.defineProperty(e,"Graph",{enumerable:!0,get:function(){return r.default}})}(dist$3);var dist$2={},commands$2={},ARRAPPEND={},hasRequiredARRAPPEND;function requireARRAPPEND(){if(hasRequiredARRAPPEND)return ARRAPPEND;hasRequiredARRAPPEND=1,Object.defineProperty(ARRAPPEND,"__esModule",{value:!0}),ARRAPPEND.transformArguments=ARRAPPEND.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return ARRAPPEND.FIRST_KEY_INDEX=1,ARRAPPEND.transformArguments=function(t,r,...s){const n=["JSON.ARRAPPEND",t,r];for(const t of s)n.push((0,e.transformRedisJsonArgument)(t));return n},ARRAPPEND}var ARRINDEX={},hasRequiredARRINDEX;function requireARRINDEX(){if(hasRequiredARRINDEX)return ARRINDEX;hasRequiredARRINDEX=1,Object.defineProperty(ARRINDEX,"__esModule",{value:!0}),ARRINDEX.transformArguments=ARRINDEX.IS_READ_ONLY=ARRINDEX.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return ARRINDEX.FIRST_KEY_INDEX=1,ARRINDEX.IS_READ_ONLY=!0,ARRINDEX.transformArguments=function(t,r,s,n,i){const a=["JSON.ARRINDEX",t,r,(0,e.transformRedisJsonArgument)(s)];return null!=n&&(a.push(n.toString()),null!=i&&a.push(i.toString())),a},ARRINDEX}var ARRINSERT={},hasRequiredARRINSERT;function requireARRINSERT(){if(hasRequiredARRINSERT)return ARRINSERT;hasRequiredARRINSERT=1,Object.defineProperty(ARRINSERT,"__esModule",{value:!0}),ARRINSERT.transformArguments=ARRINSERT.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return ARRINSERT.FIRST_KEY_INDEX=1,ARRINSERT.transformArguments=function(t,r,s,...n){const i=["JSON.ARRINSERT",t,r,s.toString()];for(const t of n)i.push((0,e.transformRedisJsonArgument)(t));return i},ARRINSERT}var ARRLEN={};function transformArguments$x(e,t){const r=["JSON.ARRLEN",e];return t&&r.push(t),r}Object.defineProperty(ARRLEN,"__esModule",{value:!0}),ARRLEN.transformArguments=ARRLEN.IS_READ_ONLY=ARRLEN.FIRST_KEY_INDEX=void 0,ARRLEN.FIRST_KEY_INDEX=1,ARRLEN.IS_READ_ONLY=!0,ARRLEN.transformArguments=transformArguments$x;var ARRPOP={},hasRequiredARRPOP;function requireARRPOP(){if(hasRequiredARRPOP)return ARRPOP;hasRequiredARRPOP=1,Object.defineProperty(ARRPOP,"__esModule",{value:!0}),ARRPOP.transformReply=ARRPOP.transformArguments=ARRPOP.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return ARRPOP.FIRST_KEY_INDEX=1,ARRPOP.transformArguments=function(e,t,r){const s=["JSON.ARRPOP",e];return t&&(s.push(t),null!=r&&s.push(r.toString())),s},ARRPOP.transformReply=function(t){return null===t?null:Array.isArray(t)?t.map(e.transformRedisJsonNullReply):(0,e.transformRedisJsonNullReply)(t)},ARRPOP}var ARRTRIM={};function transformArguments$w(e,t,r,s){return["JSON.ARRTRIM",e,t,r.toString(),s.toString()]}Object.defineProperty(ARRTRIM,"__esModule",{value:!0}),ARRTRIM.transformArguments=ARRTRIM.FIRST_KEY_INDEX=void 0,ARRTRIM.FIRST_KEY_INDEX=1,ARRTRIM.transformArguments=transformArguments$w;var DEBUG_MEMORY={};function transformArguments$v(e,t){const r=["JSON.DEBUG","MEMORY",e];return t&&r.push(t),r}Object.defineProperty(DEBUG_MEMORY,"__esModule",{value:!0}),DEBUG_MEMORY.transformArguments=DEBUG_MEMORY.FIRST_KEY_INDEX=void 0,DEBUG_MEMORY.FIRST_KEY_INDEX=2,DEBUG_MEMORY.transformArguments=transformArguments$v;var DEL$1={};function transformArguments$u(e,t){const r=["JSON.DEL",e];return t&&r.push(t),r}Object.defineProperty(DEL$1,"__esModule",{value:!0}),DEL$1.transformArguments=DEL$1.FIRST_KEY_INDEX=void 0,DEL$1.FIRST_KEY_INDEX=1,DEL$1.transformArguments=transformArguments$u;var FORGET={};function transformArguments$t(e,t){const r=["JSON.FORGET",e];return t&&r.push(t),r}Object.defineProperty(FORGET,"__esModule",{value:!0}),FORGET.transformArguments=FORGET.FIRST_KEY_INDEX=void 0,FORGET.FIRST_KEY_INDEX=1,FORGET.transformArguments=transformArguments$t;var GET$1={},hasRequiredGET$1;function requireGET$1(){return hasRequiredGET$1||(hasRequiredGET$1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=genericTransformers;e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,r){let s=["JSON.GET",e];return r?.path&&(s=(0,t.pushVerdictArguments)(s,r.path)),r?.INDENT&&s.push("INDENT",r.INDENT),r?.NEWLINE&&s.push("NEWLINE",r.NEWLINE),r?.SPACE&&s.push("SPACE",r.SPACE),r?.NOESCAPE&&s.push("NOESCAPE"),s};var r=requireCommands$2();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformRedisJsonNullReply}})}(GET$1)),GET$1}var MERGE={},hasRequiredMERGE;function requireMERGE(){if(hasRequiredMERGE)return MERGE;hasRequiredMERGE=1,Object.defineProperty(MERGE,"__esModule",{value:!0}),MERGE.transformArguments=MERGE.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return MERGE.FIRST_KEY_INDEX=1,MERGE.transformArguments=function(t,r,s){return["JSON.MERGE",t,r,(0,e.transformRedisJsonArgument)(s)]},MERGE}var MGET$1={},hasRequiredMGET$1;function requireMGET$1(){if(hasRequiredMGET$1)return MGET$1;hasRequiredMGET$1=1,Object.defineProperty(MGET$1,"__esModule",{value:!0}),MGET$1.transformReply=MGET$1.transformArguments=MGET$1.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return MGET$1.FIRST_KEY_INDEX=1,MGET$1.transformArguments=function(e,t){return["JSON.MGET",...e,t]},MGET$1.transformReply=function(t){return t.map(e.transformRedisJsonNullReply)},MGET$1}var MSET={},hasRequiredMSET;function requireMSET(){if(hasRequiredMSET)return MSET;hasRequiredMSET=1,Object.defineProperty(MSET,"__esModule",{value:!0}),MSET.transformArguments=MSET.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return MSET.FIRST_KEY_INDEX=1,MSET.transformArguments=function(t){const r=new Array(1+3*t.length);r[0]="JSON.MSET";let s=1;for(let n=0;n<t.length;n++){const i=t[n];r[s++]=i.key,r[s++]=i.path,r[s++]=(0,e.transformRedisJsonArgument)(i.value)}return r},MSET}var NUMINCRBY={},hasRequiredNUMINCRBY;function requireNUMINCRBY(){return hasRequiredNUMINCRBY||(hasRequiredNUMINCRBY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){return["JSON.NUMINCRBY",e,t,r.toString()]};var t=requireCommands$2();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformNumbersReply}})}(NUMINCRBY)),NUMINCRBY}var NUMMULTBY={},hasRequiredNUMMULTBY;function requireNUMMULTBY(){return hasRequiredNUMMULTBY||(hasRequiredNUMMULTBY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.transformArguments=function(e,t,r){return["JSON.NUMMULTBY",e,t,r.toString()]};var t=requireCommands$2();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformNumbersReply}})}(NUMMULTBY)),NUMMULTBY}var OBJKEYS={};function transformArguments$s(e,t){const r=["JSON.OBJKEYS",e];return t&&r.push(t),r}Object.defineProperty(OBJKEYS,"__esModule",{value:!0}),OBJKEYS.transformArguments=OBJKEYS.FIRST_KEY_INDEX=void 0,OBJKEYS.FIRST_KEY_INDEX=1,OBJKEYS.transformArguments=transformArguments$s;var OBJLEN={};function transformArguments$r(e,t){const r=["JSON.OBJLEN",e];return t&&r.push(t),r}Object.defineProperty(OBJLEN,"__esModule",{value:!0}),OBJLEN.transformArguments=OBJLEN.FIRST_KEY_INDEX=void 0,OBJLEN.FIRST_KEY_INDEX=1,OBJLEN.transformArguments=transformArguments$r;var RESP={};function transformArguments$q(e,t){const r=["JSON.RESP",e];return t&&r.push(t),r}Object.defineProperty(RESP,"__esModule",{value:!0}),RESP.transformArguments=RESP.FIRST_KEY_INDEX=void 0,RESP.FIRST_KEY_INDEX=1,RESP.transformArguments=transformArguments$q;var SET={},hasRequiredSET;function requireSET(){if(hasRequiredSET)return SET;hasRequiredSET=1,Object.defineProperty(SET,"__esModule",{value:!0}),SET.transformArguments=SET.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return SET.FIRST_KEY_INDEX=1,SET.transformArguments=function(t,r,s,n){const i=["JSON.SET",t,r,(0,e.transformRedisJsonArgument)(s)];return n?.NX?i.push("NX"):n?.XX&&i.push("XX"),i},SET}var STRAPPEND={},hasRequiredSTRAPPEND;function requireSTRAPPEND(){if(hasRequiredSTRAPPEND)return STRAPPEND;hasRequiredSTRAPPEND=1,Object.defineProperty(STRAPPEND,"__esModule",{value:!0}),STRAPPEND.transformArguments=STRAPPEND.FIRST_KEY_INDEX=void 0;const e=requireCommands$2();return STRAPPEND.FIRST_KEY_INDEX=1,STRAPPEND.transformArguments=function(...[t,r,s]){const n=["JSON.STRAPPEND",t];return null!=s?n.push(r,(0,e.transformRedisJsonArgument)(s)):n.push((0,e.transformRedisJsonArgument)(r)),n},STRAPPEND}var STRLEN={};function transformArguments$p(e,t){const r=["JSON.STRLEN",e];return t&&r.push(t),r}Object.defineProperty(STRLEN,"__esModule",{value:!0}),STRLEN.transformArguments=STRLEN.IS_READ_ONLY=STRLEN.FIRST_KEY_INDEX=void 0,STRLEN.FIRST_KEY_INDEX=1,STRLEN.IS_READ_ONLY=!0,STRLEN.transformArguments=transformArguments$p;var TYPE={},hasRequiredCommands$2;function transformArguments$o(e,t){const r=["JSON.TYPE",e];return t&&r.push(t),r}function requireCommands$2(){if(hasRequiredCommands$2)return commands$2;hasRequiredCommands$2=1,Object.defineProperty(commands$2,"__esModule",{value:!0}),commands$2.transformNumbersReply=commands$2.transformRedisJsonNullReply=commands$2.transformRedisJsonReply=commands$2.transformRedisJsonArgument=void 0;const e=requireARRAPPEND(),t=requireARRINDEX(),r=requireARRINSERT(),s=ARRLEN,n=requireARRPOP(),i=ARRTRIM,a=DEBUG_MEMORY,o=DEL$1,c=FORGET,u=requireGET$1(),l=requireMERGE(),p=requireMGET$1(),m=requireMSET(),d=requireNUMINCRBY(),f=requireNUMMULTBY(),h=OBJKEYS,_=OBJLEN,E=RESP,S=requireSET(),R=requireSTRAPPEND(),g=STRLEN,A=TYPE;function T(e){return JSON.parse(e)}return commands$2.default={ARRAPPEND:e,arrAppend:e,ARRINDEX:t,arrIndex:t,ARRINSERT:r,arrInsert:r,ARRLEN:s,arrLen:s,ARRPOP:n,arrPop:n,ARRTRIM:i,arrTrim:i,DEBUG_MEMORY:a,debugMemory:a,DEL:o,del:o,FORGET:c,forget:c,GET:u,get:u,MERGE:l,merge:l,MGET:p,mGet:p,MSET:m,mSet:m,NUMINCRBY:d,numIncrBy:d,NUMMULTBY:f,numMultBy:f,OBJKEYS:h,objKeys:h,OBJLEN:_,objLen:_,RESP:E,resp:E,SET:S,set:S,STRAPPEND:R,strAppend:R,STRLEN:g,strLen:g,TYPE:A,type:A},commands$2.transformRedisJsonArgument=function(e){return JSON.stringify(e)},commands$2.transformRedisJsonReply=T,commands$2.transformRedisJsonNullReply=function(e){return null===e?null:T(e)},commands$2.transformNumbersReply=function(e){return JSON.parse(e)},commands$2}Object.defineProperty(TYPE,"__esModule",{value:!0}),TYPE.transformArguments=TYPE.FIRST_KEY_INDEX=void 0,TYPE.FIRST_KEY_INDEX=1,TYPE.transformArguments=transformArguments$o,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=requireCommands$2();Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}(dist$2);var dist$1={},commands$1={},_LIST={};function transformArguments$n(){return["FT._LIST"]}Object.defineProperty(_LIST,"__esModule",{value:!0}),_LIST.transformArguments=void 0,_LIST.transformArguments=transformArguments$n;var ALTER$1={},hasRequiredALTER$1;function requireALTER$1(){if(hasRequiredALTER$1)return ALTER$1;hasRequiredALTER$1=1,Object.defineProperty(ALTER$1,"__esModule",{value:!0}),ALTER$1.transformArguments=void 0;const e=requireCommands$1();return ALTER$1.transformArguments=function(t,r){const s=["FT.ALTER",t,"SCHEMA","ADD"];return(0,e.pushSchema)(s,r),s},ALTER$1}var AGGREGATE_WITHCURSOR={},AGGREGATE={},hasRequiredAGGREGATE,hasRequiredAGGREGATE_WITHCURSOR;function requireAGGREGATE(){if(hasRequiredAGGREGATE)return AGGREGATE;hasRequiredAGGREGATE=1,Object.defineProperty(AGGREGATE,"__esModule",{value:!0}),AGGREGATE.transformReply=AGGREGATE.pushAggregatehOptions=AGGREGATE.transformArguments=AGGREGATE.IS_READ_ONLY=AGGREGATE.FIRST_KEY_INDEX=AGGREGATE.AggregateGroupByReducers=AGGREGATE.AggregateSteps=void 0;const e=genericTransformers,t=requireCommands$1();var r,s;function n(s,n){if(n?.VERBATIM&&s.push("VERBATIM"),n?.LOAD&&(s.push("LOAD"),(0,t.pushArgumentsWithLength)(s,(()=>{if(Array.isArray(n.LOAD))for(const e of n.LOAD)i(s,e);else i(s,n.LOAD)}))),n?.STEPS)for(const i of n.STEPS)switch(i.type){case r.GROUPBY:if(s.push("GROUPBY"),i.properties?(0,e.pushVerdictArgument)(s,i.properties):s.push("0"),Array.isArray(i.REDUCE))for(const e of i.REDUCE)a(s,e);else a(s,i.REDUCE);break;case r.SORTBY:(0,t.pushSortByArguments)(s,"SORTBY",i.BY),i.MAX&&s.push("MAX",i.MAX.toString());break;case r.APPLY:s.push("APPLY",i.expression,"AS",i.AS);break;case r.LIMIT:s.push("LIMIT",i.from.toString(),i.size.toString());break;case r.FILTER:s.push("FILTER",i.expression)}return(0,t.pushParamsArgs)(s,n?.PARAMS),n?.DIALECT&&s.push("DIALECT",n.DIALECT.toString()),void 0!==n?.TIMEOUT&&s.push("TIMEOUT",n.TIMEOUT.toString()),s}function i(e,t){"string"==typeof t?e.push(t):(e.push(t.identifier),t.AS&&e.push("AS",t.AS))}function a(e,r){switch(e.push("REDUCE",r.type),r.type){case s.COUNT:e.push("0");break;case s.COUNT_DISTINCT:case s.COUNT_DISTINCTISH:case s.SUM:case s.MIN:case s.MAX:case s.AVG:case s.STDDEV:case s.TOLIST:e.push("1",r.property);break;case s.QUANTILE:e.push("2",r.property,r.quantile.toString());break;case s.FIRST_VALUE:(0,t.pushArgumentsWithLength)(e,(()=>{e.push(r.property),r.BY&&(e.push("BY"),"string"==typeof r.BY?e.push(r.BY):(e.push(r.BY.property),r.BY.direction&&e.push(r.BY.direction)))}));break;case s.RANDOM_SAMPLE:e.push("2",r.property,r.sampleSize.toString())}r.AS&&e.push("AS",r.AS)}return function(e){e.GROUPBY="GROUPBY",e.SORTBY="SORTBY",e.APPLY="APPLY",e.LIMIT="LIMIT",e.FILTER="FILTER"}(r||(AGGREGATE.AggregateSteps=r={})),function(e){e.COUNT="COUNT",e.COUNT_DISTINCT="COUNT_DISTINCT",e.COUNT_DISTINCTISH="COUNT_DISTINCTISH",e.SUM="SUM",e.MIN="MIN",e.MAX="MAX",e.AVG="AVG",e.STDDEV="STDDEV",e.QUANTILE="QUANTILE",e.TOLIST="TOLIST",e.TO_LIST="TOLIST",e.FIRST_VALUE="FIRST_VALUE",e.RANDOM_SAMPLE="RANDOM_SAMPLE"}(s||(AGGREGATE.AggregateGroupByReducers=s={})),AGGREGATE.FIRST_KEY_INDEX=1,AGGREGATE.IS_READ_ONLY=!0,AGGREGATE.transformArguments=function(e,t,r){return n(["FT.AGGREGATE",e,t],r)},AGGREGATE.pushAggregatehOptions=n,AGGREGATE.transformReply=function(t){const r=[];for(let s=1;s<t.length;s++)r.push((0,e.transformTuplesReply)(t[s]));return{total:t[0],results:r}},AGGREGATE}function requireAGGREGATE_WITHCURSOR(){return hasRequiredAGGREGATE_WITHCURSOR||(hasRequiredAGGREGATE_WITHCURSOR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0;const t=requireAGGREGATE();var r=requireAGGREGATE();Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s){const n=(0,t.transformArguments)(e,r,s);return n.push("WITHCURSOR"),s?.COUNT&&n.push("COUNT",s.COUNT.toString()),n},e.transformReply=function(e){return{...(0,t.transformReply)(e[0]),cursor:e[1]}}}(AGGREGATE_WITHCURSOR)),AGGREGATE_WITHCURSOR}var ALIASADD={};function transformArguments$m(e,t){return["FT.ALIASADD",e,t]}Object.defineProperty(ALIASADD,"__esModule",{value:!0}),ALIASADD.transformArguments=void 0,ALIASADD.transformArguments=transformArguments$m;var ALIASDEL={};function transformArguments$l(e,t){return["FT.ALIASDEL",e,t]}Object.defineProperty(ALIASDEL,"__esModule",{value:!0}),ALIASDEL.transformArguments=void 0,ALIASDEL.transformArguments=transformArguments$l;var ALIASUPDATE={};function transformArguments$k(e,t){return["FT.ALIASUPDATE",e,t]}Object.defineProperty(ALIASUPDATE,"__esModule",{value:!0}),ALIASUPDATE.transformArguments=void 0,ALIASUPDATE.transformArguments=transformArguments$k;var CONFIG_GET={};function transformArguments$j(e){return["FT.CONFIG","GET",e]}function transformReply$3(e){const t=Object.create(null);for(const[r,s]of e)t[r]=s;return t}Object.defineProperty(CONFIG_GET,"__esModule",{value:!0}),CONFIG_GET.transformReply=CONFIG_GET.transformArguments=void 0,CONFIG_GET.transformArguments=transformArguments$j,CONFIG_GET.transformReply=transformReply$3;var CONFIG_SET={};function transformArguments$i(e,t){return["FT.CONFIG","SET",e,t]}Object.defineProperty(CONFIG_SET,"__esModule",{value:!0}),CONFIG_SET.transformArguments=void 0,CONFIG_SET.transformArguments=transformArguments$i;var CREATE$1={},hasRequiredCREATE$1;function requireCREATE$1(){if(hasRequiredCREATE$1)return CREATE$1;hasRequiredCREATE$1=1,Object.defineProperty(CREATE$1,"__esModule",{value:!0}),CREATE$1.transformArguments=void 0;const e=genericTransformers,t=requireCommands$1();return CREATE$1.transformArguments=function(r,s,n){const i=["FT.CREATE",r];return n?.ON&&i.push("ON",n.ON),(0,e.pushOptionalVerdictArgument)(i,"PREFIX",n?.PREFIX),n?.FILTER&&i.push("FILTER",n.FILTER),n?.LANGUAGE&&i.push("LANGUAGE",n.LANGUAGE),n?.LANGUAGE_FIELD&&i.push("LANGUAGE_FIELD",n.LANGUAGE_FIELD),n?.SCORE&&i.push("SCORE",n.SCORE.toString()),n?.SCORE_FIELD&&i.push("SCORE_FIELD",n.SCORE_FIELD),n?.MAXTEXTFIELDS&&i.push("MAXTEXTFIELDS"),n?.TEMPORARY&&i.push("TEMPORARY",n.TEMPORARY.toString()),n?.NOOFFSETS&&i.push("NOOFFSETS"),n?.NOHL&&i.push("NOHL"),n?.NOFIELDS&&i.push("NOFIELDS"),n?.NOFREQS&&i.push("NOFREQS"),n?.SKIPINITIALSCAN&&i.push("SKIPINITIALSCAN"),(0,e.pushOptionalVerdictArgument)(i,"STOPWORDS",n?.STOPWORDS),i.push("SCHEMA"),(0,t.pushSchema)(i,s),i},CREATE$1}var CURSOR_DEL={};function transformArguments$h(e,t){return["FT.CURSOR","DEL",e,t.toString()]}Object.defineProperty(CURSOR_DEL,"__esModule",{value:!0}),CURSOR_DEL.transformArguments=CURSOR_DEL.FIRST_KEY_INDEX=void 0,CURSOR_DEL.FIRST_KEY_INDEX=1,CURSOR_DEL.transformArguments=transformArguments$h;var CURSOR_READ={},hasRequiredCURSOR_READ;function requireCURSOR_READ(){return hasRequiredCURSOR_READ||(hasRequiredCURSOR_READ=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=e.FIRST_KEY_INDEX=void 0,e.FIRST_KEY_INDEX=1,e.IS_READ_ONLY=!0,e.transformArguments=function(e,t,r){const s=["FT.CURSOR","READ",e,t.toString()];return r?.COUNT&&s.push("COUNT",r.COUNT.toString()),s};var t=requireAGGREGATE_WITHCURSOR();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformReply}})}(CURSOR_READ)),CURSOR_READ}var DICTADD={};Object.defineProperty(DICTADD,"__esModule",{value:!0}),DICTADD.transformArguments=void 0;const generic_transformers_1$4=genericTransformers;function transformArguments$g(e,t){return(0,generic_transformers_1$4.pushVerdictArguments)(["FT.DICTADD",e],t)}DICTADD.transformArguments=transformArguments$g;var DICTDEL={};Object.defineProperty(DICTDEL,"__esModule",{value:!0}),DICTDEL.transformArguments=void 0;const generic_transformers_1$3=genericTransformers;function transformArguments$f(e,t){return(0,generic_transformers_1$3.pushVerdictArguments)(["FT.DICTDEL",e],t)}DICTDEL.transformArguments=transformArguments$f;var DICTDUMP={};function transformArguments$e(e){return["FT.DICTDUMP",e]}Object.defineProperty(DICTDUMP,"__esModule",{value:!0}),DICTDUMP.transformArguments=void 0,DICTDUMP.transformArguments=transformArguments$e;var DROPINDEX={};function transformArguments$d(e,t){const r=["FT.DROPINDEX",e];return t?.DD&&r.push("DD"),r}Object.defineProperty(DROPINDEX,"__esModule",{value:!0}),DROPINDEX.transformArguments=void 0,DROPINDEX.transformArguments=transformArguments$d;var EXPLAIN={},hasRequiredEXPLAIN;function requireEXPLAIN(){if(hasRequiredEXPLAIN)return EXPLAIN;hasRequiredEXPLAIN=1,Object.defineProperty(EXPLAIN,"__esModule",{value:!0}),EXPLAIN.transformArguments=EXPLAIN.IS_READ_ONLY=void 0;const e=requireCommands$1();return EXPLAIN.IS_READ_ONLY=!0,EXPLAIN.transformArguments=function(t,r,s){const n=["FT.EXPLAIN",t,r];return(0,e.pushParamsArgs)(n,s?.PARAMS),s?.DIALECT&&n.push("DIALECT",s.DIALECT.toString()),n},EXPLAIN}var EXPLAINCLI={};function transformArguments$c(e,t){return["FT.EXPLAINCLI",e,t]}Object.defineProperty(EXPLAINCLI,"__esModule",{value:!0}),EXPLAINCLI.transformArguments=EXPLAINCLI.IS_READ_ONLY=void 0,EXPLAINCLI.IS_READ_ONLY=!0,EXPLAINCLI.transformArguments=transformArguments$c;var INFO$1={};Object.defineProperty(INFO$1,"__esModule",{value:!0}),INFO$1.transformReply=INFO$1.transformArguments=void 0;const generic_transformers_1$2=genericTransformers;function transformArguments$b(e){return["FT.INFO",e]}function transformReply$2(e){return{indexName:e[1],indexOptions:e[3],indexDefinition:(0,generic_transformers_1$2.transformTuplesReply)(e[5]),attributes:e[7].map((e=>(0,generic_transformers_1$2.transformTuplesReply)(e))),numDocs:e[9],maxDocId:e[11],numTerms:e[13],numRecords:e[15],invertedSzMb:e[17],vectorIndexSzMb:e[19],totalInvertedIndexBlocks:e[21],offsetVectorsSzMb:e[23],docTableSizeMb:e[25],sortableValuesSizeMb:e[27],keyTableSizeMb:e[29],recordsPerDocAvg:e[31],bytesPerRecordAvg:e[33],offsetsPerTermAvg:e[35],offsetBitsPerRecordAvg:e[37],hashIndexingFailures:e[39],indexing:e[41],percentIndexed:e[43],gcStats:{bytesCollected:e[45][1],totalMsRun:e[45][3],totalCycles:e[45][5],averageCycleTimeMs:e[45][7],lastRunTimeMs:e[45][9],gcNumericTreesMissed:e[45][11],gcBlocksDenied:e[45][13]},cursorStats:{globalIdle:e[47][1],globalTotal:e[47][3],indexCapacity:e[47][5],idnexTotal:e[47][7]},stopWords:e[49]}}INFO$1.transformArguments=transformArguments$b,INFO$1.transformReply=transformReply$2;var PROFILE_SEARCH={},SEARCH={},hasRequiredSEARCH,hasRequiredPROFILE_SEARCH;function requireSEARCH(){if(hasRequiredSEARCH)return SEARCH;hasRequiredSEARCH=1,Object.defineProperty(SEARCH,"__esModule",{value:!0}),SEARCH.transformReply=SEARCH.transformArguments=SEARCH.IS_READ_ONLY=SEARCH.FIRST_KEY_INDEX=void 0;const e=requireCommands$1();function t(e){const t=Object.create(null);let r=0;for(;r<e.length;){const s=e[r++],n=e[r++];if("$"===s)try{Object.assign(t,JSON.parse(n));continue}catch{}t[s]=n}return t}return SEARCH.FIRST_KEY_INDEX=1,SEARCH.IS_READ_ONLY=!0,SEARCH.transformArguments=function(t,r,s){return(0,e.pushSearchOptions)(["FT.SEARCH",t,r],s)},SEARCH.transformReply=function(e,r){const s=[];let n=1;for(;n<e.length;)s.push({id:e[n++],value:r?Object.create(null):t(e[n++])});return{total:e[0],documents:s}},SEARCH}function requirePROFILE_SEARCH(){if(hasRequiredPROFILE_SEARCH)return PROFILE_SEARCH;hasRequiredPROFILE_SEARCH=1,Object.defineProperty(PROFILE_SEARCH,"__esModule",{value:!0}),PROFILE_SEARCH.transformReply=PROFILE_SEARCH.transformArguments=PROFILE_SEARCH.IS_READ_ONLY=void 0;const e=requireSEARCH(),t=requireCommands$1();return PROFILE_SEARCH.IS_READ_ONLY=!0,PROFILE_SEARCH.transformArguments=function(e,r,s){let n=["FT.PROFILE",e,"SEARCH"];return s?.LIMITED&&n.push("LIMITED"),n.push("QUERY",r),(0,t.pushSearchOptions)(n,s)},PROFILE_SEARCH.transformReply=function(r,s){return{results:(0,e.transformReply)(r[0],s),profile:(0,t.transformProfile)(r[1])}},PROFILE_SEARCH}var PROFILE_AGGREGATE={},hasRequiredPROFILE_AGGREGATE;function requirePROFILE_AGGREGATE(){if(hasRequiredPROFILE_AGGREGATE)return PROFILE_AGGREGATE;hasRequiredPROFILE_AGGREGATE=1,Object.defineProperty(PROFILE_AGGREGATE,"__esModule",{value:!0}),PROFILE_AGGREGATE.transformReply=PROFILE_AGGREGATE.transformArguments=PROFILE_AGGREGATE.IS_READ_ONLY=void 0;const e=requireAGGREGATE(),t=requireCommands$1();return PROFILE_AGGREGATE.IS_READ_ONLY=!0,PROFILE_AGGREGATE.transformArguments=function(t,r,s){const n=["FT.PROFILE",t,"AGGREGATE"];return s?.LIMITED&&n.push("LIMITED"),n.push("QUERY",r),(0,e.pushAggregatehOptions)(n,s),n},PROFILE_AGGREGATE.transformReply=function(r){return{results:(0,e.transformReply)(r[0]),profile:(0,t.transformProfile)(r[1])}},PROFILE_AGGREGATE}var SEARCH_NOCONTENT={},hasRequiredSEARCH_NOCONTENT;function requireSEARCH_NOCONTENT(){if(hasRequiredSEARCH_NOCONTENT)return SEARCH_NOCONTENT;hasRequiredSEARCH_NOCONTENT=1,Object.defineProperty(SEARCH_NOCONTENT,"__esModule",{value:!0}),SEARCH_NOCONTENT.transformReply=SEARCH_NOCONTENT.transformArguments=SEARCH_NOCONTENT.IS_READ_ONLY=SEARCH_NOCONTENT.FIRST_KEY_INDEX=void 0;const e=requireCommands$1();return SEARCH_NOCONTENT.FIRST_KEY_INDEX=1,SEARCH_NOCONTENT.IS_READ_ONLY=!0,SEARCH_NOCONTENT.transformArguments=function(t,r,s){return(0,e.pushSearchOptions)(["FT.SEARCH",t,r,"NOCONTENT"],s)},SEARCH_NOCONTENT.transformReply=function(e){return{total:e[0],documents:e.slice(1)}},SEARCH_NOCONTENT}var SPELLCHECK={};function transformArguments$a(e,t,r){const s=["FT.SPELLCHECK",e,t];if(r?.DISTANCE&&s.push("DISTANCE",r.DISTANCE.toString()),r?.TERMS)if(Array.isArray(r.TERMS))for(const e of r.TERMS)pushTerms(s,e);else pushTerms(s,r.TERMS);return r?.DIALECT&&s.push("DIALECT",r.DIALECT.toString()),s}function pushTerms(e,{mode:t,dictionary:r}){e.push("TERMS",t,r)}function transformReply$1(e){return e.map((([,e,t])=>({term:e,suggestions:t.map((([e,t])=>({score:Number(e),suggestion:t})))})))}Object.defineProperty(SPELLCHECK,"__esModule",{value:!0}),SPELLCHECK.transformReply=SPELLCHECK.transformArguments=void 0,SPELLCHECK.transformArguments=transformArguments$a,SPELLCHECK.transformReply=transformReply$1;var SUGADD={};function transformArguments$9(e,t,r,s){const n=["FT.SUGADD",e,t,r.toString()];return s?.INCR&&n.push("INCR"),s?.PAYLOAD&&n.push("PAYLOAD",s.PAYLOAD),n}Object.defineProperty(SUGADD,"__esModule",{value:!0}),SUGADD.transformArguments=void 0,SUGADD.transformArguments=transformArguments$9;var SUGDEL={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=void 0,e.transformArguments=function(e,t){return["FT.SUGDEL",e,t]};var t=genericTransformers;Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return t.transformBooleanReply}})}(SUGDEL);var SUGGET_WITHPAYLOADS={},SUGGET={};function transformArguments$8(e,t,r){const s=["FT.SUGGET",e,t];return r?.FUZZY&&s.push("FUZZY"),r?.MAX&&s.push("MAX",r.MAX.toString()),s}Object.defineProperty(SUGGET,"__esModule",{value:!0}),SUGGET.transformArguments=SUGGET.IS_READ_ONLY=void 0,SUGGET.IS_READ_ONLY=!0,SUGGET.transformArguments=transformArguments$8,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=SUGGET;var r=SUGGET;Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s){return[...(0,t.transformArguments)(e,r,s),"WITHPAYLOADS"]},e.transformReply=function(e){if(null===e)return null;const t=[];for(let r=0;r<e.length;r+=2)t.push({suggestion:e[r],payload:e[r+1]});return t}}(SUGGET_WITHPAYLOADS);var SUGGET_WITHSCORES_WITHPAYLOADS={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=SUGGET;var r=SUGGET;Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s){return[...(0,t.transformArguments)(e,r,s),"WITHSCORES","WITHPAYLOADS"]},e.transformReply=function(e){if(null===e)return null;const t=[];for(let r=0;r<e.length;r+=3)t.push({suggestion:e[r],score:Number(e[r+1]),payload:e[r+2]});return t}}(SUGGET_WITHSCORES_WITHPAYLOADS);var SUGGET_WITHSCORES={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=SUGGET;var r=SUGGET;Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),e.transformArguments=function(e,r,s){return[...(0,t.transformArguments)(e,r,s),"WITHSCORES"]},e.transformReply=function(e){if(null===e)return null;const t=[];for(let r=0;r<e.length;r+=2)t.push({suggestion:e[r],score:Number(e[r+1])});return t}}(SUGGET_WITHSCORES);var SUGLEN={};function transformArguments$7(e){return["FT.SUGLEN",e]}Object.defineProperty(SUGLEN,"__esModule",{value:!0}),SUGLEN.transformArguments=SUGLEN.IS_READ_ONLY=void 0,SUGLEN.IS_READ_ONLY=!0,SUGLEN.transformArguments=transformArguments$7;var SYNDUMP={};function transformArguments$6(e){return["FT.SYNDUMP",e]}Object.defineProperty(SYNDUMP,"__esModule",{value:!0}),SYNDUMP.transformArguments=void 0,SYNDUMP.transformArguments=transformArguments$6;var SYNUPDATE={};Object.defineProperty(SYNUPDATE,"__esModule",{value:!0}),SYNUPDATE.transformArguments=void 0;const generic_transformers_1$1=genericTransformers;function transformArguments$5(e,t,r,s){const n=["FT.SYNUPDATE",e,t];return s?.SKIPINITIALSCAN&&n.push("SKIPINITIALSCAN"),(0,generic_transformers_1$1.pushVerdictArguments)(n,r)}SYNUPDATE.transformArguments=transformArguments$5;var TAGVALS={},hasRequiredCommands$1;function transformArguments$4(e,t){return["FT.TAGVALS",e,t]}function requireCommands$1(){if(hasRequiredCommands$1)return commands$1;hasRequiredCommands$1=1,Object.defineProperty(commands$1,"__esModule",{value:!0}),commands$1.transformProfile=commands$1.pushSearchOptions=commands$1.pushParamsArgs=commands$1.pushSchema=commands$1.VectorAlgorithms=commands$1.SchemaTextFieldPhonetics=commands$1.SchemaFieldTypes=commands$1.pushArgumentsWithLength=commands$1.pushSortByArguments=commands$1.pushSortByProperty=commands$1.RedisSearchLanguages=void 0;const e=_LIST,t=requireALTER$1(),r=requireAGGREGATE_WITHCURSOR(),s=requireAGGREGATE(),n=ALIASADD,i=ALIASDEL,a=ALIASUPDATE,o=CONFIG_GET,c=CONFIG_SET,u=requireCREATE$1(),l=CURSOR_DEL,p=requireCURSOR_READ(),m=DICTADD,d=DICTDEL,f=DICTDUMP,h=DROPINDEX,_=requireEXPLAIN(),E=EXPLAINCLI,S=INFO$1,R=requirePROFILE_SEARCH(),g=requirePROFILE_AGGREGATE(),A=requireSEARCH(),T=requireSEARCH_NOCONTENT(),v=SPELLCHECK,b=SUGADD,I=SUGDEL,N=SUGGET_WITHPAYLOADS,y=SUGGET_WITHSCORES_WITHPAYLOADS,O=SUGGET_WITHSCORES,$=SUGGET,C=SUGLEN,L=SYNDUMP,D=SYNUPDATE,P=TAGVALS,x=genericTransformers;var M,F,w,U;function G(e,t){"string"==typeof t?e.push(t):(e.push(t.BY),t.DIRECTION&&e.push(t.DIRECTION))}function Y(e,t){const r=e.push("")-1;return t(e),e[r]=(e.length-r-1).toString(),e}function k(e,t){if(t){const r=Object.entries(t);e.push("PARAMS",(2*r.length).toString());for(const[t,s]of r)e.push(t,"number"==typeof s?s.toString():s)}return e}function B(e){var t={};for(let r=0;r<e.length;r+=2){const s=e[r+1];switch(e[r]){case"Type":t.type=s;break;case"Counter":t.counter=s;break;case"Time":t.time=s;break;case"Query type":t.queryType=s;break;case"Child iterators":t.childIterators=s.map(j)}}return t}function j(e){var t={};for(let r=1;r<e.length;r+=2){const s=e[r+1];switch(e[r]){case"Type":t.type=s;break;case"Counter":t.counter=s;break;case"Time":t.time=s;break;case"Size":t.size=s;break;case"Term":t.term=s;break;case"Child iterators":t.childIterators=s.map(j)}}return t}return commands$1.default={_LIST:e,_list:e,ALTER:t,alter:t,AGGREGATE_WITHCURSOR:r,aggregateWithCursor:r,AGGREGATE:s,aggregate:s,ALIASADD:n,aliasAdd:n,ALIASDEL:i,aliasDel:i,ALIASUPDATE:a,aliasUpdate:a,CONFIG_GET:o,configGet:o,CONFIG_SET:c,configSet:c,CREATE:u,create:u,CURSOR_DEL:l,cursorDel:l,CURSOR_READ:p,cursorRead:p,DICTADD:m,dictAdd:m,DICTDEL:d,dictDel:d,DICTDUMP:f,dictDump:f,DROPINDEX:h,dropIndex:h,EXPLAIN:_,explain:_,EXPLAINCLI:E,explainCli:E,INFO:S,info:S,PROFILESEARCH:R,profileSearch:R,PROFILEAGGREGATE:g,profileAggregate:g,SEARCH:A,search:A,SEARCH_NOCONTENT:T,searchNoContent:T,SPELLCHECK:v,spellCheck:v,SUGADD:b,sugAdd:b,SUGDEL:I,sugDel:I,SUGGET_WITHPAYLOADS:N,sugGetWithPayloads:N,SUGGET_WITHSCORES_WITHPAYLOADS:y,sugGetWithScoresWithPayloads:y,SUGGET_WITHSCORES:O,sugGetWithScores:O,SUGGET:$,sugGet:$,SUGLEN:C,sugLen:C,SYNDUMP:L,synDump:L,SYNUPDATE:D,synUpdate:D,TAGVALS:P,tagVals:P},function(e){e.ARABIC="Arabic",e.BASQUE="Basque",e.CATALANA="Catalan",e.DANISH="Danish",e.DUTCH="Dutch",e.ENGLISH="English",e.FINNISH="Finnish",e.FRENCH="French",e.GERMAN="German",e.GREEK="Greek",e.HUNGARIAN="Hungarian",e.INDONESAIN="Indonesian",e.IRISH="Irish",e.ITALIAN="Italian",e.LITHUANIAN="Lithuanian",e.NEPALI="Nepali",e.NORWEIGAN="Norwegian",e.PORTUGUESE="Portuguese",e.ROMANIAN="Romanian",e.RUSSIAN="Russian",e.SPANISH="Spanish",e.SWEDISH="Swedish",e.TAMIL="Tamil",e.TURKISH="Turkish",e.CHINESE="Chinese"}(M||(commands$1.RedisSearchLanguages=M={})),commands$1.pushSortByProperty=G,commands$1.pushSortByArguments=function(e,t,r){const s=e.push(t,"");if(Array.isArray(r))for(const t of r)G(e,t);else G(e,r);return e[s-1]=(e.length-s).toString(),e},commands$1.pushArgumentsWithLength=Y,function(e){e.TEXT="TEXT",e.NUMERIC="NUMERIC",e.GEO="GEO",e.TAG="TAG",e.VECTOR="VECTOR"}(F||(commands$1.SchemaFieldTypes=F={})),function(e){e.DM_EN="dm:en",e.DM_FR="dm:fr",e.FM_PT="dm:pt",e.DM_ES="dm:es"}(w||(commands$1.SchemaTextFieldPhonetics=w={})),function(e){e.FLAT="FLAT",e.HNSW="HNSW"}(U||(commands$1.VectorAlgorithms=U={})),commands$1.pushSchema=function(e,t){for(const[r,s]of Object.entries(t))if(e.push(r),"string"!=typeof s){switch(s.AS&&e.push("AS",s.AS),e.push(s.type),s.type){case F.TEXT:s.NOSTEM&&e.push("NOSTEM"),s.WEIGHT&&e.push("WEIGHT",s.WEIGHT.toString()),s.PHONETIC&&e.push("PHONETIC",s.PHONETIC),s.WITHSUFFIXTRIE&&e.push("WITHSUFFIXTRIE");break;case F.TAG:s.SEPARATOR&&e.push("SEPARATOR",s.SEPARATOR),s.CASESENSITIVE&&e.push("CASESENSITIVE"),s.WITHSUFFIXTRIE&&e.push("WITHSUFFIXTRIE");break;case F.VECTOR:e.push(s.ALGORITHM),Y(e,(()=>{switch(e.push("TYPE",s.TYPE,"DIM",s.DIM.toString(),"DISTANCE_METRIC",s.DISTANCE_METRIC),s.INITIAL_CAP&&e.push("INITIAL_CAP",s.INITIAL_CAP.toString()),s.ALGORITHM){case U.FLAT:s.BLOCK_SIZE&&e.push("BLOCK_SIZE",s.BLOCK_SIZE.toString());break;case U.HNSW:s.M&&e.push("M",s.M.toString()),s.EF_CONSTRUCTION&&e.push("EF_CONSTRUCTION",s.EF_CONSTRUCTION.toString()),s.EF_RUNTIME&&e.push("EF_RUNTIME",s.EF_RUNTIME.toString())}}));continue}s.SORTABLE&&(e.push("SORTABLE"),"UNF"===s.SORTABLE&&e.push("UNF")),s.NOINDEX&&e.push("NOINDEX")}else e.push(s)},commands$1.pushParamsArgs=k,commands$1.pushSearchOptions=function(e,t){return t?.VERBATIM&&e.push("VERBATIM"),t?.NOSTOPWORDS&&e.push("NOSTOPWORDS"),(0,x.pushOptionalVerdictArgument)(e,"INKEYS",t?.INKEYS),(0,x.pushOptionalVerdictArgument)(e,"INFIELDS",t?.INFIELDS),(0,x.pushOptionalVerdictArgument)(e,"RETURN",t?.RETURN),t?.SUMMARIZE&&(e.push("SUMMARIZE"),"object"==typeof t.SUMMARIZE&&(t.SUMMARIZE.FIELDS&&(e.push("FIELDS"),(0,x.pushVerdictArgument)(e,t.SUMMARIZE.FIELDS)),t.SUMMARIZE.FRAGS&&e.push("FRAGS",t.SUMMARIZE.FRAGS.toString()),t.SUMMARIZE.LEN&&e.push("LEN",t.SUMMARIZE.LEN.toString()),t.SUMMARIZE.SEPARATOR&&e.push("SEPARATOR",t.SUMMARIZE.SEPARATOR))),t?.HIGHLIGHT&&(e.push("HIGHLIGHT"),"object"==typeof t.HIGHLIGHT&&(t.HIGHLIGHT.FIELDS&&(e.push("FIELDS"),(0,x.pushVerdictArgument)(e,t.HIGHLIGHT.FIELDS)),t.HIGHLIGHT.TAGS&&e.push("TAGS",t.HIGHLIGHT.TAGS.open,t.HIGHLIGHT.TAGS.close))),t?.SLOP&&e.push("SLOP",t.SLOP.toString()),t?.INORDER&&e.push("INORDER"),t?.LANGUAGE&&e.push("LANGUAGE",t.LANGUAGE),t?.EXPANDER&&e.push("EXPANDER",t.EXPANDER),t?.SCORER&&e.push("SCORER",t.SCORER),t?.SORTBY&&(e.push("SORTBY"),G(e,t.SORTBY)),t?.LIMIT&&e.push("LIMIT",t.LIMIT.from.toString(),t.LIMIT.size.toString()),t?.PARAMS&&k(e,t.PARAMS),t?.DIALECT&&e.push("DIALECT",t.DIALECT.toString()),0===t?.RETURN?.length&&(e.preserve=!0),void 0!==t?.TIMEOUT&&e.push("TIMEOUT",t.TIMEOUT.toString()),e},commands$1.transformProfile=function(e){return{totalProfileTime:e[0][1],parsingTime:e[1][1],pipelineCreationTime:e[2][1],iteratorsProfile:B(e[3][1])}},commands$1}Object.defineProperty(TAGVALS,"__esModule",{value:!0}),TAGVALS.transformArguments=void 0,TAGVALS.transformArguments=transformArguments$4,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AggregateSteps=e.AggregateGroupByReducers=e.VectorAlgorithms=e.SchemaTextFieldPhonetics=e.SchemaFieldTypes=e.RedisSearchLanguages=e.default=void 0;var t=requireCommands$1();Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}});var r=requireCommands$1();Object.defineProperty(e,"RedisSearchLanguages",{enumerable:!0,get:function(){return r.RedisSearchLanguages}}),Object.defineProperty(e,"SchemaFieldTypes",{enumerable:!0,get:function(){return r.SchemaFieldTypes}}),Object.defineProperty(e,"SchemaTextFieldPhonetics",{enumerable:!0,get:function(){return r.SchemaTextFieldPhonetics}}),Object.defineProperty(e,"VectorAlgorithms",{enumerable:!0,get:function(){return r.VectorAlgorithms}});var s=requireAGGREGATE();Object.defineProperty(e,"AggregateGroupByReducers",{enumerable:!0,get:function(){return s.AggregateGroupByReducers}}),Object.defineProperty(e,"AggregateSteps",{enumerable:!0,get:function(){return s.AggregateSteps}})}(dist$1);var dist={},commands={},ADD={},hasRequiredADD;function requireADD(){if(hasRequiredADD)return ADD;hasRequiredADD=1,Object.defineProperty(ADD,"__esModule",{value:!0}),ADD.transformArguments=ADD.FIRST_KEY_INDEX=void 0;const e=requireCommands();return ADD.FIRST_KEY_INDEX=1,ADD.transformArguments=function(t,r,s,n){const i=["TS.ADD",t,(0,e.transformTimestampArgument)(r),s.toString()];return(0,e.pushRetentionArgument)(i,n?.RETENTION),(0,e.pushEncodingArgument)(i,n?.ENCODING),(0,e.pushChunkSizeArgument)(i,n?.CHUNK_SIZE),n?.ON_DUPLICATE&&i.push("ON_DUPLICATE",n.ON_DUPLICATE),(0,e.pushLabelsArgument)(i,n?.LABELS),i},ADD}var ALTER={},hasRequiredALTER;function requireALTER(){if(hasRequiredALTER)return ALTER;hasRequiredALTER=1,Object.defineProperty(ALTER,"__esModule",{value:!0}),ALTER.transformArguments=ALTER.FIRST_KEY_INDEX=void 0;const e=requireCommands();return ALTER.FIRST_KEY_INDEX=1,ALTER.transformArguments=function(t,r){const s=["TS.ALTER",t];return(0,e.pushRetentionArgument)(s,r?.RETENTION),(0,e.pushChunkSizeArgument)(s,r?.CHUNK_SIZE),(0,e.pushDuplicatePolicy)(s,r?.DUPLICATE_POLICY),(0,e.pushLabelsArgument)(s,r?.LABELS),s},ALTER}var CREATE={},hasRequiredCREATE;function requireCREATE(){if(hasRequiredCREATE)return CREATE;hasRequiredCREATE=1,Object.defineProperty(CREATE,"__esModule",{value:!0}),CREATE.transformArguments=CREATE.FIRST_KEY_INDEX=void 0;const e=requireCommands();return CREATE.FIRST_KEY_INDEX=1,CREATE.transformArguments=function(t,r){const s=["TS.CREATE",t];return(0,e.pushRetentionArgument)(s,r?.RETENTION),(0,e.pushEncodingArgument)(s,r?.ENCODING),(0,e.pushChunkSizeArgument)(s,r?.CHUNK_SIZE),(0,e.pushDuplicatePolicy)(s,r?.DUPLICATE_POLICY),(0,e.pushLabelsArgument)(s,r?.LABELS),s},CREATE}var CREATERULE={};function transformArguments$3(e,t,r,s,n){const i=["TS.CREATERULE",e,t,"AGGREGATION",r,s.toString()];return n&&i.push(n.toString()),i}Object.defineProperty(CREATERULE,"__esModule",{value:!0}),CREATERULE.transformArguments=CREATERULE.FIRST_KEY_INDEX=void 0,CREATERULE.FIRST_KEY_INDEX=1,CREATERULE.transformArguments=transformArguments$3;var DECRBY={},hasRequiredDECRBY;function requireDECRBY(){if(hasRequiredDECRBY)return DECRBY;hasRequiredDECRBY=1,Object.defineProperty(DECRBY,"__esModule",{value:!0}),DECRBY.transformArguments=DECRBY.FIRST_KEY_INDEX=void 0;const e=requireCommands();return DECRBY.FIRST_KEY_INDEX=1,DECRBY.transformArguments=function(t,r,s){return(0,e.transformIncrDecrArguments)("TS.DECRBY",t,r,s)},DECRBY}var DEL={},hasRequiredDEL;function requireDEL(){if(hasRequiredDEL)return DEL;hasRequiredDEL=1,Object.defineProperty(DEL,"__esModule",{value:!0}),DEL.transformArguments=DEL.FIRTS_KEY_INDEX=void 0;const e=requireCommands();return DEL.FIRTS_KEY_INDEX=1,DEL.transformArguments=function(t,r,s){return["TS.DEL",t,(0,e.transformTimestampArgument)(r),(0,e.transformTimestampArgument)(s)]},DEL}var DELETERULE={};function transformArguments$2(e,t){return["TS.DELETERULE",e,t]}Object.defineProperty(DELETERULE,"__esModule",{value:!0}),DELETERULE.transformArguments=DELETERULE.FIRST_KEY_INDEX=void 0,DELETERULE.FIRST_KEY_INDEX=1,DELETERULE.transformArguments=transformArguments$2;var GET={},hasRequiredGET;function requireGET(){if(hasRequiredGET)return GET;hasRequiredGET=1,Object.defineProperty(GET,"__esModule",{value:!0}),GET.transformReply=GET.transformArguments=GET.IS_READ_ONLY=GET.FIRST_KEY_INDEX=void 0;const e=requireCommands();return GET.FIRST_KEY_INDEX=1,GET.IS_READ_ONLY=!0,GET.transformArguments=function(t,r){return(0,e.pushLatestArgument)(["TS.GET",t],r?.LATEST)},GET.transformReply=function(t){return 0===t.length?null:(0,e.transformSampleReply)(t)},GET}var INCRBY={},hasRequiredINCRBY;function requireINCRBY(){if(hasRequiredINCRBY)return INCRBY;hasRequiredINCRBY=1,Object.defineProperty(INCRBY,"__esModule",{value:!0}),INCRBY.transformArguments=INCRBY.FIRST_KEY_INDEX=void 0;const e=requireCommands();return INCRBY.FIRST_KEY_INDEX=1,INCRBY.transformArguments=function(t,r,s){return(0,e.transformIncrDecrArguments)("TS.INCRBY",t,r,s)},INCRBY}var INFO_DEBUG={},INFO={};function transformArguments$1(e){return["TS.INFO",e]}function transformReply(e){return{totalSamples:e[1],memoryUsage:e[3],firstTimestamp:e[5],lastTimestamp:e[7],retentionTime:e[9],chunkCount:e[11],chunkSize:e[13],chunkType:e[15],duplicatePolicy:e[17],labels:e[19].map((([e,t])=>({name:e,value:t}))),sourceKey:e[21],rules:e[23].map((([e,t,r])=>({key:e,timeBucket:t,aggregationType:r})))}}Object.defineProperty(INFO,"__esModule",{value:!0}),INFO.transformReply=INFO.transformArguments=INFO.IS_READ_ONLY=INFO.FIRST_KEY_INDEX=void 0,INFO.FIRST_KEY_INDEX=1,INFO.IS_READ_ONLY=!0,INFO.transformArguments=transformArguments$1,INFO.transformReply=transformReply,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.FIRST_KEY_INDEX=e.IS_READ_ONLY=void 0;const t=INFO;var r=INFO;Object.defineProperty(e,"IS_READ_ONLY",{enumerable:!0,get:function(){return r.IS_READ_ONLY}}),Object.defineProperty(e,"FIRST_KEY_INDEX",{enumerable:!0,get:function(){return r.FIRST_KEY_INDEX}}),e.transformArguments=function(e){const r=(0,t.transformArguments)(e);return r.push("DEBUG"),r},e.transformReply=function(e){const r=(0,t.transformReply)(e);return r.keySelfName=e[25],r.chunks=e[27].map((e=>({startTimestamp:e[1],endTimestamp:e[3],samples:e[5],size:e[7],bytesPerSample:e[9]}))),r}}(INFO_DEBUG);var MADD={},hasRequiredMADD;function requireMADD(){if(hasRequiredMADD)return MADD;hasRequiredMADD=1,Object.defineProperty(MADD,"__esModule",{value:!0}),MADD.transformArguments=MADD.FIRST_KEY_INDEX=void 0;const e=requireCommands();return MADD.FIRST_KEY_INDEX=1,MADD.transformArguments=function(t){const r=["TS.MADD"];for(const{key:s,timestamp:n,value:i}of t)r.push(s,(0,e.transformTimestampArgument)(n),i.toString());return r},MADD}var MGET={},hasRequiredMGET;function requireMGET(){if(hasRequiredMGET)return MGET;hasRequiredMGET=1,Object.defineProperty(MGET,"__esModule",{value:!0}),MGET.transformReply=MGET.transformArguments=MGET.IS_READ_ONLY=void 0;const e=requireCommands();return MGET.IS_READ_ONLY=!0,MGET.transformArguments=function(t,r){const s=(0,e.pushLatestArgument)(["TS.MGET"],r?.LATEST);return(0,e.pushFilterArgument)(s,t)},MGET.transformReply=function(t){return t.map((([t,r,s])=>({key:t,sample:(0,e.transformSampleReply)(s)})))},MGET}var MGET_WITHLABELS={},hasRequiredMGET_WITHLABELS;function requireMGET_WITHLABELS(){if(hasRequiredMGET_WITHLABELS)return MGET_WITHLABELS;hasRequiredMGET_WITHLABELS=1,Object.defineProperty(MGET_WITHLABELS,"__esModule",{value:!0}),MGET_WITHLABELS.transformReply=MGET_WITHLABELS.transformArguments=MGET_WITHLABELS.IS_READ_ONLY=void 0;const e=requireCommands();return MGET_WITHLABELS.IS_READ_ONLY=!0,MGET_WITHLABELS.transformArguments=function(t,r){const s=(0,e.pushWithLabelsArgument)(["TS.MGET"],r?.SELECTED_LABELS);return(0,e.pushFilterArgument)(s,t)},MGET_WITHLABELS.transformReply=function(t){return t.map((([t,r,s])=>({key:t,labels:(0,e.transformLablesReply)(r),sample:(0,e.transformSampleReply)(s)})))},MGET_WITHLABELS}var QUERYINDEX={};Object.defineProperty(QUERYINDEX,"__esModule",{value:!0}),QUERYINDEX.transformArguments=QUERYINDEX.IS_READ_ONLY=void 0;const generic_transformers_1=genericTransformers;function transformArguments(e){return(0,generic_transformers_1.pushVerdictArguments)(["TS.QUERYINDEX"],e)}QUERYINDEX.IS_READ_ONLY=!0,QUERYINDEX.transformArguments=transformArguments;var RANGE={},hasRequiredRANGE;function requireRANGE(){if(hasRequiredRANGE)return RANGE;hasRequiredRANGE=1,Object.defineProperty(RANGE,"__esModule",{value:!0}),RANGE.transformReply=RANGE.transformArguments=RANGE.IS_READ_ONLY=RANGE.FIRST_KEY_INDEX=void 0;const e=requireCommands();return RANGE.FIRST_KEY_INDEX=1,RANGE.IS_READ_ONLY=!0,RANGE.transformArguments=function(t,r,s,n){return(0,e.pushRangeArguments)(["TS.RANGE",t],r,s,n)},RANGE.transformReply=function(t){return(0,e.transformRangeReply)(t)},RANGE}var REVRANGE={},hasRequiredREVRANGE;function requireREVRANGE(){if(hasRequiredREVRANGE)return REVRANGE;hasRequiredREVRANGE=1,Object.defineProperty(REVRANGE,"__esModule",{value:!0}),REVRANGE.transformReply=REVRANGE.transformArguments=REVRANGE.IS_READ_ONLY=REVRANGE.FIRST_KEY_INDEX=void 0;const e=requireCommands();return REVRANGE.FIRST_KEY_INDEX=1,REVRANGE.IS_READ_ONLY=!0,REVRANGE.transformArguments=function(t,r,s,n){return(0,e.pushRangeArguments)(["TS.REVRANGE",t],r,s,n)},REVRANGE.transformReply=function(t){return(0,e.transformRangeReply)(t)},REVRANGE}var MRANGE={},hasRequiredMRANGE;function requireMRANGE(){return hasRequiredMRANGE||(hasRequiredMRANGE=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=requireCommands();e.IS_READ_ONLY=!0,e.transformArguments=function(e,r,s,n){return(0,t.pushMRangeArguments)(["TS.MRANGE"],e,r,s,n)};var r=requireCommands();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformMRangeReply}})}(MRANGE)),MRANGE}var MRANGE_WITHLABELS={},hasRequiredMRANGE_WITHLABELS;function requireMRANGE_WITHLABELS(){return hasRequiredMRANGE_WITHLABELS||(hasRequiredMRANGE_WITHLABELS=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=requireCommands();e.IS_READ_ONLY=!0,e.transformArguments=function(e,r,s,n){return(0,t.pushMRangeWithLabelsArguments)(["TS.MRANGE"],e,r,s,n)};var r=requireCommands();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformMRangeWithLabelsReply}})}(MRANGE_WITHLABELS)),MRANGE_WITHLABELS}var MREVRANGE={},hasRequiredMREVRANGE;function requireMREVRANGE(){return hasRequiredMREVRANGE||(hasRequiredMREVRANGE=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=requireCommands();e.IS_READ_ONLY=!0,e.transformArguments=function(e,r,s,n){return(0,t.pushMRangeArguments)(["TS.MREVRANGE"],e,r,s,n)};var r=requireCommands();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformMRangeReply}})}(MREVRANGE)),MREVRANGE}var MREVRANGE_WITHLABELS={},hasRequiredMREVRANGE_WITHLABELS,hasRequiredCommands;function requireMREVRANGE_WITHLABELS(){return hasRequiredMREVRANGE_WITHLABELS||(hasRequiredMREVRANGE_WITHLABELS=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformReply=e.transformArguments=e.IS_READ_ONLY=void 0;const t=requireCommands();e.IS_READ_ONLY=!0,e.transformArguments=function(e,r,s,n){return(0,t.pushMRangeWithLabelsArguments)(["TS.MREVRANGE"],e,r,s,n)};var r=requireCommands();Object.defineProperty(e,"transformReply",{enumerable:!0,get:function(){return r.transformMRangeWithLabelsReply}})}(MREVRANGE_WITHLABELS)),MREVRANGE_WITHLABELS}function requireCommands(){if(hasRequiredCommands)return commands;hasRequiredCommands=1,Object.defineProperty(commands,"__esModule",{value:!0}),commands.pushLatestArgument=commands.transformMRangeWithLabelsReply=commands.transformMRangeReply=commands.transformRangeReply=commands.pushMRangeWithLabelsArguments=commands.pushWithLabelsArgument=commands.pushMRangeArguments=commands.pushFilterArgument=commands.pushMRangeGroupByArguments=commands.pushRangeArguments=commands.TimeSeriesBucketTimestamp=commands.transformSampleReply=commands.transformIncrDecrArguments=commands.pushLabelsArgument=commands.transformLablesReply=commands.pushDuplicatePolicy=commands.pushChunkSizeArgument=commands.pushEncodingArgument=commands.TimeSeriesEncoding=commands.pushRetentionArgument=commands.transformTimestampArgument=commands.TimeSeriesReducers=commands.TimeSeriesDuplicatePolicies=commands.TimeSeriesAggregationType=void 0;const e=requireADD(),t=requireALTER(),r=requireCREATE(),s=CREATERULE,n=requireDECRBY(),i=requireDEL(),a=DELETERULE,o=requireGET(),c=requireINCRBY(),u=INFO_DEBUG,l=INFO,p=requireMADD(),m=requireMGET(),d=requireMGET_WITHLABELS(),f=QUERYINDEX,h=requireRANGE(),_=requireREVRANGE(),E=requireMRANGE(),S=requireMRANGE_WITHLABELS(),R=requireMREVRANGE(),g=requireMREVRANGE_WITHLABELS(),A=genericTransformers;var T,v,b,I,N;function y(e){return"string"==typeof e?e:("number"==typeof e?e:e.getTime()).toString()}function O(e,t){return void 0!==t&&e.push("RETENTION",t.toString()),e}function $(e,t){return void 0!==t&&e.push("CHUNK_SIZE",t.toString()),e}function C(e){const t={};for(const[r,s]of e)t[r]=s;return t}function L(e,t){if(t){e.push("LABELS");for(const[r,s]of Object.entries(t))e.push(r,s)}return e}function D(e){return{timestamp:e[0],value:Number(e[1])}}function P(e,t,r,s){if(e.push(y(t),y(r)),w(e,s?.LATEST),s?.FILTER_BY_TS){e.push("FILTER_BY_TS");for(const t of s.FILTER_BY_TS)e.push(y(t))}return s?.FILTER_BY_VALUE&&e.push("FILTER_BY_VALUE",s.FILTER_BY_VALUE.min.toString(),s.FILTER_BY_VALUE.max.toString()),s?.COUNT&&e.push("COUNT",s.COUNT.toString()),s?.ALIGN&&e.push("ALIGN",y(s.ALIGN)),s?.AGGREGATION&&(e.push("AGGREGATION",s.AGGREGATION.type,y(s.AGGREGATION.timeBucket)),s.AGGREGATION.BUCKETTIMESTAMP&&e.push("BUCKETTIMESTAMP",s.AGGREGATION.BUCKETTIMESTAMP),s.AGGREGATION.EMPTY&&e.push("EMPTY")),e}function x(e,t){return t&&e.push("GROUPBY",t.label,"REDUCE",t.reducer),e}function M(e,t){return e.push("FILTER"),(0,A.pushVerdictArguments)(e,t)}function F(e,t){return t?(e.push("SELECTED_LABELS"),e=(0,A.pushVerdictArguments)(e,t)):e.push("WITHLABELS"),e}function w(e,t){return t&&e.push("LATEST"),e}return commands.default={ADD:e,add:e,ALTER:t,alter:t,CREATE:r,create:r,CREATERULE:s,createRule:s,DECRBY:n,decrBy:n,DEL:i,del:i,DELETERULE:a,deleteRule:a,GET:o,get:o,INCRBY:c,incrBy:c,INFO_DEBUG:u,infoDebug:u,INFO:l,info:l,MADD:p,mAdd:p,MGET:m,mGet:m,MGET_WITHLABELS:d,mGetWithLabels:d,QUERYINDEX:f,queryIndex:f,RANGE:h,range:h,REVRANGE:_,revRange:_,MRANGE:E,mRange:E,MRANGE_WITHLABELS:S,mRangeWithLabels:S,MREVRANGE:R,mRevRange:R,MREVRANGE_WITHLABELS:g,mRevRangeWithLabels:g},function(e){e.AVG="AVG",e.AVERAGE="AVG",e.FIRST="FIRST",e.LAST="LAST",e.MIN="MIN",e.MINIMUM="MIN",e.MAX="MAX",e.MAXIMUM="MAX",e.SUM="SUM",e.RANGE="RANGE",e.COUNT="COUNT",e.STD_P="STD.P",e.STD_S="STD.S",e.VAR_P="VAR.P",e.VAR_S="VAR.S",e.TWA="TWA"}(T||(commands.TimeSeriesAggregationType=T={})),function(e){e.BLOCK="BLOCK",e.FIRST="FIRST",e.LAST="LAST",e.MIN="MIN",e.MAX="MAX",e.SUM="SUM"}(v||(commands.TimeSeriesDuplicatePolicies=v={})),function(e){e.AVG="AVG",e.SUM="SUM",e.MIN="MIN",e.MINIMUM="MIN",e.MAX="MAX",e.MAXIMUM="MAX",e.RANGE="range",e.COUNT="COUNT",e.STD_P="STD.P",e.STD_S="STD.S",e.VAR_P="VAR.P",e.VAR_S="VAR.S"}(b||(commands.TimeSeriesReducers=b={})),commands.transformTimestampArgument=y,commands.pushRetentionArgument=O,function(e){e.COMPRESSED="COMPRESSED",e.UNCOMPRESSED="UNCOMPRESSED"}(I||(commands.TimeSeriesEncoding=I={})),commands.pushEncodingArgument=function(e,t){return void 0!==t&&e.push("ENCODING",t),e},commands.pushChunkSizeArgument=$,commands.pushDuplicatePolicy=function(e,t){return void 0!==t&&e.push("DUPLICATE_POLICY",t),e},commands.transformLablesReply=C,commands.pushLabelsArgument=L,commands.transformIncrDecrArguments=function(e,t,r,s){const n=[e,t,r.toString()];return null!=s?.TIMESTAMP&&n.push("TIMESTAMP",y(s.TIMESTAMP)),O(n,s?.RETENTION),s?.UNCOMPRESSED&&n.push("UNCOMPRESSED"),$(n,s?.CHUNK_SIZE),L(n,s?.LABELS),n},commands.transformSampleReply=D,function(e){e.LOW="-",e.HIGH="+",e.MID="~"}(N||(commands.TimeSeriesBucketTimestamp=N={})),commands.pushRangeArguments=P,commands.pushMRangeGroupByArguments=x,commands.pushFilterArgument=M,commands.pushMRangeArguments=function(e,t,r,s,n){return x(e=M(e=P(e,t,r,n),s),n?.GROUPBY)},commands.pushWithLabelsArgument=F,commands.pushMRangeWithLabelsArguments=function(e,t,r,s,n){return x(e=M(e=F(e=P(e,t,r,n),n?.SELECTED_LABELS),s),n?.GROUPBY)},commands.transformRangeReply=function(e){return e.map(D)},commands.transformMRangeReply=function(e){const t=[];for(const[r,s,n]of e)t.push({key:r,samples:n.map(D)});return t},commands.transformMRangeWithLabelsReply=function(e){const t=[];for(const[r,s,n]of e)t.push({key:r,labels:C(s),samples:n.map(D)});return t},commands.pushLatestArgument=w,commands}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TimeSeriesBucketTimestamp=e.TimeSeriesReducers=e.TimeSeriesAggregationType=e.TimeSeriesEncoding=e.TimeSeriesDuplicatePolicies=e.default=void 0;var t=requireCommands();Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}});var r=requireCommands();Object.defineProperty(e,"TimeSeriesDuplicatePolicies",{enumerable:!0,get:function(){return r.TimeSeriesDuplicatePolicies}}),Object.defineProperty(e,"TimeSeriesEncoding",{enumerable:!0,get:function(){return r.TimeSeriesEncoding}}),Object.defineProperty(e,"TimeSeriesAggregationType",{enumerable:!0,get:function(){return r.TimeSeriesAggregationType}}),Object.defineProperty(e,"TimeSeriesReducers",{enumerable:!0,get:function(){return r.TimeSeriesReducers}}),Object.defineProperty(e,"TimeSeriesBucketTimestamp",{enumerable:!0,get:function(){return r.TimeSeriesBucketTimestamp}})}(dist),function(e){var t=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),r=commonjsGlobal&&commonjsGlobal.__exportStar||function(e,r){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(r,s)||t(r,e,s)};Object.defineProperty(e,"__esModule",{value:!0}),e.createCluster=e.createClient=void 0;const s=dist$5,n=dist$4,i=dist$3,a=dist$2,o=dist$1,c=dist;r(dist$5,e),r(dist$4,e),r(dist$3,e),r(dist$2,e),r(dist$1,e),r(dist,e);const u={...n.default,graph:i.default,json:a.default,ft:o.default,ts:c.default};e.createClient=function(e){return(0,s.createClient)({...e,modules:{...u,...e?.modules}})},e.createCluster=function(e){return(0,s.createCluster)({...e,modules:{...u,...e?.modules}})}}(dist$6);class Authentication$1{static mount(e){const t=loadAuthenticationConfig(),r=loadBasicConfig();if(!t.enabled)return void View.mountBeforeRender(e);const s={secret:"secret",resave:!1,saveUninitialized:!1,name:t.cookie_name,cookie:{secure:t.cookie_secure,httpOnly:t.cookie_httpOnly,maxAge:t.expiration}};if("redis"===t.session_store){const e=dist$6.createClient({url:t.redis_host});e.connect().catch(console.error),s.store=new RedisStore({client:e})}e.use(session(s)),passport$1.use(new libExports$1.Strategy({usernameField:t.username,passwordField:t.password,session:!0,passReqToCallback:!0},(async(e,r,s,n)=>{const i=await t.authenticate_user(r,s,e),a=e.headers["x-forwarded-proto"]||e.protocol;i&&"http"===a&&t.cookie_secure&&console.warn("Warning: Cookie security must be disabled for user authentication to work over the HTTP protocol (config/authentication.js#cookie_secure)"),n(null,i||!1)}))),passport$1.serializeUser(((e,t)=>{t(null,e.id||void 0)})),passport$1.deserializeUser((async(e,r)=>{r(null,await t.subscribe_user(e))})),e.use(passport$1.initialize()),e.use(passport$1.session()),View.mountBeforeRender(e),e.use(((e,s,n)=>{if(t.allow_unauthenticated&&this.#e(e,t.allow_unauthenticated))return void n();const i=r.is_ajax(e),a=isFunction(t.failure_redirect)?t.failure_redirect(e,s):t.failure_redirect;e.isAuthenticated()?e.path!==a||i?(s.locals.session=e.user,n()):s.redirect(t.success_redirect):i?s.status(401).end():e.path===a?n():s.redirect(a)}))}static#e(e,t){const r=e.path.replace(/\/$/,"");if(!t.length)return!0;for(let e of t)if("string"==typeof e&&-1!==r.indexOf(e)||e instanceof RegExp&&r.match(e))return!0;return!1}}var balancedMatch=balanced$1;function balanced$1(e,t,r){e instanceof RegExp&&(e=maybeMatch(e,r)),t instanceof RegExp&&(t=maybeMatch(t,r));var s=range(e,t,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+e.length,s[1]),post:r.slice(s[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}function range(e,t,r){var s,n,i,a,o,c=r.indexOf(e),u=r.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(e===t)return[c,u];for(s=[],i=r.length;l>=0&&!o;)l==c?(s.push(l),c=r.indexOf(e,l+1)):1==s.length?o=[s.pop(),u]:((n=s.pop())<i&&(i=n,a=u),u=r.indexOf(t,l+1)),l=c<u&&c>=0?c:u;s.length&&(o=[i,a])}return o}balanced$1.range=range;var balanced=balancedMatch,braceExpansion=expandTop,escSlash="\0SLASH"+Math.random()+"\0",escOpen="\0OPEN"+Math.random()+"\0",escClose="\0CLOSE"+Math.random()+"\0",escComma="\0COMMA"+Math.random()+"\0",escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(e){return e.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[],r=balanced("{","}",e);if(!r)return e.split(",");var s=r.pre,n=r.body,i=r.post,a=s.split(",");a[a.length-1]+="{"+n+"}";var o=parseCommaParts(i);return i.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),t.push.apply(t,a),t}function expandTop(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),expand(escapeBraces(e),!0).map(unescapeBraces)):[]}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[],s=balanced("{","}",e);if(!s)return[e];var n=s.pre,i=s.post.length?expand(s.post,!1):[""];if(/\$$/.test(s.pre))for(var a=0;a<i.length;a++){var o=n+"{"+s.body+"}"+i[a];r.push(o)}else{var c,u,l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),m=l||p,d=s.body.indexOf(",")>=0;if(!m&&!d)return s.post.match(/,.*\}/)?expand(e=s.pre+"{"+s.body+escClose+s.post):[e];if(m)c=s.body.split(/\.\./);else if(1===(c=parseCommaParts(s.body)).length&&1===(c=expand(c[0],!1).map(embrace)).length)return i.map((function(e){return s.pre+c[0]+e}));if(m){var f=numeric(c[0]),h=numeric(c[1]),_=Math.max(c[0].length,c[1].length),E=3==c.length?Math.abs(numeric(c[2])):1,S=lte;h<f&&(E*=-1,S=gte);var R=c.some(isPadded);u=[];for(var g=f;S(g,h);g+=E){var A;if(p)"\\"===(A=String.fromCharCode(g))&&(A="");else if(A=String(g),R){var T=_-A.length;if(T>0){var v=new Array(T+1).join("0");A=g<0?"-"+v+A.slice(1):v+A}}u.push(A)}}else{u=[];for(var b=0;b<c.length;b++)u.push.apply(u,expand(c[b],!1))}for(b=0;b<u.length;b++)for(a=0;a<i.length;a++){o=n+u[b]+i[a];(!t||m||o)&&r.push(o)}}return r}var expand$1=getDefaultExportFromCjs(braceExpansion);const MAX_PATTERN_LENGTH=65536,assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>MAX_PATTERN_LENGTH)throw new TypeError("pattern is too long")},posixClasses={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&"),regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rangesToString=e=>e.join(""),parseClass=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const s=[],n=[];let i=r+1,a=!1,o=!1,c=!1,u=!1,l=r,p="";e:for(;i<e.length;){const t=e.charAt(i);if("!"!==t&&"^"!==t||i!==r+1){if("]"===t&&a&&!c){l=i+1;break}if(a=!0,"\\"!==t||c){if("["===t&&!c)for(const[t,[a,c,u]]of Object.entries(posixClasses))if(e.startsWith(t,i)){if(p)return["$.",!1,e.length-r,!0];i+=t.length,u?n.push(a):s.push(a),o=o||c;continue e}c=!1,p?(t>p?s.push(braceEscape(p)+"-"+braceEscape(t)):t===p&&s.push(braceEscape(t)),p="",i++):e.startsWith("-]",i+1)?(s.push(braceEscape(t+"-")),i+=2):e.startsWith("-",i+1)?(p=t,i+=2):(s.push(braceEscape(t)),i++)}else c=!0,i++}else u=!0,i++}if(l<i)return["",!1,0,!1];if(!s.length&&!n.length)return["$.",!1,e.length-r,!0];if(0===n.length&&1===s.length&&/^\\?.$/.test(s[0])&&!u){const e=2===s[0].length?s[0].slice(-1):s[0];return[regexpEscape(e),!1,l-r,!1]}const m="["+(u?"^":"")+rangesToString(s)+"]",d="["+(u?"":"^")+rangesToString(n)+"]";return[s.length&&n.length?"("+m+"|"+d+")":s.length?m:d,o,l-r,!0]},unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),types=new Set(["!","?","+","*","@"]),isExtglobType=e=>types.has(e),startNoTraversal="(?!(?:^|/)\\.\\.?(?:$|/))",startNoDot="(?!\\.)",addPatternStart=new Set(["[","."]),justDots=new Set(["..","."]),reSpecials=new Set("().*{}+?[]^$\\!"),regExpEscape$1=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qmark$1="[^/]",star$1=qmark$1+"*?",starNoEmpty=qmark$1+"+?";class AST{type;#t;#r;#s=!1;#n=[];#i;#a;#o;#c=!1;#u;#l;#p=!1;constructor(e,t,r={}){this.type=e,e&&(this.#r=!0),this.#i=t,this.#t=this.#i?this.#i.#t:this,this.#u=this.#t===this?r:this.#t.#u,this.#o=this.#t===this?[]:this.#t.#o,"!"!==e||this.#t.#c||this.#o.push(this),this.#a=this.#i?this.#i.#n.length:0}get hasMagic(){if(void 0!==this.#r)return this.#r;for(const e of this.#n)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return void 0!==this.#l?this.#l:this.type?this.#l=this.type+"("+this.#n.map((e=>String(e))).join("|")+")":this.#l=this.#n.map((e=>String(e))).join("")}#m(){if(this!==this.#t)throw new Error("should only call on root");if(this.#c)return this;let e;for(this.toString(),this.#c=!0;e=this.#o.pop();){if("!"!==e.type)continue;let t=e,r=t.#i;for(;r;){for(let s=t.#a+1;!r.type&&s<r.#n.length;s++)for(const t of e.#n){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#n[s])}t=r,r=t.#i}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof AST&&t.#i===this))throw new Error("invalid part: "+t);this.#n.push(t)}}toJSON(){const e=null===this.type?this.#n.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#n.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&"!"===this.#i?.type)&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#a)return!0;const e=this.#i;for(let t=0;t<this.#a;t++){const r=e.#n[t];if(!(r instanceof AST&&"!"===r.type))return!1}return!0}isEnd(){if(this.#t===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const e=this.#i?this.#i.#n.length:0;return this.#a===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new AST(this.type,e);for(const e of this.#n)t.copyIn(e);return t}static#d(e,t,r,s){let n=!1,i=!1,a=-1,o=!1;if(null===t.type){let c=r,u="";for(;c<e.length;){const r=e.charAt(c++);if(n||"\\"===r)n=!n,u+=r;else if(i)c===a+1?"^"!==r&&"!"!==r||(o=!0):"]"!==r||c===a+2&&o||(i=!1),u+=r;else if("["!==r)if(s.noext||!isExtglobType(r)||"("!==e.charAt(c))u+=r;else{t.push(u),u="";const n=new AST(r,t);c=AST.#d(e,n,c,s),t.push(n)}else i=!0,a=c,o=!1,u+=r}return t.push(u),c}let c=r+1,u=new AST(null,t);const l=[];let p="";for(;c<e.length;){const r=e.charAt(c++);if(n||"\\"===r)n=!n,p+=r;else if(i)c===a+1?"^"!==r&&"!"!==r||(o=!0):"]"!==r||c===a+2&&o||(i=!1),p+=r;else if("["!==r)if(isExtglobType(r)&&"("===e.charAt(c)){u.push(p),p="";const t=new AST(r,u);u.push(t),c=AST.#d(e,t,c,s)}else if("|"!==r){if(")"===r)return""===p&&0===t.#n.length&&(t.#p=!0),u.push(p),p="",t.push(...l,u),c;p+=r}else u.push(p),p="",l.push(u),u=new AST(null,t);else i=!0,a=c,o=!1,p+=r}return t.type=null,t.#r=void 0,t.#n=[e.substring(r-1)],c}static fromGlob(e,t={}){const r=new AST(null,void 0,t);return AST.#d(e,r,0,t),r}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();const e=this.toString(),[t,r,s,n]=this.toRegExpSource();if(!(s||this.#r||this.#u.nocase&&!this.#u.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const i=(this.#u.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,i),{_src:t,_glob:e})}get options(){return this.#u}toRegExpSource(e){const t=e??!!this.#u.dot;if(this.#t===this&&this.#m(),!this.type){const r=this.isStart()&&this.isEnd(),s=this.#n.map((t=>{const[s,n,i,a]="string"==typeof t?AST.#f(t,this.#r,r):t.toRegExpSource(e);return this.#r=this.#r||i,this.#s=this.#s||a,s})).join("");let n="";if(this.isStart()&&"string"==typeof this.#n[0]){if(!(1===this.#n.length&&justDots.has(this.#n[0]))){const r=addPatternStart,i=t&&r.has(s.charAt(0))||s.startsWith("\\.")&&r.has(s.charAt(2))||s.startsWith("\\.\\.")&&r.has(s.charAt(4)),a=!t&&!e&&r.has(s.charAt(0));n=i?startNoTraversal:a?startNoDot:""}}let i="";this.isEnd()&&this.#t.#c&&"!"===this.#i?.type&&(i="(?:$|\\/)");return[n+s+i,unescape(s),this.#r=!!this.#r,this.#s]}const r="*"===this.type||"+"===this.type,s="!"===this.type?"(?:(?!(?:":"(?:";let n=this.#h(t);if(this.isStart()&&this.isEnd()&&!n&&"!"!==this.type){const e=this.toString();return this.#n=[e],this.type=null,this.#r=void 0,[e,unescape(this.toString()),!1,!1]}let i=!r||e||t||!startNoDot?"":this.#h(!0);i===n&&(i=""),i&&(n=`(?:${n})(?:${i})*?`);let a="";if("!"===this.type&&this.#p)a=(this.isStart()&&!t?startNoDot:"")+starNoEmpty;else{a=s+n+("!"===this.type?"))"+(!this.isStart()||t||e?"":startNoDot)+star$1+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&i?")":"*"===this.type&&i?")?":`)${this.type}`)}return[a,unescape(n),this.#r=!!this.#r,this.#s]}#h(e){return this.#n.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,s,n,i]=t.toRegExpSource(e);return this.#s=this.#s||i,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#f(e,t,r=!1){let s=!1,n="",i=!1;for(let a=0;a<e.length;a++){const o=e.charAt(a);if(s)s=!1,n+=(reSpecials.has(o)?"\\":"")+o;else if("\\"!==o){if("["===o){const[r,s,o,c]=parseClass(e,a);if(o){n+=r,i=i||s,a+=o-1,t=t||c;continue}}"*"!==o?"?"!==o?n+=regExpEscape$1(o):(n+=qmark$1,t=!0):(n+=r&&"*"===e?starNoEmpty:star$1,t=!0)}else a===e.length-1?n+="\\\\":s=!0}return[n,unescape(e),!!t,i]}}const escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),minimatch=(e,t,r={})=>(assertValidPattern(t),!(!r.nocomment&&"#"===t.charAt(0))&&new Minimatch(t,r).match(e)),starDotExtRE=/^\*+([^+@!?\*\[\(]*)$/,starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e),starDotExtTestDot=e=>t=>t.endsWith(e),starDotExtTestNocase=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),starDotExtTestNocaseDot=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),starDotStarRE=/^\*+\.\*+$/,starDotStarTest=e=>!e.startsWith(".")&&e.includes("."),starDotStarTestDot=e=>"."!==e&&".."!==e&&e.includes("."),dotStarRE=/^\.\*+$/,dotStarTest=e=>"."!==e&&".."!==e&&e.startsWith("."),starRE=/^\*+$/,starTest=e=>0!==e.length&&!e.startsWith("."),starTestDot=e=>0!==e.length&&"."!==e&&".."!==e,qmarksRE=/^\?+([^+@!?\*\[\(]*)?$/,qmarksTestNocase=([e,t=""])=>{const r=qmarksTestNoExt([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},qmarksTestNocaseDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},qmarksTestDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);return t?e=>r(e)&&e.endsWith(t):r},qmarksTest=([e,t=""])=>{const r=qmarksTestNoExt([e]);return t?e=>r(e)&&e.endsWith(t):r},qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},defaultPlatform$2="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",path={win32:{sep:"\\"},posix:{sep:"/"}},sep="win32"===defaultPlatform$2?path.win32.sep:path.posix.sep;minimatch.sep=sep;const GLOBSTAR=Symbol("globstar **");minimatch.GLOBSTAR=GLOBSTAR;const qmark="[^/]",star=qmark+"*?",twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?",filter=(e,t={})=>r=>minimatch(r,e,t);minimatch.filter=filter;const ext=(e,t={})=>Object.assign({},e,t),defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return minimatch;const t=minimatch;return Object.assign(((r,s,n={})=>t(r,s,ext(e,n))),{Minimatch:class extends t.Minimatch{constructor(t,r={}){super(t,ext(e,r))}static defaults(r){return t.defaults(ext(e,r)).Minimatch}},AST:class extends t.AST{constructor(t,r,s={}){super(t,r,ext(e,s))}static fromGlob(r,s={}){return t.AST.fromGlob(r,ext(e,s))}},unescape:(r,s={})=>t.unescape(r,ext(e,s)),escape:(r,s={})=>t.escape(r,ext(e,s)),filter:(r,s={})=>t.filter(r,ext(e,s)),defaults:r=>t.defaults(ext(e,r)),makeRe:(r,s={})=>t.makeRe(r,ext(e,s)),braceExpand:(r,s={})=>t.braceExpand(r,ext(e,s)),match:(r,s,n={})=>t.match(r,s,ext(e,n)),sep:t.sep,GLOBSTAR:GLOBSTAR})};minimatch.defaults=defaults;const braceExpand=(e,t={})=>(assertValidPattern(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:expand$1(e));minimatch.braceExpand=braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();minimatch.makeRe=makeRe;const match=(e,t,r={})=>{const s=new Minimatch(t,r);return e=e.filter((e=>s.match(e))),s.options.nonull&&!e.length&&e.push(t),e};minimatch.match=match;const globMagic=/[?*]|[+@!]\(.*?\)|\[|\]/,regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){assertValidPattern(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||defaultPlatform$2,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let s=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&globMagic.test(e[2])||globMagic.test(e[3])),r=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(r)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,s),this.set=s.filter((e=>-1===e.indexOf(!1))),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let r=0;r<e[t].length;r++)"**"===e[t][r]&&(e[t][r]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let r=t;for(;"**"===e[r+1];)r++;r!==t&&e.splice(t,r-t)}return e}))}levelOneOptimize(e){return e.map((e=>0===(e=e.reduce(((e,t)=>{const r=e[e.length-1];return"**"===t&&"**"===r?e:".."===t&&r&&".."!==r&&"."!==r&&"**"!==r?(e.pop(),e):(e.push(t),e)}),[])).length?[""]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const s=e[r];1===r&&""===s&&""===e[0]||("."!==s&&""!==s||(t=!0,e.splice(r,1),r--))}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let r=0;for(;-1!==(r=e.indexOf("..",r+1));){const s=e[r-1];s&&"."!==s&&".."!==s&&"**"!==s&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let s=-1;for(;-1!==(s=r.indexOf("**",s+1));){let n=s;for(;"**"===r[n+1];)n++;n>s&&r.splice(s+1,n-s);let i=r[s+1];const a=r[s+2],o=r[s+3];if(".."!==i)continue;if(!a||"."===a||".."===a||!o||"."===o||".."===o)continue;t=!0,r.splice(s,1);const c=r.slice(0);c[s]="**",e.push(c),s--}if(!this.preserveMultipleSlashes){for(let e=1;e<r.length-1;e++){const s=r[e];1===e&&""===s&&""===r[0]||("."!==s&&""!==s||(t=!0,r.splice(e,1),e--))}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(t=!0,r.pop())}let n=0;for(;-1!==(n=r.indexOf("..",n+1));){const e=r[n-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===n&&"**"===r[n+1]?["."]:[];r.splice(n-1,2,...e),0===r.length&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){const s=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(s){e[t]=[],e[r]=s;break}}return e.filter((e=>e.length))}partsMatch(e,t,r=!1){let s=0,n=0,i=[],a="";for(;s<e.length&&n<t.length;)if(e[s]===t[n])i.push("b"===a?t[n]:e[s]),s++,n++;else if(r&&"**"===e[s]&&t[n]===e[s+1])i.push(e[s]),s++;else if(r&&"**"===t[n]&&e[s]===t[n+1])i.push(t[n]),n++;else if("*"!==e[s]||!t[n]||!this.options.dot&&t[n].startsWith(".")||"**"===t[n]){if("*"!==t[n]||!e[s]||!this.options.dot&&e[s].startsWith(".")||"**"===e[s])return!1;if("a"===a)return!1;a="b",i.push(t[n]),s++,n++}else{if("b"===a)return!1;a="a",i.push(e[s]),s++,n++}return e.length===t.length&&i}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let s=0;s<e.length&&"!"===e.charAt(s);s++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){const s=this.options;if(this.isWindows){const r="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),s=!r&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),i=s?3:r?0:void 0,a=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])?3:n?0:void 0;if("number"==typeof i&&"number"==typeof a){const[r,s]=[e[i],t[a]];r.toLowerCase()===s.toLowerCase()&&(t[a]=r,a>i?t=t.slice(a):i>a&&(e=e.slice(i)))}}const{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,a=0,o=e.length,c=t.length;i<o&&a<c;i++,a++){this.debug("matchOne loop");var u=t[a],l=e[i];if(this.debug(t,u,l),!1===u)return!1;if(u===GLOBSTAR){this.debug("GLOBSTAR",[t,u,l]);var p=i,m=a+1;if(m===c){for(this.debug("** at the end");i<o;i++)if("."===e[i]||".."===e[i]||!s.dot&&"."===e[i].charAt(0))return!1;return!0}for(;p<o;){var d=e[p];if(this.debug("\nglobstar while",e,p,t,m,d),this.matchOne(e.slice(p),t.slice(m),r))return this.debug("globstar found match!",p,o,d),!0;if("."===d||".."===d||!s.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,p,t,m);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!r||(this.debug("\n>>> no match, partial?",e,p,t,m),p!==o))}let n;if("string"==typeof u?(n=l===u,this.debug("string match",u,l,n)):(n=u.test(l),this.debug("pattern match",u,l,n)),!n)return!1}if(i===o&&a===c)return!0;if(i===o)return r;if(a===c)return i===o-1&&""===e[i];throw new Error("wtf?")}braceExpand(){return braceExpand(this.pattern,this.options)}parse(e){assertValidPattern(e);const t=this.options;if("**"===e)return GLOBSTAR;if(""===e)return"";let r,s=null;(r=e.match(starRE))?s=t.dot?starTestDot:starTest:(r=e.match(starDotExtRE))?s=(t.nocase?t.dot?starDotExtTestNocaseDot:starDotExtTestNocase:t.dot?starDotExtTestDot:starDotExtTest)(r[1]):(r=e.match(qmarksRE))?s=(t.nocase?t.dot?qmarksTestNocaseDot:qmarksTestNocase:t.dot?qmarksTestDot:qmarksTest)(r):(r=e.match(starDotStarRE))?s=t.dot?starDotStarTestDot:starDotStarTest:(r=e.match(dotStarRE))&&(s=dotStarTest);const n=AST.fromGlob(e,this.options).toMMPattern();return s&&"object"==typeof n&&Reflect.defineProperty(n,"test",{value:s}),n}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,r=t.noglobstar?star:t.dot?twoStarDot:twoStarNoDot,s=new Set(t.nocase?["i"]:[]);let n=e.map((e=>{const t=e.map((e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))s.add(t);return"string"==typeof e?regExpEscape(e):e===GLOBSTAR?GLOBSTAR:e._src}));return t.forEach(((e,s)=>{const n=t[s+1],i=t[s-1];e===GLOBSTAR&&i!==GLOBSTAR&&(void 0===i?void 0!==n&&n!==GLOBSTAR?t[s+1]="(?:\\/|"+r+"\\/)?"+n:t[s]=r:void 0===n?t[s-1]=i+"(?:\\/|"+r+")?":n!==GLOBSTAR&&(t[s-1]=i+"(?:\\/|\\/"+r+"\\/)"+n,t[s+1]=GLOBSTAR))})),t.filter((e=>e!==GLOBSTAR)).join("/")})).join("|");const[i,a]=e.length>1?["(?:",")"]:["",""];n="^"+i+n+a+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...s].join(""))}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;this.isWindows&&(e=e.split("\\").join("/"));const s=this.slashSplit(e);this.debug(this.pattern,"split",s);const n=this.set;this.debug(this.pattern,"set",n);let i=s[s.length-1];if(!i)for(let e=s.length-2;!i&&e>=0;e--)i=s[e];for(let e=0;e<n.length;e++){const a=n[e];let o=s;r.matchBase&&1===a.length&&(o=[i]);if(this.matchOne(o,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(e){return minimatch.defaults(e).Minimatch}}minimatch.AST=AST,minimatch.Minimatch=Minimatch,minimatch.escape=escape,minimatch.unescape=unescape;const perf="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,warned=new Set,PROCESS="object"==typeof process&&process?process:{},emitWarning=(e,t,r,s)=>{"function"==typeof PROCESS.emitWarning?PROCESS.emitWarning(e,t,r,s):console.error(`[${r}] ${t}: ${e}`)};let AC=globalThis.AbortController,AS=globalThis.AbortSignal;if(void 0===AC){AS=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},AC=class{constructor(){t()}signal=new AS;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const shouldWarn=e=>!warned.has(e),isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),getUintArray=e=>isPosInt(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null:null;class ZeroArray extends Array{constructor(e){super(e),this.fill(0)}}class Stack{heap;length;static#_=!1;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#_=!0;const r=new Stack(e,t);return Stack.#_=!1,r}constructor(e,t){if(!Stack.#_)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#E;#S;#R;#g;#A;#T;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#v;#b;#I;#N;#y;#O;#$;#C;#L;#D;#P;#x;#M;#F;#w;#U;#G;static unsafeExposeInternals(e){return{starts:e.#M,ttls:e.#F,sizes:e.#x,keyMap:e.#I,keyList:e.#N,valList:e.#y,next:e.#O,prev:e.#$,get head(){return e.#C},get tail(){return e.#L},free:e.#D,isBackgroundFetch:t=>e.#Y(t),backgroundFetch:(t,r,s,n)=>e.#k(t,r,s,n),moveToTail:t=>e.#B(t),indexes:t=>e.#j(t),rindexes:t=>e.#X(t),isStale:t=>e.#H(t)}}get max(){return this.#E}get maxSize(){return this.#S}get calculatedSize(){return this.#b}get size(){return this.#v}get fetchMethod(){return this.#A}get memoMethod(){return this.#T}get dispose(){return this.#R}get disposeAfter(){return this.#g}constructor(e){const{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:i,updateAgeOnHas:a,allowStale:o,dispose:c,disposeAfter:u,noDisposeOnSet:l,noUpdateTTL:p,maxSize:m=0,maxEntrySize:d=0,sizeCalculation:f,fetchMethod:h,memoMethod:_,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:g,ignoreFetchAbort:A}=e;if(0!==t&&!isPosInt(t))throw new TypeError("max option must be a nonnegative integer");const T=t?getUintArray(t):Array;if(!T)throw new Error("invalid max value: "+t);if(this.#E=t,this.#S=m,this.maxEntrySize=d||this.#S,this.sizeCalculation=f,this.sizeCalculation){if(!this.#S&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==_&&"function"!=typeof _)throw new TypeError("memoMethod must be a function if defined");if(this.#T=_,void 0!==h&&"function"!=typeof h)throw new TypeError("fetchMethod must be a function if specified");if(this.#A=h,this.#U=!!h,this.#I=new Map,this.#N=new Array(t).fill(void 0),this.#y=new Array(t).fill(void 0),this.#O=new T(t),this.#$=new T(t),this.#C=0,this.#L=0,this.#D=Stack.create(t),this.#v=0,this.#b=0,"function"==typeof c&&(this.#R=c),"function"==typeof u?(this.#g=u,this.#P=[]):(this.#g=void 0,this.#P=void 0),this.#w=!!this.#R,this.#G=!!this.#g,this.noDisposeOnSet=!!l,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!g,this.ignoreFetchAbort=!!A,0!==this.maxEntrySize){if(0!==this.#S&&!isPosInt(this.#S))throw new TypeError("maxSize must be a positive integer if specified");if(!isPosInt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#K()}if(this.allowStale=!!o,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!i,this.updateAgeOnHas=!!a,this.ttlResolution=isPosInt(s)||0===s?s:1,this.ttlAutopurge=!!n,this.ttl=r||0,this.ttl){if(!isPosInt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#q()}if(0===this.#E&&0===this.ttl&&0===this.#S)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#E&&!this.#S){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){warned.add(e);emitWarning("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#I.has(e)?1/0:0}#q(){const e=new ZeroArray(this.#E),t=new ZeroArray(this.#E);this.#F=e,this.#M=t,this.#W=(r,s,n=perf.now())=>{if(t[r]=0!==s?n:0,e[r]=s,0!==s&&this.ttlAutopurge){const e=setTimeout((()=>{this.#H(r)&&this.#V(this.#N[r],"expire")}),s+1);e.unref&&e.unref()}},this.#z=r=>{t[r]=0!==e[r]?perf.now():0},this.#Z=(n,i)=>{if(e[i]){const a=e[i],o=t[i];if(!a||!o)return;n.ttl=a,n.start=o,n.now=r||s();const c=n.now-o;n.remainingTTL=a-c}};let r=0;const s=()=>{const e=perf.now();if(this.ttlResolution>0){r=e;const t=setTimeout((()=>r=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{const i=this.#I.get(n);if(void 0===i)return 0;const a=e[i],o=t[i];if(!a||!o)return 1/0;return a-((r||s())-o)},this.#H=n=>{const i=t[n],a=e[n];return!!a&&!!i&&(r||s())-i>a}}#z=()=>{};#Z=()=>{};#W=()=>{};#H=()=>!1;#K(){const e=new ZeroArray(this.#E);this.#b=0,this.#x=e,this.#Q=t=>{this.#b-=e[t],e[t]=0},this.#J=(e,t,r,s)=>{if(this.#Y(t))return 0;if(!isPosInt(r)){if(!s)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof s)throw new TypeError("sizeCalculation must be a function");if(r=s(t,e),!isPosInt(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#ee=(t,r,s)=>{if(e[t]=r,this.#S){const r=this.#S-e[t];for(;this.#b>r;)this.#te(!0)}this.#b+=e[t],s&&(s.entrySize=r,s.totalCalculatedSize=this.#b)}}#Q=e=>{};#ee=(e,t,r)=>{};#J=(e,t,r,s)=>{if(r||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#j({allowStale:e=this.allowStale}={}){if(this.#v)for(let t=this.#L;this.#re(t)&&(!e&&this.#H(t)||(yield t),t!==this.#C);)t=this.#$[t]}*#X({allowStale:e=this.allowStale}={}){if(this.#v)for(let t=this.#C;this.#re(t)&&(!e&&this.#H(t)||(yield t),t!==this.#L);)t=this.#O[t]}#re(e){return void 0!==e&&this.#I.get(this.#N[e])===e}*entries(){for(const e of this.#j())void 0===this.#y[e]||void 0===this.#N[e]||this.#Y(this.#y[e])||(yield[this.#N[e],this.#y[e]])}*rentries(){for(const e of this.#X())void 0===this.#y[e]||void 0===this.#N[e]||this.#Y(this.#y[e])||(yield[this.#N[e],this.#y[e]])}*keys(){for(const e of this.#j()){const t=this.#N[e];void 0===t||this.#Y(this.#y[e])||(yield t)}}*rkeys(){for(const e of this.#X()){const t=this.#N[e];void 0===t||this.#Y(this.#y[e])||(yield t)}}*values(){for(const e of this.#j()){void 0===this.#y[e]||this.#Y(this.#y[e])||(yield this.#y[e])}}*rvalues(){for(const e of this.#X()){void 0===this.#y[e]||this.#Y(this.#y[e])||(yield this.#y[e])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#j()){const s=this.#y[r],n=this.#Y(s)?s.__staleWhileFetching:s;if(void 0!==n&&e(n,this.#N[r],this))return this.get(this.#N[r],t)}}forEach(e,t=this){for(const r of this.#j()){const s=this.#y[r],n=this.#Y(s)?s.__staleWhileFetching:s;void 0!==n&&e.call(t,n,this.#N[r],this)}}rforEach(e,t=this){for(const r of this.#X()){const s=this.#y[r],n=this.#Y(s)?s.__staleWhileFetching:s;void 0!==n&&e.call(t,n,this.#N[r],this)}}purgeStale(){let e=!1;for(const t of this.#X({allowStale:!0}))this.#H(t)&&(this.#V(this.#N[t],"expire"),e=!0);return e}info(e){const t=this.#I.get(e);if(void 0===t)return;const r=this.#y[t],s=this.#Y(r)?r.__staleWhileFetching:r;if(void 0===s)return;const n={value:s};if(this.#F&&this.#M){const e=this.#F[t],r=this.#M[t];if(e&&r){const t=e-(perf.now()-r);n.ttl=t,n.start=Date.now()}}return this.#x&&(n.size=this.#x[t]),n}dump(){const e=[];for(const t of this.#j({allowStale:!0})){const r=this.#N[t],s=this.#y[t],n=this.#Y(s)?s.__staleWhileFetching:s;if(void 0===n||void 0===r)continue;const i={value:n};if(this.#F&&this.#M){i.ttl=this.#F[t];const e=perf.now()-this.#M[t];i.start=Math.floor(Date.now()-e)}this.#x&&(i.size=this.#x[t]),e.unshift([r,i])}return e}load(e){this.clear();for(const[t,r]of e){if(r.start){const e=Date.now()-r.start;r.start=perf.now()-e}this.set(t,r.value,r)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:s=this.ttl,start:n,noDisposeOnSet:i=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=this.#J(e,t,r.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize)return o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this.#V(e,"set"),this;let l=0===this.#v?void 0:this.#I.get(e);if(void 0===l)l=0===this.#v?this.#L:0!==this.#D.length?this.#D.pop():this.#v===this.#E?this.#te(!1):this.#v,this.#N[l]=e,this.#y[l]=t,this.#I.set(e,l),this.#O[this.#L]=l,this.#$[l]=this.#L,this.#L=l,this.#v++,this.#ee(l,u,o),o&&(o.set="add"),c=!1;else{this.#B(l);const r=this.#y[l];if(t!==r){if(this.#U&&this.#Y(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||i||(this.#w&&this.#R?.(t,e,"set"),this.#G&&this.#P?.push([t,e,"set"]))}else i||(this.#w&&this.#R?.(r,e,"set"),this.#G&&this.#P?.push([r,e,"set"]));if(this.#Q(l),this.#ee(l,u,o),this.#y[l]=t,o){o.set="replace";const e=r&&this.#Y(r)?r.__staleWhileFetching:r;void 0!==e&&(o.oldValue=e)}}else o&&(o.set="update")}if(0===s||this.#F||this.#q(),this.#F&&(c||this.#W(l,s,n),o&&this.#Z(o,l)),!i&&this.#G&&this.#P){const e=this.#P;let t;for(;t=e?.shift();)this.#g?.(...t)}return this}pop(){try{for(;this.#v;){const e=this.#y[this.#C];if(this.#te(!0),this.#Y(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#G&&this.#P){const e=this.#P;let t;for(;t=e?.shift();)this.#g?.(...t)}}}#te(e){const t=this.#C,r=this.#N[t],s=this.#y[t];return this.#U&&this.#Y(s)?s.__abortController.abort(new Error("evicted")):(this.#w||this.#G)&&(this.#w&&this.#R?.(s,r,"evict"),this.#G&&this.#P?.push([s,r,"evict"])),this.#Q(t),e&&(this.#N[t]=void 0,this.#y[t]=void 0,this.#D.push(t)),1===this.#v?(this.#C=this.#L=0,this.#D.length=0):this.#C=this.#O[t],this.#I.delete(r),this.#v--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:s}=t,n=this.#I.get(e);if(void 0!==n){const e=this.#y[n];if(this.#Y(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#H(n))return r&&this.#z(n),s&&(s.has="hit",this.#Z(s,n)),!0;s&&(s.has="stale",this.#Z(s,n))}else s&&(s.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,s=this.#I.get(e);if(void 0===s||!r&&this.#H(s))return;const n=this.#y[s];return this.#Y(n)?n.__staleWhileFetching:n}#k(e,t,r,s){const n=void 0===t?void 0:this.#y[t];if(this.#Y(n))return n;const i=new AC,{signal:a}=r;a?.addEventListener("abort",(()=>i.abort(a.reason)),{signal:i.signal});const o={signal:i.signal,options:r,context:s},c=(s,n=!1)=>{const{aborted:a}=i.signal,c=r.ignoreFetchAbort&&void 0!==s;if(r.status&&(a&&!n?(r.status.fetchAborted=!0,r.status.fetchError=i.signal.reason,c&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),a&&!c&&!n)return u(i.signal.reason);const p=l;return this.#y[t]===l&&(void 0===s?p.__staleWhileFetching?this.#y[t]=p.__staleWhileFetching:this.#V(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,s,o.options))),s},u=s=>{const{aborted:n}=i.signal,a=n&&r.allowStaleOnFetchAbort,o=a||r.allowStaleOnFetchRejection,c=o||r.noDeleteOnFetchRejection,u=l;if(this.#y[t]===l){!c||void 0===u.__staleWhileFetching?this.#V(e,"fetch"):a||(this.#y[t]=u.__staleWhileFetching)}if(o)return r.status&&void 0!==u.__staleWhileFetching&&(r.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw s};r.status&&(r.status.fetchDispatched=!0);const l=new Promise(((t,s)=>{const a=this.#A?.(e,n,o);a&&a instanceof Promise&&a.then((e=>t(void 0===e?void 0:e)),s),i.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))}))})).then(c,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),u(e)))),p=Object.assign(l,{__abortController:i,__staleWhileFetching:n,__returned:void 0});return void 0===t?(this.set(e,p,{...o.options,status:void 0}),t=this.#I.get(e)):this.#y[t]=p,p}#Y(e){if(!this.#U)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AC}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:f,forceRefresh:h=!1,status:_,signal:E}=t;if(!this.#U)return _&&(_.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:_});const S={allowStale:r,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:i,noDisposeOnSet:a,size:o,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:m,status:_,signal:E};let R=this.#I.get(e);if(void 0===R){_&&(_.fetch="miss");const t=this.#k(e,R,S,f);return t.__returned=t}{const t=this.#y[R];if(this.#Y(t)){const e=r&&void 0!==t.__staleWhileFetching;return _&&(_.fetch="inflight",e&&(_.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const n=this.#H(R);if(!h&&!n)return _&&(_.fetch="hit"),this.#B(R),s&&this.#z(R),_&&this.#Z(_,R),t;const i=this.#k(e,R,S,f),a=void 0!==i.__staleWhileFetching&&r;return _&&(_.fetch=n?"stale":"refresh",a&&n&&(_.returnedStale=!0)),a?i.__staleWhileFetching:i.__returned=i}}async forceFetch(e,t={}){const r=await this.fetch(e,t);if(void 0===r)throw new Error("fetch() returned undefined");return r}memo(e,t={}){const r=this.#T;if(!r)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:n,...i}=t,a=this.get(e,i);if(!n&&void 0!==a)return a;const o=r(e,a,{options:i,context:s});return this.set(e,o,i),o}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:i}=t,a=this.#I.get(e);if(void 0!==a){const t=this.#y[a],o=this.#Y(t);return i&&this.#Z(i,a),this.#H(a)?(i&&(i.get="stale"),o?(i&&r&&void 0!==t.__staleWhileFetching&&(i.returnedStale=!0),r?t.__staleWhileFetching:void 0):(n||this.#V(e,"expire"),i&&r&&(i.returnedStale=!0),r?t:void 0)):(i&&(i.get="hit"),o?t.__staleWhileFetching:(this.#B(a),s&&this.#z(a),t))}i&&(i.get="miss")}#se(e,t){this.#$[t]=e,this.#O[e]=t}#B(e){e!==this.#L&&(e===this.#C?this.#C=this.#O[e]:this.#se(this.#$[e],this.#O[e]),this.#se(this.#L,e),this.#L=e)}delete(e){return this.#V(e,"delete")}#V(e,t){let r=!1;if(0!==this.#v){const s=this.#I.get(e);if(void 0!==s)if(r=!0,1===this.#v)this.#ne(t);else{this.#Q(s);const r=this.#y[s];if(this.#Y(r)?r.__abortController.abort(new Error("deleted")):(this.#w||this.#G)&&(this.#w&&this.#R?.(r,e,t),this.#G&&this.#P?.push([r,e,t])),this.#I.delete(e),this.#N[s]=void 0,this.#y[s]=void 0,s===this.#L)this.#L=this.#$[s];else if(s===this.#C)this.#C=this.#O[s];else{const e=this.#$[s];this.#O[e]=this.#O[s];const t=this.#O[s];this.#$[t]=this.#$[s]}this.#v--,this.#D.push(s)}}if(this.#G&&this.#P?.length){const e=this.#P;let t;for(;t=e?.shift();)this.#g?.(...t)}return r}clear(){return this.#ne("delete")}#ne(e){for(const t of this.#X({allowStale:!0})){const r=this.#y[t];if(this.#Y(r))r.__abortController.abort(new Error("deleted"));else{const s=this.#N[t];this.#w&&this.#R?.(r,s,e),this.#G&&this.#P?.push([r,s,e])}}if(this.#I.clear(),this.#y.fill(void 0),this.#N.fill(void 0),this.#F&&this.#M&&(this.#F.fill(0),this.#M.fill(0)),this.#x&&this.#x.fill(0),this.#C=0,this.#L=0,this.#D.length=0,this.#b=0,this.#v=0,this.#G&&this.#P){const e=this.#P;let t;for(;t=e?.shift();)this.#g?.(...t)}}}const proc="object"==typeof process&&process?process:{stdout:null,stderr:null},isStream=e=>!!e&&"object"==typeof e&&(e instanceof Minipass||e instanceof Stream||isReadable(e)||isWritable(e)),isReadable=e=>!!e&&"object"==typeof e&&e instanceof node_events.EventEmitter&&"function"==typeof e.pipe&&e.pipe!==Stream.Writable.prototype.pipe,isWritable=e=>!!e&&"object"==typeof e&&e instanceof node_events.EventEmitter&&"function"==typeof e.write&&"function"==typeof e.end,EOF=Symbol("EOF"),MAYBE_EMIT_END=Symbol("maybeEmitEnd"),EMITTED_END=Symbol("emittedEnd"),EMITTING_END=Symbol("emittingEnd"),EMITTED_ERROR=Symbol("emittedError"),CLOSED=Symbol("closed"),READ=Symbol("read"),FLUSH=Symbol("flush"),FLUSHCHUNK=Symbol("flushChunk"),ENCODING=Symbol("encoding"),DECODER=Symbol("decoder"),FLOWING=Symbol("flowing"),PAUSED=Symbol("paused"),RESUME=Symbol("resume"),BUFFER=Symbol("buffer"),PIPES=Symbol("pipes"),BUFFERLENGTH=Symbol("bufferLength"),BUFFERPUSH=Symbol("bufferPush"),BUFFERSHIFT=Symbol("bufferShift"),OBJECTMODE=Symbol("objectMode"),DESTROYED=Symbol("destroyed"),ERROR=Symbol("error"),EMITDATA=Symbol("emitData"),EMITEND=Symbol("emitEnd"),EMITEND2=Symbol("emitEnd2"),ASYNC=Symbol("async"),ABORT=Symbol("abort"),ABORTED=Symbol("aborted"),SIGNAL=Symbol("signal"),DATALISTENERS=Symbol("dataListeners"),DISCARDED=Symbol("discarded"),defer=e=>Promise.resolve().then(e),nodefer=e=>e(),isEndish=e=>"end"===e||"finish"===e||"prefinish"===e,isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0,isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[RESUME](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode,isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&"buffer"!==e.encoding;class Minipass extends node_events.EventEmitter{[FLOWING]=!1;[PAUSED]=!1;[PIPES]=[];[BUFFER]=[];[OBJECTMODE];[ENCODING];[ASYNC];[DECODER];[EOF]=!1;[EMITTED_END]=!1;[EMITTING_END]=!1;[CLOSED]=!1;[EMITTED_ERROR]=null;[BUFFERLENGTH]=0;[DESTROYED]=!1;[SIGNAL];[ABORTED]=!1;[DATALISTENERS]=0;[DISCARDED]=!1;writable=!0;readable=!0;constructor(...e){const t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");isObjectModeOptions(t)?(this[OBJECTMODE]=!0,this[ENCODING]=null):isEncodingOptions(t)?(this[ENCODING]=t.encoding,this[OBJECTMODE]=!1):(this[OBJECTMODE]=!1,this[ENCODING]=null),this[ASYNC]=!!t.async,this[DECODER]=this[ENCODING]?new node_string_decoder.StringDecoder(this[ENCODING]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[BUFFER]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[PIPES]});const{signal:r}=t;r&&(this[SIGNAL]=r,r.aborted?this[ABORT]():r.addEventListener("abort",(()=>this[ABORT]())))}get bufferLength(){return this[BUFFERLENGTH]}get encoding(){return this[ENCODING]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[OBJECTMODE]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ASYNC]}set async(e){this[ASYNC]=this[ASYNC]||!!e}[ABORT](){this[ABORTED]=!0,this.emit("abort",this[SIGNAL]?.reason),this.destroy(this[SIGNAL]?.reason)}get aborted(){return this[ABORTED]}set aborted(e){}write(e,t,r){if(this[ABORTED])return!1;if(this[EOF])throw new Error("write after end");if(this[DESTROYED])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(r=t,t="utf8"),t||(t="utf8");const s=this[ASYNC]?defer:nodefer;if(!this[OBJECTMODE]&&!Buffer.isBuffer(e))if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBufferLike(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");return this[OBJECTMODE]?(this[FLOWING]&&0!==this[BUFFERLENGTH]&&this[FLUSH](!0),this[FLOWING]?this.emit("data",e):this[BUFFERPUSH](e),0!==this[BUFFERLENGTH]&&this.emit("readable"),r&&s(r),this[FLOWING]):e.length?("string"!=typeof e||t===this[ENCODING]&&!this[DECODER]?.lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ENCODING]&&(e=this[DECODER].write(e)),this[FLOWING]&&0!==this[BUFFERLENGTH]&&this[FLUSH](!0),this[FLOWING]?this.emit("data",e):this[BUFFERPUSH](e),0!==this[BUFFERLENGTH]&&this.emit("readable"),r&&s(r),this[FLOWING]):(0!==this[BUFFERLENGTH]&&this.emit("readable"),r&&s(r),this[FLOWING])}read(e){if(this[DESTROYED])return null;if(this[DISCARDED]=!1,0===this[BUFFERLENGTH]||0===e||e&&e>this[BUFFERLENGTH])return this[MAYBE_EMIT_END](),null;this[OBJECTMODE]&&(e=null),this[BUFFER].length>1&&!this[OBJECTMODE]&&(this[BUFFER]=[this[ENCODING]?this[BUFFER].join(""):Buffer.concat(this[BUFFER],this[BUFFERLENGTH])]);const t=this[READ](e||null,this[BUFFER][0]);return this[MAYBE_EMIT_END](),t}[READ](e,t){if(this[OBJECTMODE])this[BUFFERSHIFT]();else{const r=t;e===r.length||null===e?this[BUFFERSHIFT]():"string"==typeof r?(this[BUFFER][0]=r.slice(e),t=r.slice(0,e),this[BUFFERLENGTH]-=e):(this[BUFFER][0]=r.subarray(e),t=r.subarray(0,e),this[BUFFERLENGTH]-=e)}return this.emit("data",t),this[BUFFER].length||this[EOF]||this.emit("drain"),t}end(e,t,r){return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t="utf8"),void 0!==e&&this.write(e,t),r&&this.once("end",r),this[EOF]=!0,this.writable=!1,!this[FLOWING]&&this[PAUSED]||this[MAYBE_EMIT_END](),this}[RESUME](){this[DESTROYED]||(this[DATALISTENERS]||this[PIPES].length||(this[DISCARDED]=!0),this[PAUSED]=!1,this[FLOWING]=!0,this.emit("resume"),this[BUFFER].length?this[FLUSH]():this[EOF]?this[MAYBE_EMIT_END]():this.emit("drain"))}resume(){return this[RESUME]()}pause(){this[FLOWING]=!1,this[PAUSED]=!0,this[DISCARDED]=!1}get destroyed(){return this[DESTROYED]}get flowing(){return this[FLOWING]}get paused(){return this[PAUSED]}[BUFFERPUSH](e){this[OBJECTMODE]?this[BUFFERLENGTH]+=1:this[BUFFERLENGTH]+=e.length,this[BUFFER].push(e)}[BUFFERSHIFT](){return this[OBJECTMODE]?this[BUFFERLENGTH]-=1:this[BUFFERLENGTH]-=this[BUFFER][0].length,this[BUFFER].shift()}[FLUSH](e=!1){do{}while(this[FLUSHCHUNK](this[BUFFERSHIFT]())&&this[BUFFER].length);e||this[BUFFER].length||this[EOF]||this.emit("drain")}[FLUSHCHUNK](e){return this.emit("data",e),this[FLOWING]}pipe(e,t){if(this[DESTROYED])return e;this[DISCARDED]=!1;const r=this[EMITTED_END];return t=t||{},e===proc.stdout||e===proc.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[PIPES].push(t.proxyErrors?new PipeProxyErrors(this,e,t):new Pipe(this,e,t)),this[ASYNC]?defer((()=>this[RESUME]())):this[RESUME]()),e}unpipe(e){const t=this[PIPES].find((t=>t.dest===e));t&&(1===this[PIPES].length?(this[FLOWING]&&0===this[DATALISTENERS]&&(this[FLOWING]=!1),this[PIPES]=[]):this[PIPES].splice(this[PIPES].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if("data"===e)this[DISCARDED]=!1,this[DATALISTENERS]++,this[PIPES].length||this[FLOWING]||this[RESUME]();else if("readable"===e&&0!==this[BUFFERLENGTH])super.emit("readable");else if(isEndish(e)&&this[EMITTED_END])super.emit(e),this.removeAllListeners(e);else if("error"===e&&this[EMITTED_ERROR]){const e=t;this[ASYNC]?defer((()=>e.call(this,this[EMITTED_ERROR]))):e.call(this,this[EMITTED_ERROR])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){const r=super.off(e,t);return"data"===e&&(this[DATALISTENERS]=this.listeners("data").length,0!==this[DATALISTENERS]||this[DISCARDED]||this[PIPES].length||(this[FLOWING]=!1)),r}removeAllListeners(e){const t=super.removeAllListeners(e);return"data"!==e&&void 0!==e||(this[DATALISTENERS]=0,this[DISCARDED]||this[PIPES].length||(this[FLOWING]=!1)),t}get emittedEnd(){return this[EMITTED_END]}[MAYBE_EMIT_END](){this[EMITTING_END]||this[EMITTED_END]||this[DESTROYED]||0!==this[BUFFER].length||!this[EOF]||(this[EMITTING_END]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[CLOSED]&&this.emit("close"),this[EMITTING_END]=!1)}emit(e,...t){const r=t[0];if("error"!==e&&"close"!==e&&e!==DESTROYED&&this[DESTROYED])return!1;if("data"===e)return!(!this[OBJECTMODE]&&!r)&&(this[ASYNC]?(defer((()=>this[EMITDATA](r))),!0):this[EMITDATA](r));if("end"===e)return this[EMITEND]();if("close"===e){if(this[CLOSED]=!0,!this[EMITTED_END]&&!this[DESTROYED])return!1;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[EMITTED_ERROR]=r,super.emit(ERROR,r);const e=!(this[SIGNAL]&&!this.listeners("error").length)&&super.emit("error",r);return this[MAYBE_EMIT_END](),e}if("resume"===e){const e=super.emit("resume");return this[MAYBE_EMIT_END](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const s=super.emit(e,...t);return this[MAYBE_EMIT_END](),s}[EMITDATA](e){for(const t of this[PIPES])!1===t.dest.write(e)&&this.pause();const t=!this[DISCARDED]&&super.emit("data",e);return this[MAYBE_EMIT_END](),t}[EMITEND](){return!this[EMITTED_END]&&(this[EMITTED_END]=!0,this.readable=!1,this[ASYNC]?(defer((()=>this[EMITEND2]())),!0):this[EMITEND2]())}[EMITEND2](){if(this[DECODER]){const e=this[DECODER].end();if(e){for(const t of this[PIPES])t.dest.write(e);this[DISCARDED]||super.emit("data",e)}}for(const e of this[PIPES])e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){const e=Object.assign([],{dataLength:0});this[OBJECTMODE]||(e.dataLength=0);const t=this.promise();return this.on("data",(t=>{e.push(t),this[OBJECTMODE]||(e.dataLength+=t.length)})),await t,e}async concat(){if(this[OBJECTMODE])throw new Error("cannot concat in objectMode");const e=await this.collect();return this[ENCODING]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(DESTROYED,(()=>t(new Error("stream destroyed")))),this.on("error",(e=>t(e))),this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[DISCARDED]=!1;let e=!1;const t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();const r=this.read();if(null!==r)return Promise.resolve({done:!1,value:r});if(this[EOF])return t();let s,n;const i=e=>{this.off("data",a),this.off("end",o),this.off(DESTROYED,c),t(),n(e)},a=e=>{this.off("error",i),this.off("end",o),this.off(DESTROYED,c),this.pause(),s({value:e,done:!!this[EOF]})},o=()=>{this.off("error",i),this.off("data",a),this.off(DESTROYED,c),t(),s({done:!0,value:void 0})},c=()=>i(new Error("stream destroyed"));return new Promise(((e,t)=>{n=t,s=e,this.once(DESTROYED,c),this.once("error",i),this.once("end",o),this.once("data",a)}))},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[DISCARDED]=!1;let e=!1;const t=()=>(this.pause(),this.off(ERROR,t),this.off(DESTROYED,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(ERROR,t),this.once(DESTROYED,t),{next:()=>{if(e)return t();const r=this.read();return null===r?t():{done:!1,value:r}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[DESTROYED])return e?this.emit("error",e):this.emit(DESTROYED),this;this[DESTROYED]=!0,this[DISCARDED]=!0,this[BUFFER].length=0,this[BUFFERLENGTH]=0;return"function"!=typeof this.close||this[CLOSED]||this.close(),e?this.emit("error",e):this.emit(DESTROYED),this}static get isStream(){return isStream}}const realpathSync=require$$0$2.realpathSync.native,defaultFS={lstatSync:require$$0$2.lstatSync,readdir:require$$0$2.readdir,readdirSync:require$$0$2.readdirSync,readlinkSync:require$$0$2.readlinkSync,realpathSync:realpathSync,promises:{lstat:promises.lstat,readdir:promises.readdir,readlink:promises.readlink,realpath:promises.realpath}},fsFromOption=e=>e&&e!==defaultFS&&e!==fs__namespace?{...defaultFS,...e,promises:{...defaultFS.promises,...e.promises||{}}}:defaultFS,uncDriveRegexp=/^\\\\\?\\([a-z]:)\\?$/i,uncToDrive=e=>e.replace(/\//g,"\\").replace(uncDriveRegexp,"$1\\"),eitherSep=/[\\\/]/,UNKNOWN=0,IFIFO=1,IFCHR=2,IFDIR=4,IFBLK=6,IFREG=8,IFLNK=10,IFSOCK=12,IFMT=15,IFMT_UNKNOWN=~IFMT,READDIR_CALLED=16,LSTAT_CALLED=32,ENOTDIR=64,ENOENT=128,ENOREADLINK=256,ENOREALPATH=512,ENOCHILD=ENOTDIR|ENOENT|ENOREALPATH,TYPEMASK=1023,entToType=e=>e.isFile()?IFREG:e.isDirectory()?IFDIR:e.isSymbolicLink()?IFLNK:e.isCharacterDevice()?IFCHR:e.isBlockDevice()?IFBLK:e.isSocket()?IFSOCK:e.isFIFO()?IFIFO:UNKNOWN,normalizeCache=new Map,normalize=e=>{const t=normalizeCache.get(e);if(t)return t;const r=e.normalize("NFKD");return normalizeCache.set(e,r),r},normalizeNocaseCache=new Map,normalizeNocase=e=>{const t=normalizeNocaseCache.get(e);if(t)return t;const r=normalize(e.toLowerCase());return normalizeNocaseCache.set(e,r),r};class ResolveCache extends LRUCache{constructor(){super({max:256})}}class ChildrenCache extends LRUCache{constructor(e=16384){super({maxSize:e,sizeCalculation:e=>e.length+1})}}const setAsCwd=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=!1;#ie;#ae;get dev(){return this.#ae}#oe;get mode(){return this.#oe}#ce;get nlink(){return this.#ce}#ue;get uid(){return this.#ue}#le;get gid(){return this.#le}#pe;get rdev(){return this.#pe}#me;get blksize(){return this.#me}#de;get ino(){return this.#de}#v;get size(){return this.#v}#fe;get blocks(){return this.#fe}#he;get atimeMs(){return this.#he}#_e;get mtimeMs(){return this.#_e}#Ee;get ctimeMs(){return this.#Ee}#Se;get birthtimeMs(){return this.#Se}#Re;get atime(){return this.#Re}#ge;get mtime(){return this.#ge}#Ae;get ctime(){return this.#Ae}#Te;get birthtime(){return this.#Te}#ve;#be;#Ie;#Ne;#ye;#Oe;#$e;#Ce;#Le;#De;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=UNKNOWN,r,s,n,i,a){this.name=e,this.#ve=n?normalizeNocase(e):normalize(e),this.#$e=t&TYPEMASK,this.nocase=n,this.roots=s,this.root=r||this,this.#Ce=i,this.#Ie=a.fullpath,this.#ye=a.relative,this.#Oe=a.relativePosix,this.parent=a.parent,this.parent?this.#ie=this.parent.#ie:this.#ie=fsFromOption(a.fs)}depth(){return void 0!==this.#be?this.#be:this.parent?this.#be=this.parent.depth()+1:this.#be=0}childrenCache(){return this.#Ce}resolve(e){if(!e)return this;const t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#Pe(r):this.#Pe(r)}#Pe(e){let t=this;for(const r of e)t=t.child(r);return t}children(){const e=this.#Ce.get(this);if(e)return e;const t=Object.assign([],{provisional:0});return this.#Ce.set(this,t),this.#$e&=~READDIR_CALLED,t}child(e,t){if(""===e||"."===e)return this;if(".."===e)return this.parent||this;const r=this.children(),s=this.nocase?normalizeNocase(e):normalize(e);for(const e of r)if(e.#ve===s)return e;const n=this.parent?this.sep:"",i=this.#Ie?this.#Ie+n+e:void 0,a=this.newChild(e,UNKNOWN,{...t,parent:this,fullpath:i});return this.canReaddir()||(a.#$e|=ENOENT),r.push(a),a}relative(){if(this.isCWD)return"";if(void 0!==this.#ye)return this.#ye;const e=this.name,t=this.parent;if(!t)return this.#ye=this.name;const r=t.relative();return r+(r&&t.parent?this.sep:"")+e}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#Oe)return this.#Oe;const e=this.name,t=this.parent;if(!t)return this.#Oe=this.fullpathPosix();const r=t.relativePosix();return r+(r&&t.parent?"/":"")+e}fullpath(){if(void 0!==this.#Ie)return this.#Ie;const e=this.name,t=this.parent;if(!t)return this.#Ie=this.name;const r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#Ie=r}fullpathPosix(){if(void 0!==this.#Ne)return this.#Ne;if("/"===this.sep)return this.#Ne=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(e)?this.#Ne=`//?/${e}`:this.#Ne=e}const e=this.parent,t=e.fullpathPosix(),r=t+(t&&e.parent?"/":"")+this.name;return this.#Ne=r}isUnknown(){return(this.#$e&IFMT)===UNKNOWN}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#$e&IFMT)===IFREG}isDirectory(){return(this.#$e&IFMT)===IFDIR}isCharacterDevice(){return(this.#$e&IFMT)===IFCHR}isBlockDevice(){return(this.#$e&IFMT)===IFBLK}isFIFO(){return(this.#$e&IFMT)===IFIFO}isSocket(){return(this.#$e&IFMT)===IFSOCK}isSymbolicLink(){return(this.#$e&IFLNK)===IFLNK}lstatCached(){return this.#$e&LSTAT_CALLED?this:void 0}readlinkCached(){return this.#Le}realpathCached(){return this.#De}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#Le)return!0;if(!this.parent)return!1;const e=this.#$e&IFMT;return!(e!==UNKNOWN&&e!==IFLNK||this.#$e&ENOREADLINK||this.#$e&ENOENT)}calledReaddir(){return!!(this.#$e&READDIR_CALLED)}isENOENT(){return!!(this.#$e&ENOENT)}isNamed(e){return this.nocase?this.#ve===normalizeNocase(e):this.#ve===normalize(e)}async readlink(){const e=this.#Le;if(e)return e;if(this.canReadlink()&&this.parent)try{const e=await this.#ie.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#Le=t}catch(e){return void this.#xe(e.code)}}readlinkSync(){const e=this.#Le;if(e)return e;if(this.canReadlink()&&this.parent)try{const e=this.#ie.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#Le=t}catch(e){return void this.#xe(e.code)}}#Me(e){this.#$e|=READDIR_CALLED;for(let t=e.provisional;t<e.length;t++){const r=e[t];r&&r.#Fe()}}#Fe(){this.#$e&ENOENT||(this.#$e=(this.#$e|ENOENT)&IFMT_UNKNOWN,this.#we())}#we(){const e=this.children();e.provisional=0;for(const t of e)t.#Fe()}#Ue(){this.#$e|=ENOREALPATH,this.#Ge()}#Ge(){if(this.#$e&ENOTDIR)return;let e=this.#$e;(e&IFMT)===IFDIR&&(e&=IFMT_UNKNOWN),this.#$e=e|ENOTDIR,this.#we()}#Ye(e=""){"ENOTDIR"===e||"EPERM"===e?this.#Ge():"ENOENT"===e?this.#Fe():this.children().provisional=0}#ke(e=""){if("ENOTDIR"===e){this.parent.#Ge()}else"ENOENT"===e&&this.#Fe()}#xe(e=""){let t=this.#$e;t|=ENOREADLINK,"ENOENT"===e&&(t|=ENOENT),"EINVAL"!==e&&"UNKNOWN"!==e||(t&=IFMT_UNKNOWN),this.#$e=t,"ENOTDIR"===e&&this.parent&&this.parent.#Ge()}#Be(e,t){return this.#je(e,t)||this.#Xe(e,t)}#Xe(e,t){const r=entToType(e),s=this.newChild(e.name,r,{parent:this}),n=s.#$e&IFMT;return n!==IFDIR&&n!==IFLNK&&n!==UNKNOWN&&(s.#$e|=ENOTDIR),t.unshift(s),t.provisional++,s}#je(e,t){for(let r=t.provisional;r<t.length;r++){const s=t[r];if((this.nocase?normalizeNocase(e.name):normalize(e.name))===s.#ve)return this.#He(e,s,r,t)}}#He(e,t,r,s){const n=t.name;return t.#$e=t.#$e&IFMT_UNKNOWN|entToType(e),n!==e.name&&(t.name=e.name),r!==s.provisional&&(r===s.length-1?s.pop():s.splice(r,1),s.unshift(t)),s.provisional++,t}async lstat(){if(!(this.#$e&ENOENT))try{return this.#Ke(await this.#ie.promises.lstat(this.fullpath())),this}catch(e){this.#ke(e.code)}}lstatSync(){if(!(this.#$e&ENOENT))try{return this.#Ke(this.#ie.lstatSync(this.fullpath())),this}catch(e){this.#ke(e.code)}}#Ke(e){const{atime:t,atimeMs:r,birthtime:s,birthtimeMs:n,blksize:i,blocks:a,ctime:o,ctimeMs:c,dev:u,gid:l,ino:p,mode:m,mtime:d,mtimeMs:f,nlink:h,rdev:_,size:E,uid:S}=e;this.#Re=t,this.#he=r,this.#Te=s,this.#Se=n,this.#me=i,this.#fe=a,this.#Ae=o,this.#Ee=c,this.#ae=u,this.#le=l,this.#de=p,this.#oe=m,this.#ge=d,this.#_e=f,this.#ce=h,this.#pe=_,this.#v=E,this.#ue=S;const R=entToType(e);this.#$e=this.#$e&IFMT_UNKNOWN|R|LSTAT_CALLED,R!==UNKNOWN&&R!==IFDIR&&R!==IFLNK&&(this.#$e|=ENOTDIR)}#qe=[];#We=!1;#Ve(e){this.#We=!1;const t=this.#qe.slice();this.#qe.length=0,t.forEach((t=>t(null,e)))}readdirCB(e,t=!1){if(!this.canReaddir())return void(t?e(null,[]):queueMicrotask((()=>e(null,[]))));const r=this.children();if(this.calledReaddir()){const s=r.slice(0,r.provisional);return void(t?e(null,s):queueMicrotask((()=>e(null,s))))}if(this.#qe.push(e),this.#We)return;this.#We=!0;const s=this.fullpath();this.#ie.readdir(s,{withFileTypes:!0},((e,t)=>{if(e)this.#Ye(e.code),r.provisional=0;else{for(const e of t)this.#Be(e,r);this.#Me(r)}this.#Ve(r.slice(0,r.provisional))}))}#ze;async readdir(){if(!this.canReaddir())return[];const e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);const t=this.fullpath();if(this.#ze)await this.#ze;else{let r=()=>{};this.#ze=new Promise((e=>r=e));try{for(const r of await this.#ie.promises.readdir(t,{withFileTypes:!0}))this.#Be(r,e);this.#Me(e)}catch(t){this.#Ye(t.code),e.provisional=0}this.#ze=void 0,r()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];const e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);const t=this.fullpath();try{for(const r of this.#ie.readdirSync(t,{withFileTypes:!0}))this.#Be(r,e);this.#Me(e)}catch(t){this.#Ye(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#$e&ENOCHILD)return!1;const e=IFMT&this.#$e;return e===UNKNOWN||e===IFDIR||e===IFLNK}shouldWalk(e,t){return(this.#$e&IFDIR)===IFDIR&&!(this.#$e&ENOCHILD)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#De)return this.#De;if(!((ENOREALPATH|ENOREADLINK|ENOENT)&this.#$e))try{const e=await this.#ie.promises.realpath(this.fullpath());return this.#De=this.resolve(e)}catch(e){this.#Ue()}}realpathSync(){if(this.#De)return this.#De;if(!((ENOREALPATH|ENOREADLINK|ENOENT)&this.#$e))try{const e=this.#ie.realpathSync(this.fullpath());return this.#De=this.resolve(e)}catch(e){this.#Ue()}}[setAsCwd](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;const t=new Set([]);let r=[],s=this;for(;s&&s.parent;)t.add(s),s.#ye=r.join(this.sep),s.#Oe=r.join("/"),s=s.parent,r.push("..");for(s=e;s&&s.parent&&!t.has(s);)s.#ye=void 0,s.#Oe=void 0,s=s.parent}}class PathWin32 extends PathBase{sep="\\";splitSep=eitherSep;constructor(e,t=UNKNOWN,r,s,n,i,a){super(e,t,r,s,n,i,a)}newChild(e,t=UNKNOWN,r={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return path$4.win32.parse(e).root}getRoot(e){if((e=uncToDrive(e.toUpperCase()))===this.root.name)return this.root;for(const[t,r]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=r;return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){return(e=e.toUpperCase().replace(/\//g,"\\").replace(uncDriveRegexp,"$1\\"))===t}}class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=UNKNOWN,r,s,n,i,a){super(e,t,r,s,n,i,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=UNKNOWN,r={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}}class PathScurryBase{root;rootPath;roots;cwd;#Ze;#Qe;#Ce;nocase;#ie;constructor(e=process.cwd(),t,r,{nocase:s,childrenCacheSize:n=16384,fs:i=defaultFS}={}){this.#ie=fsFromOption(i),(e instanceof URL||e.startsWith("file://"))&&(e=node_url.fileURLToPath(e));const a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#Ze=new ResolveCache,this.#Qe=new ResolveCache,this.#Ce=new ChildrenCache(n);const o=a.substring(this.rootPath.length).split(r);if(1!==o.length||o[0]||o.pop(),void 0===s)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#ie),this.roots[this.rootPath]=this.root;let c=this.root,u=o.length-1;const l=t.sep;let p=this.rootPath,m=!1;for(const e of o){const t=u--;c=c.child(e,{relative:new Array(t).fill("..").join(l),relativePosix:new Array(t).fill("..").join("/"),fullpath:p+=(m?"":l)+e}),m=!0}this.cwd=c}depth(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#Ce}resolve(...e){let t="";for(let r=e.length-1;r>=0;r--){const s=e[r];if(s&&"."!==s&&(t=t?`${s}/${t}`:s,this.isAbsolute(s)))break}const r=this.#Ze.get(t);if(void 0!==r)return r;const s=this.cwd.resolve(t).fullpath();return this.#Ze.set(t,s),s}resolvePosix(...e){let t="";for(let r=e.length-1;r>=0;r--){const s=e[r];if(s&&"."!==s&&(t=t?`${s}/${t}`:s,this.isAbsolute(s)))break}const r=this.#Qe.get(t);if(void 0!==r)return r;const s=this.cwd.resolve(t).fullpathPosix();return this.#Qe.set(t,s),s}relative(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r}=t;if(e.canReaddir()){const t=await e.readdir();return r?t:t.map((e=>e.name))}return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r=!0}=t;return e.canReaddir()?r?e.readdirSync():e.readdirSync().map((e=>e.name)):[]}async lstat(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return"string"==typeof e&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e.withFileTypes,e=this.cwd);const r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e.withFileTypes,e=this.cwd);const r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e.withFileTypes,e=this.cwd);const r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e.withFileTypes,e=this.cwd);const r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:i}=t,a=[];n&&!n(e)||a.push(r?e:e.fullpath());const o=new Set,c=(e,t)=>{o.add(e),e.readdirCB(((e,u)=>{if(e)return t(e);let l=u.length;if(!l)return t();const p=()=>{0==--l&&t()};for(const e of u)n&&!n(e)||a.push(r?e:e.fullpath()),s&&e.isSymbolicLink()?e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(o,i)?c(e,p):p())):e.shouldWalk(o,i)?c(e,p):p()}),!0)},u=e;return new Promise(((e,t)=>{c(u,(r=>{if(r)return t(r);e(a)}))}))}walkSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:i}=t,a=[];n&&!n(e)||a.push(r?e:e.fullpath());const o=new Set([e]);for(const e of o){const t=e.readdirSync();for(const e of t){n&&!n(e)||a.push(r?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!s||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,i)&&o.add(t)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:i}=t;n&&!n(e)||(yield r?e:e.fullpath());const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){n&&!n(e)||(yield r?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!s||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(a,i)&&a.add(t)}}}stream(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:i}=t,a=new Minipass({objectMode:!0});n&&!n(e)||a.write(r?e:e.fullpath());const o=new Set,c=[e];let u=0;const l=()=>{let e=!1;for(;!e;){const t=c.shift();if(!t)return void(0===u&&a.end());u++,o.add(t);const p=(t,d,f=!1)=>{if(t)return a.emit("error",t);if(s&&!f){const e=[];for(const t of d)t.isSymbolicLink()&&e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)));if(e.length)return void Promise.all(e).then((()=>p(null,d,!0)))}for(const t of d)!t||n&&!n(t)||a.write(r?t:t.fullpath())||(e=!0);u--;for(const e of d){const t=e.realpathCached()||e;t.shouldWalk(o,i)&&c.push(t)}e&&!a.flowing?a.once("drain",l):m||l()};let m=!0;t.readdirCB(p,!0),m=!1}};return l(),a}streamSync(e=this.cwd,t={}){"string"==typeof e?e=this.cwd.resolve(e):e instanceof PathBase||(t=e,e=this.cwd);const{withFileTypes:r=!0,follow:s=!1,filter:n,walkFilter:i}=t,a=new Minipass({objectMode:!0}),o=new Set;n&&!n(e)||a.write(r?e:e.fullpath());const c=[e];let u=0;const l=()=>{let e=!1;for(;!e;){const t=c.shift();if(!t)return void(0===u&&a.end());u++,o.add(t);const l=t.readdirSync();for(const t of l)n&&!n(t)||a.write(r?t:t.fullpath())||(e=!0);u--;for(const e of l){let t=e;if(e.isSymbolicLink()){if(!s||!(t=e.realpathSync()))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,i)&&c.push(t)}}e&&!a.flowing&&a.once("drain",l)};return l(),a}chdir(e=this.cwd){const t=this.cwd;this.cwd="string"==typeof e?this.cwd.resolve(e):e,this.cwd[setAsCwd](t)}}class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:r=!0}=t;super(e,path$4.win32,"\\",{...t,nocase:r}),this.nocase=r;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return path$4.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,IFDIR,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:r=!1}=t;super(e,path$4.posix,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,IFDIR,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:r=!0}=t;super(e,{...t,nocase:r})}}process.platform;const PathScurry="win32"===process.platform?PathScurryWin32:"darwin"===process.platform?PathScurryDarwin:PathScurryPosix,isPatternList=e=>e.length>=1,isGlobList=e=>e.length>=1;class Pattern{#Je;#et;#tt;length;#rt;#st;#nt;#it;#at;#ot;#ct=!0;constructor(e,t,r,s){if(!isPatternList(e))throw new TypeError("empty pattern list");if(!isGlobList(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#Je=e,this.#et=t,this.#tt=r,this.#rt=s,0===this.#tt)if(this.isUNC()){const[e,t,r,s,...n]=this.#Je,[i,a,o,c,...u]=this.#et;""===n[0]&&(n.shift(),u.shift());const l=[e,t,r,s,""].join("/"),p=[i,a,o,c,""].join("/");this.#Je=[l,...n],this.#et=[p,...u],this.length=this.#Je.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#Je,[r,...s]=this.#et;""===t[0]&&(t.shift(),s.shift());const n=e+"/",i=r+"/";this.#Je=[n,...t],this.#et=[i,...s],this.length=this.#Je.length}}pattern(){return this.#Je[this.#tt]}isString(){return"string"==typeof this.#Je[this.#tt]}isGlobstar(){return this.#Je[this.#tt]===GLOBSTAR}isRegExp(){return this.#Je[this.#tt]instanceof RegExp}globString(){return this.#nt=this.#nt||(0===this.#tt?this.isAbsolute()?this.#et[0]+this.#et.slice(1).join("/"):this.#et.join("/"):this.#et.slice(this.#tt).join("/"))}hasMore(){return this.length>this.#tt+1}rest(){return void 0!==this.#st?this.#st:this.hasMore()?(this.#st=new Pattern(this.#Je,this.#et,this.#tt+1,this.#rt),this.#st.#ot=this.#ot,this.#st.#at=this.#at,this.#st.#it=this.#it,this.#st):this.#st=null}isUNC(){const e=this.#Je;return void 0!==this.#at?this.#at:this.#at="win32"===this.#rt&&0===this.#tt&&""===e[0]&&""===e[1]&&"string"==typeof e[2]&&!!e[2]&&"string"==typeof e[3]&&!!e[3]}isDrive(){const e=this.#Je;return void 0!==this.#it?this.#it:this.#it="win32"===this.#rt&&0===this.#tt&&this.length>1&&"string"==typeof e[0]&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#Je;return void 0!==this.#ot?this.#ot:this.#ot=""===e[0]&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#Je[0];return"string"==typeof e&&this.isAbsolute()&&0===this.#tt?e:""}checkFollowGlobstar(){return!(0===this.#tt||!this.isGlobstar()||!this.#ct)}markFollowGlobstar(){return!(0===this.#tt||!this.isGlobstar()||!this.#ct)&&(this.#ct=!1,!0)}}const defaultPlatform$1="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:r,noext:s,noglobstar:n,platform:i=defaultPlatform$1}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];const a={dot:!0,nobrace:t,nocase:r,noext:s,noglobstar:n,optimizationLevel:2,platform:i,nocomment:!0,nonegate:!0};for(const t of e){const e=new Minimatch(t,a);for(let t=0;t<e.set.length;t++){const r=e.set[t],s=e.globParts[t];if(!r||!s)throw new Error("invalid pattern object");for(;"."===r[0]&&"."===s[0];)r.shift(),s.shift();const n=new Pattern(r,s,0,i),o=new Minimatch(n.globString(),a),c="**"===s[s.length-1],u=n.isAbsolute();u?this.absolute.push(o):this.relative.push(o),c&&(u?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}}ignored(e){const t=e.fullpath(),r=`${t}/`,s=e.relative()||".",n=`${s}/`;for(const e of this.relative)if(e.match(s)||e.match(n))return!0;for(const e of this.absolute)if(e.match(t)||e.match(r))return!0;return!1}childrenIgnored(e){const t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(const e of this.relativeChildren)if(e.match(r))return!0;for(const e of this.absoluteChildren)if(e.match(t))return!0;return!1}}class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath(),s=this.store.get(r);s?s.add(t.globString()):this.store.set(r,new Set([t.globString()]))}}class MatchRecord{store=new Map;add(e,t,r){const s=(t?2:0)|(r?1:0),n=this.store.get(e);this.store.set(e,void 0===n?s:s&n)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(2&t),!!(1&t)]))}}class SubWalks{store=new Map;add(e,t){if(!e.canReaddir())return;const r=this.store.get(e);r?r.find((e=>e.globString()===t.globString()))||r.push(t):this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root(),s=t.isAbsolute()&&!1!==this.opts.absolute;if(r){e=e.resolve("/"===r&&void 0!==this.opts.root?this.opts.root:r);const s=t.rest();if(!s){this.matches.add(e,!0,!1);continue}t=s}if(e.isENOENT())continue;let n,i,a=!1;for(;"string"==typeof(n=t.pattern())&&(i=t.rest());){const r=e.resolve(n);e=r,t=i,a=!0}if(n=t.pattern(),i=t.rest(),a){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if("string"!=typeof n)if(n===GLOBSTAR){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);const r=i?.pattern(),n=i?.rest();if(i&&(""!==r&&"."!==r||n)){if(".."===r){const t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,s,!0)}}else this.matches.add(e,s,""===r||"."===r)}else n instanceof RegExp&&this.subwalks.add(e,t);else{const t=".."===n||""===n||"."===n;this.matches.add(e.resolve(n),s,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e),s=this.child();for(const e of t)for(const t of r){const r=t.isAbsolute(),n=t.pattern(),i=t.rest();n===GLOBSTAR?s.testGlobstar(e,t,i,r):n instanceof RegExp?s.testRegExp(e,n,i,r):s.testString(e,n,i,r)}return s}testGlobstar(e,t,r,s){if(!this.dot&&e.name.startsWith(".")||(t.hasMore()||this.matches.add(e,s,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){const t=r.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,r.rest(),s);else if(".."===t){const t=e.parent||e;this.subwalks.add(t,r)}else t instanceof RegExp&&this.testRegExp(e,t,r.rest(),s)}}testRegExp(e,t,r,s){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,s,!1))}testString(e,t,r,s){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,s,!1))}}const makeIgnore=(e,t)=>"string"==typeof e?new Ignore([e],t):Array.isArray(e)?new Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#ut=[];#lt;#pt;signal;maxDepth;constructor(e,t,r){this.patterns=e,this.path=t,this.opts=r,this.#pt=r.posix||"win32"!==r.platform?"/":"\\",r.ignore&&(this.#lt=makeIgnore(r.ignore,r)),this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",(()=>{this.#ut.length=0})))}#mt(e){return this.seen.has(e)||!!this.#lt?.ignored?.(e)}#dt(e){return!!this.#lt?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#ut.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#ut.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}const s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=await s.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.opts.nodir&&this.opts.follow&&e.isSymbolicLink()&&e.realpathCached()?.isDirectory()||this.#mt(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}const s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=s.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#mt(e))return;const r=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);const s=this.opts.mark&&e.isDirectory()?this.#pt:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+s)}else{const t=this.opts.posix?e.relativePosix():e.relative(),r=this.opts.dotRelative&&!t.startsWith(".."+this.#pt)?"."+this.#pt:"";this.matchEmit(t?r+t+s:"."+s)}}async match(e,t,r){const s=await this.matchCheck(e,r);s&&this.matchFinish(s,t)}matchSync(e,t,r){const s=this.matchCheckSync(e,r);s&&this.matchFinish(s,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new Processor(this.opts),r)}walkCB2(e,t,r,s){if(this.#dt(e))return s();if(this.signal?.aborted&&s(),this.paused)return void this.onResume((()=>this.walkCB2(e,t,r,s)));r.processPatterns(e,t);let n=1;const i=()=>{0==--n&&s()};for(const[e,t,s]of r.matches.entries())this.#mt(e)||(n++,this.match(e,t,s).then((()=>i())));for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;n++;const t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,r,i):e.readdirCB(((t,s)=>this.walkCB3(e,s,r,i)),!0)}i()}walkCB3(e,t,r,s){r=r.filterEntries(e,t);let n=1;const i=()=>{0==--n&&s()};for(const[e,t,s]of r.matches.entries())this.#mt(e)||(n++,this.match(e,t,s).then((()=>i())));for(const[e,t]of r.subwalks.entries())n++,this.walkCB2(e,t,r.child(),i);i()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new Processor(this.opts),r)}walkCB2Sync(e,t,r,s){if(this.#dt(e))return s();if(this.signal?.aborted&&s(),this.paused)return void this.onResume((()=>this.walkCB2Sync(e,t,r,s)));r.processPatterns(e,t);let n=1;const i=()=>{0==--n&&s()};for(const[e,t,s]of r.matches.entries())this.#mt(e)||this.matchSync(e,t,s);for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;n++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,i)}i()}walkCB3Sync(e,t,r,s){r=r.filterEntries(e,t);let n=1;const i=()=>{0==--n&&s()};for(const[e,t,s]of r.matches.entries())this.#mt(e)||this.matchSync(e,t,s);for(const[e,t]of r.subwalks.entries())n++,this.walkCB2Sync(e,t,r.child(),i);i()}}class GlobWalker extends GlobUtil{matches;constructor(e,t,r){super(e,t,r),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)}))})),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason})),this.matches}}class GlobStream extends GlobUtil{results;constructor(e,t,r){super(e,t,r),this.results=new Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",(()=>this.resume())),this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){const e=this.path;return e.isUnknown()?e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))})):this.walkCB(e,this.patterns,(()=>this.results.end())),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>this.results.end())),this.results}}const defaultPlatform="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=require$$0$9.fileURLToPath(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map((e=>e.replace(/\\/g,"/")))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map((e=>e.includes("/")?e:`./**/${e}`))}if(this.pattern=e,this.platform=t.platform||defaultPlatform,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,void 0!==t.nocase&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const e="win32"===t.platform?PathScurryWin32:"darwin"===t.platform?PathScurryDarwin:t.platform?PathScurryPosix:PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r="darwin"===this.platform||"win32"===this.platform,s={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map((e=>new Minimatch(e,s))),[i,a]=n.reduce(((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e)),[[],[]]);this.patterns=i.map(((e,t)=>{const r=a[t];if(!r)throw new Error("invalid pattern object");return new Pattern(e,r,0,this.platform)}))}async walk(){return[...await new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}const hasMagic=(e,t={})=>{Array.isArray(e)||(e=[e]);for(const r of e)if(new Minimatch(r,t).hasMagic())return!0;return!1};function globStreamSync(e,t={}){return new Glob(e,t).streamSync()}function globStream(e,t={}){return new Glob(e,t).stream()}function globSync(e,t={}){return new Glob(e,t).walkSync()}async function glob_(e,t={}){return new Glob(e,t).walk()}function globIterateSync(e,t={}){return new Glob(e,t).iterateSync()}function globIterate(e,t={}){return new Glob(e,t).iterate()}const streamSync=globStreamSync,stream=Object.assign(globStream,{sync:globStreamSync}),iterateSync=globIterateSync,iterate=Object.assign(globIterate,{sync:globIterateSync}),sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync}),glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:sync,globStream:globStream,stream:stream,globStreamSync:globStreamSync,streamSync:streamSync,globIterate:globIterate,iterate:iterate,globIterateSync:globIterateSync,iterateSync:iterateSync,Glob:Glob,hasMagic:hasMagic,escape:escape,unescape:unescape});glob.glob=glob;const require$2=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);class Router{static mount(e){const t=loadBasicConfig();for(let r of globSync(`${t.router_dir}/**/*.js`,{nodir:!1})){let s=require$2(r);s.default&&(s=s.default);const n=r.match(/\/routes(?:(\/..*))?\/(..*)\.js/);if(!n)continue;const[i,a,o]=n,c=a?`${a}/${o.toLowerCase()}`:`/${o.toLowerCase()}`;process.env.EXPRESS_DEBUG&&console.log(`URL mapping ${c}`),e.use(c,s),c===t.default_router&&e.use("/",s)}}}var database=new class extends sequelize.Sequelize{constructor(){Environment.mount();const e=loadDatabaseConfig();super(e.database,e.username,e.password||void 0,e)}async isConnect(){try{return await this.authenticate(),!0}catch{return!1}}};class Model extends sequelize.Model{static table;static attributes;static DataTypes=sequelize.DataTypes;static QueryTypes=sequelize.QueryTypes;static Op=sequelize.Op;static fn=sequelize.fn;static col=sequelize.col;static literal=sequelize.literal;static where=sequelize.where;static Transaction=sequelize.Transaction;static initialize(){return process.env.EXPRESS_DEBUG&&console.log(`Initialize ${this.table} model`),this.init(this.attributes,{modelName:this.table,sequelize:database,freezeTableName:!0,timestamps:!1}),this}static association(){}static async begin(e){return database.transaction(e)}static async findById(e){return this.findOne({where:{id:e},raw:!0})}static async query(e,t){return this.sequelize.query(e,t)}}const require$1=node_module.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:_documentCurrentScript&&_documentCurrentScript.src||new URL("build.cjs",document.baseURI).href);var loadModels=()=>{const e=`${process.cwd()}/models`;if(!fs$3.existsSync(e))return void console.log(`There is no model directory (${e})`);const t=[];for(let r of globSync(`${e}/**/*.js`,{nodir:!1})){const e=require$1(r).prototype instanceof Model?require$1(r):require$1(r).default;e.initialize(),t.push(e)}for(let e of t)e.association()},httpErrors={exports:{}},compat={exports:{}},callsiteTostring,hasRequiredCallsiteTostring,eventListenerCount_1,hasRequiredEventListenerCount;function requireCallsiteTostring(){if(hasRequiredCallsiteTostring)return callsiteTostring;return hasRequiredCallsiteTostring=1,callsiteTostring=function(e){var t=!0,r=function(e){var t,r="";e.isNative()?r="native":e.isEval()?(t=e.getScriptNameOrSourceURL())||(r=e.getEvalOrigin()):t=e.getFileName();if(t){r+=t;var s=e.getLineNumber();if(null!=s){r+=":"+s;var n=e.getColumnNumber();n&&(r+=":"+n)}}return r||"unknown source"}(e),s=e.getFunctionName(),n=e.isConstructor(),i=!(e.isToplevel()||n),a="";if(i){var o=e.getMethodName(),c=(u=e.receiver).constructor&&u.constructor.name||null;s?(c&&0!==s.indexOf(c)&&(a+=c+"."),a+=s,o&&s.lastIndexOf("."+o)!==s.length-o.length-1&&(a+=" [as "+o+"]")):a+=c+"."+(o||"<anonymous>")}else n?a+="new "+(s||"<anonymous>"):s?a+=s:(t=!1,a+=r);var u;t&&(a+=" ("+r+")");return a}}
|
|
125
|
+
/*!
|
|
126
|
+
* depd
|
|
127
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
128
|
+
* MIT Licensed
|
|
129
|
+
*/function requireEventListenerCount(){if(hasRequiredEventListenerCount)return eventListenerCount_1;return hasRequiredEventListenerCount=1,eventListenerCount_1=function(e,t){return e.listeners(t).length}}
|
|
130
|
+
/*!
|
|
131
|
+
* depd
|
|
132
|
+
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
133
|
+
* MIT Licensed
|
|
134
|
+
*/!function(e){var t=require$$0$5.EventEmitter;function r(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var s=r();return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:s}),s}})}function s(e){return e.toString()}r(e.exports,"callSiteToString",(function(){var e=Error.stackTraceLimit,t={},r=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.stackTraceLimit=2,Error.captureStackTrace(t);var n=t.stack.slice();return Error.prepareStackTrace=r,Error.stackTraceLimit=e,n[0].toString?s:requireCallsiteTostring()})),r(e.exports,"eventListenerCount",(function(){return t.listenerCount||requireEventListenerCount()}))}(compat);var compatExports=compat.exports,callSiteToString=compatExports.callSiteToString,eventListenerCount=compatExports.eventListenerCount,relative=require$$1.relative,depd_1=depd,basePath=process.cwd();
|
|
135
|
+
/*!
|
|
136
|
+
* depd
|
|
137
|
+
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
138
|
+
* MIT Licensed
|
|
139
|
+
*/function containsNamespace(e,t){for(var r=e.split(/[ ,]+/),s=String(t).toLowerCase(),n=0;n<r.length;n++){var i=r[n];if(i&&("*"===i||i.toLowerCase()===s))return!0}return!1}function convertDataDescriptorToAccessor(e,t,r){var s=Object.getOwnPropertyDescriptor(e,t),n=s.value;return s.get=function(){return n},s.writable&&(s.set=function(e){return n=e}),delete s.value,delete s.writable,Object.defineProperty(e,t,s),s}function createArgumentsString(e){for(var t="",r=0;r<e;r++)t+=", arg"+r;return t.substr(2)}function createStackString(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var r=0;r<e.length;r++)t+="\n at "+callSiteToString(e[r]);return t}function depd(e){if(!e)throw new TypeError("argument namespace is required");var t=callSiteLocation(getStack()[1])[0];function r(e){log.call(r,e)}return r._file=t,r._ignored=isignored(e),r._namespace=e,r._traced=istraced(e),r._warned=Object.create(null),r.function=wrapfunction,r.property=wrapproperty,r}function isignored(e){return!!process.noDeprecation||containsNamespace(process.env.NO_DEPRECATION||"",e)}function istraced(e){return!!process.traceDeprecation||containsNamespace(process.env.TRACE_DEPRECATION||"",e)}function log(e,t){var r=0!==eventListenerCount(process,"deprecation");if(r||!this._ignored){var s,n,i,a,o=0,c=!1,u=getStack(),l=this._file;for(t?(a=t,(i=callSiteLocation(u[1])).name=a.name,l=i[0]):i=a=callSiteLocation(u[o=2]);o<u.length;o++)if((n=(s=callSiteLocation(u[o]))[0])===l)c=!0;else if(n===this._file)l=this._file;else if(c)break;var p=s?a.join(":")+"__"+s.join(":"):void 0;if(void 0===p||!(p in this._warned)){this._warned[p]=!0;var m=e;if(m||(m=i!==a&&i.name?defaultMessage(i):defaultMessage(a)),r){var d=DeprecationError(this._namespace,m,u.slice(o));process.emit("deprecation",d)}else{var f=(process.stderr.isTTY?formatColor:formatPlain).call(this,m,s,u.slice(o));process.stderr.write(f+"\n","utf8")}}}}function callSiteLocation(e){var t=e.getFileName()||"<anonymous>",r=e.getLineNumber(),s=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var n=[t,r,s];return n.callSite=e,n.name=e.getFunctionName(),n}function defaultMessage(e){var t=e.callSite,r=e.name;r||(r="<anonymous@"+formatLocation(e)+">");var s=t.getThis(),n=s&&t.getTypeName();return"Object"===n&&(n=void 0),"Function"===n&&(n=s.name||n),n&&t.getMethodName()?n+"."+r:r}function formatPlain(e,t,r){var s=(new Date).toUTCString()+" "+this._namespace+" deprecated "+e;if(this._traced){for(var n=0;n<r.length;n++)s+="\n at "+callSiteToString(r[n]);return s}return t&&(s+=" at "+formatLocation(t)),s}function formatColor(e,t,r){var s="[36;1m"+this._namespace+"[22;39m [33;1mdeprecated[22;39m [0m"+e+"[39m";if(this._traced){for(var n=0;n<r.length;n++)s+="\n [36mat "+callSiteToString(r[n])+"[39m";return s}return t&&(s+=" [36m"+formatLocation(t)+"[39m"),s}function formatLocation(e){return relative(basePath,e[0])+":"+e[1]+":"+e[2]}function getStack(){var e=Error.stackTraceLimit,t={},r=Error.prepareStackTrace;Error.prepareStackTrace=prepareObjectStackTrace,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(t);var s=t.stack.slice(1);return Error.prepareStackTrace=r,Error.stackTraceLimit=e,s}function prepareObjectStackTrace(e,t){return t}function wrapfunction(fn,message){if("function"!=typeof fn)throw new TypeError("argument fn must be a function");var args=createArgumentsString(fn.length),stack=getStack(),site=callSiteLocation(stack[1]);site.name=fn.name;var deprecatedfn=eval("(function ("+args+') {\n"use strict"\nlog.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n})');return deprecatedfn}function wrapproperty(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(e,t);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable");var n=this,i=callSiteLocation(getStack()[1]);i.name=t,"value"in s&&(s=convertDataDescriptorToAccessor(e,t));var a=s.get,o=s.set;"function"==typeof a&&(s.get=function(){return log.call(n,r,i),a.apply(this,arguments)}),"function"==typeof o&&(s.set=function(){return log.call(n,r,i),o.apply(this,arguments)}),Object.defineProperty(e,t,s)}function DeprecationError(e,t,r){var s,n=new Error;return Object.defineProperty(n,"constructor",{value:DeprecationError}),Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(n,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,get:function(){return void 0!==s?s:s=createStackString.call(this,r)},set:function(e){s=e}}),n}var setprototypeof=Object.setPrototypeOf||({__proto__:[]}instanceof Array?setProtoOf:mixinProperties);function setProtoOf(e,t){return e.__proto__=t,e}function mixinProperties(e,t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r]);return e}var require$$0={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"(Unused)",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},codes=require$$0,statuses=status;
|
|
140
|
+
/*!
|
|
141
|
+
* statuses
|
|
142
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
143
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
144
|
+
* MIT Licensed
|
|
145
|
+
*/function populateStatusesMap(e,t){var r=[];return Object.keys(t).forEach((function(s){var n=t[s],i=Number(s);e[i]=n,e[n]=i,e[n.toLowerCase()]=i,r.push(i)})),r}function status(e){if("number"==typeof e){if(!status[e])throw new Error("invalid status code: "+e);return e}if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);if(!isNaN(t)){if(!status[t])throw new Error("invalid status code: "+t);return t}if(!(t=status[e.toLowerCase()]))throw new Error('invalid status message: "'+e+'"');return t}status.STATUS_CODES=codes,status.codes=populateStatusesMap(status,codes),status.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},status.empty={204:!0,205:!0,304:!0},status.retry={502:!0,503:!0,504:!0};var inherits={exports:{}},inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,"function"==typeof Object.create?inherits_browser.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:inherits_browser.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}),inherits_browser.exports}try{var util=require("util");if("function"!=typeof util.inherits)throw"";inherits.exports=util.inherits}catch(e){inherits.exports=requireInherits_browser()}var inheritsExports=inherits.exports;
|
|
146
|
+
/*!
|
|
147
|
+
* http-errors
|
|
148
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
149
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
150
|
+
* MIT Licensed
|
|
151
|
+
*/!function(e){var t=depd_1("http-errors"),r=setprototypeof,s=statuses,n=inheritsExports;function i(e){return Number(String(e).charAt(0)+"00")}e.exports=function e(){for(var r,n,a=500,o={},c=0;c<arguments.length;c++){var u=arguments[c];if(u instanceof Error)a=(r=u).status||r.statusCode||a;else switch(typeof u){case"string":n=u;break;case"number":a=u,0!==c&&t("non-first-argument status code; replace with createError("+u+", ...)");break;case"object":o=u}}"number"==typeof a&&(a<400||a>=600)&&t("non-error status code; use only 4xx or 5xx status codes");("number"!=typeof a||!s[a]&&(a<400||a>=600))&&(a=500);var l=e[a]||e[i(a)];r||(r=l?new l(n):new Error(n||s[a]),Error.captureStackTrace(r,e));l&&r instanceof l&&r.status===a||(r.expose=a<500,r.status=r.statusCode=a);for(var p in o)"status"!==p&&"statusCode"!==p&&(r[p]=o[p]);return r},e.exports.HttpError=function(){function e(){throw new TypeError("cannot construct abstract class")}return n(e,Error),e}(),function(e,a,o){a.forEach((function(t){var a,c=s[t].split(" ").map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join("").replace(/[^ _0-9a-z]/gi,"");switch(i(t)){case 400:a=function(e,t,i){var a=t.match(/Error$/)?t:t+"Error";function o(e){var t=null!=e?e:s[i],n=new Error(t);return Error.captureStackTrace(n,o),r(n,o.prototype),Object.defineProperty(n,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:a,writable:!0}),n}return n(o,e),o.prototype.status=i,o.prototype.statusCode=i,o.prototype.expose=!0,o}(o,c,t);break;case 500:a=function(e,t,i){var a=t.match(/Error$/)?t:t+"Error";function o(e){var t=null!=e?e:s[i],n=new Error(t);return Error.captureStackTrace(n,o),r(n,o.prototype),Object.defineProperty(n,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(n,"name",{enumerable:!1,configurable:!0,value:a,writable:!0}),n}return n(o,e),o.prototype.status=i,o.prototype.statusCode=i,o.prototype.expose=!1,o}(o,c,t)}a&&(e[t]=a,e[c]=a)})),e["I'mateapot"]=t.function(e.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(e.exports,s.codes,e.exports.HttpError)}(httpErrors);var httpErrorsExports=httpErrors.exports,createError=getDefaultExportFromCjs(httpErrorsExports);class ErrorHandler{static mount(e){const t=loadBasicConfig();e.use(((e,t,r)=>{r(createError(404))})),e.use((async(e,r,s,n)=>{t.hook_handle_error?t.hook_handle_error(e,r,s,n):(console.error(e),s.status(e.status||500).end())}))}}var mount=e=>{Global.mount(),Environment.mount(),loadModels(),Http.mount(e),View.mount(e),CORS.mount(e),Local.mount(e),Authentication$1.mount(e),Router.mount(e),ErrorHandler.mount(e)},index$3=Object.freeze({__proto__:null,Database:database,Model:Model,loadModels:loadModels});class Authentication{static authenticate(e,t,r){return new Promise(((s,n)=>{passport$1.authenticate("local",((t,r)=>{t?n(t):r?e.logIn(r,(e=>{e?n(e):s(!0)})):s(!1)}))(e,t,r)}))}static logout(e){e.logout((e=>{}))}static successRedirect(e){const t=loadAuthenticationConfig();e.redirect(t.success_redirect)}static failureRedirect(e,t){const r=loadAuthenticationConfig(),s=isFunction(r.failure_redirect)?r.failure_redirect(e,t):r.failure_redirect;t.redirect(s)}}var index$2=Object.freeze({__proto__:null,Authentication:Authentication}),index$1=Object.freeze({__proto__:null,CORS:CORS,Environment:Environment,ErrorHandler:ErrorHandler,Global:Global,Http:Http,Local:Local,View:View}),index=Object.freeze({__proto__:null});exports.database=index$3,exports.interfaces=index,exports.middlewares=index$1,exports.mount=mount,exports.services=index$2,exports.utils=index$4;
|