zeed 0.9.2 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-VBENGHAN.js +12 -0
- package/dist/chunk-VBENGHAN.js.map +1 -0
- package/dist/index.all.d.ts +270 -228
- package/dist/index.browser.cjs +6 -6
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.ts +2 -2
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.node.cjs +11 -11
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts +3 -3
- package/dist/index.node.js +6 -6
- package/dist/index.node.js.map +1 -1
- package/dist/{uuid-c2cc7aa0.d.ts → uuid-bcd51568.d.ts} +269 -227
- package/package.json +4 -4
- package/dist/chunk-5KHLXHN6.js +0 -12
- package/dist/chunk-5KHLXHN6.js.map +0 -1
package/dist/index.node.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";var Tr=Object.create;var ce=Object.defineProperty;var wr=Object.getOwnPropertyDescriptor;var Lr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty;var r=(e,t)=>ce(e,"name",{value:t,configurable:!0});var Er=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},tn=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lr(t))!Ar.call(e,i)&&i!==n&&ce(e,i,{get:()=>t[i],enumerable:!(o=wr(t,i))||o.enumerable});return e};var ve=(e,t,n)=>(n=e!=null?Tr(vr(e)):{},tn(t||!e||!e.__esModule?ce(n,"default",{value:e,enumerable:!0}):n,e)),Pr=e=>tn(ce({},"__esModule",{value:!0}),e);var na={};Er(na,{CRYPTO_DEFAULT_ALG:()=>Me,CRYPTO_DEFAULT_DERIVE_ALG:()=>dt,CRYPTO_DEFAULT_DERIVE_ITERATIONS:()=>ln,CRYPTO_DEFAULT_HASH_ALG:()=>gt,Channel:()=>ye,CryptoEncoder:()=>We,DAY_MS:()=>Oe,Day:()=>A,Emitter:()=>R,FileStorage:()=>Ye,JsonEncoder:()=>G,LocalChannel:()=>ie,LogLevel:()=>j,LogLevelAlias:()=>rt,Logger:()=>v,LoggerConsoleHandler:()=>le,LoggerContext:()=>ot,LoggerFileHandler:()=>Vt,LoggerMemoryHandler:()=>As,LoggerNodeHandler:()=>en,MemStorage:()=>Je,NoopEncoder:()=>qe,PoolTaskIdConflictResolution:()=>er,PoolTaskState:()=>Xn,PubSub:()=>he,SerialQueue:()=>Ve,Uint8ArrayToHexDump:()=>pt,Uint8ArrayToJson:()=>De,Uint8ArrayToString:()=>at,XRX:()=>He,_decodeUtf8Polyfill:()=>un,_encodeUtf8Polyfill:()=>an,arrayAvg:()=>so,arrayBatches:()=>ao,arrayEmptyInPlace:()=>Qr,arrayFilterInPlace:()=>Ue,arrayFlatten:()=>K,arrayIntersection:()=>yn,arrayIsEqual:()=>xn,arrayMax:()=>ro,arrayMin:()=>oo,arrayMinus:()=>gn,arrayRandomElement:()=>no,arrayRemoveElement:()=>Zr,arraySetElement:()=>Kr,arrayShuffle:()=>eo,arrayShuffleForce:()=>to,arrayShuffleInPlace:()=>xt,arraySorted:()=>hn,arraySortedNumbers:()=>Xr,arraySum:()=>io,arraySymmetricDifference:()=>Jr,arrayToggleInPlace:()=>Yr,arrayUnion:()=>mn,arrayUnique:()=>Fe,avg:()=>_r,between:()=>Nr,cloneJsonObject:()=>ji,cloneObject:()=>Q,cmp:()=>ke,colorString:()=>ue,colorStringList:()=>Xt,composeOrderby:()=>qr,createArray:()=>uo,createLocalChannelPair:()=>Es,createPromise:()=>At,createPromiseProxy:()=>Nt,csvParse:()=>Cn,csvParseToObjects:()=>Zi,csvStringify:()=>Ji,dateStringToDays:()=>Zo,day:()=>Jo,dayDay:()=>An,dayDiff:()=>Bo,dayFromAny:()=>Uo,dayFromDate:()=>de,dayFromDateGMT:()=>Io,dayFromParts:()=>Be,dayFromString:()=>vt,dayFromTimestamp:()=>En,dayFromToday:()=>Lt,dayIterator:()=>Ho,dayMonth:()=>Tt,dayMonthStart:()=>Oo,dayOffset:()=>pe,dayRange:()=>jo,dayToDate:()=>wt,dayToDateGMT:()=>$o,dayToParts:()=>Fo,dayToString:()=>Pn,dayToTimestamp:()=>Ie,dayYear:()=>Ce,dayYearStart:()=>Co,debounce:()=>Ls,decimal:()=>Dn,decimalCentsPart:()=>Qo,decimalFromCents:()=>Ko,decimalToCents:()=>Yo,decodeBase16:()=>yo,decodeBase32:()=>go,decodeBase58:()=>xo,decodeBase62:()=>To,decrypt:()=>yt,deepEqual:()=>Rn,deepMerge:()=>me,deepStripUndefinedInPlace:()=>Mn,deriveKeyPbkdf2:()=>Cr,detect:()=>ir,digest:()=>Or,empty:()=>Bi,encodeBase16:()=>mo,encodeBase32:()=>fo,encodeBase58:()=>ho,encodeBase62:()=>bo,encodeQuery:()=>It,encrypt:()=>mt,endSortWeight:()=>$t,ensureFolder:()=>Js,ensureKey:()=>$i,ensureKeyAsync:()=>Ii,equalBinary:()=>ft,escapeHTML:()=>Rt,escapeRegExp:()=>kt,estimateSizeForBase:()=>wo,exists:()=>Qe,fetchBasic:()=>Gt,fetchJson:()=>ks,fetchOptionsBasicAuth:()=>rr,fetchOptionsFormURLEncoded:()=>Us,fetchOptionsJson:()=>$s,fetchText:()=>Fs,fixBrokenUth8String:()=>ko,forEachDay:()=>qo,forTimes:()=>_i,formatMessages:()=>vn,formatMilliseconds:()=>Ot,fromBase64:()=>cn,fromBase64String:()=>Ir,fromCamelCase:()=>vo,fromHex:()=>ct,getEnvVariableRelaxed:()=>Vs,getGlobal:()=>Is,getGlobalContext:()=>ee,getGlobalEmitter:()=>is,getGlobalLogger:()=>rn,getNamespaceFilterString:()=>nn,getNavigator:()=>or,getSecureRandom:()=>fn,getSecureRandomIfPossible:()=>E,getSourceLocation:()=>tt,getSourceLocationByPrecedingPattern:()=>Kt,getStack:()=>Zt,getStackLlocationList:()=>dr,getTimestamp:()=>re,getWindow:()=>zt,immediate:()=>_o,isArray:()=>O,isBoolean:()=>Dt,isBrowser:()=>sr,isEven:()=>Ft,isHalf:()=>te,isInteger:()=>ni,isLocalHost:()=>vs,isNotNull:()=>ai,isNull:()=>ii,isNullOrUndefined:()=>oi,isNumber:()=>ti,isObject:()=>I,isPrime:()=>zr,isPrimeRX:()=>Gr,isPrimitive:()=>je,isPromise:()=>D,isRecord:()=>ge,isRecordPlain:()=>Xo,isSafeInteger:()=>ri,isString:()=>ei,isTimeout:()=>zo,isUint8Array:()=>si,isValue:()=>ui,joinToUint8Array:()=>Ur,jsonStringify:()=>Fr,jsonStringifySafe:()=>P,jsonStringifySorted:()=>Mr,jsonToUint8Array:()=>Se,last:()=>Ci,lazyListener:()=>as,linkifyPlainText:()=>Fi,listDistinctUnion:()=>pi,listGroupBy:()=>fi,listOfKey:()=>di,listQuery:()=>li,loggerStackTraceDebug:()=>br,memoize:()=>Hi,memoizeAsync:()=>Ni,messages:()=>ss,moveSortWeight:()=>Ri,noop:()=>Bs,objectIsEmpty:()=>yi,objectMap:()=>gi,objectMergeDisposable:()=>mi,parseArgs:()=>js,parseBasicAuth:()=>nr,parseDate:()=>us,parseLogLevel:()=>Ae,parseOrderby:()=>dn,parseQuery:()=>Ui,pbcopy:()=>Hs,platform:()=>Os,promisify:()=>$,qid:()=>bs,randomBoolean:()=>Br,randomFloat:()=>Hr,randomInt:()=>jr,randomUint8Array:()=>Z,readText:()=>Ks,regExpEscape:()=>qi,regExpString:()=>On,removeFolder:()=>Zs,renderMessages:()=>fe,roundDown:()=>Li,roundHalfAwayFromZero:()=>Ei,roundHalfDown:()=>Pi,roundHalfEven:()=>Si,roundHalfOdd:()=>Ai,roundHalfTowardsZero:()=>Di,roundHalfUp:()=>vi,roundUp:()=>wi,seededRandom:()=>Vr,setUuidDefaultEncoding:()=>ys,setupEnv:()=>qs,size:()=>Oi,sleep:()=>No,sortedItems:()=>Un,sortedOrderby:()=>Wr,startSortWeight:()=>Ut,stringToBoolean:()=>Ao,stringToFloat:()=>Po,stringToInteger:()=>Eo,stringToPath:()=>cr,stringToUInt8Array:()=>st,suid:()=>ds,suidBytes:()=>Bt,suidBytesDate:()=>Kn,suidDate:()=>gs,sum:()=>pn,throttle:()=>ws,timeout:()=>Go,timeoutReached:()=>Et,timoutError:()=>Pt,toBase64:()=>lt,toBase64Url:()=>$r,toBool:()=>Mo,toCamelCase:()=>bt,toCapitalize:()=>bn,toCapitalizeWords:()=>Lo,toFloat:()=>So,toHex:()=>ut,toHumanReadableFilePath:()=>Ws,toHumanReadableUrl:()=>$n,toInt:()=>Do,toPath:()=>Ke,toString:()=>Ro,toUint8Array:()=>S,toValidFilename:()=>Mt,today:()=>Wo,tryTimeout:()=>St,uname:()=>_,unescapeHTML:()=>ci,useAsyncMutex:()=>os,useBase:()=>H,useDefer:()=>Xi,useDispose:()=>Ne,useDisposer:()=>Qi,useEventListener:()=>ns,useExitHandler:()=>Cs,useInterval:()=>ts,useLevelFilter:()=>B,useMessageHub:()=>Ps,useMutex:()=>rs,useNamespaceFilter:()=>F,usePool:()=>Ts,usePubSub:()=>Ss,useRPC:()=>Ms,useSorted:()=>Mi,useTimeout:()=>es,uuid:()=>N,uuid32bit:()=>ms,uuidB32:()=>Gn,uuidB62:()=>Hn,uuidBytes:()=>Ge,uuidDecode:()=>Ht,uuidDecodeB32:()=>Vn,uuidDecodeB62:()=>_n,uuidDecodeV4:()=>Jn,uuidEncode:()=>Qn,uuidEncodeB32:()=>zn,uuidEncodeB62:()=>Nn,uuidEncodeV4:()=>Wn,uuidIsValid:()=>hs,uuidv4:()=>qn,valueToBoolean:()=>Y,valueToFloat:()=>Ln,valueToInteger:()=>wn,valueToPath:()=>lr,valueToString:()=>$e,waitOn:()=>Vo,writeText:()=>Ys});module.exports=Pr(na);function Sr(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}r(Sr,"_global");function ee(){let e=Sr();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}r(ee,"getGlobalContext");function nn(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}r(nn,"getNamespaceFilterString");var Dr=nn(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*");function F(e=Dr){let t,n=[],o=[];if(!e)t=r(function(i){return!1},"fn");else if(e==="*")t=r(function(i){return!0},"fn");else{let i,s=e.split(/[\s,]+/),u=s.length;for(i=0;i<u;i++){if(!s[i])continue;let a=s[i].replace(/\*/g,".*?");a[0]==="-"?n.push(new RegExp(`^${a.substr(1)}$`)):o.push(new RegExp(`^${a}$`))}t=r(function(a){if(n.length===0&&o.length===0)return!0;let c,l;for(c=0,l=n.length;c<l;c++)if(n[c].test(a))return!1;for(c=0,l=o.length;c<l;c++)if(o[c].test(a))return!0;return!1},"fn")}return t.accept=o,t.reject=n,t.filter=e,t}r(F,"useNamespaceFilter");var Rr=typeof process<"u"?process.env.ZEED_LEVEL??process.env.LEVEL??process.env.DEBUG_LEVEL:typeof localStorage<"u"?localStorage.zeed_level??localStorage.level??localStorage.debug_level:void 0;function Ae(e){if(e===!1)return 1/0;if(typeof e=="number")return e;if(typeof e=="string"){let t=rt[e.toLocaleLowerCase().trim()];if(t!=null)return t}return-1}r(Ae,"parseLogLevel");function B(e=Rr){let t=Ae(e);return n=>n>=t}r(B,"useLevelFilter");function le(e={}){let{level:t=void 0,filter:n=void 0}=e,o=F(n),i=B(t);return s=>{if(!i(s.level)||!o(s.name))return;let u=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(`I|* ${u}`,...s.messages);break;case 2:console.warn(`W|** ${u}`,...s.messages);break;case 3:console.error(`E|*** ${u}`,...s.messages);break;default:console.debug(`D| ${u}`,...s.messages);break}}}r(le,"LoggerConsoleHandler");var j=(a=>(a[a.all=-1]="all",a[a.debug=0]="debug",a[a.info=1]="info",a[a.warn=2]="warn",a[a.error=3]="error",a[a.fatal=4]="fatal",a[a.off=1/0]="off",a))(j||{}),rt={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:1/0,"-":1/0};function ot(e=""){let t=[le()],n=r(c=>!0,"logCheckNamespace"),o=!1,i=u,s=!1;function u(c="",l){let p=Ae(l??-1);function d(h,m){return p<=h?m:()=>{}}r(d,"defineForLogLevel");let f=d(0,(...h)=>{g({name:c,messages:h,level:0})});f.label=c,f.extend=function(h){return i(c?`${c}:${h}`:h)};let g=r(h=>{if(n(c))for(let m of t)m&&m(h)},"emit");return f.debug=d(0,(...h)=>{g({name:c,messages:h,level:0})}),f.info=d(1,(...h)=>{g({name:c,messages:h,level:1})}),f.warn=d(2,(...h)=>{g({name:c,messages:h,level:2})}),f.error=d(3,(...h)=>{g({name:c,messages:h,level:3})}),f.fatal=d(4,(...h)=>{throw g({name:c,messages:h,level:4}),new Error(`${h.map(String).join(" ")}`)}),f.assert=d(4,(h,...m)=>{h||f.fatal(...m)}),f}r(u,"LoggerBaseFactory");function a(c="",l){let p=i(c,l);return s&&p.debug(`+++ init of logger "${c}" on level "${j[p.level]}".`),p}return r(a,"Logger"),a.registerHandler=function(c){t.push(c)},a.setFilter=function(c){n=F(c)},a.setLock=(c=!0)=>o=c,a.setDebug=(c=!0)=>s=c,a.setHandlers=function(c=[]){i!==u&&(i=u),!o&&(t=[...c].filter(l=>typeof l=="function"))},a.level=-1,a.setLogLevel=function(c=-1){o||(a.level=c)},a.setFactory=function(c){o||(i=c)},a}r(ot,"LoggerContext");var J;function it(){let e=ot();return e.setHandlers([le()]),e}r(it,"getLoggerContext");function rn(){if(J==null)try{let e=ee();e!=null?e?.logger==null?(J=it(),e.logger=J):J=e.logger:J=it()}catch{J=it()}return J}r(rn,"getGlobalLogger");var v=rn();var on=r((e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t,"_sortedReplacer");function Mr(e,t=void 0){return JSON.stringify(e,on,t)}r(Mr,"jsonStringifySorted");function kr(e,t){let n=[],o=[];return t==null&&(t=r(function(i,s){return n[0]===s?"[Circular ~]":`[Circular ~.${o.slice(0,n.indexOf(s)).join(".")}]`},"cycleReplacer")),function(i,s){if(n.length>0){let u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?o.splice(u,1/0,i):o.push(i),~n.indexOf(s)&&(s=t?.call(this,i,s))}else n.push(s);s=on(i,s);try{return e==null?s:e.call(this,i,s)}catch{}return String(s)}}r(kr,"serializer");function P(e,t,n,o){return JSON.stringify(e,kr(t,o),n)}r(P,"jsonStringifySafe");var Fr=P;var sn=v("zeed:bin","error");function an(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i)||0;return o}r(an,"_encodeUtf8Polyfill");function un(e){let t=e.length,n="",o=0;for(;t>0;){let i=t<1e4?t:1e4,s=e.subarray(o,o+i);o+=i,n+=String.fromCodePoint.apply(null,s),t-=i}return decodeURIComponent(escape(n))}r(un,"_decodeUtf8Polyfill");var Ee;function st(e){if(Ee==null&&(Ee=an,typeof TextEncoder<"u")){let t=new TextEncoder;Ee=r(n=>t.encode(n),"_textEncoder")}return Ee(e.normalize("NFC"))}r(st,"stringToUInt8Array");var Pe;function at(e){if(Pe==null&&(Pe=un,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});Pe=r(n=>t.decode(n),"_textDecoder")}return Pe(e).normalize("NFC")}r(at,"Uint8ArrayToString");function S(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?st(e):e.length?new Uint8Array(e):e}r(S,"toUint8Array");function Ur(...e){let t=0,n=e.flat(1).map(s=>{let u=S(s);return t+=u.length,u}),o=new Uint8Array(t),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}r(Ur,"joinToUint8Array");function ut(e){if(typeof Buffer<"u")return Buffer.from(S(e)).toString("hex");let t="0123456789abcdef",n="";for(let o of[...S(e)])n+=t[o>>4]+t[o&15];return n}r(ut,"toHex");function ct(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}r(ct,"fromHex");function lt(e,t=!1){let n=S(e),o="";if(typeof Buffer<"u")o=Buffer.from(n).toString("base64");else{let i="";for(let s=0;s<n.byteLength;s++)i+=String.fromCharCode(n[s]);o=btoa(i)}return t?o.replaceAll("=",""):o}r(lt,"toBase64");function $r(e){let t=S(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url").replaceAll("=","");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}r($r,"toBase64Url");function cn(e){if(e=e.replaceAll("-","+").replaceAll("_","/"),typeof Buffer<"u"){let o=Buffer.from(e,"base64");return new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}r(cn,"fromBase64");function Ir(e){return at(cn(e))}r(Ir,"fromBase64String");function ft(e,t){if(e.byteLength!==t.byteLength)return!1;let n=S(e),o=S(t);for(let i=0;i<n.length;i++)if(n[i]!==o[i])return!1;return!0}r(ft,"equalBinary");function Se(e){try{return st(P(e))}catch(t){throw sn.warn("jsonToUint8Array",e),t}}r(Se,"jsonToUint8Array");function De(e){try{return JSON.parse(at(e))}catch(t){throw sn.warn("Uint8ArrayToJson",e),t}}r(De,"Uint8ArrayToJson");function pt(e,t){if(typeof e!="string")if(e instanceof ArrayBuffer&&e.byteLength!==void 0)e=String.fromCharCode.apply(String,[].slice.call(new Uint8Array(e)));else if(Array.isArray(e))e=String.fromCharCode.apply(String,e);else if(e.constructor===Uint8Array)e=String.fromCharCode.apply(String,[].slice.call(e));else return!1;t=t||16;let n=[],o="0123456789ABCDEF";for(let i=0;i<e.length;i+=t){let s=e.slice(i,Math.min(i+t,e.length)),u=`0000${i.toString(16)}`.slice(-4),a=s.split("").map(l=>{let p=l.charCodeAt(0);return` ${o[(240&p)>>4]}${o[15&p]}`}).join("");a+=" ".repeat(t-s.length);let c=s.replace(/[\x00-\x1F\x20]/g,".");c+=" ".repeat(t-s.length),n.push(`${u} ${a} ${c}`)}return n.join(`
|
|
2
|
-
`)}r(
|
|
3
|
-
${
|
|
1
|
+
"use strict";var vr=Object.create;var le=Object.defineProperty;var Ar=Object.getOwnPropertyDescriptor;var Er=Object.getOwnPropertyNames;var Pr=Object.getPrototypeOf,Sr=Object.prototype.hasOwnProperty;var r=(e,t)=>le(e,"name",{value:t,configurable:!0});var Dr=(e,t)=>{for(var n in t)le(e,n,{get:t[n],enumerable:!0})},on=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Er(t))!Sr.call(e,i)&&i!==n&&le(e,i,{get:()=>t[i],enumerable:!(o=Ar(t,i))||o.enumerable});return e};var Ae=(e,t,n)=>(n=e!=null?vr(Pr(e)):{},on(t||!e||!e.__esModule?le(n,"default",{value:e,enumerable:!0}):n,e)),Rr=e=>on(le({},"__esModule",{value:!0}),e);var ra={};Dr(ra,{CRYPTO_DEFAULT_ALG:()=>Me,CRYPTO_DEFAULT_DERIVE_ALG:()=>mt,CRYPTO_DEFAULT_DERIVE_ITERATIONS:()=>dn,CRYPTO_DEFAULT_HASH_ALG:()=>yt,Channel:()=>he,CryptoEncoder:()=>Je,DAY_MS:()=>Be,Day:()=>A,Emitter:()=>P,FileStorage:()=>Xe,JsonEncoder:()=>z,LocalChannel:()=>oe,LogLevel:()=>j,LogLevelAlias:()=>it,Logger:()=>v,LoggerConsoleHandler:()=>fe,LoggerContext:()=>st,LoggerFileHandler:()=>Jt,LoggerMemoryHandler:()=>Ms,LoggerNodeHandler:()=>rn,MemStorage:()=>Ke,NoopEncoder:()=>We,PoolTaskIdConflictResolution:()=>or,PoolTaskState:()=>rr,Progress:()=>ie,PubSub:()=>xe,SerialQueue:()=>Ze,Uint8ArrayToHexDump:()=>gt,Uint8ArrayToJson:()=>Re,Uint8ArrayToString:()=>ct,XRX:()=>Ne,_decodeUtf8Polyfill:()=>fn,_encodeUtf8Polyfill:()=>ln,arrayAvg:()=>uo,arrayBatches:()=>co,arrayEmptyInPlace:()=>eo,arrayFilterInPlace:()=>$e,arrayFlatten:()=>K,arrayIntersection:()=>bn,arrayIsEqual:()=>wn,arrayMax:()=>io,arrayMin:()=>so,arrayMinus:()=>hn,arrayRandomElement:()=>oo,arrayRemoveElement:()=>Ce,arraySetElement:()=>Qr,arrayShuffle:()=>no,arrayShuffleForce:()=>ro,arrayShuffleInPlace:()=>Tt,arraySorted:()=>Tn,arraySortedNumbers:()=>to,arraySum:()=>ao,arraySymmetricDifference:()=>Yr,arrayToggleInPlace:()=>Xr,arrayUnion:()=>xn,arrayUnique:()=>ke,avg:()=>Vr,between:()=>zr,cloneJsonObject:()=>ji,cloneObject:()=>Q,cmp:()=>Fe,colorString:()=>ce,colorStringList:()=>nn,composeOrderby:()=>Zr,createArray:()=>lo,createLocalChannelPair:()=>ws,createPromise:()=>Pt,createPromiseProxy:()=>zt,csvParse:()=>jn,csvParseToObjects:()=>Ki,csvStringify:()=>Zi,dateStringToDays:()=>Yo,day:()=>Ko,dayDay:()=>Sn,dayDiff:()=>jo,dayFromAny:()=>$o,dayFromDate:()=>ge,dayFromDateGMT:()=>Oo,dayFromParts:()=>je,dayFromString:()=>Et,dayFromTimestamp:()=>Dn,dayFromToday:()=>At,dayIterator:()=>No,dayMonth:()=>Lt,dayMonthStart:()=>Bo,dayOffset:()=>de,dayRange:()=>Ho,dayToDate:()=>vt,dayToDateGMT:()=>Io,dayToParts:()=>Co,dayToString:()=>Rn,dayToTimestamp:()=>Oe,dayYear:()=>_e,dayYearStart:()=>_o,debounce:()=>Rs,decimal:()=>Mn,decimalCentsPart:()=>ei,decimalFromCents:()=>Qo,decimalToCents:()=>Xo,decodeBase16:()=>xo,decodeBase32:()=>yo,decodeBase58:()=>To,decodeBase62:()=>Lo,decrypt:()=>xt,deepEqual:()=>Fn,deepMerge:()=>ye,deepStripUndefinedInPlace:()=>kn,deriveKeyPbkdf2:()=>jr,detect:()=>ur,digest:()=>_r,empty:()=>_i,encodeBase16:()=>ho,encodeBase32:()=>go,encodeBase58:()=>bo,encodeBase62:()=>wo,encodeQuery:()=>Bt,encrypt:()=>ht,endSortWeight:()=>Ot,ensureFolder:()=>Zs,ensureKey:()=>$i,ensureKeyAsync:()=>Ii,equalBinary:()=>dt,escapeHTML:()=>Ft,escapeRegExp:()=>Ct,estimateSizeForBase:()=>vo,exists:()=>et,fetchBasic:()=>qt,fetchJson:()=>Fs,fetchOptionsBasicAuth:()=>sr,fetchOptionsFormURLEncoded:()=>Cs,fetchOptionsJson:()=>$s,fetchText:()=>ks,fixBrokenUth8String:()=>ko,forEachDay:()=>Jo,forTimes:()=>Gi,formatMessages:()=>Pn,formatMilliseconds:()=>_t,fromBase64:()=>pn,fromBase64String:()=>Br,fromCamelCase:()=>Eo,fromHex:()=>ft,getEnvVariableRelaxed:()=>qs,getGlobal:()=>Is,getGlobalContext:()=>ee,getGlobalEmitter:()=>ss,getGlobalLogger:()=>an,getNamespaceFilterString:()=>sn,getNavigator:()=>ar,getSecureRandom:()=>gn,getSecureRandomIfPossible:()=>E,getSourceLocation:()=>rt,getSourceLocationByPrecedingPattern:()=>Xt,getStack:()=>Qt,getStackLlocationList:()=>yr,getTimestamp:()=>re,getWindow:()=>Wt,immediate:()=>zo,isArray:()=>I,isBoolean:()=>Ut,isBrowser:()=>cr,isEven:()=>$t,isHalf:()=>te,isInteger:()=>oi,isLocalHost:()=>Us,isNotNull:()=>Mt,isNull:()=>ai,isNullOrUndefined:()=>si,isNumber:()=>ri,isObject:()=>$,isPrime:()=>Wr,isPrimeRX:()=>qr,isPrimitive:()=>He,isPromise:()=>R,isRecord:()=>me,isRecordPlain:()=>ti,isSafeInteger:()=>ii,isString:()=>ni,isTimeout:()=>qo,isUint8Array:()=>ui,isValue:()=>ci,joinToUint8Array:()=>Ir,jsonStringify:()=>$r,jsonStringifySafe:()=>S,jsonStringifySorted:()=>kr,jsonToUint8Array:()=>De,last:()=>Bi,lazyListener:()=>us,linkifyPlainText:()=>ki,listDistinctUnion:()=>di,listGroupBy:()=>pi,listOfKey:()=>gi,listQuery:()=>fi,loggerStackTraceDebug:()=>Lr,memoize:()=>Hi,memoizeAsync:()=>Ni,messages:()=>as,moveSortWeight:()=>Ui,noop:()=>_s,objectIsEmpty:()=>hi,objectMap:()=>mi,objectMergeDisposable:()=>yi,parseArgs:()=>js,parseBasicAuth:()=>ir,parseDate:()=>cs,parseLogLevel:()=>Ee,parseOrderby:()=>yn,parseQuery:()=>Ci,pbcopy:()=>Hs,platform:()=>Os,promisify:()=>C,qid:()=>Ts,randomBoolean:()=>Hr,randomFloat:()=>Gr,randomInt:()=>Nr,randomUint8Array:()=>Z,readText:()=>Ys,regExpEscape:()=>Wi,regExpString:()=>_n,removeFolder:()=>Ks,renderMessages:()=>pe,roundDown:()=>vi,roundHalfAwayFromZero:()=>Pi,roundHalfDown:()=>Si,roundHalfEven:()=>Di,roundHalfOdd:()=>Ei,roundHalfTowardsZero:()=>Ri,roundHalfUp:()=>Ai,roundUp:()=>Li,seededRandom:()=>Jr,setUuidDefaultEncoding:()=>hs,setupEnv:()=>Ws,size:()=>Oi,sleep:()=>Go,sortedItems:()=>In,sortedOrderby:()=>Kr,startSortWeight:()=>It,stringToBoolean:()=>Po,stringToFloat:()=>Do,stringToInteger:()=>So,stringToPath:()=>pr,stringToUInt8Array:()=>ut,suid:()=>gs,suidBytes:()=>Ht,suidBytesDate:()=>Xn,suidDate:()=>ms,sum:()=>mn,throttle:()=>Ds,timeout:()=>Vo,timeoutReached:()=>St,timoutError:()=>Dt,toBase64:()=>pt,toBase64Url:()=>Or,toBool:()=>Fo,toCamelCase:()=>wt,toCapitalize:()=>Ln,toCapitalizeWords:()=>Ao,toFloat:()=>Ro,toHex:()=>lt,toHumanReadableFilePath:()=>Js,toHumanReadableUrl:()=>On,toInt:()=>Uo,toPath:()=>Qe,toString:()=>Mo,toUint8Array:()=>D,toValidFilename:()=>kt,today:()=>Zo,tryTimeout:()=>Rt,uname:()=>G,unescapeHTML:()=>li,useAsyncMutex:()=>is,useBase:()=>H,useDefer:()=>es,useDispose:()=>Ge,useDisposer:()=>Xi,useEventListener:()=>rs,useExitHandler:()=>Bs,useInterval:()=>ns,useLevelFilter:()=>_,useMessageHub:()=>Ls,useMutex:()=>os,useNamespaceFilter:()=>F,usePool:()=>Ss,usePubSub:()=>vs,useRPC:()=>Ps,useSorted:()=>Mi,useTimeout:()=>ts,uuid:()=>N,uuid32bit:()=>ys,uuidB32:()=>qn,uuidB62:()=>Gn,uuidBytes:()=>Ve,uuidDecode:()=>Gt,uuidDecodeB32:()=>Jn,uuidDecodeB62:()=>Vn,uuidDecodeV4:()=>Yn,uuidEncode:()=>tr,uuidEncodeB32:()=>Wn,uuidEncodeB62:()=>zn,uuidEncodeV4:()=>Kn,uuidIsValid:()=>xs,uuidv4:()=>Zn,valueToBoolean:()=>Y,valueToFloat:()=>En,valueToInteger:()=>An,valueToPath:()=>dr,valueToString:()=>Ie,waitOn:()=>Wo,writeText:()=>Qs});module.exports=Rr(ra);function Ur(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}r(Ur,"_global");function ee(){let e=Ur();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}r(ee,"getGlobalContext");function sn(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}r(sn,"getNamespaceFilterString");var Mr=sn(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*");function F(e=Mr){let t,n=[],o=[];if(!e)t=r(function(i){return!1},"fn");else if(e==="*")t=r(function(i){return!0},"fn");else{let i,s=e.split(/[\s,]+/),u=s.length;for(i=0;i<u;i++){if(!s[i])continue;let a=s[i].replace(/\*/g,".*?");a[0]==="-"?n.push(new RegExp(`^${a.substr(1)}$`)):o.push(new RegExp(`^${a}$`))}t=r(function(a){if(n.length===0&&o.length===0)return!0;let c,l;for(c=0,l=n.length;c<l;c++)if(n[c].test(a))return!1;for(c=0,l=o.length;c<l;c++)if(o[c].test(a))return!0;return!1},"fn")}return t.accept=o,t.reject=n,t.filter=e,t}r(F,"useNamespaceFilter");var Fr=typeof process<"u"?process.env.ZEED_LEVEL??process.env.LEVEL??process.env.DEBUG_LEVEL:typeof localStorage<"u"?localStorage.zeed_level??localStorage.level??localStorage.debug_level:void 0;function Ee(e){if(e===!1)return 1/0;if(typeof e=="number")return e;if(typeof e=="string"){let t=it[e.toLocaleLowerCase().trim()];if(t!=null)return t}return-1}r(Ee,"parseLogLevel");function _(e=Fr){let t=Ee(e);return n=>n>=t}r(_,"useLevelFilter");function fe(e={}){let{level:t=void 0,filter:n=void 0}=e,o=F(n),i=_(t);return s=>{if(!i(s.level)||!o(s.name))return;let u=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(`I|* ${u}`,...s.messages);break;case 2:console.warn(`W|** ${u}`,...s.messages);break;case 3:console.error(`E|*** ${u}`,...s.messages);break;default:console.debug(`D| ${u}`,...s.messages);break}}}r(fe,"LoggerConsoleHandler");var j=(a=>(a[a.all=-1]="all",a[a.debug=0]="debug",a[a.info=1]="info",a[a.warn=2]="warn",a[a.error=3]="error",a[a.fatal=4]="fatal",a[a.off=1/0]="off",a))(j||{}),it={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:1/0,"-":1/0};function st(e=""){let t=[fe()],n=r(c=>!0,"logCheckNamespace"),o=!1,i=u,s=!1;function u(c="",l){let p=Ee(l??-1);function d(h,m){return p<=h?m:()=>{}}r(d,"defineForLogLevel");let f=d(0,(...h)=>{g({name:c,messages:h,level:0})});f.label=c,f.extend=function(h){return i(c?`${c}:${h}`:h)};let g=r(h=>{if(n(c))for(let m of t)m&&m(h)},"emit");return f.debug=d(0,(...h)=>{g({name:c,messages:h,level:0})}),f.info=d(1,(...h)=>{g({name:c,messages:h,level:1})}),f.warn=d(2,(...h)=>{g({name:c,messages:h,level:2})}),f.error=d(3,(...h)=>{g({name:c,messages:h,level:3})}),f.fatal=d(4,(...h)=>{throw g({name:c,messages:h,level:4}),new Error(`${h.map(String).join(" ")}`)}),f.assert=d(4,(h,...m)=>{h||f.fatal(...m)}),f}r(u,"LoggerBaseFactory");function a(c="",l){let p=i(c,l);return s&&p.debug(`+++ init of logger "${c}" on level "${j[p.level]}".`),p}return r(a,"Logger"),a.registerHandler=function(c){t.push(c)},a.setFilter=function(c){n=F(c)},a.setLock=(c=!0)=>o=c,a.setDebug=(c=!0)=>s=c,a.setHandlers=function(c=[]){i!==u&&(i=u),!o&&(t=[...c].filter(l=>typeof l=="function"))},a.level=-1,a.setLogLevel=function(c=-1){o||(a.level=c)},a.setFactory=function(c){o||(i=c)},a}r(st,"LoggerContext");var J;function at(){let e=st();return e.setHandlers([fe()]),e}r(at,"getLoggerContext");function an(){if(J==null)try{let e=ee();e!=null?e?.logger==null?(J=at(),e.logger=J):J=e.logger:J=at()}catch{J=at()}return J}r(an,"getGlobalLogger");var v=an();var un=r((e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t,"_sortedReplacer");function kr(e,t=void 0){return JSON.stringify(e,un,t)}r(kr,"jsonStringifySorted");function Cr(e,t){let n=[],o=[];return t==null&&(t=r(function(i,s){return n[0]===s?"[Circular ~]":`[Circular ~.${o.slice(0,n.indexOf(s)).join(".")}]`},"cycleReplacer")),function(i,s){if(n.length>0){let u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?o.splice(u,1/0,i):o.push(i),~n.indexOf(s)&&(s=t?.call(this,i,s))}else n.push(s);s=un(i,s);try{return e==null?s:e.call(this,i,s)}catch{}return String(s)}}r(Cr,"serializer");function S(e,t,n,o){return JSON.stringify(e,Cr(t,o),n)}r(S,"jsonStringifySafe");var $r=S;var cn=v("zeed:bin","error");function ln(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i)||0;return o}r(ln,"_encodeUtf8Polyfill");function fn(e){let t=e.length,n="",o=0;for(;t>0;){let i=t<1e4?t:1e4,s=e.subarray(o,o+i);o+=i,n+=String.fromCodePoint.apply(null,s),t-=i}return decodeURIComponent(escape(n))}r(fn,"_decodeUtf8Polyfill");var Pe;function ut(e){if(Pe==null&&(Pe=ln,typeof TextEncoder<"u")){let t=new TextEncoder;Pe=r(n=>t.encode(n),"_textEncoder")}return Pe(e.normalize("NFC"))}r(ut,"stringToUInt8Array");var Se;function ct(e){if(Se==null&&(Se=fn,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});Se=r(n=>t.decode(n),"_textDecoder")}return Se(e).normalize("NFC")}r(ct,"Uint8ArrayToString");function D(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?ut(e):e.length?new Uint8Array(e):e}r(D,"toUint8Array");function Ir(...e){let t=0,n=e.flat(1).map(s=>{let u=D(s);return t+=u.length,u}),o=new Uint8Array(t),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}r(Ir,"joinToUint8Array");function lt(e){if(typeof Buffer<"u")return Buffer.from(D(e)).toString("hex");let t="0123456789abcdef",n="";for(let o of[...D(e)])n+=t[o>>4]+t[o&15];return n}r(lt,"toHex");function ft(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}r(ft,"fromHex");function pt(e,t=!1){let n=D(e),o="";if(typeof Buffer<"u")o=Buffer.from(n).toString("base64");else{let i="";for(let s=0;s<n.byteLength;s++)i+=String.fromCharCode(n[s]);o=btoa(i)}return t?o.replaceAll("=",""):o}r(pt,"toBase64");function Or(e){let t=D(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url").replaceAll("=","");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}r(Or,"toBase64Url");function pn(e){if(e=e.replaceAll("-","+").replaceAll("_","/"),typeof Buffer<"u"){let o=Buffer.from(e,"base64");return new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}r(pn,"fromBase64");function Br(e){return ct(pn(e))}r(Br,"fromBase64String");function dt(e,t){if(e.byteLength!==t.byteLength)return!1;let n=D(e),o=D(t);for(let i=0;i<n.length;i++)if(n[i]!==o[i])return!1;return!0}r(dt,"equalBinary");function De(e){try{return ut(S(e))}catch(t){throw cn.warn("jsonToUint8Array",e),t}}r(De,"jsonToUint8Array");function Re(e){try{return JSON.parse(ct(e))}catch(t){throw cn.warn("Uint8ArrayToJson",e),t}}r(Re,"Uint8ArrayToJson");function gt(e,t){if(typeof e!="string")if(e instanceof ArrayBuffer&&e.byteLength!==void 0)e=String.fromCharCode.apply(String,[].slice.call(new Uint8Array(e)));else if(Array.isArray(e))e=String.fromCharCode.apply(String,e);else if(e.constructor===Uint8Array)e=String.fromCharCode.apply(String,[].slice.call(e));else return!1;t=t||16;let n=[],o="0123456789ABCDEF";for(let i=0;i<e.length;i+=t){let s=e.slice(i,Math.min(i+t,e.length)),u=`0000${i.toString(16)}`.slice(-4),a=s.split("").map(l=>{let p=l.charCodeAt(0);return` ${o[(240&p)>>4]}${o[15&p]}`}).join("");a+=" ".repeat(t-s.length);let c=s.replace(/[\x00-\x1F\x20]/g,".");c+=" ".repeat(t-s.length),n.push(`${u} ${a} ${c}`)}return n.join(`
|
|
2
|
+
`)}r(gt,"Uint8ArrayToHexDump");function Z(e=16){let t=new Uint8Array(e);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*256);return t}r(Z,"randomUint8Array");var yt="SHA-256",Me="AES-GCM",mt="PBKDF2",dn=1e5;async function _r(e,t=yt){return D(await crypto.subtle.digest(t,D(e)))}r(_r,"digest");async function jr(e,t={}){let n=D(e),o=await crypto.subtle.importKey("raw",n,mt,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:mt,salt:t.salt?D(t.salt):new Uint8Array(0),iterations:t.iterations??dn,hash:yt},o,{name:Me,length:256},!0,["encrypt","decrypt"])}r(jr,"deriveKeyPbkdf2");var Ue=new Uint8Array([1,1]);async function ht(e,t){let n=Z(12),o=await crypto.subtle.encrypt({name:Me,iv:n},t,e),i=new Uint8Array(o),s=Ue.length+n.length+i.length,u=new Uint8Array(s),a=0;return u.set(Ue,a),a+=Ue.length,u.set(n,a),a+=n.length,u.set(i,a),u}r(ht,"encrypt");async function xt(e,t){let n=e.subarray(0,2);if(!dt(n,Ue))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,2+12),i=e.subarray(2+12,e.length),s=await crypto.subtle.decrypt({name:Me,iv:o},t,i);return new Uint8Array(s)}r(xt,"decrypt");function gn(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}r(gn,"getSecureRandom");function E(){return typeof crypto<"u"?gn():Math.random()}r(E,"getSecureRandomIfPossible");function Hr(e=.25){return E()<e}r(Hr,"randomBoolean");function Nr(e=100,t=0){return t+Math.floor(E()*(e-t))}r(Nr,"randomInt");function Gr(e=100,t=0){return t+E()*(e-t)}r(Gr,"randomFloat");function zr(e,t,n){return Math.max(e,Math.min(n,t))}r(zr,"between");function mn(e){return e.reduce((t,n)=>t+n,0)}r(mn,"sum");function Vr(e){return mn(e)/e.length}r(Vr,"avg");function qr(e){return!/^1?$|^(11+?)\1+$/.test("1".repeat(e))}r(qr,"isPrimeRX");function Wr(e){for(let t=2;t<e;t++)if(e%t===0)return!1;return e>1}r(Wr,"isPrime");var bt=6;function Jr(e=0,t=1,n){bt=((n??bt)*9301+49297)%233280;let o=bt/233280;return t+o*(e-t)}r(Jr,"seededRandom");function yn(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}r(yn,"parseOrderby");function Zr(e,t=!0){return`${e} ${t?"asc":"desc"}`}r(Zr,"composeOrderby");function Fe(e,t,n=!0){let o=e||0,i=t||0;return o>i?n?1:-1:o<i?n?-1:1:0}r(Fe,"cmp");function Kr(e,...t){if(t.length>0){let n=t.map(yn),o=Array.from(e);return o.sort((i,s)=>{for(let{field:u,asc:a}of n){let c=Fe(i[u],s[u],a);if(c!==0)return c}return 0}),o}return e}r(Kr,"sortedOrderby");function ke(e){return e.filter((t,n)=>e.indexOf(t)===n)}r(ke,"arrayUnique");function hn(e,t){return ke(e.filter(n=>!t.includes(n)))}r(hn,"arrayMinus");function xn(...e){return ke(e.reduce((t=[],n)=>t.concat(n),[]))}r(xn,"arrayUnion");function K(...e){return e.flat(1/0)}r(K,"arrayFlatten");function bn(e,t){return ke(e).filter(n=>t.includes(n))}r(bn,"arrayIntersection");function Yr(e,t){return hn(xn(e,t),bn(e,t))}r(Yr,"arraySymmetricDifference");function Ce(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return[]}r(Ce,"arrayRemoveElement");function Qr(e,t){return e.includes(t)||e.push(t),e}r(Qr,"arraySetElement");function $e(e,t){return e.splice(0,e.length,...e.filter(t)),e}r($e,"arrayFilterInPlace");function Xr(e,t){let n=e.findIndex(o=>o===t);return n>=0?e.splice(n,1):e.push(t),e}r(Xr,"arrayToggleInPlace");function eo(e){return e.splice(0,e.length),e}r(eo,"arrayEmptyInPlace");function Tn(e,t=Fe){return Array.from(e).sort(t)}r(Tn,"arraySorted");function to(e){return Tn(e,(t,n)=>t-n)}r(to,"arraySortedNumbers");function wn(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}r(wn,"arrayIsEqual");function Tt(e){return e.sort(()=>E()>.5?1:-1),e}r(Tt,"arrayShuffleInPlace");function no(e){return Tt(Array.from(e))}r(no,"arrayShuffle");function ro(e){for(;e.length>1;){let t=Array.from(e);if(Tt(t),!wn(e,t))return t}return e}r(ro,"arrayShuffleForce");function oo(e){return e[Math.floor(E()*e.length)]}r(oo,"arrayRandomElement");function io(...e){return K(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}r(io,"arrayMax");function so(...e){return K(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}r(so,"arrayMin");function ao(...e){return K(e).reduce((t,n)=>t+n,0)}r(ao,"arraySum");function uo(...e){let t=K(e);return t.reduce((n,o)=>n+o,0)/t.length}r(uo,"arrayAvg");function co(e,t){let n=[],o=0,i=e.length;for(;o<i;)n.push(e.slice(o,o+=t));return n}r(co,"arrayBatches");function lo(e=0,t){if(e<=0)return[];let n=new Array(e);for(let o=0;o<e;o++)n[o]=t instanceof Function?t(o):t;return n}r(lo,"createArray");var fo=v("zeed:basex","error"),po={2:"01",8:"01234567",11:"0123456789a",16:"0123456789abcdef",32:"0123456789abcdefghjkmnpqrtuvwxyz","32-crockford":"0123456789ABCDEFGHJKMNPQRSTVWXYZ","32-geohash":"0123456789bcdefghjkmnpqrstuvwxyz","32-agnoster":"0123456789abcdefghjkmnpqrtuvwxyz","32-rfc":"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","32-hex":"0123456789ABCDEFGHIJKLMNOPQRSTUV","32-zbase":"ybndrfg8ejkmcpqxot1uwisza345h769",36:"0123456789abcdefghijklmnopqrstuvwxyz",58:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",62:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",64:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","64-url":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",66:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~",85:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"};function H(e){let t=po[String(e)];if(!t)if(typeof e=="string")t=e;else throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let n=new Uint8Array(256);for(let l=0;l<n.length;l++)n[l]=255;for(let l=0;l<t.length;l++){let p=t.charAt(l),d=p.charCodeAt(0);if(n[d]!==255)throw new TypeError(`${p} is ambiguous`);n[d]=l}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function a(l,p=-1){let d=D(l);if(d.byteLength===0)return"";let f=0,g=0,h=d.byteLength;for(;g!==h&&d[g]===0;)g++;let m=(h-g)*u+1>>>0,x=new Uint8Array(m);for(;g!==h;){let b=d[g],L=0;for(let T=m-1;(b!==0||L<f)&&T!==-1;T--,L++)b+=256*x[T]>>>0,x[T]=b%o>>>0,b=b/o>>>0;if(b!==0)throw fo.warn("Non-zero carry",d,p,L,m),new Error("Non-zero carry");f=L,g++}let y=m-f;for(;y!==m&&x[y]===0;)y++;let w="";for(;y<m;++y)w+=t.charAt(x[y]);return p>0?w.padStart(p,i):w}r(a,"encode");function c(l,p=-1){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;l=l.replace(/\s+/gi,"");let d=0,f=0;for(;l[d]===i;)d++;let g=(l.length-d)*s+1>>>0,h=new Uint8Array(g);for(;l[d];){let x=n[l.charCodeAt(d)];if(x===255)throw new Error(`Unsupported character "${l[d]}"`);let y=0;for(let w=g-1;(x!==0||y<f)&&w!==-1;w--,y++)x+=o*h[w]>>>0,h[w]=x%256>>>0,x=x/256>>>0;if(x!==0)throw new Error("Non-zero carry");f=y,d++}let m=g-f;for(;m!==g&&h[m]===0;)m++;return p>0?new Uint8Array([...new Uint8Array(p-h.length+m),...h.slice(m)]):h.slice(m)}return r(c,"decode"),{encode:a,decode:c}}r(H,"useBase");var{encode:go,decode:mo}=H(32);function yo(e){return mo(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"))}r(yo,"decodeBase32");var{encode:ho,decode:xo}=H(16),{encode:bo,decode:To}=H(58),{encode:wo,decode:Lo}=H(62);function vo(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}r(vo,"estimateSizeForBase");var wt=r(e=>(e.length>0&&(/^[A-Z0-9_\-\ ]*$/g.test(e)&&(e=e.toLowerCase()),e=e.replace(/^[-_\ ]+/gi,"").replace(/[-_\ ]+$/gi,"").replace(/[-_\ ]+([a-z0-9])/gi,(t,n)=>n.toUpperCase()),e=e[0].toLowerCase()+e.substring(1)),e),"toCamelCase");function Ln(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}r(Ln,"toCapitalize");function Ao(e){return e.replace(/\w\S*/g,Ln)}r(Ao,"toCapitalizeWords");function Eo(e,t="-"){return t=typeof t>"u"?"_":t,e.replace(/([a-z\d])([A-Z])/g,`$1${t}$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1${t}$2`).toLowerCase()}r(Eo,"fromCamelCase");var vn=["1","true","yes","y","on"];function Po(e,t=!1){return e==null||typeof e!="string"?t:vn.includes(String(e).trim().toLowerCase())}r(Po,"stringToBoolean");function So(e,t=0){return e==null||typeof e!="string"?t:parseInt(e.trim(),10)??t}r(So,"stringToInteger");function Do(e,t=0){return e==null||typeof e!="string"?t:parseFloat(e.trim())??t}r(Do,"stringToFloat");function Y(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:vn.includes(String(e).trim().toLowerCase())}r(Y,"valueToBoolean");function An(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):parseInt(String(e).trim(),10)??t}r(An,"valueToInteger");function En(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):parseFloat(String(e).trim())??t}r(En,"valueToFloat");function Ie(e,t=""){return e==null?t:String(e)??t}r(Ie,"valueToString");var Ro=En,Uo=An,Mo=Ie,Fo=Y;function Pn(e,t={}){let{trace:n=!0,pretty:o=!0}=t;return e.map(i=>{if(i&&typeof i=="object"){if(o&&(i instanceof Uint8Array||i instanceof ArrayBuffer))return`
|
|
3
|
+
${gt(i)}
|
|
4
4
|
`;if(i instanceof Error)return n?`${i.name||"Error"}: ${i.message}
|
|
5
|
-
${i.stack}`:`${i.name||"Error"}: ${i.message}`;try{return o?JSON.stringify(i,null,2):JSON.stringify(i)}catch{}}return String(i)})}r(vn,"formatMessages");function fe(e,t={}){return vn(e,t).join(" ")}r(fe,"renderMessages");function ko(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ko,"fixBrokenUth8String");var Oe=864e5;function Ce(e){return Math.floor(e/1e4)}r(Ce,"dayYear");function Tt(e){return Math.floor(e/100%100)}r(Tt,"dayMonth");function An(e){return Math.floor(e%100)}r(An,"dayDay");function Fo(e){return[Ce(e),Tt(e),An(e)]}r(Fo,"dayToParts");function wt(e,t=!1){return t?new Date(`${Pn(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(wt,"dayToDate");function Lt(){return de(new Date)}r(Lt,"dayFromToday");function Uo(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return vt(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return Be(n,o,i)}else if(e instanceof Date)return de(e,t)}r(Uo,"dayFromAny");function $o(e){return wt(e,!0)}r($o,"dayToDateGMT");function de(e,t=!1){return t?vt(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(de,"dayFromDate");function Io(e){return de(e,!0)}r(Io,"dayFromDateGMT");function Ie(e,t=!0){return wt(e,t).getTime()}r(Ie,"dayToTimestamp");function En(e,t=!0){return de(new Date(e),t)}r(En,"dayFromTimestamp");function Pn(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(Pn,"dayToString");function Be(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(Be,"dayFromParts");function vt(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return+t}r(vt,"dayFromString");function Oo(e,t=0){let n=Ce(e),o=Tt(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),Be(n,o,1)}r(Oo,"dayMonthStart");function Co(e,t=0){let n=Ce(e);return Be(n+t,1,1)}r(Co,"dayYearStart");function pe(e,t){return En(Ie(e)+t*864e5)}r(pe,"dayOffset");function Bo(e,t){return Math.round((Ie(t)-Ie(e))/864e5)}r(Bo,"dayDiff");function jo(e,t){let n=[];for(t==null&&(t=Lt()),e<0&&(e=pe(t,e+1));e<=t;)n.push(e),e=pe(e,1);return n}r(jo,"dayRange");function*Ho(e,t){let n=[];for(t==null&&(t=Lt()),e<0&&(e=pe(t,e+1));e<=t;)yield e,e=pe(e,1);return n}r(Ho,"dayIterator");var Sn=v("zeed:promise","error");function At(){let e,t;return[new Promise((o,i)=>{e=o,t=i}),e,t]}r(At,"createPromise");async function No(e){return new Promise(t=>setTimeout(t,e))}r(No,"sleep");async function _o(){return new Promise(e=>setTimeout(e,0))}r(_o,"immediate");var Et=Symbol("timeout");async function Go(e,t,n=Et){return new Promise(async(o,i)=>{let s=!1,u=setTimeout(()=>{s=!0,o(n)},t);try{let a=await e;clearTimeout(u),s||o(a)}catch(a){clearTimeout(u),s||i(a)}})}r(Go,"timeout");var Pt=new Error("Timeout reached");function zo(e){return e===Et||e===Pt}r(zo,"isTimeout");async function St(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(Pt)},t);try{let u=await e;clearTimeout(s),i||n(u)}catch(u){clearTimeout(s),i||o(u)}})}r(St,"tryTimeout");function Vo(e,t,n=1e3){return new Promise((o,i)=>{let s=r(c=>{a&&(clearTimeout(a),u(),o(c))},"fn"),u=r(()=>{a=null,e.off?e.off(t,s):e.removeEventListener?e.removeEventListener(t,s):Sn.warn("No remove listener method found for",e,t)},"done"),a=setTimeout(()=>{u(),i(new Error("Did not response in time"))},n);e.on?e.on(t,s):e.addEventListener?e.addEventListener(t,s):Sn.warn("No listener method found for",e)})}r(Vo,"waitOn");function D(e){return Boolean(e&&(e instanceof Promise||typeof e.then=="function"))}r(D,"isPromise");function $(e){return Promise.resolve(e)}r($,"promisify");var A=class{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=A.from(t)?.days),t==null){let n=new Date;this.days=n.getFullYear()*1e4+(n.getMonth()+1)*100+n.getDate()}else this.days=t}static fromNumber(t){return new A(t)}static fromString(t){return A.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?A.fromString(t.toISOString().substr(0,10)):A.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return A.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new A(t);if(typeof t=="string")return A.fromString(t);if(Array.isArray(t)&&t.length===3){let[o,i=1,s=1]=t;return i<1||i>12||s<1||s>31?void 0:new A(o*1e4+i*100+s)}else{if(t instanceof Date)return A.fromDate(t,n);if(t instanceof A)return t}}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let n=String(this.days);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}toDate(t=!1){return t?new Date(`${this.toString()}T00:00:00.000Z`):new Date(this.days/1e4,this.days/100%100-1,this.days%100)}toDateGMT(){return this.toDate(!0)}get year(){return Math.floor(this.days/1e4)}get month(){return Math.floor(this.days/100%100)}get day(){return Math.floor(this.days%100)}dayOffset(t){return A.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return A.from([this.year,this.month,1])}yearStart(){return A.from([this.year,1,1])}monthOffset(t){let n=this.month+t,o=Math.floor((n-1)%12)+1;o===0&&(o=12);let i=Math.floor((n-1)/12);return A.from([this.year+i,o,this.day])}daysUntil(t){return Math.round((new A(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(A,"Day");async function qo(e,t,n){let o=A.from(e),i=A.from(t);for(;o&&i&&o?.days<=i?.days;){let s=n(o);D(s)&&await s,o=o.dayOffset(1)}}r(qo,"forEachDay");function Wo(){return new A}r(Wo,"today");function Jo(e){return new A(e)}r(Jo,"day");function Zo(e){return A.fromDate(new Date(e)).days}r(Zo,"dateStringToDays");function Dn(e,t=2){return+(+e).toFixed(t)}r(Dn,"decimal");function Ko(e,t=2){return+(+e/10**t).toFixed(t)}r(Ko,"decimalFromCents");function Yo(e,t=2){return Math.round(+e*10**t)}r(Yo,"decimalToCents");function Qo(e,t=2){return t*(Dn(e,t)%1)}r(Qo,"decimalCentsPart");function I(e){return e!=null&&typeof e=="object"}r(I,"isObject");function je(e){return Object(e)!==e}r(je,"isPrimitive");function O(e){return Array.isArray(e)}r(O,"isArray");function ge(e){return I(e)&&!O(e)}r(ge,"isRecord");function Xo(e){return e?.constructor===Object}r(Xo,"isRecordPlain");function ei(e){return typeof e=="string"}r(ei,"isString");function ti(e){return typeof e=="number"}r(ti,"isNumber");function ni(e){return typeof e=="number"&&Number.isInteger(e)}r(ni,"isInteger");function ri(e){return typeof e=="number"&&Number.isSafeInteger(e)}r(ri,"isSafeInteger");function Dt(e){return typeof e=="boolean"}r(Dt,"isBoolean");function oi(e){return e==null}r(oi,"isNullOrUndefined");function ii(e){return e==null}r(ii,"isNull");function si(e){return I(e)&&e.constructor.name==="Uint8Array"}r(si,"isUint8Array");function ai(e){return e!=null}r(ai,"isNotNull");function ui(e){return e!=null&&e!==!1&&e!==!0}r(ui,"isValue");function Rn(e,t,n=new WeakSet){if(e===t)return!0;if(n.has(t)||(je(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return!1;for(let o in e){if(!e.hasOwnProperty(o))continue;if(!t.hasOwnProperty(o))return!1;let i=e[o],s=t[o];if(!Rn(i,s,n))return!1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}r(Rn,"deepEqual");function Mn(e,t=new WeakSet){if(t.has(e))return"[Circular ~]";if(je(e)||t.add(e),ge(e)){for(let n in e)if(!!e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}Mn(e[n],t)}}else if(O(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(Mn,"deepStripUndefinedInPlace");function me(e,...t){for(let n of t)I(e)||(e={}),!(n==null||!I(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):I(i)&&I(s)?e[o]=me(Object.assign({},i),s):e[o]=s});return e}r(me,"deepMerge");var Rt=r(e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,"""),"escapeHTML"),ci=r(e=>e.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&"),"unescapeHTML");function li(e,t,n=[]){return e.filter(o=>!t.some(i=>!i(o))).map(o=>{for(let i of n)o=i(o);return o}).filter(o=>o!=null)}r(li,"listQuery");function fi(e,t){return e.reduce((n,o)=>{let i=String(o[t]);return(n[i]=n[i]||[]).push(o),n},{})}r(fi,"listGroupBy");function pi(e,t){return Array.from(e.reduce((n,o)=>n.add(o[t]),new Set))}r(pi,"listDistinctUnion");function di(e,t){return e.map(n=>n[t])}r(di,"listOfKey");function gi(e,t){return I(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return O(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(gi,"objectMap");function mi(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(mi,"objectMergeDisposable");function yi(e){return Object.keys(e).length<=0}r(yi,"objectIsEmpty");var kn=/[\u0000-\u001F\u0080-\u009F]/g,hi=/^\.+/,xi=/\.+$/;function Fn(){return/[<>:"/\\|?*\u0000-\u001F]/g}r(Fn,"filenameReservedRegex");function bi(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}r(bi,"windowsReservedNameRegex");function Mt(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(Fn().test(t)&&kn.test(t))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(Fn(),t).replace(kn,t).replace(hi,t).replace(xi,""),e=bi().test(e)?e+t:e,e.slice(0,100)}r(Mt,"toValidFilename");var Ti=/[\\\-\[\]\/{}()*+?.^$|]/g;function kt(e){return e?e instanceof RegExp?e.source:e.replace(Ti,"\\$&"):""}r(kt,"escapeRegExp");var te=r(e=>Math.abs(e)%1===.5,"isHalf"),Ft=r(e=>e%2===0,"isEven"),wi=r(e=>Math.ceil(e),"roundUp"),Li=r(e=>Math.floor(e),"roundDown"),vi=r(e=>Math.round(e),"roundHalfUp"),Ai=r(e=>{let t=Math.round(e);return te(e)&&Ft(t)?t-1:t},"roundHalfOdd"),Ei=r(e=>te(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),Pi=r(e=>te(e)?Math.floor(e):Math.round(e),"roundHalfDown"),Si=r(e=>{let t=Math.round(e);return te(e)?Ft(t)?t:t-1:t},"roundHalfEven"),Di=r(e=>te(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function Ut(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-E()}r(Ut,"startSortWeight");function $t(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+E()}r($t,"endSortWeight");function Ri(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return $t(n);if(e<=0)return Ut(n);n=Un([...n]);let s=i?-1:0,u=n[e+s].sort_weight||0,c=(n[e+s+1].sort_weight||0)-u;if(c===0)return i?Ut(n):$t(n);let l=u+c/2,p=c*.01*(E()-.5);return l+p}r(Ri,"moveSortWeight");function Un(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(Un,"sortedItems");function Mi(e={}){let{getter:t=r(a=>a.sort,"getter")}=e;function n(a){return a.sort((c,l)=>(t(c)||0)-(t(l)||0)),a}r(n,"items");function o(a){return a.reduce((c,l)=>Math.min(c,t(l)||0),0)-1-E()}r(o,"start");function i(a){return a.reduce((c,l)=>Math.max(c,t(l)||0),0)+1+E()}r(i,"end");function s(a,c){a==null&&(a=(c??0)-1),c==null&&(c=(a??0)+1);let l=c-a,p=a+l/2,d=l*.01*(E()-.5);return p+d}r(s,"between");function u(a,c,l){let p=l.length,d=a<c;if(p<=0||a>=p-1)return i(l);if(a<=0)return o(l);l=n([...l]);let f=d?-1:0,g=t(l[a+f])||0,m=(t(l[a+f+1])||0)-g;if(m===0)return d?o(l):i(l);let x=g+m/2,y=m*.01*(E()-.5);return x+y}return r(u,"move"),{start:o,end:i,between:s,move:u,items:n}}r(Mi,"useSorted");var ki=/((?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00A1-\uFFFF][a-z0-9\u00A1-\uFFFF_-]{0,62})?[a-z0-9\u00A1-\uFFFF]\.)+(?:[a-z\u00A1-\uFFFF]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?)/gim;function Fi(e){return e.split(ki).map((t,n)=>{let o=Rt(t);return n%2?`<a target="_blank" href="${o}">${$n(o)}</a>`:o}).join("")}r(Fi,"linkifyPlainText");function $n(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r($n,"toHumanReadableUrl");function It(e){let t=[];for(let[n,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)i!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`)}return t.join("&")}r(It,"encodeQuery");function Ui(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<n.length;o++){let i=n[o].split("="),s=decodeURIComponent(i[0]),u=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(u)):t[s]=u}return t}r(Ui,"parseQuery");function $i(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r($i,"ensureKey");async function Ii(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(Ii,"ensureKeyAsync");function Oi(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(Oi,"size");function Ci(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(Ci,"last");function Bi(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:e?.size!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.warn("Failed to check if empty for",e,t)}return!0}r(Bi,"empty");function Q(e){return Object(e)!==e?e:JSON.parse(P(e))}r(Q,"cloneObject");function ji(e){return Object(e)!==e?e:JSON.parse(P(e))}r(ji,"cloneJsonObject");function Hi(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let o=e(n);return t.set(n,o),o}}r(Hi,"memoize");function Ni(e){let t=new Map;return async(...n)=>{let o=P(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(Ni,"memoizeAsync");function _i(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(_i,"forTimes");var Gi=/\\\s|\s+|#[^\n]*\n?/gm,zi=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,In=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm,Vi=v("zeed:xrx","error");function On(e){return typeof e=="string"?e:e.source||""}r(On,"regExpString");function qi(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(qi,"regExpEscape");var He=class{constructor(t,n){this.namedGroups={};this.names=[];let o=n??"",i;if(t instanceof RegExp?(n==null&&(o=t.flags),i=t.source):i=t,o&&o.includes("x")&&(o=o.replace("x",""),i=i.replace(Gi,a=>a[0]==="\\"?a:"")),!(t instanceof RegExp)){let a=0;i=i.replace(zi,(c,l)=>(a+=1,l?(l!=="index"&&l!=="length"&&!this.namedGroups[l]?this.namedGroups[l]=a:Vi.error(`Unallowed or duplicate group name: ${l}`),"("):c)),this.names=Object.keys(this.namedGroups)}i=On(i),In.lastIndex=0;let u=In.exec(i);u&&(this.lookBehind={rx:new RegExp(`${u[3]}$(?!\\s)`),expect:u?u[2]==="=":!u},i=i.substr(u[0].length)),this.rx=new RegExp(i,o)}get lastIndex(){return this.rx.lastIndex}set lastIndex(t){this.rx.lastIndex=t}_handleMatch(t){if(this.lookBehind){let n=t.input.slice(0,t.index);if(this.lookBehind.expect!==this.lookBehind.rx.test(n))return null}for(let n of this.names)t[n]=t[this.namedGroups[n]];return t}exec(t){let n;for(;n=this.rx.exec(t);)if(this.rx.lastIndex===n.index&&this.rx.lastIndex++,n=this._handleMatch(n),n!=null)return n}execAll(t){let n=[],o;for(this.rx.lastIndex=0;o=this.exec(t);)n.push(o);return this.rx.lastIndex=0,n}replace(t,n){let o=typeof n=="function"?n:()=>n;return t.replace(this.rx,i=>o(i))}};r(He,"XRX");var Wi=",";function Ji(e,t={}){let{separator:n=Wi}=t,o="";for(let i=0;i<e.length;i++)o+=`${e[i].map(s=>{if(s==null||s==="")return"";if(Dt(s))return s?1:0;let u=String(s);return(ge(s)||O(s))&&(u=P(s)),u.includes('"')||u.includes(`
|
|
5
|
+
${i.stack}`:`${i.name||"Error"}: ${i.message}`;try{return o?JSON.stringify(i,null,2):JSON.stringify(i)}catch{}}return String(i)})}r(Pn,"formatMessages");function pe(e,t={}){return Pn(e,t).join(" ")}r(pe,"renderMessages");function ko(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ko,"fixBrokenUth8String");var Be=864e5;function _e(e){return Math.floor(e/1e4)}r(_e,"dayYear");function Lt(e){return Math.floor(e/100%100)}r(Lt,"dayMonth");function Sn(e){return Math.floor(e%100)}r(Sn,"dayDay");function Co(e){return[_e(e),Lt(e),Sn(e)]}r(Co,"dayToParts");function vt(e,t=!1){return t?new Date(`${Rn(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(vt,"dayToDate");function At(){return ge(new Date)}r(At,"dayFromToday");function $o(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return Et(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return je(n,o,i)}else if(e instanceof Date)return ge(e,t)}r($o,"dayFromAny");function Io(e){return vt(e,!0)}r(Io,"dayToDateGMT");function ge(e,t=!1){return t?Et(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(ge,"dayFromDate");function Oo(e){return ge(e,!0)}r(Oo,"dayFromDateGMT");function Oe(e,t=!0){return vt(e,t).getTime()}r(Oe,"dayToTimestamp");function Dn(e,t=!0){return ge(new Date(e),t)}r(Dn,"dayFromTimestamp");function Rn(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(Rn,"dayToString");function je(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(je,"dayFromParts");function Et(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return+t}r(Et,"dayFromString");function Bo(e,t=0){let n=_e(e),o=Lt(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),je(n,o,1)}r(Bo,"dayMonthStart");function _o(e,t=0){let n=_e(e);return je(n+t,1,1)}r(_o,"dayYearStart");function de(e,t){return Dn(Oe(e)+t*864e5)}r(de,"dayOffset");function jo(e,t){return Math.round((Oe(t)-Oe(e))/864e5)}r(jo,"dayDiff");function Ho(e,t){let n=[];for(t==null&&(t=At()),e<0&&(e=de(t,e+1));e<=t;)n.push(e),e=de(e,1);return n}r(Ho,"dayRange");function*No(e,t){let n=[];for(t==null&&(t=At()),e<0&&(e=de(t,e+1));e<=t;)yield e,e=de(e,1);return n}r(No,"dayIterator");var Un=v("zeed:promise","error");function Pt(){let e,t;return[new Promise((o,i)=>{e=o,t=i}),e,t]}r(Pt,"createPromise");async function Go(e){return new Promise(t=>setTimeout(t,e))}r(Go,"sleep");async function zo(){return new Promise(e=>setTimeout(e,0))}r(zo,"immediate");var St=Symbol("timeout");async function Vo(e,t,n=St){return new Promise(async(o,i)=>{let s=!1,u=setTimeout(()=>{s=!0,o(n)},t);try{let a=await e;clearTimeout(u),s||o(a)}catch(a){clearTimeout(u),s||i(a)}})}r(Vo,"timeout");var Dt=new Error("Timeout reached");function qo(e){return e===St||e===Dt}r(qo,"isTimeout");async function Rt(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(Dt)},t);try{let u=await e;clearTimeout(s),i||n(u)}catch(u){clearTimeout(s),i||o(u)}})}r(Rt,"tryTimeout");function Wo(e,t,n=1e3){return new Promise((o,i)=>{let s=r(c=>{a&&(clearTimeout(a),u(),o(c))},"fn"),u=r(()=>{a=null,e.off?e.off(t,s):e.removeEventListener?e.removeEventListener(t,s):Un.warn("No remove listener method found for",e,t)},"done"),a=setTimeout(()=>{u(),i(new Error("Did not response in time"))},n);e.on?e.on(t,s):e.addEventListener?e.addEventListener(t,s):Un.warn("No listener method found for",e)})}r(Wo,"waitOn");function R(e){return Boolean(e&&(e instanceof Promise||typeof e.then=="function"))}r(R,"isPromise");function C(e){return Promise.resolve(e)}r(C,"promisify");var A=class{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=A.from(t)?.days),t==null){let n=new Date;this.days=n.getFullYear()*1e4+(n.getMonth()+1)*100+n.getDate()}else this.days=t}static fromNumber(t){return new A(t)}static fromString(t){return A.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?A.fromString(t.toISOString().substr(0,10)):A.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return A.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new A(t);if(typeof t=="string")return A.fromString(t);if(Array.isArray(t)&&t.length===3){let[o,i=1,s=1]=t;return i<1||i>12||s<1||s>31?void 0:new A(o*1e4+i*100+s)}else{if(t instanceof Date)return A.fromDate(t,n);if(t instanceof A)return t}}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let n=String(this.days);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}toDate(t=!1){return t?new Date(`${this.toString()}T00:00:00.000Z`):new Date(this.days/1e4,this.days/100%100-1,this.days%100)}toDateGMT(){return this.toDate(!0)}get year(){return Math.floor(this.days/1e4)}get month(){return Math.floor(this.days/100%100)}get day(){return Math.floor(this.days%100)}dayOffset(t){return A.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return A.from([this.year,this.month,1])}yearStart(){return A.from([this.year,1,1])}monthOffset(t){let n=this.month+t,o=Math.floor((n-1)%12)+1;o===0&&(o=12);let i=Math.floor((n-1)/12);return A.from([this.year+i,o,this.day])}daysUntil(t){return Math.round((new A(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(A,"Day");async function Jo(e,t,n){let o=A.from(e),i=A.from(t);for(;o&&i&&o?.days<=i?.days;){let s=n(o);R(s)&&await s,o=o.dayOffset(1)}}r(Jo,"forEachDay");function Zo(){return new A}r(Zo,"today");function Ko(e){return new A(e)}r(Ko,"day");function Yo(e){return A.fromDate(new Date(e)).days}r(Yo,"dateStringToDays");function Mn(e,t=2){return+(+e).toFixed(t)}r(Mn,"decimal");function Qo(e,t=2){return+(+e/10**t).toFixed(t)}r(Qo,"decimalFromCents");function Xo(e,t=2){return Math.round(+e*10**t)}r(Xo,"decimalToCents");function ei(e,t=2){return t*(Mn(e,t)%1)}r(ei,"decimalCentsPart");function $(e){return e!=null&&typeof e=="object"}r($,"isObject");function He(e){return Object(e)!==e}r(He,"isPrimitive");function I(e){return Array.isArray(e)}r(I,"isArray");function me(e){return $(e)&&!I(e)}r(me,"isRecord");function ti(e){return e?.constructor===Object}r(ti,"isRecordPlain");function ni(e){return typeof e=="string"}r(ni,"isString");function ri(e){return typeof e=="number"}r(ri,"isNumber");function oi(e){return typeof e=="number"&&Number.isInteger(e)}r(oi,"isInteger");function ii(e){return typeof e=="number"&&Number.isSafeInteger(e)}r(ii,"isSafeInteger");function Ut(e){return typeof e=="boolean"}r(Ut,"isBoolean");function si(e){return e==null}r(si,"isNullOrUndefined");function ai(e){return e==null}r(ai,"isNull");function ui(e){return $(e)&&e.constructor.name==="Uint8Array"}r(ui,"isUint8Array");function Mt(e){return e!=null}r(Mt,"isNotNull");function ci(e){return e!=null&&e!==!1&&e!==!0}r(ci,"isValue");function Fn(e,t,n=new WeakSet){if(e===t)return!0;if(n.has(t)||(He(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return!1;for(let o in e){if(!e.hasOwnProperty(o))continue;if(!t.hasOwnProperty(o))return!1;let i=e[o],s=t[o];if(!Fn(i,s,n))return!1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}r(Fn,"deepEqual");function kn(e,t=new WeakSet){if(t.has(e))return"[Circular ~]";if(He(e)||t.add(e),me(e)){for(let n in e)if(!!e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}kn(e[n],t)}}else if(I(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(kn,"deepStripUndefinedInPlace");function ye(e,...t){for(let n of t)$(e)||(e={}),!(n==null||!$(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):$(i)&&$(s)?e[o]=ye(Object.assign({},i),s):e[o]=s});return e}r(ye,"deepMerge");var Ft=r(e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,"""),"escapeHTML"),li=r(e=>e.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&"),"unescapeHTML");function fi(e,t,n=[]){return e.filter(o=>!t.some(i=>!i(o))).map(o=>{for(let i of n)o=i(o);return o}).filter(o=>o!=null)}r(fi,"listQuery");function pi(e,t){return e.reduce((n,o)=>{let i=String(o[t]);return(n[i]=n[i]||[]).push(o),n},{})}r(pi,"listGroupBy");function di(e,t){return Array.from(e.reduce((n,o)=>n.add(o[t]),new Set))}r(di,"listDistinctUnion");function gi(e,t){return e.map(n=>n[t])}r(gi,"listOfKey");function mi(e,t){return $(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return I(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(mi,"objectMap");function yi(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(yi,"objectMergeDisposable");function hi(e){return Object.keys(e).length<=0}r(hi,"objectIsEmpty");var Cn=/[\u0000-\u001F\u0080-\u009F]/g,xi=/^\.+/,bi=/\.+$/;function $n(){return/[<>:"/\\|?*\u0000-\u001F]/g}r($n,"filenameReservedRegex");function Ti(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}r(Ti,"windowsReservedNameRegex");function kt(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if($n().test(t)&&Cn.test(t))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace($n(),t).replace(Cn,t).replace(xi,t).replace(bi,""),e=Ti().test(e)?e+t:e,e.slice(0,100)}r(kt,"toValidFilename");var wi=/[\\\-\[\]\/{}()*+?.^$|]/g;function Ct(e){return e?e instanceof RegExp?e.source:e.replace(wi,"\\$&"):""}r(Ct,"escapeRegExp");var te=r(e=>Math.abs(e)%1===.5,"isHalf"),$t=r(e=>e%2===0,"isEven"),Li=r(e=>Math.ceil(e),"roundUp"),vi=r(e=>Math.floor(e),"roundDown"),Ai=r(e=>Math.round(e),"roundHalfUp"),Ei=r(e=>{let t=Math.round(e);return te(e)&&$t(t)?t-1:t},"roundHalfOdd"),Pi=r(e=>te(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),Si=r(e=>te(e)?Math.floor(e):Math.round(e),"roundHalfDown"),Di=r(e=>{let t=Math.round(e);return te(e)?$t(t)?t:t-1:t},"roundHalfEven"),Ri=r(e=>te(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function It(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-E()}r(It,"startSortWeight");function Ot(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+E()}r(Ot,"endSortWeight");function Ui(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return Ot(n);if(e<=0)return It(n);n=In([...n]);let s=i?-1:0,u=n[e+s].sort_weight||0,c=(n[e+s+1].sort_weight||0)-u;if(c===0)return i?It(n):Ot(n);let l=u+c/2,p=c*.01*(E()-.5);return l+p}r(Ui,"moveSortWeight");function In(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(In,"sortedItems");function Mi(e={}){let{getter:t=r(a=>a.sort,"getter")}=e;function n(a){return a.sort((c,l)=>(t(c)||0)-(t(l)||0)),a}r(n,"items");function o(a){return a.reduce((c,l)=>Math.min(c,t(l)||0),0)-1-E()}r(o,"start");function i(a){return a.reduce((c,l)=>Math.max(c,t(l)||0),0)+1+E()}r(i,"end");function s(a,c){a==null&&(a=(c??0)-1),c==null&&(c=(a??0)+1);let l=c-a,p=a+l/2,d=l*.01*(E()-.5);return p+d}r(s,"between");function u(a,c,l){let p=l.length,d=a<c;if(p<=0||a>=p-1)return i(l);if(a<=0)return o(l);l=n([...l]);let f=d?-1:0,g=t(l[a+f])||0,m=(t(l[a+f+1])||0)-g;if(m===0)return d?o(l):i(l);let x=g+m/2,y=m*.01*(E()-.5);return x+y}return r(u,"move"),{start:o,end:i,between:s,move:u,items:n}}r(Mi,"useSorted");var Fi=/((?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00A1-\uFFFF][a-z0-9\u00A1-\uFFFF_-]{0,62})?[a-z0-9\u00A1-\uFFFF]\.)+(?:[a-z\u00A1-\uFFFF]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?)/gim;function ki(e){return e.split(Fi).map((t,n)=>{let o=Ft(t);return n%2?`<a target="_blank" href="${o}">${On(o)}</a>`:o}).join("")}r(ki,"linkifyPlainText");function On(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(On,"toHumanReadableUrl");function Bt(e){let t=[];for(let[n,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)i!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`)}return t.join("&")}r(Bt,"encodeQuery");function Ci(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<n.length;o++){let i=n[o].split("="),s=decodeURIComponent(i[0]),u=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(u)):t[s]=u}return t}r(Ci,"parseQuery");function $i(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r($i,"ensureKey");async function Ii(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(Ii,"ensureKeyAsync");function Oi(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(Oi,"size");function Bi(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(Bi,"last");function _i(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:e?.size!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.warn("Failed to check if empty for",e,t)}return!0}r(_i,"empty");function Q(e){return Object(e)!==e?e:JSON.parse(S(e))}r(Q,"cloneObject");function ji(e){return Object(e)!==e?e:JSON.parse(S(e))}r(ji,"cloneJsonObject");function Hi(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let o=e(n);return t.set(n,o),o}}r(Hi,"memoize");function Ni(e){let t=new Map;return async(...n)=>{let o=S(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(Ni,"memoizeAsync");function Gi(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(Gi,"forTimes");var zi=/\\\s|\s+|#[^\n]*\n?/gm,Vi=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,Bn=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm,qi=v("zeed:xrx","error");function _n(e){return typeof e=="string"?e:e.source||""}r(_n,"regExpString");function Wi(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Wi,"regExpEscape");var Ne=class{constructor(t,n){this.namedGroups={};this.names=[];let o=n??"",i;if(t instanceof RegExp?(n==null&&(o=t.flags),i=t.source):i=t,o&&o.includes("x")&&(o=o.replace("x",""),i=i.replace(zi,a=>a[0]==="\\"?a:"")),!(t instanceof RegExp)){let a=0;i=i.replace(Vi,(c,l)=>(a+=1,l?(l!=="index"&&l!=="length"&&!this.namedGroups[l]?this.namedGroups[l]=a:qi.error(`Unallowed or duplicate group name: ${l}`),"("):c)),this.names=Object.keys(this.namedGroups)}i=_n(i),Bn.lastIndex=0;let u=Bn.exec(i);u&&(this.lookBehind={rx:new RegExp(`${u[3]}$(?!\\s)`),expect:u?u[2]==="=":!u},i=i.substr(u[0].length)),this.rx=new RegExp(i,o)}get lastIndex(){return this.rx.lastIndex}set lastIndex(t){this.rx.lastIndex=t}_handleMatch(t){if(this.lookBehind){let n=t.input.slice(0,t.index);if(this.lookBehind.expect!==this.lookBehind.rx.test(n))return null}for(let n of this.names)t[n]=t[this.namedGroups[n]];return t}exec(t){let n;for(;n=this.rx.exec(t);)if(this.rx.lastIndex===n.index&&this.rx.lastIndex++,n=this._handleMatch(n),n!=null)return n}execAll(t){let n=[],o;for(this.rx.lastIndex=0;o=this.exec(t);)n.push(o);return this.rx.lastIndex=0,n}replace(t,n){let o=typeof n=="function"?n:()=>n;return t.replace(this.rx,i=>o(i))}};r(Ne,"XRX");var Ji=",";function Zi(e,t={}){let{separator:n=Ji}=t,o="";for(let i=0;i<e.length;i++)o+=`${e[i].map(s=>{if(s==null||s==="")return"";if(Ut(s))return s?1:0;let u=String(s);return(me(s)||I(s))&&(u=S(s)),u.includes('"')||u.includes(`
|
|
6
6
|
`)||u.includes(n)?`"${u.replace(/"/g,'""')}"`:u}).join(n)}
|
|
7
|
-
`;return o}r(
|
|
7
|
+
`;return o}r(Zi,"csvStringify");function jn(e,t={}){let n=/("((?:(?:[^"]*?)(?:"")?)*)"|([^,;\t\n]*))([,;\t]|\n|\r\n)/g;t.separator&&(n=new RegExp(n.source.replaceAll(",;\\t",Ct(t.separator)),n.flags));let o=[],i=[],s,u=`${e.replaceAll(`\r
|
|
8
8
|
`,`
|
|
9
9
|
`).trim()}
|
|
10
10
|
`;for(;s=n.exec(u);){let a=s[2]??s[3]??"";a=a.replaceAll('""','"'),i.push(a),s[4]===`
|
|
11
|
-
`&&(o.push(i),i=[])}return o}r(Cn,"csvParse");function Zi(e,t={}){let n=Cn(e,t),o=n[0];return n.slice(1).map(i=>Object.fromEntries(i.map((s,u)=>[o[u],s])))}r(Zi,"csvParseToObjects");var Ki=v("zeed:dispose","error");async function Yi(e){typeof e=="function"?await $(e()):D(e)?await e:typeof e.dispose=="function"?await $(e.dispose()):D(e.dispose)?await e.dispose:typeof e.cleanup=="function"?await $(e.cleanup()):D(e.cleanup)&&await e.cleanup}r(Yi,"callDisposer");function Ne(e){let{name:t}=typeof e=="string"?{name:e}:e??{},n=[],o=r(async u=>{u!=null&&n.includes(u)&&(Ue(n,a=>a!==u),await Yi(u))},"untrack"),i=r(async()=>{for(t&&Ki.debug(`dispose ${t}: ${n.length} entries`);n.length>0;)await o(n[0])},"dispose"),s=r(u=>{if(u!=null)return n.unshift(u),()=>o(u)},"track");return Object.assign(i,{track:s,add:s,untrack:o,dispose:i,exec:i,getSize(){return n.length}})}r(Ne,"useDispose");var Qi=Ne;function Xi(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let u=n[0];if(Ue(n,a=>a!==u),typeof u=="function"){let a=u();if(D(a)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await a}}else if(D(u)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await u}else throw new Error(`Unhandled disposable: ${u}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s)},"add"),exec:o,getSize(){return n.length}})}r(Xi,"useDefer");function es(e,t=0){let n=setTimeout(e,t);return()=>{n&&(clearTimeout(n),n=void 0)}}r(es,"useTimeout");function ts(e,t){let n=setInterval(e,t);return()=>{n&&(clearInterval(n),n=void 0)}}r(ts,"useInterval");function ns(e,t,n,...o){return e==null?()=>{}:(e.on?e.on(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o)})}r(ns,"useEventListener");function rs(){let e=!0;return(t,n)=>{let o=!1;if(e){e=!1;try{t(),o=!0}finally{e=!0}}else n!==void 0&&n();return o}}r(rs,"useMutex");function os(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();D(i)&&await i,o=!0}finally{e=!0}}else if(n!==void 0){let i=n();D(i)&&await i}return o}}r(os,"useAsyncMutex");var ne=v("zeed:emitter","error"),R=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this.dispose=Ne();this.call=new Proxy({},{get:(t,n)=>async(...o)=>await this.emit(n,...o)})}async emit(t,...n){let o=!1;this.dispose.add(()=>{this.subscribers={},this.subscribersOnAny=[]});try{let i=this.subscribers[t]||[];if(this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(u=>{try{return $(u(...n))}catch(a){ne.warn("emit warning:",a)}return null}).filter(u=>u!=null);o=!0,await Promise.all(s)}}catch(i){ne.error("emit exception",i)}return o}onAny(t){this.subscribersOnAny.push(t)}on(t,n){let o=this.subscribers[t]||[];return o.push(n),this.subscribers[t]=o,()=>{this.off(t,n)}}onCall(t){for(let[n,o]of Object.entries(t))this.on(n,o)}once(t,n){let o=r(async(...i)=>(this.off(t,o),await $(n(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,n)}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>n&&o!==n),this}removeAllListeners(){return this.subscribers={},this}};r(R,"Emitter");function is(){let e=ee().emitter;return e||(e=new R,ee().emitter=e),e}r(is,"getGlobalEmitter");var ss=new R;function as(e,t){let n=Math.round(E()*100),o=[],i,s=r((a,c)=>{let l={key:a,obj:c};o.push(l),i&&i()},"incoming");return t?e.on?e.on(t,a=>{s(t,a)}):e.addEventListener?e.addEventListener(t,a=>{s(t,a)}):ne.error(n,"Cannot listen to key"):e.onAny?e.onAny((a,c)=>{s(a,c)}):ne.error(n,"cannot listen to all for",e),r((a,c=!0)=>new Promise((l,p)=>{a||(a=t,a||o.length&&(a=o[0].key)),i=r(()=>{for(;o.length>0;){let d=o.shift();if(d.key===a)i=void 0,l(d.obj);else{if(c){ne.warn(n,`Unhandled event ${a} with value: ${d.obj}`);continue}p(new Error(`Expected ${a}, but found ${d.key} with value=${d.obj}`)),ne.error(n,`Unhandled event ${a} with value: ${d.obj}`)}break}},"lazyResolve"),i()}),"on")}r(as,"lazyListener");var re=r(()=>Date.now(),"getTimestamp");function Ot(e){return e>999?`${(e/1e3).toFixed(1)}s`:`${e.toFixed(2)}ms`}r(Ot,"formatMilliseconds");function us(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let n=null;if(t.includes(":"))try{n=new Date(t)}catch{}if(!(n instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(n=new Date(+o[1],+o[2]-1,+o[3],12,0))}if(n instanceof Date)return n}}}r(us,"parseDate");var{encode:Bn,decode:cs}=H(62),{encode:jn,decode:ls}=H(32),_e=16;function Ge(){return Z(_e)}r(Ge,"uuidBytes");function Hn(e=Ge()){return Bn(e,22)}r(Hn,"uuidB62");function Nn(e){return Bn(e,22)}r(Nn,"uuidEncodeB62");function _n(e){return cs(e,_e)}r(_n,"uuidDecodeB62");function Gn(e=Ge()){return jn(e,26)}r(Gn,"uuidB32");function zn(e){return jn(e,26)}r(zn,"uuidEncodeB32");function Vn(e){return ls(e,_e)}r(Vn,"uuidDecodeB32");var fs="10000000-1000-4000-8000-100000000000",qn=typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID.bind(crypto):()=>fs.replace(/[018]/g,e=>(e^Z(1)[0]&15>>e/4).toString(16));function Wn(e){let t=ut(e);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(Wn,"uuidEncodeV4");function Jn(e){return ct(e.replaceAll("-",""))}r(Jn,"uuidDecodeV4");var Zn=16e11;function ps(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let o=0;o<t.length;o++){let i=e&255;t[n-o]=i,e=(e-i)/256}return t}r(ps,"longToByteArray");function Bt(){let e=re()-Zn;return new Uint8Array([...ps(e),...Z(10)])}r(Bt,"suidBytes");function ds(){return Qn(Bt())}r(ds,"suid");function gs(e){return Kn(Ht(e))}r(gs,"suidDate");function Kn(e){return new Date(Zn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r(Kn,"suidBytesDate");var ms=r(()=>new Uint32Array(Z(4))[0],"uuid32bit"),jt={base62:{uuid:Hn,uuidDecode:_n,uuidEncode:Nn},base32:{uuid:Gn,uuidDecode:Vn,uuidEncode:zn},uuidv4:{uuid:qn,uuidDecode:Jn,uuidEncode:Wn}},ze="base62",Yn=!1;function ys(e,t=!1){ze=e,Yn=t}r(ys,"setUuidDefaultEncoding");function N(){return jt[ze].uuid(Yn?Bt():Ge())}r(N,"uuid");function Ht(e){return jt[ze].uuidDecode(e)}r(Ht,"uuidDecode");function Qn(e){return jt[ze].uuidEncode(e)}r(Qn,"uuidEncode");function hs(e){try{return Ht(e).length===_e}catch{}return!1}r(hs,"uuidIsValid");var Ct={};function _(e="id"){return Ct[e]==null&&(Ct[e]=0),`${e}-${Ct[e]++}`}r(_,"uname");var xs=0;function bs(){return`id-${xs++}`}r(bs,"qid");var Xn=(o=>(o[o.waiting=0]="waiting",o[o.running=1]="running",o[o.finished=2]="finished",o))(Xn||{}),er=(o=>(o[o.replace=0]="replace",o[o.memoize=1]="memoize",o[o.error=2]="error",o))(er||{});function Ts(e={}){let{maxParallel:t=3}=e,n=new R,o=0,i=0,s=0,u=0,a={};async function c(){if(o>0){let[m,x]=At();return n.once("didFinish",x),m}}r(c,"waitFinishAll");function l(){n.emit("didFinish"),o=0,i=0}r(l,"didFinish");function p(){let m=0,x=0;for(let{max:y,resolved:w,state:b}of Object.values(a))m+=y,x+=b===2?y:Math.min(y,w);n.emit("didUpdate",o,i,m,x)}r(p,"didUpdate");function d(){if(p(),o>0&&o===i&&l(),s>=t)return;let m=Object.values(a).filter(x=>x.state===0);if(m.length>0){let x;for(let y of m)y.group!=null&&Object.values(a).some(w=>w.state===1&&w.id!==y.id&&w.group===y.group)||(x==null||y.priority<x.priority)&&(x=y);if(x!=null){let y=x.id,w=x.done;x.state=1,++s,n.emit("didStart",y);let b=r(T=>{x&&(x.result=T,x.state=2,x.resolved=x.max),--s,++i,d()},"taskFinished");x.task(x).then(T=>{w(T),n.emit("didResolve",y,T),b(T)}).catch(T=>{w(),n.emit("didReject",y,T),b()})}}}r(d,"performNext");function f(m){let x=a[m];x&&x.state===0&&(a[m].state=2,++i,n.emit("didCancel",m),p())}r(f,"cancel");function g(){Object.keys(a).forEach(f)}r(g,"cancelAll");function h(m,x={}){let y,w=new Promise(T=>y=T),b=x.id??N();if(a[b]!=null){let T=x.idConflictResolution??1;if(T===0)f(b);else if(T===1){let L=a[b];return{id:b,promise:(async()=>{if(L.state===2)return a[b].result})(),dispose:()=>f(b),cancel:()=>f(b)}}else throw new Error(`Pool task with id=${b} already exists!`)}return a[b]={id:b,task:m,priority:++u,group:x.group,state:0,max:x.max??1,resolved:x.resolved??0,done:y,payload:x.payload,setMax(T){a[b].max=T,p()},setResolved(T){a[b].resolved=T,p()},incResolved(T=1){a[b].resolved+=T,p()}},++o,d(),{id:b,promise:w,dispose:()=>f(b),cancel:()=>f(b)}}return r(h,"enqueue"),{events:n,cancel:f,cancelAll:g,enqueue:h,dispose:g,waitFinishAll:c}}r(Ts,"usePool");var Ve=class extends R{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=_("queue"),logLevel:i}=n;this.name=o,this.log=v(`zeed:queue:${o}`,i??1/0)}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.paused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.paused;){let n=this.queue.shift();if(this.log(`performNext => ${n?.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let u;try{this.log.info(`start task ${o}`),u=await this.currentTask,this.log(`finished task ${o} with result =`,u)}catch(a){this.log.warn("Error performing task",a)}s(u),this.currentTask=void 0,this.countResolved+=1,this.emit("didUpdate",this.countMax,this.countResolved)}for(this.queue.length===0&&(this.emit("didFinish"),this.countMax=0,this.countResolved=0);this.waitToFinish.length>0;)this.waitToFinish.shift()()}async enqueue(n,o={}){let{immediate:i=!1,name:s=_(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(u=>{this.queue.push({name:s,task:n,resolve:u}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext()}))}async enqueueReentrant(n,o={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:o.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let o=this.queue.map(i=>i.resolve);this.queue=[],o.forEach(i=>i(void 0)),await this.wait()}async pause(){this.log("pause"),this.paused=!0,await this.wait()}resume(){this.log("resume"),this.paused=!1,this.performNext()}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.paused)))return new Promise(n=>{this.waitToFinish.push(n)})}get isPaused(){return this.paused}get hasTasks(){return this.queue.length!==0}};r(Ve,"SerialQueue");var oe=!1,U=oe?v("zeed:throttle","error"):()=>{};function ws(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,u=0,a=0,c,l=Date.now();function p(){return s?(clearTimeout(s),s=void 0,!0):!1}r(p,"clearExistingTimeout");function d(...f){let g=Date.now(),h=g-u;function m(){let y=Date.now();return`total ${(y-l).toFixed(1)}ms - elapsed ${(y-u).toFixed(1)}ms - visited ${a}x`}r(m,"debugElapsed");let x=r(()=>{a=0,u=Date.now(),e.apply(this,f)},"exec");if(c=x,h>n||!s){oe&&U("elapsed",m()),i&&(h>n?(oe&&U("\u{1F680} leading",m()),x()):++a);let y=h>n?n:n-h;U(`\u23F1 start timeout with ${y.toFixed(1)}ms`,m()),p(),u=g,s=setTimeout(()=>{oe&&U("\u23F1 reached timeout",m()),s=0,o&&(!i||a>0)&&(oe&&U("\u{1F680} trailing",m()),c?.())},y)}else++a,oe&&U("visited",m())}return r(d,"wrapper"),d.cancel=p,d.stop=()=>{p()&&c&&c()},d.immediate=r(async function(...g){p(),u=Date.now(),e.apply(this,g)},"immediate"),d.dispose=()=>d.stop(),d}r(ws,"throttle");function Ls(e,t={}){let{delay:n=100}=t,o=0,i=!1,s;function u(){o&&(U("clear"),clearTimeout(o),o=0)}r(u,"clearExistingTimeout");async function a(){try{if(u(),s!=null){U("exec");let p=[...s];s=void 0,i=!0,await $(e(...p)),i=!1,U("exec done"),s!=null&&(u(),U("exec trigger next"),o=setTimeout(a,n))}}catch{}}r(a,"exec");function c(...p){s=[...p],u(),U("trigger"),i===!1&&(o=setTimeout(a,n))}r(c,"wrapper");async function l(...p){u(),s=[...p],await a()}return r(l,"immediate"),c.cancel=u,c.dispose=u,c.immediate=l,c}r(Ls,"debounce");function vs(e=globalThis?.location?.hostname??""){return["::ffff:127.0.0.1","localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}r(vs,"isLocalHost");function As(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=F(n),s=B(t);return u=>{!s(u.level)||!i(u.name)||o.push(u)}}r(As,"LoggerMemoryHandler");var ye=class extends R{constructor(){super(...arguments);this.id=N()}close(){this.dispose()}};r(ye,"Channel");var ie=class extends ye{constructor(){super(...arguments);this.isConnected=!0}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:N()})}};r(ie,"LocalChannel");function Es(){let e=new ie,t=new ie;return e.other=t,t.other=e,[e,t]}r(Es,"createLocalChannelPair");var qe=class{async encode(t){return t}async decode(t){return t}};r(qe,"NoopEncoder");var G=class{async encode(t){return Se(t)}async decode(t){return De(t)}};r(G,"JsonEncoder");var We=class{constructor(t){this.key=t}async encode(t){let n=Se(t);return await mt(n,this.key)}async decode(t){let n=await yt(t,this.key);return De(n)}};r(We,"CryptoEncoder");var Nt=r((e,t,n={})=>new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)}),"createPromiseProxy");function Ps(e={}){let{name:t=_("hub"),encoder:n=new G,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,u=v(t,s),a={},c,l=[],p,d={},f=r(()=>{clearTimeout(p)},"dispose"),g=r(async()=>{if(clearTimeout(p),c){if(c.isConnected)for(;l.length;){let y=l[0];try{c.postMessage(await n.encode(y)),l.shift()}catch(w){u.warn("postMessage",w);break}}l.length>0&&o>0&&(p=setTimeout(g,o))}},"postNext"),h=r(async y=>{u("enqueue postMessage",y),l.push(y),await g()},"postMessage"),m=r(async y=>{c=y,c.on("connect",g),c.on("message",async w=>{u("onmessage",typeof w);let{name:b,args:T,id:L,result:V,error:q}=await n.decode(w.data);if(b){u(`name ${b} id ${L}`);try{if(a[b]==null)throw new Error(`handler for ${b} was not found`);let k=a[b](...T);D(k)&&(k=await k),u(`result ${k}`),L&&await h({id:L,result:k})}catch(k){let W=k instanceof Error?k:new Error($e(k));u.warn("execution error",W.name),await h({id:L,error:{message:W.message,stack:W.stack,name:W.name}})}}else if(L)if(u(`response for id=${L}: result=${V}, error=${q}`),d[L]==null)V===void 0?u(`skip response for ${L}`):u.warn(`no response hook for ${L}`);else{let[k,W]=d[L];if(k&&W)if(delete d[L],q){let Le=new Error(q.message);Le.stack=q.stack,Le.name=q.name,u.warn("reject",Le.name),W(Le)}else u("resolve",V),k(V)}else i||u.warn("Unhandled message",w)}),await g()},"connect"),x=r(async(y,w,b={})=>{let{timeout:T=5e3}=b,L=N();return await h({name:y,args:w,id:L}),St(new Promise((V,q)=>d[L]=[V,q]),T)},"fetchMessage");return e.channel&&m(e.channel),{dispose:f,connect:m,listen(y){Object.assign(a,y)},send(){return Nt(x,{},{options(y){return Nt(x,{...y})}})}}}r(Ps,"useMessageHub");var he=class extends R{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:o,encoder:i=new G,channel:s,debug:u=!1}=n;this.channel=s,this.encoder=i,this.debug=u,this.name=o??this.channel.id??_("pubsub"),this.log=v(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected")}),this.channel.on("disconnect",()=>{this.log("channel disconnected")})),this.channel.on("message",async({data:a})=>{let c=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${c?.event}, info=`,c):this.log(`channel message, event=${c?.event}`),c){let{event:l,args:p}=c;await this.emitSuper(l,...p)}})}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...o){return await super.emit(n,...o)}async emit(n,...o){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,o.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let i=await this.encoder.encode({event:n,args:o});return this.channel.postMessage(i),!0}catch(i){this.log.warn(`emit(${String(n)})`,i)}return!1}};r(he,"PubSub");function Ss(e){return new he(e)}r(Ss,"usePubSub");var Ds=1;var tr=r(e=>e,"defaultSerialize"),Rs=tr;function Ms(e,t){let{post:n,on:o,eventNames:i=[],serialize:s=tr,deserialize:u=Rs}=t,a=new Map;return o(async c=>{let l=u(c),[p,d,f,g]=l;if(p===1||p===2){let h,m;if(g!=null)try{let x=e[g];h=await x(...d)}catch(x){m=String(x)}else m="Method implementation missing";p===1&&f&&n(s(m?[4,m,f]:[3,h,f]))}else if(f){let h=a.get(f);h!=null&&(p===4?h.reject(d):h.resolve(d)),a.delete(f)}}),new Proxy({},{get(c,l){let p=r((...f)=>{n(s([2,f,null,l]))},"sendEvent");if(t.onlyEvents||i.includes(l))return p.asEvent=p,p;let d=r((...f)=>new Promise((g,h)=>{let m=Ds++;a.set(m,{resolve:g,reject:h}),n(s([1,f,m,l]))}),"sendCall");return d.asEvent=p,d}})}r(Ms,"useRPC");var se=v("zeed:network","error"),_t={cache:"no-cache",redirect:"follow",headers:{}};function nr(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,o]=t[1].split(":",2);return{url:e.replace(`${t[1]}@`,""),username:n,password:o}}}r(nr,"parseBasicAuth");async function Gt(e,t={},n=fetch){try{O(t)&&(t=me({},...K(t)));let o=nr(String(e));o&&(e=o.url,t=me({},t,rr(o.username,o.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let i=await n(String(e),t);if(i.status<400)return i;try{se.warn(`Fetch of ${String(e)} returned status=${i.status}. Options:`,t),se.warn(`Response: ${await i.text()}`)}catch(s){se.error("Exception:",s)}}catch(o){se.error("fetchBasic",o)}}r(Gt,"fetchBasic");async function ks(e,t={},n=fetch){try{let o=await Gt(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){se.error("fetchJSON error:",o)}}r(ks,"fetchJson");async function Fs(e,t={},n=fetch){try{let o=await Gt(e,[_t,{method:"GET"},t],n);if(o)return await o.text()}catch(o){se.error("fetchHTML error:",o)}}r(Fs,"fetchText");function Us(e,t="POST"){return{method:t,..._t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:It(e)}}r(Us,"fetchOptionsFormURLEncoded");function $s(e,t="POST"){return{method:t,..._t,headers:{"Content-Type":"application/json; charset=utf-8"},body:P(e)}}r($s,"fetchOptionsJson");function rr(e,t){return{headers:{Authorization:`Basic ${lt(`${e}:${t}`)}`}}}r(rr,"fetchOptionsBasicAuth");function zt(){if(typeof window<"u")return window}r(zt,"getWindow");function or(){if(typeof navigator<"u")return navigator}r(or,"getNavigator");function Is(){return zt()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(Is,"getGlobal");var z=or(),X=zt();function ir(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,test:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){return e.ios=z?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!z?.platform?.startsWith("Mac"),e.windows=!!z?.platform?.startsWith("Win"),e.beaker=X?.beaker!=null,e.electron=(z?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=X?.webkit?.messageHandlers!=null,e.pwa=z?.serviceWorker!=null,e.pwaInstalled=z?.standalone||X?.matchMedia?.("(display-mode: standalone)")?.matches,e.node=typeof process<"u"&&process?.release?.name==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,e.jest=typeof jest<"u"||typeof vitest<"u",e.test=e.jest,e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=X&&"ontouchstart"in X||(z?.maxTouchPoints||0)>1||z?.msPointerEnabled&&X?.MSGesture||X?.DocumentTouch&&document instanceof DocumentTouch,e}r(ir,"detect");var sr=r(()=>typeof window<"u"&&globalThis===window,"isBrowser"),Os=ir();function Cs(e){sr()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e)}r(Cs,"useExitHandler");var Je=class{constructor(t={}){this.store={}}setItem(t,n){this.store[t]=Q(n)}getItem(t){return Q(this.store[t])}removeItem(t){delete this.store[t]}clear(){this.store={}}allKeys(){return Object.keys(this.store)}};r(Je,"MemStorage");var Bs=r(()=>{},"noop");function js(e={}){let{args:t=process.argv.slice(1),alias:n={},normalize:o=bt,booleanArgs:i=[],listArgs:s=[],numberArgs:u=[]}=e,a=Object.entries(n).reduce((f,g)=>{let[h,m]=g;typeof m=="string"&&(m=[m]);for(let x of m)f[o(x)]=o(h);return f},{}),c={_:[]};function l(f,g){c[f]==null||typeof c[f]=="boolean"?c[f]=g:Array.isArray(c[f])?c[f].push(g):c[f]=[c[f],g]}r(l,"setOpt");let p=[...t],d;for(;d=p.shift();){let f;if(/^--?/.test(d)){let g=d.replace(/^--?/,"");if(d.includes("=")){let[h,m]=g.split("=",2);g=h.trim(),f=m.trim()}g=o(g),g=a[g]??g,i.includes(g)?l(g,!0):(f=f??p.shift()??"",u.includes(g)&&(f=Number(f??0)),s.includes(g)?Array.isArray(c[g])?c[g].push(f):c[g]=[f]:l(g,f))}else c._.push(d)}return c}r(js,"parseArgs");function Hs(e){return new Promise((t,n)=>{import("child_process").then(({spawn:o})=>{let i=o("pbcopy");i.on("error",s=>n(s)),i.on("close",()=>t(e)),i.stdin.write(e),i.stdin.end()}).catch(()=>{})})}r(Hs,"pbcopy");var Ze=ve(require("crypto"),1);try{typeof globalThis<"u"&&typeof globalThis.crypto>"u"&&Ze.default&&Ze.default.webcrypto&&(globalThis.crypto=Ze.default.webcrypto)}catch(e){console.warn("Failed to polyfill webcrypto",e)}var xe=ve(require("fs"),1),ur=require("path");var be=v("zeed:env","error"),Ns=`
|
|
12
|
-
`,
|
|
13
|
-
`)}switch(r(h,"write"),l.level){case 1:h(`${p}I|* `,...g);break;case 2:h(`${p}W|** `,...g);break;case 3:h(`${p}E|***`,...g);break;default:h(`${p}D| `,...g);break}}}r(
|
|
14
|
-
`)
|
|
15
|
-
`).map(u=>u.trim()),s=i.findIndex(u=>e.some(a=>u.startsWith(a)));n=i[s+1],n&&(n=
|
|
16
|
-
`)}r(
|
|
11
|
+
`&&(o.push(i),i=[])}return o}r(jn,"csvParse");function Ki(e,t={}){let n=jn(e,t),o=n[0];return n.slice(1).map(i=>Object.fromEntries(i.map((s,u)=>[o[u],s])))}r(Ki,"csvParseToObjects");var Yi=v("zeed:dispose","error");async function Qi(e){typeof e=="function"?await C(e()):R(e)?await e:typeof e.dispose=="function"?await C(e.dispose()):R(e.dispose)?await e.dispose:typeof e.cleanup=="function"?await C(e.cleanup()):R(e.cleanup)&&await e.cleanup}r(Qi,"callDisposer");function Ge(e){let{name:t}=typeof e=="string"?{name:e}:e??{},n=[],o=r(async u=>{u!=null&&n.includes(u)&&($e(n,a=>a!==u),await Qi(u))},"untrack"),i=r(async()=>{for(t&&Yi.debug(`dispose ${t}: ${n.length} entries`);n.length>0;)await o(n[0])},"dispose"),s=r(u=>{if(u!=null)return n.unshift(u),()=>o(u)},"track");return Object.assign(i,{track:s,add:s,untrack:o,dispose:i,exec:i,getSize(){return n.length},isDisposed(){return n.length<=0}})}r(Ge,"useDispose");var Xi=Ge;function es(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let u=n[0];if($e(n,a=>a!==u),typeof u=="function"){let a=u();if(R(a)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await a}}else if(R(u)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await u}else throw new Error(`Unhandled disposable: ${u}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s)},"add"),exec:o,getSize(){return n.length}})}r(es,"useDefer");function ts(e,t=0){let n=setTimeout(e,t);return()=>{n&&(clearTimeout(n),n=void 0)}}r(ts,"useTimeout");function ns(e,t){let n=setInterval(e,t);return()=>{n&&(clearInterval(n),n=void 0)}}r(ns,"useInterval");function rs(e,t,n,...o){return e==null?()=>{}:(e.on?e.on(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o)})}r(rs,"useEventListener");function os(){let e=!0;return(t,n)=>{let o=!1;if(e){e=!1;try{t(),o=!0}finally{e=!0}}else n!==void 0&&n();return o}}r(os,"useMutex");function is(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();R(i)&&await i,o=!0}finally{e=!0}}else if(n!==void 0){let i=n();R(i)&&await i}return o}}r(is,"useAsyncMutex");var ne=v("zeed:emitter","error"),P=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this.dispose=Ge();this.call=new Proxy({},{get:(t,n)=>async(...o)=>await this.emit(n,...o)})}async emit(t,...n){let o=!1;try{let i=this.subscribers[t]||[];if(this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(u=>{try{return C(u(...n))}catch(a){ne.warn("emit warning:",a)}return null}).filter(u=>u!=null);o=!0,await Promise.all(s)}}catch(i){ne.error("emit exception",i)}return o}onAny(t){this.subscribersOnAny.push(t)}on(t,n){let o=this.subscribers[t]||[];return o.push(n),this.subscribers[t]=o,()=>{this.off(t,n)}}onCall(t){for(let[n,o]of Object.entries(t))this.on(n,o)}once(t,n){let o=r(async(...i)=>(this.off(t,o),await C(n(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,n)}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>n&&o!==n),this}removeAllListeners(){return this.subscribers={},this}};r(P,"Emitter");function ss(){let e=ee().emitter;return e||(e=new P,ee().emitter=e),e}r(ss,"getGlobalEmitter");var as=new P;function us(e,t){let n=Math.round(E()*100),o=[],i,s=r((a,c)=>{let l={key:a,obj:c};o.push(l),i&&i()},"incoming");return t?e.on?e.on(t,a=>{s(t,a)}):e.addEventListener?e.addEventListener(t,a=>{s(t,a)}):ne.error(n,"Cannot listen to key"):e.onAny?e.onAny((a,c)=>{s(a,c)}):ne.error(n,"cannot listen to all for",e),r((a,c=!0)=>new Promise((l,p)=>{a||(a=t,a||o.length&&(a=o[0].key)),i=r(()=>{for(;o.length>0;){let d=o.shift();if(d.key===a)i=void 0,l(d.obj);else{if(c){ne.warn(n,`Unhandled event ${a} with value: ${d.obj}`);continue}p(new Error(`Expected ${a}, but found ${d.key} with value=${d.obj}`)),ne.error(n,`Unhandled event ${a} with value: ${d.obj}`)}break}},"lazyResolve"),i()}),"on")}r(us,"lazyListener");var re=r(()=>Date.now(),"getTimestamp");function _t(e){return e>999?`${(e/1e3).toFixed(1)}s`:`${e.toFixed(2)}ms`}r(_t,"formatMilliseconds");function cs(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let n=null;if(t.includes(":"))try{n=new Date(t)}catch{}if(!(n instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(n=new Date(+o[1],+o[2]-1,+o[3],12,0))}if(n instanceof Date)return n}}}r(cs,"parseDate");var{encode:Hn,decode:ls}=H(62),{encode:Nn,decode:fs}=H(32),ze=16;function Ve(){return Z(ze)}r(Ve,"uuidBytes");function Gn(e=Ve()){return Hn(e,22)}r(Gn,"uuidB62");function zn(e){return Hn(e,22)}r(zn,"uuidEncodeB62");function Vn(e){return ls(e,ze)}r(Vn,"uuidDecodeB62");function qn(e=Ve()){return Nn(e,26)}r(qn,"uuidB32");function Wn(e){return Nn(e,26)}r(Wn,"uuidEncodeB32");function Jn(e){return fs(e,ze)}r(Jn,"uuidDecodeB32");var ps="10000000-1000-4000-8000-100000000000",Zn=typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID.bind(crypto):()=>ps.replace(/[018]/g,e=>(e^Z(1)[0]&15>>e/4).toString(16));function Kn(e){let t=lt(e);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(Kn,"uuidEncodeV4");function Yn(e){return ft(e.replaceAll("-",""))}r(Yn,"uuidDecodeV4");var Qn=16e11;function ds(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let o=0;o<t.length;o++){let i=e&255;t[n-o]=i,e=(e-i)/256}return t}r(ds,"longToByteArray");function Ht(){let e=re()-Qn;return new Uint8Array([...ds(e),...Z(10)])}r(Ht,"suidBytes");function gs(){return tr(Ht())}r(gs,"suid");function ms(e){return Xn(Gt(e))}r(ms,"suidDate");function Xn(e){return new Date(Qn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r(Xn,"suidBytesDate");var ys=r(()=>new Uint32Array(Z(4))[0],"uuid32bit"),Nt={base62:{uuid:Gn,uuidDecode:Vn,uuidEncode:zn},base32:{uuid:qn,uuidDecode:Jn,uuidEncode:Wn},uuidv4:{uuid:Zn,uuidDecode:Yn,uuidEncode:Kn}},qe="base62",er=!1;function hs(e,t=!1){qe=e,er=t}r(hs,"setUuidDefaultEncoding");function N(){return Nt[qe].uuid(er?Ht():Ve())}r(N,"uuid");function Gt(e){return Nt[qe].uuidDecode(e)}r(Gt,"uuidDecode");function tr(e){return Nt[qe].uuidEncode(e)}r(tr,"uuidEncode");function xs(e){try{return Gt(e).length===ze}catch{}return!1}r(xs,"uuidIsValid");var jt={};function G(e="id"){return jt[e]==null&&(jt[e]=0),`${e}-${jt[e]++}`}r(G,"uname");var bs=0;function Ts(){return`id-${bs++}`}r(Ts,"qid");var he=class extends P{constructor(){super(...arguments);this.id=N()}close(){this.dispose()}};r(he,"Channel");var oe=class extends he{constructor(){super(...arguments);this.isConnected=!0}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:N()})}};r(oe,"LocalChannel");function ws(){let e=new oe,t=new oe;return e.other=t,t.other=e,[e,t]}r(ws,"createLocalChannelPair");var We=class{async encode(t){return t}async decode(t){return t}};r(We,"NoopEncoder");var z=class{async encode(t){return De(t)}async decode(t){return Re(t)}};r(z,"JsonEncoder");var Je=class{constructor(t){this.key=t}async encode(t){let n=De(t);return await ht(n,this.key)}async decode(t){let n=await xt(t,this.key);return Re(n)}};r(Je,"CryptoEncoder");var zt=r((e,t,n={})=>new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)}),"createPromiseProxy");function Ls(e={}){let{name:t=G("hub"),encoder:n=new z,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,u=v(t,s),a={},c,l=[],p,d={},f=r(()=>{clearTimeout(p)},"dispose"),g=r(async()=>{if(clearTimeout(p),c){if(c.isConnected)for(;l.length;){let y=l[0];try{c.postMessage(await n.encode(y)),l.shift()}catch(w){u.warn("postMessage",w);break}}l.length>0&&o>0&&(p=setTimeout(g,o))}},"postNext"),h=r(async y=>{u("enqueue postMessage",y),l.push(y),await g()},"postMessage"),m=r(async y=>{c=y,c.on("connect",g),c.on("message",async w=>{u("onmessage",typeof w);let{name:b,args:L,id:T,result:B,error:q}=await n.decode(w.data);if(b){u(`name ${b} id ${T}`);try{if(a[b]==null)throw new Error(`handler for ${b} was not found`);let M=a[b](...L);R(M)&&(M=await M),u(`result ${M}`),T&&await h({id:T,result:M})}catch(M){let W=M instanceof Error?M:new Error(Ie(M));u.warn("execution error",W.name),await h({id:T,error:{message:W.message,stack:W.stack,name:W.name}})}}else if(T)if(u(`response for id=${T}: result=${B}, error=${q}`),d[T]==null)B===void 0?u(`skip response for ${T}`):u.warn(`no response hook for ${T}`);else{let[M,W]=d[T];if(M&&W)if(delete d[T],q){let ve=new Error(q.message);ve.stack=q.stack,ve.name=q.name,u.warn("reject",ve.name),W(ve)}else u("resolve",B),M(B)}else i||u.warn("Unhandled message",w)}),await g()},"connect"),x=r(async(y,w,b={})=>{let{timeout:L=5e3}=b,T=N();return await h({name:y,args:w,id:T}),Rt(new Promise((B,q)=>d[T]=[B,q]),L)},"fetchMessage");return e.channel&&m(e.channel),{dispose:f,connect:m,listen(y){Object.assign(a,y)},send(){return zt(x,{},{options(y){return zt(x,{...y})}})}}}r(Ls,"useMessageHub");var xe=class extends P{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:o,encoder:i=new z,channel:s,debug:u=!1}=n;this.channel=s,this.encoder=i,this.debug=u,this.name=o??this.channel.id??G("pubsub"),this.log=v(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected")}),this.channel.on("disconnect",()=>{this.log("channel disconnected")})),this.channel.on("message",async({data:a})=>{let c=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${c?.event}, info=`,c):this.log(`channel message, event=${c?.event}`),c){let{event:l,args:p}=c;await this.emitSuper(l,...p)}})}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...o){return await super.emit(n,...o)}async emit(n,...o){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,o.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let i=await this.encoder.encode({event:n,args:o});return this.channel.postMessage(i),!0}catch(i){this.log.warn(`emit(${String(n)})`,i)}return!1}};r(xe,"PubSub");function vs(e){return new xe(e)}r(vs,"usePubSub");var As=1;var nr=r(e=>e,"defaultSerialize"),Es=nr;function Ps(e,t){let{post:n,on:o,eventNames:i=[],serialize:s=nr,deserialize:u=Es}=t,a=new Map;return o(async c=>{let l=u(c),[p,d,f,g]=l;if(p===1||p===2){let h,m;if(g!=null)try{let x=e[g];h=await x(...d)}catch(x){m=String(x)}else m="Method implementation missing";p===1&&f&&n(s(m?[4,m,f]:[3,h,f]))}else if(f){let h=a.get(f);h!=null&&(p===4?h.reject(d):h.resolve(d)),a.delete(f)}}),new Proxy({},{get(c,l){let p=r((...f)=>{n(s([2,f,null,l]))},"sendEvent");if(t.onlyEvents||i.includes(l))return p.asEvent=p,p;let d=r((...f)=>new Promise((g,h)=>{let m=As++;a.set(m,{resolve:g,reject:h}),n(s([1,f,m,l]))}),"sendCall");return d.asEvent=p,d}})}r(Ps,"useRPC");var ie=class extends P{constructor(n={}){super();this._isCancelled=!1;this._children=[];this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._isCancelable=n.isCancelable??!0,this.dispose.add(async()=>{for(let o of this._children)await o.dispose();await this.emit("progressDispose",this)})}update(){this.emit("progressChanged",this)}async cancel(){if(this._isCancelable&&!this.isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel()}}addChild(n){n.on("progressDispose",()=>{Ce(this._children,n)}),n.on("progressChanged",()=>{this.update()}),this._children.includes(n)||this._children.push(n),this.update()}removeChild(n){Ce(this._children,n),this.update()}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let o of this._children)n+=o.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let o of this._children)n+=o.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){return this.isIndeterminate()?0:Math.min(1,Math.max(0,this.getCompletedUnits()/this.getTotalUnits()))}getChildrenCount(){return this._children.length}setTotalUnit(n){this._totalUnits=n,this.update()}setCompletetedUnit(n){this._completedUnits=n,this.update()}incCompletedUnit(n=1){this._completedUnits+=n,this.update()}};r(ie,"Progress");var rr=(o=>(o[o.waiting=0]="waiting",o[o.running=1]="running",o[o.finished=2]="finished",o))(rr||{}),or=(o=>(o[o.replace=0]="replace",o[o.memoize=1]="memoize",o[o.error=2]="error",o))(or||{});function Ss(e={}){let{maxParallel:t=3}=e,n=new P,o=0,i=0,s=0,u=0,a={};async function c(){if(o>0){let[m,x]=Pt();return n.once("didFinish",x),m}}r(c,"waitFinishAll");function l(){n.emit("didFinish"),o=0,i=0}r(l,"didFinish");function p(){let m=0,x=0;for(let{max:y,resolved:w,state:b}of Object.values(a))m+=y,x+=b===2?y:Math.min(y,w);n.emit("didUpdate",o,i,m,x)}r(p,"didUpdate");function d(){if(p(),o>0&&o===i&&l(),s>=t)return;let m=Object.values(a).filter(x=>x.state===0);if(m.length>0){let x;for(let y of m)y.group!=null&&Object.values(a).some(w=>w.state===1&&w.id!==y.id&&w.group===y.group)||(x==null||y.priority<x.priority)&&(x=y);if(x!=null){let y=x.id,w=x.done;x.state=1,++s,n.emit("didStart",y);let b=r(L=>{x&&(x.result=L,x.state=2,x.resolved=x.max),--s,++i,d()},"taskFinished");x.task(x).then(L=>{w(L),n.emit("didResolve",y,L),b(L)}).catch(L=>{w(),n.emit("didReject",y,L),b()})}}}r(d,"performNext");function f(m){let x=a[m];x&&x.state===0&&(a[m].state=2,++i,n.emit("didCancel",m),p())}r(f,"cancel");function g(){Object.keys(a).forEach(f)}r(g,"cancelAll");function h(m,x={}){let y,w=new Promise(T=>y=T),b=x.id??N();if(a[b]!=null){let T=x.idConflictResolution??1;if(T===0)f(b);else if(T===1){let B=a[b];return{id:b,promise:(async()=>{if(B.state===2)return a[b].result})(),dispose:()=>f(b),cancel:()=>f(b)}}else throw new Error(`Pool task with id=${b} already exists!`)}let L=new ie({totalUnits:x.max??1,completeUnits:x.resolved??0});return a[b]={id:b,task:m,priority:++u,group:x.group,state:0,max:x.max??1,resolved:x.resolved??0,done:y,payload:x.payload,progress:L,setMax(T){L.setTotalUnit(T),a[b].max=T,p()},setResolved(T){L.setCompletetedUnit(T),a[b].resolved=T,p()},incResolved(T=1){L.incCompletedUnit(T),a[b].resolved+=T,p()}},++o,d(),{id:b,promise:w,dispose:()=>f(b),cancel:()=>f(b)}}return r(h,"enqueue"),{events:n,cancel:f,cancelAll:g,enqueue:h,dispose:g,waitFinishAll:c}}r(Ss,"usePool");var Ze=class extends P{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=G("queue"),logLevel:i}=n;this.name=o,this.log=v(`zeed:queue:${o}`,i??1/0)}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.paused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.paused;){let n=this.queue.shift();if(this.log(`performNext => ${n?.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let u;try{this.log.info(`start task ${o}`),u=await this.currentTask,this.log(`finished task ${o} with result =`,u)}catch(a){this.log.warn("Error performing task",a)}s(u),this.currentTask=void 0,this.countResolved+=1,this.emit("didUpdate",this.countMax,this.countResolved)}for(this.queue.length===0&&(this.emit("didFinish"),this.countMax=0,this.countResolved=0);this.waitToFinish.length>0;)this.waitToFinish.shift()()}async enqueue(n,o={}){let{immediate:i=!1,name:s=G(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(u=>{this.queue.push({name:s,task:n,resolve:u}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext()}))}async enqueueReentrant(n,o={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:o.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let o=this.queue.map(i=>i.resolve);this.queue=[],o.forEach(i=>i(void 0)),await this.wait()}async pause(){this.log("pause"),this.paused=!0,await this.wait()}resume(){this.log("resume"),this.paused=!1,this.performNext()}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.paused)))return new Promise(n=>{this.waitToFinish.push(n)})}get isPaused(){return this.paused}get hasTasks(){return this.queue.length!==0}};r(Ze,"SerialQueue");var se=!1,k=se?v("zeed:throttle","error"):()=>{};function Ds(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,u=0,a=0,c,l=Date.now();function p(){return s?(clearTimeout(s),s=void 0,!0):!1}r(p,"clearExistingTimeout");function d(...f){let g=Date.now(),h=g-u;function m(){let y=Date.now();return`total ${(y-l).toFixed(1)}ms - elapsed ${(y-u).toFixed(1)}ms - visited ${a}x`}r(m,"debugElapsed");let x=r(()=>{a=0,u=Date.now(),e.apply(this,f)},"exec");if(c=x,h>n||!s){se&&k("elapsed",m()),i&&(h>n?(se&&k("\u{1F680} leading",m()),x()):++a);let y=h>n?n:n-h;k(`\u23F1 start timeout with ${y.toFixed(1)}ms`,m()),p(),u=g,s=setTimeout(()=>{se&&k("\u23F1 reached timeout",m()),s=0,o&&(!i||a>0)&&(se&&k("\u{1F680} trailing",m()),c?.())},y)}else++a,se&&k("visited",m())}return r(d,"wrapper"),d.cancel=p,d.stop=()=>{p()&&c&&c()},d.immediate=r(async function(...g){p(),u=Date.now(),e.apply(this,g)},"immediate"),d.dispose=()=>d.stop(),d}r(Ds,"throttle");function Rs(e,t={}){let{delay:n=100}=t,o=0,i=!1,s;function u(){o&&(k("clear"),clearTimeout(o),o=0)}r(u,"clearExistingTimeout");async function a(){try{if(u(),s!=null){k("exec");let p=[...s];s=void 0,i=!0,await C(e(...p)),i=!1,k("exec done"),s!=null&&(u(),k("exec trigger next"),o=setTimeout(a,n))}}catch{}}r(a,"exec");function c(...p){s=[...p],u(),k("trigger"),i===!1&&(o=setTimeout(a,n))}r(c,"wrapper");async function l(...p){u(),s=[...p],await a()}return r(l,"immediate"),c.cancel=u,c.dispose=u,c.immediate=l,c}r(Rs,"debounce");function Us(e=globalThis?.location?.hostname??""){return["::ffff:127.0.0.1","localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}r(Us,"isLocalHost");function Ms(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=F(n),s=_(t);return u=>{!s(u.level)||!i(u.name)||o.push(u)}}r(Ms,"LoggerMemoryHandler");var ae=v("zeed:network","error"),Vt={cache:"no-cache",redirect:"follow",headers:{}};function ir(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,o]=t[1].split(":",2);return{url:e.replace(`${t[1]}@`,""),username:n,password:o}}}r(ir,"parseBasicAuth");async function qt(e,t={},n=fetch){try{I(t)&&(t=ye({},...K(t)));let o=ir(String(e));o&&(e=o.url,t=ye({},t,sr(o.username,o.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let i=await n(String(e),t);if(i.status<400)return i;try{ae.warn(`Fetch of ${String(e)} returned status=${i.status}. Options:`,t),ae.warn(`Response: ${await i.text()}`)}catch(s){ae.error("Exception:",s)}}catch(o){ae.error("fetchBasic",o)}}r(qt,"fetchBasic");async function Fs(e,t={},n=fetch){try{let o=await qt(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){ae.error("fetchJSON error:",o)}}r(Fs,"fetchJson");async function ks(e,t={},n=fetch){try{let o=await qt(e,[Vt,{method:"GET"},t],n);if(o)return await o.text()}catch(o){ae.error("fetchHTML error:",o)}}r(ks,"fetchText");function Cs(e,t="POST"){return{method:t,...Vt,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:Bt(e)}}r(Cs,"fetchOptionsFormURLEncoded");function $s(e,t="POST"){return{method:t,...Vt,headers:{"Content-Type":"application/json; charset=utf-8"},body:S(e)}}r($s,"fetchOptionsJson");function sr(e,t){return{headers:{Authorization:`Basic ${pt(`${e}:${t}`)}`}}}r(sr,"fetchOptionsBasicAuth");function Wt(){if(typeof window<"u")return window}r(Wt,"getWindow");function ar(){if(typeof navigator<"u")return navigator}r(ar,"getNavigator");function Is(){return Wt()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(Is,"getGlobal");var V=ar(),X=Wt();function ur(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,test:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){return e.ios=V?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!V?.platform?.startsWith("Mac"),e.windows=!!V?.platform?.startsWith("Win"),e.beaker=X?.beaker!=null,e.electron=(V?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=X?.webkit?.messageHandlers!=null,e.pwa=V?.serviceWorker!=null,e.pwaInstalled=V?.standalone||X?.matchMedia?.("(display-mode: standalone)")?.matches,e.node=typeof process<"u"&&process?.release?.name==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,e.jest=typeof jest<"u"||typeof vitest<"u",e.test=e.jest,e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=X&&"ontouchstart"in X||(V?.maxTouchPoints||0)>1||V?.msPointerEnabled&&X?.MSGesture||X?.DocumentTouch&&document instanceof DocumentTouch,e}r(ur,"detect");var cr=r(()=>typeof window<"u"&&globalThis===window,"isBrowser"),Os=ur();function Bs(e){cr()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e)}r(Bs,"useExitHandler");var Ke=class{constructor(t={}){this.store={}}setItem(t,n){this.store[t]=Q(n)}getItem(t){return Q(this.store[t])}removeItem(t){delete this.store[t]}clear(){this.store={}}allKeys(){return Object.keys(this.store)}};r(Ke,"MemStorage");var _s=r(()=>{},"noop");function js(e={}){let{args:t=process.argv.slice(1),alias:n={},normalize:o=wt,booleanArgs:i=[],listArgs:s=[],numberArgs:u=[]}=e,a=Object.entries(n).reduce((f,g)=>{let[h,m]=g;typeof m=="string"&&(m=[m]);for(let x of m)f[o(x)]=o(h);return f},{}),c={_:[]};function l(f,g){c[f]==null||typeof c[f]=="boolean"?c[f]=g:Array.isArray(c[f])?c[f].push(g):c[f]=[c[f],g]}r(l,"setOpt");let p=[...t],d;for(;d=p.shift();){let f;if(/^--?/.test(d)){let g=d.replace(/^--?/,"");if(d.includes("=")){let[h,m]=g.split("=",2);g=h.trim(),f=m.trim()}g=o(g),g=a[g]??g,i.includes(g)?l(g,!0):(f=f??p.shift()??"",u.includes(g)&&(f=Number(f??0)),s.includes(g)?Array.isArray(c[g])?c[g].push(f):c[g]=[f]:l(g,f))}else c._.push(d)}return c}r(js,"parseArgs");function Hs(e){return new Promise((t,n)=>{import("child_process").then(({spawn:o})=>{let i=o("pbcopy");i.on("error",s=>n(s)),i.on("close",()=>t(e)),i.stdin.write(e),i.stdin.end()}).catch(()=>{})})}r(Hs,"pbcopy");var Ye=Ae(require("crypto"),1);try{typeof globalThis<"u"&&typeof globalThis.crypto>"u"&&Ye.default&&Ye.default.webcrypto&&(globalThis.crypto=Ye.default.webcrypto)}catch(e){console.warn("Failed to polyfill webcrypto",e)}var be=Ae(require("fs"),1),fr=require("path");var Te=v("zeed:env","error"),Ns=`
|
|
12
|
+
`,Gs=/^\s*([\w_.-]+)\s*=\s*(.*)?\s*$/,zs=/\\n/g,Vs=/\n|\r|\r\n/;function lr(e,t={}){let n={};return String(e).split(Vs).forEach((o,i)=>{let s=o.match(Gs);if(s!=null){let u=s[1],a=s[2]||"",c=a.length-1,l=a[0]==='"'&&a[c]==='"';a[0]==="'"&&a[c]==="'"||l?(a=a.substring(1,c),l&&(a=a.replace(zs,Ns))):a=a.trim(),n[u]=a}else Te.debug(`did not match key and value when parsing line ${i+1}: ${o}`)}),n}r(lr,"parse");function pr(e,t="."){return(0,fr.resolve)(process.cwd(),e??t)}r(pr,"stringToPath");function dr(e,t=""){return e==null&&(e=t),pr(String(e).trim(),t)}r(dr,"valueToPath");var Qe=dr;function qs(e,t=process.env){if(t[e]!=null)return t[e];e=e.toLowerCase();for(let[n,o]of Object.entries(t))if(n.toLowerCase()===e)return o}r(qs,"getEnvVariableRelaxed");function Ws(e={}){let t=e?.path??Qe(e?.filename??".env"),n=e?.encoding??"utf8",o=e?.debug||!1;o!==!0&&(Te.level=1/0);try{let i=be.default.existsSync(t)?lr(be.default.readFileSync(t,{encoding:n}),{debug:o}):{},s=be.default.existsSync(`${t}.local`)?lr(be.default.readFileSync(`${t}.local`,{encoding:n}),{debug:o}):{},u=Object.assign({},i,s),a=e?.env??process.env;return Object.entries(u).forEach(([c,l])=>{typeof e?.prefix=="string"&&(c=e?.prefix+c),Object.prototype.hasOwnProperty.call(a,c)?Te.debug(`"${c}" is already defined and will not be overwritten`):l!=null&&(Te.info(`set env.${c} = ${l}`),a[c]=l)}),{parsed:u}}catch(i){return Te.error(i),{error:i}}}r(Ws,"setupEnv");var U=require("fs"),we=require("path");var gr=v("zeed:filestorage","error"),Xe=class{constructor(t={}){this.store={};this.fileKeys=void 0;this.pretty=!1;this.dirname=(0,we.resolve)(process.cwd(),t.path??".fileStorage"),this.pretty=!!t.pretty,this.extension=t.extension??".json",t.extension&&!this.extension.startsWith(".")&&(this.extension=`.${this.extension}`),this.extensionLength=this.extension.length,this.objectToString=t.objectToString??(n=>this.pretty?S(n,null,2):S(n)),this.objectFromString=t.objectFromString??(n=>{try{return JSON.parse(n)}catch(o){gr.warn(`fileStorage parse error '${o}' in`,n)}}),this.keyToFilename=t.keyToFilename??kt}setItem(t,n){this.store[t]=Q(n);try{let o=this.objectToString(n),i=this.getPath(t);(0,U.mkdirSync)((0,we.dirname)(i),{recursive:!0}),(0,U.writeFileSync)(i,o,"utf8")}catch(o){gr.error("setItem error",o)}}getPath(t){return(0,we.resolve)(this.dirname,this.keyToFilename(t)+this.extension)}getBuffer(t){let n=this.getPath(t);return Buffer.from((0,U.readFileSync)(n))}getItem(t){let n=this.store[t];if(n!==null){if(n!=null)return Q(n);try{let o=this.getPath(t),i=(0,U.readFileSync)(o,"utf8");if(i!=null){let s=this.objectFromString(i);return this.store[t]=s,s}}catch{this.store[t]=null}}}removeItem(t){if(delete this.store[t],this.fileKeys!=null){let n=this.fileKeys.indexOf(t);n!==-1&&this.fileKeys.splice(n,1)}try{let n=this.getPath(t);(0,U.unlinkSync)(n)}catch{}}clear(){this.fileKeys=[],this.store={},(0,U.rmSync)(this.dirname,{recursive:!0,force:!0})}allKeys(){if(this.fileKeys==null)try{this.fileKeys=(0,U.readdirSync)(this.dirname,{withFileTypes:!0}).filter(n=>!n.isDirectory()&&n.name.endsWith(this.extension)).map(n=>n.name.slice(0,-this.extensionLength))||[]}catch{}let t=[...this.fileKeys||[]];for(let n of Object.keys(this.store))t.includes(n)||t.push(n);return t.sort(),t}};r(Xe,"FileStorage");var O=require("fs/promises"),ue=require("path");function Js(e){let t=(0,ue.normalize)(e),n=process.env.HOME;return n&&t.startsWith(n)?`~${t.slice(n.length)}`:t}r(Js,"toHumanReadableFilePath");async function et(e){try{await(0,O.stat)(e)}catch{return!1}return!0}r(et,"exists");async function Zs(...e){let t=(0,ue.join)(...e);return await et(t)||await(0,O.mkdir)(t,{recursive:!0}),t}r(Zs,"ensureFolder");async function Ks(...e){let t=(0,ue.join)(...e);return await et(t)&&await(0,O.rm)(t,{recursive:!0}),t}r(Ks,"removeFolder");async function Ys(...e){let t=(0,ue.join)(...e);if(await et(t))return await(0,O.readFile)(t,"utf-8")}r(Ys,"readText");async function Qs(e,t){await(0,O.writeFile)(e,t,"utf-8")}r(Qs,"writeText");var tt=require("fs"),nt=require("path");var mr={};function Jt(e,t={}){let{level:n=void 0,filter:o=void 0,time:i=!0,pretty:s=!1}=t;e=(0,nt.resolve)(process.cwd(),e),(0,tt.mkdirSync)((0,nt.dirname)(e),{recursive:!0});let u=(0,tt.createWriteStream)(e,{flags:"a"}),a=F(o),c=_(n);return l=>{if(!c(l.level)||!a(l.name))return;let p=i?`${new Date().toISOString()} `:"",d=l.name||"",f=mr[d||""];f==null&&(mr[d]=f);let g=[`[${d||"*"}]`,pe(l.messages,{pretty:s})];function h(...m){u.write(`${m.join(" ")}
|
|
13
|
+
`)}switch(r(h,"write"),l.level){case 1:h(`${p}I|* `,...g);break;case 2:h(`${p}W|** `,...g);break;case 3:h(`${p}E|***`,...g);break;default:h(`${p}D| `,...g);break}}}r(Jt,"LoggerFileHandler");var Tr=Ae(require("tty"),1);var Yt=require("path");function yr(e){return typeof e!="string"?[]:e?.split(`
|
|
14
|
+
`).map(t=>{let n=t.match(/^\s+at.*(\((.*)\)|file:\/\/(.*)$)|\s*at\s(\/.*)$/);if(n){let o=n[3]||n[2]||n[4];return o.endsWith(")")&&(o=o.slice(0,-1)),o}})?.filter(Mt)??[]}r(yr,"getStackLlocationList");var Zt=(0,Yt.resolve)(process.cwd()),Kt=process.env?.HOME?(0,Yt.resolve)(process.env?.HOME):"";function hr(e){if(e.includes("/node_modules/"))return"";let t="file://";return e.startsWith(t)?e.substr(t.length):Zt&&e.startsWith(Zt)?e.substr(Zt.length+1):(Kt&&e.startsWith(Kt)&&(e=`~/${e.substr(Kt.length+1)}`),e)}r(hr,"pathStripCwd");function Xs(e){let t=e.match(/^\s*at.*(\((.*)\)|file:\/\/(.*)$)|\s*at\s(\/.*)$/);if(t){let n=t[3]||t[2]||t[4];return n.endsWith(")")&&(n=n.slice(0,-1)),n}return""}r(Xs,"extractFileInfo");function rt(e=2,t=!0){let n=new Error("stack").stack||"",o=yr(n)?.[e];return o&&t&&(o=hr(o)),o||""}r(rt,"getSourceLocation");function Qt(){return new Error("stack").stack||""}r(Qt,"getStack");function Xt(e,t=!0){let n="",o=new Error("stack").stack||"";if(typeof o=="string"){let i=o.split(`
|
|
15
|
+
`).map(u=>u.trim()),s=i.findIndex(u=>e.some(a=>u.startsWith(a)));n=i[s+1],n&&(n=Xs(n)),n&&t&&(n=hr(n))}return n}r(Xt,"getSourceLocationByPrecedingPattern");function ea(){try{return Y(process.env.ZEED_COLOR,Tr.default.isatty(process.stdout.fd))}catch{}return!1}r(ea,"shouldUseColor");var en,xr=[6,2,3,4,5,1];function ta(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return xr[Math.abs(t)%xr.length]}r(ta,"selectColor");var br={},tn;function ot(...e){process.stdout.write(`${pe(e)}
|
|
16
|
+
`)}r(ot,"log");var Le={BOLD:"\x1B[1m",UNBOLD:"\x1B[2m",RED:"\x1B[31m",GREEN:"\x1B[32m",BLUE:"\x1B[34m",PURPLE:"\x1B[35m",GRAY:"\x1B[37m",ORANGE:"\x1B[38;5;208m",UNCOLOR:"\x1B[0m"};var wr="\x1B[0m";function ce(e,t){return`${t===8?Le.ORANGE:`\x1B[3${t<8?t:`8;5;${t}`}m`}${e}${wr}`}r(ce,"colorString");function nn(e,t,n=!0){return e.map(o=>{if(typeof o!="string")return o;let i=t,s=wr;return n&&(i=`${Le.BOLD}${i}`,s=`${s}${Le.BOLD}`),`${i}${o}${s}`})}r(nn,"colorStringList");var Lr="loggerStackTraceDebug-7d38e5a9214b58d29734374cdb9521fd964d7485";function rn(e={}){en==null&&(en=ea()),tn==null&&(tn=re());let{level:t=void 0,filter:n=void 0,colors:o=en,levelHelper:i=!0,nameBrackets:s=!0,padding:u=0,fill:a=0,stack:c=!0,time:l=!0}=e,p=F(n),d=_(t);return f=>{if(!d(f.level)||!p(f.name))return;let g=re(),h=f.name||"",m=br[h||""];m==null&&(m={color:ta(h)},br[h]=m);let x=_t(g-tn),y,w=s?`[${h}]`:h;if(u>0&&(w=w.padStart(u," ")),a>0&&(w=w.padEnd(a," ")),o){let T=m.color;y=[`${ce(w,T)} | `],f.level===2?y.push(...nn(f.messages,Le.ORANGE)):f.level===3?y.push(...nn(f.messages,Le.RED)):y.push(...f.messages),l&&y.push(ce(`+${x}`,T))}else y=[w,...f.messages],l&&y.push(`+${x}`);if(f.messages?.[0]===Lr&&console.log(Qt()),c){let T="";typeof c=="boolean"?(T=Xt(["at Function.","at null.log (","at log ("],!0),T||(T=rt(0,!0))):T=rt(typeof c=="number"?c:3,!0),T&&y.push(ce(`(${T})`,7))}let b="|",L=".";switch(f.level){case 1:i&&(y[0]=`I${b}${L} ${y[0]}`),ot(...y);break;case 2:i&&(y[0]=(o?ce(`W${b}${L}${L} `,8):`W${b}${L}${L} `)+y[0]),ot(...y);break;case 3:i&&(y[0]=(o?ce(`E${b}${L}${L}${L} `,1):`E${b}${L}${L}${L} `)+y[0]),ot(...y);break;default:i&&(y[0]=`D${b} ${y[0]}`),ot(...y);break}}}r(rn,"LoggerNodeHandler");function na(){let e=[rn({padding:32,nameBrackets:!1})],t=process.env.ZEED_LOG??process.env.LOG,n=Y(process.env.ZEED_TIME,!0),o=Y(process.env.ZEED_PRETTY,!1);t&&e.unshift(Jt(Qe(t),{time:n,pretty:o})),v.setHandlers(e)}r(na,"setupLogContextNode");na();0&&(module.exports={CRYPTO_DEFAULT_ALG,CRYPTO_DEFAULT_DERIVE_ALG,CRYPTO_DEFAULT_DERIVE_ITERATIONS,CRYPTO_DEFAULT_HASH_ALG,Channel,CryptoEncoder,DAY_MS,Day,Emitter,FileStorage,JsonEncoder,LocalChannel,LogLevel,LogLevelAlias,Logger,LoggerConsoleHandler,LoggerContext,LoggerFileHandler,LoggerMemoryHandler,LoggerNodeHandler,MemStorage,NoopEncoder,PoolTaskIdConflictResolution,PoolTaskState,Progress,PubSub,SerialQueue,Uint8ArrayToHexDump,Uint8ArrayToJson,Uint8ArrayToString,XRX,_decodeUtf8Polyfill,_encodeUtf8Polyfill,arrayAvg,arrayBatches,arrayEmptyInPlace,arrayFilterInPlace,arrayFlatten,arrayIntersection,arrayIsEqual,arrayMax,arrayMin,arrayMinus,arrayRandomElement,arrayRemoveElement,arraySetElement,arrayShuffle,arrayShuffleForce,arrayShuffleInPlace,arraySorted,arraySortedNumbers,arraySum,arraySymmetricDifference,arrayToggleInPlace,arrayUnion,arrayUnique,avg,between,cloneJsonObject,cloneObject,cmp,colorString,colorStringList,composeOrderby,createArray,createLocalChannelPair,createPromise,createPromiseProxy,csvParse,csvParseToObjects,csvStringify,dateStringToDays,day,dayDay,dayDiff,dayFromAny,dayFromDate,dayFromDateGMT,dayFromParts,dayFromString,dayFromTimestamp,dayFromToday,dayIterator,dayMonth,dayMonthStart,dayOffset,dayRange,dayToDate,dayToDateGMT,dayToParts,dayToString,dayToTimestamp,dayYear,dayYearStart,debounce,decimal,decimalCentsPart,decimalFromCents,decimalToCents,decodeBase16,decodeBase32,decodeBase58,decodeBase62,decrypt,deepEqual,deepMerge,deepStripUndefinedInPlace,deriveKeyPbkdf2,detect,digest,empty,encodeBase16,encodeBase32,encodeBase58,encodeBase62,encodeQuery,encrypt,endSortWeight,ensureFolder,ensureKey,ensureKeyAsync,equalBinary,escapeHTML,escapeRegExp,estimateSizeForBase,exists,fetchBasic,fetchJson,fetchOptionsBasicAuth,fetchOptionsFormURLEncoded,fetchOptionsJson,fetchText,fixBrokenUth8String,forEachDay,forTimes,formatMessages,formatMilliseconds,fromBase64,fromBase64String,fromCamelCase,fromHex,getEnvVariableRelaxed,getGlobal,getGlobalContext,getGlobalEmitter,getGlobalLogger,getNamespaceFilterString,getNavigator,getSecureRandom,getSecureRandomIfPossible,getSourceLocation,getSourceLocationByPrecedingPattern,getStack,getStackLlocationList,getTimestamp,getWindow,immediate,isArray,isBoolean,isBrowser,isEven,isHalf,isInteger,isLocalHost,isNotNull,isNull,isNullOrUndefined,isNumber,isObject,isPrime,isPrimeRX,isPrimitive,isPromise,isRecord,isRecordPlain,isSafeInteger,isString,isTimeout,isUint8Array,isValue,joinToUint8Array,jsonStringify,jsonStringifySafe,jsonStringifySorted,jsonToUint8Array,last,lazyListener,linkifyPlainText,listDistinctUnion,listGroupBy,listOfKey,listQuery,loggerStackTraceDebug,memoize,memoizeAsync,messages,moveSortWeight,noop,objectIsEmpty,objectMap,objectMergeDisposable,parseArgs,parseBasicAuth,parseDate,parseLogLevel,parseOrderby,parseQuery,pbcopy,platform,promisify,qid,randomBoolean,randomFloat,randomInt,randomUint8Array,readText,regExpEscape,regExpString,removeFolder,renderMessages,roundDown,roundHalfAwayFromZero,roundHalfDown,roundHalfEven,roundHalfOdd,roundHalfTowardsZero,roundHalfUp,roundUp,seededRandom,setUuidDefaultEncoding,setupEnv,size,sleep,sortedItems,sortedOrderby,startSortWeight,stringToBoolean,stringToFloat,stringToInteger,stringToPath,stringToUInt8Array,suid,suidBytes,suidBytesDate,suidDate,sum,throttle,timeout,timeoutReached,timoutError,toBase64,toBase64Url,toBool,toCamelCase,toCapitalize,toCapitalizeWords,toFloat,toHex,toHumanReadableFilePath,toHumanReadableUrl,toInt,toPath,toString,toUint8Array,toValidFilename,today,tryTimeout,uname,unescapeHTML,useAsyncMutex,useBase,useDefer,useDispose,useDisposer,useEventListener,useExitHandler,useInterval,useLevelFilter,useMessageHub,useMutex,useNamespaceFilter,usePool,usePubSub,useRPC,useSorted,useTimeout,uuid,uuid32bit,uuidB32,uuidB62,uuidBytes,uuidDecode,uuidDecodeB32,uuidDecodeB62,uuidDecodeV4,uuidEncode,uuidEncodeB32,uuidEncodeB62,uuidEncodeV4,uuidIsValid,uuidv4,valueToBoolean,valueToFloat,valueToInteger,valueToPath,valueToString,waitOn,writeText});
|
|
17
17
|
//# sourceMappingURL=index.node.cjs.map
|