zeed 0.13.21 → 0.13.22

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.
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- function Jn(){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")}function W(){let e=Jn();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}var J=-1,Z=0,se=1,ae=2,ue=3,ce=4,be=9007199254740991,Ft={"*":-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:9007199254740991,"-":9007199254740991};function Zn(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}function F(){return typeof crypto<"u"?Zn():Math.random()}function Ho(e=.25){return F()<e}function zo(e=100,t=0){return t+Math.floor(F()*(e-t))}function Go(e=100,t=0){return t+F()*(e-t)}function qo(e,t,n){return Math.max(e,Math.min(n,t))}function Yn(e){return e.reduce((t,n)=>t+n,0)}function Wo(e){return Yn(e)/e.length}function Jo(e){return !/^1?$|^(11+?)\1+$/.test("1".repeat(e))}function Zo(e){for(let t=2;t<e;t++)if(e%t===0)return !1;return e>1}var qe=6;function Yo(e=0,t=1,n){qe=((n??qe)*9301+49297)%233280;let r=qe/233280;return t+r*(e-t)}function Kn(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}function Xo(e,t=!0){return `${e} ${t?"asc":"desc"}`}function We(e,t,n=!0){let r=e||0,o=t||0;return r>o?n?1:-1:r<o?n?-1:1:0}function Qo(e,...t){if(t.length>0){let n=t.map(Kn),r=Array.from(e);return r.sort((o,i)=>{for(let{field:s,asc:a}of n){let u=We(o[s],i[s],a);if(u!==0)return u}return 0}),r}return e}function Je(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Xn(e,t){return Je(e.filter(n=>!t.includes(n)))}function Qn(...e){return Je(e.reduce((t=[],n)=>t.concat(n),[]))}function Y(...e){return e.flat(Number.POSITIVE_INFINITY)}function er(e,t){return Je(e).filter(n=>t.includes(n))}function ri(e,t){return Xn(Qn(e,t),er(e,t))}function St(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return []}function oi(e,t){return e.includes(t)||e.push(t),e}function Ze(e,t){return e.splice(0,e.length,...e.filter(t)),e}function ii(e,t){let n=e.findIndex(r=>r===t);return n>=0?e.splice(n,1):e.push(t),e}function si(e){return e.splice(0,e.length),e}function tr(e,t=We){return Array.from(e).sort(t)}function ai(e){return tr(e,(t,n)=>t-n)}function nr(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function It(e){return e.sort(()=>F()>.5?1:-1),e}function ui(e){return It(Array.from(e))}function ci(e){for(;e.length>1;){let t=Array.from(e);if(It(t),!nr(e,t))return t}return e}function li(e){return e[Math.floor(F()*e.length)]}function fi(...e){return Y(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}function pi(...e){return Y(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}function di(...e){return Y(e).reduce((t,n)=>t+n,0)}function gi(...e){let t=Y(e);return t.reduce((n,r)=>n+r,0)/t.length}function mi(e,t){let n=[],r=0,o=e.length;for(;r<o;)n.push(e.slice(r,r+=t));return n}function yi(e=0,t){if(e<=0)return [];let n=Array.from({length:e});for(let r=0;r<e;r++)n[r]=t instanceof Function?t(r):t;return n}var rr=(e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,r)=>(n[r]=t[r],n),{}):t;function bi(e,t=void 0){return JSON.stringify(e,rr,t)}function or(e,t){let n=[],r=[];return t==null&&(t=function(o,i){return n[0]===i?"[Circular ~]":`[Circular ~.${r.slice(0,n.indexOf(i)).join(".")}]`}),function(o,i){if(n.length>0){let s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?r.splice(s,Number.POSITIVE_INFINITY,o):r.push(o),~n.indexOf(i)&&(i=t?.call(this,o,i));}else n.push(i);try{return e==null?i:e.call(this,o,i)}catch{}return String(i)}}function P(e,t,n,r){return JSON.stringify(e,or(t??void 0,r),n??void 0)}var xi=P;function ir(e){let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let o=0;o<n;o++)r[o]=t.codePointAt(o)||0;return r}function sr(e){let t=e.length,n="",r=0;for(;t>0;){let o=t<1e4?t:1e4,i=e.subarray(r,r+o);r+=o,n+=String.fromCodePoint.apply(null,i),t-=o;}return decodeURIComponent(escape(n))}var xe;function kt(e){if(xe==null&&(xe=ir,typeof TextEncoder<"u")){let t=new TextEncoder;xe=n=>t.encode(n);}return xe(e.normalize("NFC"))}var we;function Pt(e){if(we==null&&(we=sr,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});we=n=>t.decode(n);}return we(e).normalize("NFC")}function C(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?kt(e):e.length?new Uint8Array(e):e}function Li(...e){let t=0,n=e.flat(1).map(i=>{let s=C(i);return t+=s.length,s}),r=new Uint8Array(t),o=0;for(let i of n)r.set(i,o),o+=i.length;return r}function Rt(e){if(typeof Buffer<"u")return Buffer.from(C(e)).toString("hex");let t="0123456789abcdef",n="";for(let r of [...C(e)])n+=t[r>>4]+t[r&15];return n}function Mt(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>Number.parseInt(t,16)))}function le(e,t=!1){let n=C(e),r="";if(typeof Buffer<"u")r=Buffer.from(n).toString("base64");else {let o="";for(let i=0;i<n.byteLength;i++)o+=String.fromCharCode(n[i]);r=btoa(o);}return t?r.replaceAll("=",""):r}function vi(e){let t=C(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url").replaceAll("=","");let n="";for(let r=0;r<t.byteLength;r++)n+=String.fromCharCode(t[r]);return btoa(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Te(e){if(e=e.replaceAll("-","+").replaceAll("_","/"),typeof Buffer<"u"){let r=Buffer.from(e,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function Ai(e){return Pt(Te(e))}function Bt(e,t){if(e.byteLength!==t.byteLength)return !1;let n=C(e),r=C(t);for(let o=0;o<n.length;o++)if(n[o]!==r[o])return !1;return !0}function Ye(e){return kt(P(e))}function Ke(e){return JSON.parse(Pt(e))}function Ot(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=[],r="0123456789ABCDEF";for(let o=0;o<e.length;o+=t){let i=e.slice(o,Math.min(o+t,e.length)),s=`0000${o.toString(16)}`.slice(-4),a=i.split("").map(g=>{let y=g.charCodeAt(0);return ` ${r[(240&y)>>4]}${r[15&y]}`}).join("");a+=" ".repeat(t-i.length);let u=i.replace(/[\x00-\x1F\x20\x7F-\xA0\xAD]/g,".");u+=" ".repeat(t-i.length),n.push(`${s} ${a} ${u}`);}return n.join(`
4
- `)}var ar={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 ur(e){let t=ar[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 g=0;g<n.length;g++)n[g]=255;for(let g=0;g<t.length;g++){let y=t.charAt(g),b=y.charCodeAt(0);if(n[b]!==255)throw new TypeError(`${y} is ambiguous`);n[b]=g;}let r=t.length,o=t.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function a(g,y=-1){let b=C(g);if(b.byteLength===0)return "";let w=0,L=0,h=b.byteLength;for(;L!==h&&b[L]===0;)L++;let x=(h-L)*s+1>>>0,T=new Uint8Array(x);for(;L!==h;){let p=b[L],d=0;for(let l=x-1;(p!==0||d<w)&&l!==-1;l--,d++)p+=256*T[l]>>>0,T[l]=p%r>>>0,p=p/r>>>0;if(p!==0)throw new Error("Non-zero carry");w=d,L++;}let m=x-w;for(;m!==x&&T[m]===0;)m++;let c="";for(;m<x;++m)c+=t.charAt(T[m]);return y>0?c.padStart(y,o):c}function u(g,y=-1){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;g=g.replace(/\s+/gi,"");let b=0,w=0;for(;g[b]===o;)b++;let L=(g.length-b)*i+1>>>0,h=new Uint8Array(L);for(;g[b];){let T=n[g.charCodeAt(b)];if(T===255)throw new Error(`Unsupported character "${g[b]}"`);let m=0;for(let c=L-1;(T!==0||m<w)&&c!==-1;c--,m++)T+=r*h[c]>>>0,h[c]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");w=m,b++;}let x=L-w;for(;x!==L&&h[x]===0;)x++;return y>0?new Uint8Array([...new Uint8Array(y-h.length+x),...h.slice(x)]):h.slice(x)}return {encode:a,decode:u}}var Le;function N(e){Le==null&&(Le=new Map);function t(){let o=Le.get(e);return o==null&&(o=ur(e),Le.set(e,o)),o}function n(o,i=-1){return t().encode(o,i)}function r(o,i=-1){return t().decode(o,i)}return {encode:n,decode:r}}function Xe(e,t=-1){return N(32).encode(e,t)}function $t(e,t=-1){return N(32).decode(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"),t)}function Di(e,t=-1){return N(16).encode(e,t)}function Ei(e,t=-1){return N(16).decode(e,t)}function Fi(e,t=-1){return N(58).encode(e,t)}function Si(e,t=-1){return N(58).decode(e,t)}function Qe(e,t=-1){return N(62).encode(e,t)}function _t(e,t=-1){return N(62).decode(e,t)}function Ii(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}function Pi(e){return 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}function cr(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}function Ri(e){return e.replace(/\w\S*/g,cr)}function Mi(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()}var jt=["1","true","yes","y","on"];function $i(e,t=!1){return e==null||typeof e!="string"?t:jt.includes(String(e).trim().toLowerCase())}function _i(e,t=0){return e==null||typeof e!="string"?t:Number.parseInt(e.trim(),10)??t}function ji(e,t=0){return e==null||typeof e!="string"?t:Number.parseFloat(e.trim())??t}function lr(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:jt.includes(String(e).trim().toLowerCase())}function fr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseInt(String(e).trim(),10)??t}function pr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseFloat(String(e).trim())??t}function et(e,t=""){return e==null?t:String(e)??t}var Ni=pr,Vi=fr,Hi=et,zi=lr;function dr(e,t={}){let{trace:n=!0,pretty:r=!0}=t;return e.map(o=>{if(o&&typeof o=="object"){if(r&&(o instanceof Uint8Array||o instanceof ArrayBuffer))return `
3
+ function Jn(){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")}function W(){let e=Jn();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}var J=-1,Z=0,se=1,ae=2,ue=3,ce=4,be=9007199254740991,Ft={"*":-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:9007199254740991,"-":9007199254740991};function Zn(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}function F(){return typeof crypto<"u"?Zn():Math.random()}function Ho(e=.25){return F()<e}function zo(e=100,t=0){return t+Math.floor(F()*(e-t))}function Go(e=100,t=0){return t+F()*(e-t)}function qo(e,t,n){return Math.max(e,Math.min(n,t))}function Yn(e){return e.reduce((t,n)=>t+n,0)}function Wo(e){return Yn(e)/e.length}function Jo(e){return !/^1?$|^(11+?)\1+$/.test("1".repeat(e))}function Zo(e){for(let t=2;t<e;t++)if(e%t===0)return !1;return e>1}var qe=6;function Yo(e=0,t=1,n){qe=((n??qe)*9301+49297)%233280;let r=qe/233280;return t+r*(e-t)}function Kn(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}function Xo(e,t=!0){return `${e} ${t?"asc":"desc"}`}function We(e,t,n=!0){let r=e||0,o=t||0;return r>o?n?1:-1:r<o?n?-1:1:0}function Qo(e,...t){if(t.length>0){let n=t.map(Kn),r=Array.from(e);return r.sort((o,i)=>{for(let{field:s,asc:a}of n){let u=We(o[s],i[s],a);if(u!==0)return u}return 0}),r}return e}function Je(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Xn(e,t){return Je(e.filter(n=>!t.includes(n)))}function Qn(...e){return Je(e.reduce((t=[],n)=>t.concat(n),[]))}function Y(...e){return e.flat(Number.POSITIVE_INFINITY)}function er(e,t){return Je(e).filter(n=>t.includes(n))}function ri(e,t){return Xn(Qn(e,t),er(e,t))}function St(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return []}function oi(e,t){return e.includes(t)||e.push(t),e}function Ze(e,t){return e.splice(0,e.length,...e.filter(t)),e}function ii(e,t){let n=e.findIndex(r=>r===t);return n>=0?e.splice(n,1):e.push(t),e}function si(e){return e.splice(0,e.length),e}function ai(e,t){return e.splice(0,e.length,...t),e}function tr(e,t=We){return Array.from(e).sort(t)}function ui(e){return tr(e,(t,n)=>t-n)}function nr(e,t){return e.length===t.length&&e.every((n,r)=>n===t[r])}function It(e){return e.sort(()=>F()>.5?1:-1),e}function ci(e){return It(Array.from(e))}function li(e){for(;e.length>1;){let t=Array.from(e);if(It(t),!nr(e,t))return t}return e}function fi(e){return e[Math.floor(F()*e.length)]}function pi(...e){return Y(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}function di(...e){return Y(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}function gi(...e){return Y(e).reduce((t,n)=>t+n,0)}function mi(...e){let t=Y(e);return t.reduce((n,r)=>n+r,0)/t.length}function yi(e,t){let n=[],r=0,o=e.length;for(;r<o;)n.push(e.slice(r,r+=t));return n}function hi(e=0,t){if(e<=0)return [];let n=Array.from({length:e});for(let r=0;r<e;r++)n[r]=t instanceof Function?t(r):t;return n}var rr=(e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,r)=>(n[r]=t[r],n),{}):t;function xi(e,t=void 0){return JSON.stringify(e,rr,t)}function or(e,t){let n=[],r=[];return t==null&&(t=function(o,i){return n[0]===i?"[Circular ~]":`[Circular ~.${r.slice(0,n.indexOf(i)).join(".")}]`}),function(o,i){if(n.length>0){let s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?r.splice(s,Number.POSITIVE_INFINITY,o):r.push(o),~n.indexOf(i)&&(i=t?.call(this,o,i));}else n.push(i);try{return e==null?i:e.call(this,o,i)}catch{}return String(i)}}function k(e,t,n,r){return JSON.stringify(e,or(t??void 0,r),n??void 0)}var wi=k;function ir(e){let t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let o=0;o<n;o++)r[o]=t.codePointAt(o)||0;return r}function sr(e){let t=e.length,n="",r=0;for(;t>0;){let o=t<1e4?t:1e4,i=e.subarray(r,r+o);r+=o,n+=String.fromCodePoint.apply(null,i),t-=o;}return decodeURIComponent(escape(n))}var xe;function Pt(e){if(xe==null&&(xe=ir,typeof TextEncoder<"u")){let t=new TextEncoder;xe=n=>t.encode(n);}return xe(e.normalize("NFC"))}var we;function kt(e){if(we==null&&(we=sr,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});we=n=>t.decode(n);}return we(e).normalize("NFC")}function C(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Pt(e):e.length?new Uint8Array(e):e}function vi(...e){let t=0,n=e.flat(1).map(i=>{let s=C(i);return t+=s.length,s}),r=new Uint8Array(t),o=0;for(let i of n)r.set(i,o),o+=i.length;return r}function Rt(e){if(typeof Buffer<"u")return Buffer.from(C(e)).toString("hex");let t="0123456789abcdef",n="";for(let r of [...C(e)])n+=t[r>>4]+t[r&15];return n}function Mt(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>Number.parseInt(t,16)))}function le(e,t=!1){let n=C(e),r="";if(typeof Buffer<"u")r=Buffer.from(n).toString("base64");else {let o="";for(let i=0;i<n.byteLength;i++)o+=String.fromCharCode(n[i]);r=btoa(o);}return t?r.replaceAll("=",""):r}function Ai(e){let t=C(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url").replaceAll("=","");let n="";for(let r=0;r<t.byteLength;r++)n+=String.fromCharCode(t[r]);return btoa(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function Te(e){if(e=e.replaceAll("-","+").replaceAll("_","/"),typeof Buffer<"u"){let r=Buffer.from(e,"base64");return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function Ci(e){return kt(Te(e))}function Bt(e,t){if(e.byteLength!==t.byteLength)return !1;let n=C(e),r=C(t);for(let o=0;o<n.length;o++)if(n[o]!==r[o])return !1;return !0}function Ye(e){return Pt(k(e))}function Ke(e){return JSON.parse(kt(e))}function Ot(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=[],r="0123456789ABCDEF";for(let o=0;o<e.length;o+=t){let i=e.slice(o,Math.min(o+t,e.length)),s=`0000${o.toString(16)}`.slice(-4),a=i.split("").map(g=>{let y=g.charCodeAt(0);return ` ${r[(240&y)>>4]}${r[15&y]}`}).join("");a+=" ".repeat(t-i.length);let u=i.replace(/[\x00-\x1F\x20\x7F-\xA0\xAD]/g,".");u+=" ".repeat(t-i.length),n.push(`${s} ${a} ${u}`);}return n.join(`
4
+ `)}var ar={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 ur(e){let t=ar[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 g=0;g<n.length;g++)n[g]=255;for(let g=0;g<t.length;g++){let y=t.charAt(g),b=y.charCodeAt(0);if(n[b]!==255)throw new TypeError(`${y} is ambiguous`);n[b]=g;}let r=t.length,o=t.charAt(0),i=Math.log(r)/Math.log(256),s=Math.log(256)/Math.log(r);function a(g,y=-1){let b=C(g);if(b.byteLength===0)return "";let w=0,L=0,h=b.byteLength;for(;L!==h&&b[L]===0;)L++;let x=(h-L)*s+1>>>0,T=new Uint8Array(x);for(;L!==h;){let p=b[L],d=0;for(let l=x-1;(p!==0||d<w)&&l!==-1;l--,d++)p+=256*T[l]>>>0,T[l]=p%r>>>0,p=p/r>>>0;if(p!==0)throw new Error("Non-zero carry");w=d,L++;}let m=x-w;for(;m!==x&&T[m]===0;)m++;let c="";for(;m<x;++m)c+=t.charAt(T[m]);return y>0?c.padStart(y,o):c}function u(g,y=-1){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;g=g.replace(/\s+/gi,"");let b=0,w=0;for(;g[b]===o;)b++;let L=(g.length-b)*i+1>>>0,h=new Uint8Array(L);for(;g[b];){let T=n[g.charCodeAt(b)];if(T===255)throw new Error(`Unsupported character "${g[b]}"`);let m=0;for(let c=L-1;(T!==0||m<w)&&c!==-1;c--,m++)T+=r*h[c]>>>0,h[c]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");w=m,b++;}let x=L-w;for(;x!==L&&h[x]===0;)x++;return y>0?new Uint8Array([...new Uint8Array(y-h.length+x),...h.slice(x)]):h.slice(x)}return {encode:a,decode:u}}var Le;function N(e){Le==null&&(Le=new Map);function t(){let o=Le.get(e);return o==null&&(o=ur(e),Le.set(e,o)),o}function n(o,i=-1){return t().encode(o,i)}function r(o,i=-1){return t().decode(o,i)}return {encode:n,decode:r}}function Xe(e,t=-1){return N(32).encode(e,t)}function $t(e,t=-1){return N(32).decode(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"),t)}function Ei(e,t=-1){return N(16).encode(e,t)}function Fi(e,t=-1){return N(16).decode(e,t)}function Si(e,t=-1){return N(58).encode(e,t)}function Ii(e,t=-1){return N(58).decode(e,t)}function Qe(e,t=-1){return N(62).encode(e,t)}function _t(e,t=-1){return N(62).decode(e,t)}function Pi(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}function Ri(e){return 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}function cr(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}function Mi(e){return e.replace(/\w\S*/g,cr)}function Bi(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()}var jt=["1","true","yes","y","on"];function _i(e,t=!1){return e==null||typeof e!="string"?t:jt.includes(String(e).trim().toLowerCase())}function ji(e,t=0){return e==null||typeof e!="string"?t:Number.parseInt(e.trim(),10)??t}function Ni(e,t=0){return e==null||typeof e!="string"?t:Number.parseFloat(e.trim())??t}function lr(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:jt.includes(String(e).trim().toLowerCase())}function fr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseInt(String(e).trim(),10)??t}function pr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseFloat(String(e).trim())??t}function et(e,t=""){return e==null?t:String(e)??t}var Vi=pr,Hi=fr,zi=et,Gi=lr;function dr(e,t={}){let{trace:n=!0,pretty:r=!0}=t;return e.map(o=>{if(o&&typeof o=="object"){if(r&&(o instanceof Uint8Array||o instanceof ArrayBuffer))return `
5
5
  ${Ot(o)}
6
6
  `;if(o instanceof Error)return n?`${o.name||"Error"}: ${o.message}
7
- ${o.stack}`:`${o.name||"Error"}: ${o.message}`;try{return r?JSON.stringify(o,null,2):JSON.stringify(o)}catch{}}return String(o)})}function Gi(e,t={}){return dr(e,t).join(" ")}function qi(e){try{return decodeURIComponent(escape(e))}catch{}return e}function Zi(e){if(e.startsWith("data:"))return Te(e.split(",",2)[1])}function Yi(e){if(e.startsWith("data:"))return e.slice(5).split(",",2)[0]}function Ki(e){if(e.startsWith("data:")){let[t,n]=e.slice(5).split(",",2);return new Blob([Te(n)],{type:t})}}async function Xi(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${le(t)}`}function Qi(e,t="application/octet-stream"){return `data:${t},${le(e)}`}function Nt(){let e,t;return [new Promise((r,o)=>{e=r,t=o;}),e,t]}async function ts(e){return new Promise(t=>setTimeout(t,e))}async function ns(){return new Promise(e=>setTimeout(e,0))}async function rs(e,t,n="timeoutReached"){return new Promise(async(r,o)=>{let i=!1,s=setTimeout(()=>{i=!0,r(n);},t);try{let a=await e;clearTimeout(s),i||r(a);}catch(a){clearTimeout(s),i||o(a);}})}function os(e){return e==="timeoutReached"||e?.name==="Timeout reached"}async function Vt(e,t){return t<=0?await e:new Promise(async(n,r)=>{let o=!1,i=setTimeout(()=>{o=!0,r(new Error("Timeout reached"));},t);try{let s=await e;clearTimeout(i),o||n(s);}catch(s){clearTimeout(i),o||r(s);}})}function is(e,t,n=1e3){return new Promise((r,o)=>{let i=u=>{a&&(clearTimeout(a),s(),r(u));},s=()=>{a=null,e.off?e.off(t,i):e.removeEventListener&&e.removeEventListener(t,i);},a=setTimeout(()=>{s(),o(new Error("Did not response in time"));},n);e.on?e.on(t,i):e.addEventListener&&e.addEventListener(t,i);})}function I(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}function V(e){return Promise.resolve(e)}var Ht=864e5;function nt(e){return Math.floor(e/1e4)}function zt(e){return Math.floor(e/100%100)}function gr(e){return Math.floor(e%100)}function as(e){return [nt(e),zt(e),gr(e)]}function Gt(e,t=!1){return t?new Date(`${yr(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}function qt(){return Ae(new Date)}function us(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return Wt(e);if(Array.isArray(e)&&e.length===3){let[n,r,o]=e;return rt(n,r,o)}else if(e instanceof Date)return Ae(e,t)}function cs(e){return Gt(e,!0)}function Ae(e,t=!1){return t?Wt(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}function ls(e){return Ae(e,!0)}function tt(e,t=!0){return Gt(e,t).getTime()}function mr(e,t=!0){return Ae(new Date(e),t)}function yr(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}function rt(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}function Wt(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}function fs(e,t=0){let n=nt(e),r=zt(e);return t!==0&&(r+=t,n+=Math.floor((r-1)/12),r=Math.floor((r-1)%12)+1,r===0&&(r=12)),rt(n,r,1)}function ps(e,t=0){let n=nt(e);return rt(n+t,1,1)}function ve(e,t){return mr(tt(e)+t*864e5)}function ds(e,t){return Math.round((tt(t)-tt(e))/864e5)}function gs(e,t){let n=[];for(t==null&&(t=qt()),e<0&&(e=ve(t,e+1));e<=t;)n.push(e),e=ve(e,1);return n}function*ms(e,t){let n=[];for(t==null&&(t=qt()),e<0&&(e=ve(t,e+1));e<=t;)yield e,e=ve(e,1);return n}var H=class e{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=e.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 e(t)}static fromString(t){return e.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?e.fromString(t.toISOString().substr(0,10)):e.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return e.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new e(t);if(typeof t=="string")return e.fromString(t);if(Array.isArray(t)&&t.length===3){let[r,o=1,i=1]=t;return o<1||o>12||i<1||i>31?void 0:new e(r*1e4+o*100+i)}else {if(t instanceof Date)return e.fromDate(t,n);if(t instanceof e)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 e.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return e.from([this.year,this.month,1])}yearStart(){return e.from([this.year,1,1])}monthOffset(t){let n=this.month+t,r=Math.floor((n-1)%12)+1;r===0&&(r=12);let o=Math.floor((n-1)/12);return e.from([this.year+o,r,this.day])}daysUntil(t){return Math.round((new e(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};async function bs(e,t,n){let r=H.from(e),o=H.from(t);for(;r&&o&&r?.days<=o?.days;){let i=n(r);I(i)&&await i,r=r.dayOffset(1);}}function xs(){return new H}function ws(e){return new H(e)}function Ts(e){return H.fromDate(new Date(e)).days}function hr(e,t=2){return +(+e).toFixed(t)}function vs(e,t=2){return +(+e/10**t).toFixed(t)}function As(e,t=2){return Math.round(+e*10**t)}function Cs(e,t=2){return t*(hr(e,t)%1)}function Es(e,t,n){let r=e[t];return r===void 0&&(r=n(t,e),e[t]=r),r}async function Fs(e,t,n){let r=e[t];return r===void 0&&(r=await n(t,e),e[t]=r),r}function Jt(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}function Ss(e){return e!=null&&e.length>0?e[0]:void 0}function Is(e){return e!=null&&e.length>0?e[e.length-1]:void 0}function ks(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}function ot(e){return Object(e)!==e?e:JSON.parse(P(e))}function Ps(e){return Object(e)!==e?e:JSON.parse(P(e))}function Rs(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let r=e(n);return t.set(n,r),r}}function Ms(e){let t=new Map;return async(...n)=>{let r=P(n);if(t.has(r))return t.get(r);let o=await e(...n);return t.set(r,o),o}}function Bs(e,t){let n=[];for(let r=0;r<e;r++)n.push(t(r,e));return n}function B(e){return e!=null&&typeof e=="object"}function it(e){return Object(e)!==e}function _(e){return Array.isArray(e)}function Ce(e){return B(e)&&!_(e)}function _s(e){return e?.constructor===Object}function Ue(e){return typeof e=="string"}function Zt(e){return typeof e=="number"&&!Number.isNaN(e)}function js(e){return Zt(e)&&Number.isInteger(e)}function Ns(e){return Zt(e)&&Number.isSafeInteger(e)}function Yt(e){return typeof e=="boolean"}function Vs(e){return e==null}function Hs(e){return e==null}function zs(e){return B(e)&&e.constructor.name==="Uint8Array"}function Gs(e){return e!=null}function st(e){return e==null||e===""||B(e)&&Jt(e)<=0}function qs(e){return !st(e)}function Ws(e){return e!=null&&e!==!1&&e!==!0}function Js(e){return e!=null&&e!==!1&&e!==0&&e!==""}function br(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(it(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return !1;for(let r in e){if(!e.hasOwnProperty(r))continue;if(!t.hasOwnProperty(r))return !1;let o=e[r],i=t[r];if(!br(o,i,n))return !1}for(let r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return !1;return !0}function xr(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(it(e)||t.add(e),Ce(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}xr(e[n],t);}}else if(_(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}function De(e,...t){for(let n of t)B(e)||(e={}),!(n==null||!B(n))&&Object.keys(n).forEach(r=>{let o=e[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat(i):B(o)&&B(i)?e[r]=De(Object.assign({},o),i):e[r]=i;});return e}function wr(e,t,n={cyclesFix:!0},r=[]){let o=[],i=Array.isArray(e);for(let a in e){let u=e[a],g=i?+a:a;if(!(a in t)){o.push({type:"del",path:[g]});continue}let y=t[a],b=typeof u=="object"&&typeof y=="object";if(u&&y&&b&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!r.includes(u))){let w=wr(u,y,n,n.cyclesFix?r.concat([u]):[]);o=[...o,...w.map(L=>(L.path.unshift(g),L))];}else u!==y&&!(b&&(Number.isNaN(u)?`${u}`==`${y}`:+u==+y))&&o.push({path:[g],type:"upd",value:y});}let s=Array.isArray(t);for(let a in t)a in e||o.push({type:"new",path:[s?+a:a],value:t[a]});return o}function Kt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")}function Qs(e){return e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&")}function ta(e,t,n=[]){return e.filter(r=>!t.some(o=>!o(r))).map(r=>{for(let o of n)r=o(r);return r}).filter(r=>r!=null)}function na(e,t){return e.reduce((n,r)=>{let o=String(r[t]);return (n[o]=n[o]||[]).push(r),n},{})}function ra(e,t){return Array.from(e.reduce((n,r)=>n.add(r[t]),new Set))}function oa(e,t){return e.map(n=>n[t])}function aa(e,t){return B(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>{let o=t(n,r);return _(o)&&o.length===2?o:[n,o]}).filter(n=>n!=null)):{}}function ua(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}function ca(e){return Object.keys(e).length<=0}var Tr=/[\\\-\[\]\/{}()*+?.^$|]/g;function Ee(e){return e?e instanceof RegExp?e.source:e.replace(Tr,"\\$&"):""}var Lr=100,vr=/^\.+/,Ar=/\.+$/,Cr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function Xt(){return Cr}function Ur(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}function da(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(Xt().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${Ee(t)})+`;return e=e.replace(Xt(),t).replace(vr,t).replace(Ar,"").replace(new RegExp(n,"gm"),t).trim(),e=Ur().test(e)?e+t:e,e.slice(0,Lr)}function fe(e){return Math.abs(e)%1===.5}function Qt(e){return e%2===0}var ma=e=>Math.ceil(e),ya=e=>Math.floor(e),ha=e=>Math.round(e),ba=e=>{let t=Math.round(e);return fe(e)&&Qt(t)?t-1:t},xa=e=>fe(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),wa=e=>fe(e)?Math.floor(e):Math.round(e),Ta=e=>{let t=Math.round(e);return fe(e)?Qt(t)?t:t-1:t},La=e=>fe(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e);function en(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-F()}function tn(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+F()}function Ca(e,t,n){let r=n.length,o=e<t;if(r<=0||e>=r-1)return tn(n);if(e<=0)return en(n);n=Dr([...n]);let i=o?-1:0,s=n[e+i].sort_weight||0,u=(n[e+i+1].sort_weight||0)-s;if(u===0)return o?en(n):tn(n);let g=s+u/2,y=u*.01*(F()-.5);return g+y}function Dr(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}function Ea(e={}){let{getter:t=a=>a.sort}=e;function n(a){return a.sort((u,g)=>(t(u)||0)-(t(g)||0)),a}function r(a){return a.reduce((u,g)=>Math.min(u,t(g)||0),0)-1-F()}function o(a){return a.reduce((u,g)=>Math.max(u,t(g)||0),0)+1+F()}function i(a,u){a==null&&(a=(u??0)-1),u==null&&(u=(a??0)+1);let g=u-a,y=a+g/2,b=g*.01*(F()-.5);return y+b}function s(a,u,g){let y=g.length,b=a<u;if(y<=0||a>=y-1)return o(g);if(a<=0)return r(g);g=n([...g]);let w=b?-1:0,L=t(g[a+w])||0,x=(t(g[a+w+1])||0)-L;if(x===0)return b?r(g):o(g);let T=L+x/2,m=x*.01*(F()-.5);return T+m}return {start:r,end:o,between:i,move:s,items:n}}function Er(e){return t=>e?.[t]}var Fr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Sr=Er(Fr),Ir=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,kr="\\u0300-\\u036f",Pr="\\ufe20-\\ufe2f",Rr="\\u20d0-\\u20ff",Mr="\\u1ab0-\\u1aff",Br="\\u1dc0-\\u1dff",Or=kr+Pr+Rr+Mr+Br,$r=`[${Or}]`,_r=RegExp($r,"g");function nn(e){return e&&e.replace(Ir,Sr).replace(_r,"")}var jr=/((?:(?:(?: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 ka(e){return e.split(jr).map((t,n)=>{let r=Kt(t);return n%2?`<a target="_blank" href="${r}">${Nr(r)}</a>`:r}).join("")}function Nr(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}function rn(e,t){let n=[];for(let[r,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)t&&!t(i)||i!=null&&n.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(i))}`);}return n.join("&")}function Pa(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let r=0;r<n.length;r++){let o=n[r].split("="),i=decodeURIComponent(o[0]),s=decodeURIComponent(o[1]||"");t[i]!=null?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(s)):t[i]=s;}return t}var on=["aardvark","absurd","accrue","acme","adrift","adult","afflict","ahead","aimless","Algol","allow","alone","ammo","ancient","apple","artist","assume","Athens","atlas","Aztec","baboon","backfield","backward","basalt","beaming","bedlamp","beehive","beeswax","befriend","Belfast","berserk","billiard","bison","blackjack","blockade","blowtorch","bluebird","bombast","bookshelf","brackish","breadline","breakup","brickyard","briefcase","Burbank","button","buzzard","cement","chairlift","chatter","checkup","chisel","choking","chopper","Christmas","clamshell","classic","classroom","cleanup","clockwork","cobra","commence","concert","cowbell","crackdown","cranky","crowfoot","crucial","crumpled","crusade","cubic","deadbolt","deckhand","dogsled","dosage","dragnet","drainage","dreadful","drifter","dropper","drumbeat","drunken","Dupont","dwelling","eating","edict","egghead","eightball","endorse","endow","enlist","erase","escape","exceed","eyeglass","eyetooth","facial","fallout","flagpole","flatfoot","flytrap","fracture","fragile","framework","freedom","frighten","gazelle","Geiger","Glasgow","glitter","glucose","goggles","goldfish","gremlin","guidance","hamlet","highchair","hockey","hotdog","indoors","indulge","inverse","involve","island","Janus","jawbone","keyboard","kickoff","kiwi","klaxon","lockup","merit","minnow","miser","Mohawk","mural","music","Neptune","newborn","nightbird","obtuse","offload","oilfield","optic","orca","payday","peachy","pheasant","physique","playhouse","Pluto","preclude","prefer","preshrunk","printer","profile","prowler","pupil","puppy","python","quadrant","quiver","quota","ragtime","ratchet","rebirth","reform","regain","reindeer","rematch","repay","retouch","revenge","reward","rhythm","ringbolt","robust","rocker","ruffled","sawdust","scallion","scenic","scorecard","Scotland","seabird","select","sentence","shadow","showgirl","skullcap","skydive","slingshot","slothful","slowdown","snapline","snapshot","snowcap","snowslide","solo","spaniel","spearhead","spellbind","spheroid","spigot","spindle","spoilage","spyglass","stagehand","stagnate","stairway","standard","stapler","steamship","stepchild","sterling","stockman","stopwatch","stormy","sugar","surmount","suspense","swelter","tactics","talon","tapeworm","tempest","tiger","tissue","tonic","tracker","transit","trauma","treadmill","Trojan","trouble","tumor","tunnel","tycoon","umpire","uncut","unearth","unwind","uproot","upset","upshot","vapor","village","virus","Vulcan","waffle","wallet","watchword","wayside","willow","woodlark","Zulu"],sn=["adroitness","adviser","aggregate","alkali","almighty","amulet","amusement","antenna","applicant","Apollo","armistice","article","asteroid","Atlantic","atmosphere","autopsy","Babylon","backwater","barbecue","belowground","bifocals","bodyguard","borderline","bottomless","Bradbury","Brazilian","breakaway","Burlington","businessman","butterfat","Camelot","candidate","cannonball","Capricorn","caravan","caretaker","celebrate","cellulose","certify","chambermaid","Cherokee","Chicago","clergyman","coherence","combustion","commando","company","component","concurrent","confidence","conformist","congregate","consensus","consulting","corporate","corrosion","councilman","crossover","cumbersome","customer","Dakota","decadence","December","decimal","designing","detector","detergent","determine","dictator","dinosaur","direction","disable","disbelief","disruptive","distortion","divisive","document","embezzle","enchanting","enrollment","enterprise","equation","equipment","escapade","Eskimo","everyday","examine","existence","exodus","fascinate","filament","finicky","forever","fortitude","frequency","gadgetry","Galveston","getaway","glossary","gossamer","graduate","gravity","guitarist","hamburger","Hamilton","handiwork","hazardous","headwaters","hemisphere","hesitate","hideaway","holiness","hurricane","hydraulic","impartial","impetus","inception","indigo","inertia","infancy","inferno","informant","insincere","insurgent","integrate","intention","inventive","Istanbul","Jamaica","Jupiter","leprosy","letterhead","liberty","maritime","matchmaker","maverick","Medusa","megaton","microscope","microwave","midsummer","millionaire","miracle","misnomer","molasses","molecule","Montana","monument","mosquito","narrative","nebula","newsletter","Norwegian","October","Ohio","onlooker","opulent","Orlando","outfielder","Pacific","pandemic","pandora","paperweight","paragon","paragraph","paramount","passenger","pedigree","Pegasus","penetrate","perceptive","performance","pharmacy","phonetic","photograph","pioneer","pocketful","politeness","positive","potato","processor","prophecy","provincial","proximate","puberty","publisher","pyramid","quantity","racketeer","rebellion","recipe","recover","repellent","replica","reproduce","resistor","responsive","retraction","retrieval","retrospect","revenue","revival","revolver","Sahara","sandalwood","sardonic","Saturday","savagery","scavenger","sensation","sociable","souvenir","specialist","speculate","stethoscope","stupendous","supportive","surrender","suspicious","sympathy","tambourine","telephone","therapist","tobacco","tolerance","tomorrow","torpedo","tradition","travesty","trombonist","truncated","typewriter","ultimate","undaunted","underfoot","unicorn","unify","universe","unravel","upcoming","vacancy","vagabond","versatile","vertigo","Virginia","visitor","vocalist","voyager","warranty","Waterloo","whimsical","Wichita","Wilmington","Wyoming","yesteryear","Yucatan"];function Oa(e,t=" ",n=" "){return Array.from(e).map((r,o)=>o%2?sn[r]+n:on[r]+t).join("").slice(0,-(e.length%2?t:n).length)}function $a(e){return C(e.map((t,n)=>(n%2?sn:on).findIndex(r=>r.toLocaleLowerCase()===nn(t).toLocaleLowerCase().trim())))}var Vr=/\\\s|\s+|#[^\n]*\n?/gm,Hr=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,an=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function zr(e){return typeof e=="string"?e:e.source||""}function ja(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var un=class{constructor(t,n){this.namedGroups={};this.names=[];let r=n??"",o;if(t instanceof RegExp?(n==null&&(r=t.flags),o=t.source):o=t,r&&r.includes("x")&&(r=r.replace("x",""),o=o.replace(Vr,a=>a[0]==="\\"?a:"")),!(t instanceof RegExp)){let a=0;o=o.replace(Hr,(u,g)=>(a+=1,g?(g!=="index"&&g!=="length"&&!this.namedGroups[g]&&(this.namedGroups[g]=a),"("):u)),this.names=Object.keys(this.namedGroups);}o=zr(o),an.lastIndex=0;let s=an.exec(o);s&&(this.lookBehind={rx:new RegExp(`${s[3]}$(?!\\s)`),expect:s?s[2]==="=":!s},o=o.substr(s[0].length)),this.rx=new RegExp(o,r);}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=[],r;for(this.rx.lastIndex=0;r=this.exec(t);)n.push(r);return this.rx.lastIndex=0,n}replace(t,n){let r=typeof n=="function"?n:()=>n;return t.replace(this.rx,o=>r(o))}};function Gr(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}function qr(){return Gr(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}function O(e=qr()){let t,n=[],r=[];if(!e)t=function(o){return !1};else if(e==="*")t=function(o){return !0};else {let o,i=e.split(/[\s,]+/),s=i.length;for(o=0;o<s;o++){if(!i[o])continue;let a=i[o].replace(/\*/g,".*?");a[0]==="-"?n.push(new RegExp(`^${a.substr(1)}`)):r.push(new RegExp(`^${a}`));}t=function(a){if(n.length===0&&r.length===0)return !0;let u,g;for(u=0,g=n.length;u<g;u++)if(n[u].test(a))return !1;for(u=0,g=r.length;u<g;u++)if(r[u].test(a))return !0;return !1};}return t.accept=r,t.reject=n,t.filter=e,t}function Wr(){return 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 pe(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=Ft[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}function K(e=Wr()){let t=pe(e);return n=>n>=t}function $(...e){return Ue(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}function Fe(e={}){let{level:t=void 0,filter:n=void 0}=e,r=O(n),o=K(t);return i=>{if(!o(i.level)||!r(i.name))return;let s=i.name?`[${i.name}]`:"";switch(i.level){case 1:console.info(...$(`I|* ${s}`,...i.messages));break;case 2:console.warn(...$(`W|** ${s}`,...i.messages));break;case 3:console.error(...$(`E|*** ${s}`,...i.messages));break;default:console.debug(...$(`D| ${s}`,...i.messages));break}}}function cn(e=""){let t=[Fe()],n=u=>!0,r=!1,o=s,i=!1;function s(u="",g){let y=pe(g??-1);function b(h,x){return y<=h?x:()=>{}}let w=b(0,(...h)=>{L({name:u,messages:h,level:0});});w.label=u,w.extend=function(h){return o(u?`${u}:${h}`:h)};let L=h=>{if(n(u))for(let x of t)x&&x(h);};return w.debug=b(0,(...h)=>{L({name:u,messages:h,level:0});}),w.info=b(1,(...h)=>{L({name:u,messages:h,level:1});}),w.warn=b(2,(...h)=>{L({name:u,messages:h,level:2});}),w.error=b(3,(...h)=>{L({name:u,messages:h,level:3});}),w.fatal=b(4,(...h)=>{throw L({name:u,messages:h,level:4}),new Error(`${h.map(String).join(" ")}`)}),w.assert=b(4,(h,...x)=>{(h==null||typeof h=="number"&&Number.isNaN(h)||!h)&&w.fatal(...x);}),w}function a(u="",g){let y=o(u,g);return i&&y.debug(`+++ init of logger "${u}" on level "${y.level}".`),y}return a.registerHandler=function(u){t.push(u);},a.setFilter=function(u){n=O(u);},a.setLock=(u=!0)=>r=u,a.setDebug=(u=!0)=>i=u,a.setHandlers=function(u=[]){o!==s&&(o=s),!r&&(t=[...u].filter(g=>typeof g=="function"));},a.level=-1,a.setLogLevel=function(u=-1){r||(a.level=u);},a.setFactory=function(u){r||(o=u);},a}var j;function at(e){let t=cn();return e?e(t):t.setHandlers([Fe()]),t}function ut(e){if(j==null)try{let t=W();t!=null?t?.logger==null?(j=at(e),t.logger=j):j=t.logger:j=at(e);}catch{j=at(e);}return j}function ln(){if(j!=null)return j;try{let e=W();if(e?.logger!=null)return e.logger}catch{}}function k(e,t){return ut()(e,t)}var fn=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Se(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return fn[Math.abs(t)%fn.length]}function z(){return Date.now()}function ct(e){return e>999?`${(e/1e3).toFixed(1)} s`:`${e.toFixed(2)} ms`}function tu(...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 r=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);r&&(n=new Date(+r[1],+r[2]-1,+r[3],12,0));}if(n instanceof Date)return n}}}function pn(){return typeof performance<"u"?performance.now():Date.now()}function nu(){let e=pn();return function(){let t=pn()-e;return ct(t)}}function su(e){let{level:t=void 0,filter:n=void 0,messages:r=[]}=e,o=O(n),i=K(t);return s=>{i(s.level)&&o(s.name)&&(s.timestamp=z(),r.push(s));}}function Jr(...e){throw ln()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}function Zr(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&Jr(...t);}function dn(e,...t){Zr(e,...t);}function de(e,t,n){return new Uint8Array(e,t,n)}var X;function mn(){return X===void 0&&(X=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,X&&X.decode(new Uint8Array).length===1&&(X=null)),X}var lt=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};function Me(){return new lt}function ft(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}function Be(e){let t=new Uint8Array(ft(e)),n=0;for(let r=0;r<e.bufs.length;r++){let o=e.bufs[r];t.set(o,n),n+=o.length;}return t.set(de(e.cbuf.buffer,0,e.cpos),n),t}function Xr(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(de(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}function D(e,t){let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t;}var xn=D;function wn(e,t){D(e,t&255),D(e,t>>>8&255);}function Tn(e,t){for(let n=0;n<4;n++)D(e,t&255),t>>>=8;}function G(e,t){for(;t>127;)D(e,128|127&t),t=Math.floor(t/128);D(e,127&t);}function Qr(e){return e!==0?e<0:1/e<0}function pt(e,t){let n=Qr(t);for(n&&(t=-t),D(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)D(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}function Oe(e,t){let n=e.cbuf.length,r=e.cpos,o=Math.min(n-r,t.length),i=t.length-o;e.cbuf.set(t.subarray(0,o),r),e.cpos+=o,i>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Math.max(n*2,i)),e.cbuf.set(t.subarray(o)),e.cpos=i);}function $e(e,t){G(e,t.byteLength),Oe(e,t);}function to(e,t){let n=unescape(encodeURIComponent(t)),r=n.length;G(e,r);for(let o=0;o<r;o++)D(e,n.codePointAt(o));}function Re(e,t){return to(e,t)}function dt(e,t){Xr(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}function gt(e,t){return dt(e,4).setFloat32(0,t,!1)}function no(e,t){return dt(e,8).setFloat64(0,t,!1)}function ro(e,t){return dt(e,8).setBigInt64(0,t,!1)}var Pe;function oo(e){return Pe==null&&(Pe=new DataView(new ArrayBuffer(4))),Pe.setFloat32(0,e),Pe.getFloat32(0)===e}function ee(e,t){switch(typeof t){case"string":D(e,119),Re(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(D(e,125),pt(e,t)):oo(t)?(D(e,124),gt(e,t)):(D(e,123),no(e,t));break;case"bigint":D(e,122),ro(e,t);break;case"object":if(t===null)D(e,126);else if(Array.isArray(t)){D(e,117),G(e,t.length);for(let n=0;n<t.length;n++)ee(e,t[n]);}else if(t instanceof Uint8Array)D(e,116),$e(e,t);else {D(e,118);let n=Object.keys(t);G(e,n.length);for(let r=0;r<n.length;r++){let o=n[r];Re(e,o),ee(e,t[o]);}}break;case"boolean":D(e,t?120:121);break;default:D(e,127);}}var Ln="Unexpected end of array",vn="Integer out of Range",mt=class{constructor(t){this.arr=t,this.pos=0;}};function je(e){return new mt(e)}function yt(e,t){let n=de(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}function te(e){let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let o=e.arr[e.pos++];if(t=t+(o&127)*n,n*=128,o<128)return t;if(t>Number.MAX_SAFE_INTEGER)throw new Error(vn)}throw new Error(Ln)}function Ne(e){return yt(e,te(e))}function ye(e){return e.arr[e.pos++]}function An(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}function Cn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t}function ht(e){let t=e.arr[e.pos++],n=t&63,r=64,o=(t&64)>0?-1:1;if(!(t&128))return o*n;let i=e.arr.length;for(;e.pos<i;){if(t=e.arr[e.pos++],n=n+(t&127)*r,r*=128,t<128)return o*n;if(n>Number.MAX_SAFE_INTEGER)throw new Error(vn)}throw new Error(Ln)}function io(e){let t=te(e);if(t===0)return "";{let n=String.fromCodePoint(ye(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(ye(e));else for(;t>0;){let r=t<1e4?t:1e4,o=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,o),t-=r;}return decodeURIComponent(escape(n))}}function _e(e){let t=mn();return t?t.decode(Ne(e)):io(e)}function bt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}function xt(e){return bt(e,4).getFloat32(0,!1)}function so(e){return bt(e,8).getFloat64(0,!1)}function ao(e){return bt(e,8).getBigInt64(0,!1)}var uo=[e=>{},e=>null,ht,xt,so,ao,e=>!1,e=>!0,_e,e=>{let t=te(e),n={};for(let r=0;r<t;r++){let o=_e(e);n[o]=ne(e);}return n},e=>{let t=te(e),n=[];for(let r=0;r<t;r++)n.push(ne(e));return n},Ne];function ne(e){return uo[127-ye(e)](e)}var Un=class{async encode(t){let n=Me();return ee(n,t),Be(n)}async decode(t){return ne(je(C(t)))}};function Cu(e){let t=Me();return ee(t,e),Be(t)}function Uu(e){return ne(je(C(e)))}function Du(e){let t=Me();return e!=null&&Oe(t,C(e)),{writeBytes:(n,r)=>{let o=C(n);dn(!(r!=null&&o.length!==r),`Expected ${r} bytes, got ${o.length}`),Oe(t,o);},writeBytesVar:n=>$e(t,C(n)),writeUintVar:n=>G(t,n),writeUint8:n=>xn(t,n),writeUint16:n=>wn(t,n),writeUint32:n=>Tn(t,n),writeIntVar:n=>pt(t,n),writeFloat:n=>gt(t,n),writeStringVar:n=>Re(t,n),write:n=>ee(t,n),getUint8Array:()=>Be(t),getLength:()=>ft(t)}}function Eu(e){let t=je(C(e));return {readBytes:n=>yt(t,n),readBytesVar:()=>Ne(t),readUintVar:()=>te(t),readUint8:()=>ye(t),readUint16:()=>An(t),readUint32:()=>Cn(t),readIntVar:()=>ht(t),readFloat:()=>xt(t),readStringVar:()=>_e(t),read:()=>ne(t),getOffset:()=>t.pos||0}}function Fu(e=0){return {setBit:(t,n=!0)=>n?e|=1<<t:e&=~(1<<t),unsetBit:t=>e&=1<<t,toggleBit:t=>e^=1<<t,getBit:t=>(e&1<<t)!==0,getValue:()=>e}}async function co(e){return await e.arrayBuffer()}async function Su(e){let t=await co(e);if(t!=null)return C(t)}function re(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}var En="SHA-256",wt="AES-GCM",Dn="PBKDF2",lo=1e5;async function Pu(e,t=En){return C(await crypto.subtle.digest(t,C(e)))}async function Ru(e,t={}){let n=C(e),r=await crypto.subtle.importKey("raw",n,Dn,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:Dn,salt:t.salt?C(t.salt):new Uint8Array(0),iterations:t.iterations??lo,hash:En},r,{name:wt,length:256},!0,["encrypt","decrypt"])}function Fn(){return new Uint8Array([1,1])}async function Sn(e,t){let n=Fn(),r=re(12),o=await crypto.subtle.encrypt({name:wt,iv:r},t,e),i=new Uint8Array(o),s=n.length+r.length+i.length,a=new Uint8Array(s),u=0;return a.set(n,u),u+=n.length,a.set(r,u),u+=r.length,a.set(i,u),a}async function In(e,t){let n=e.subarray(0,2);if(!Bt(n,Fn()))return Promise.reject(new Error(`Unknown magic ${n}`));let r=e.subarray(2,2+12),o=e.subarray(2+12,e.length),i=await crypto.subtle.decrypt({name:wt,iv:r},t,o);return new Uint8Array(i)}var fo=",";function Ou(e,t={}){let{separator:n=fo}=t,r="";for(let o=0;o<e.length;o++)r+=`${e[o].map(i=>{if(i==null||i==="")return "";if(Yt(i))return i?1:0;let s=String(i);return (Ce(i)||_(i))&&(s=P(i)),s.includes('"')||s.includes(`
7
+ ${o.stack}`:`${o.name||"Error"}: ${o.message}`;try{return r?JSON.stringify(o,null,2):JSON.stringify(o)}catch{}}return String(o)})}function qi(e,t={}){return dr(e,t).join(" ")}function Wi(e){try{return decodeURIComponent(escape(e))}catch{}return e}function Yi(e){if(e.startsWith("data:"))return Te(e.split(",",2)[1])}function Ki(e){if(e.startsWith("data:"))return e.slice(5).split(",",2)[0]}function Xi(e){if(e.startsWith("data:")){let[t,n]=e.slice(5).split(",",2);return new Blob([Te(n)],{type:t})}}async function Qi(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${le(t)}`}function es(e,t="application/octet-stream"){return `data:${t},${le(e)}`}function Nt(){let e,t;return [new Promise((r,o)=>{e=r,t=o;}),e,t]}async function ns(e){return new Promise(t=>setTimeout(t,e))}async function rs(){return new Promise(e=>setTimeout(e,0))}async function os(e,t,n="timeoutReached"){return new Promise(async(r,o)=>{let i=!1,s=setTimeout(()=>{i=!0,r(n);},t);try{let a=await e;clearTimeout(s),i||r(a);}catch(a){clearTimeout(s),i||o(a);}})}function is(e){return e==="timeoutReached"||e?.name==="Timeout reached"}async function Vt(e,t){return t<=0?await e:new Promise(async(n,r)=>{let o=!1,i=setTimeout(()=>{o=!0,r(new Error("Timeout reached"));},t);try{let s=await e;clearTimeout(i),o||n(s);}catch(s){clearTimeout(i),o||r(s);}})}function ss(e,t,n=1e3){return new Promise((r,o)=>{let i=u=>{a&&(clearTimeout(a),s(),r(u));},s=()=>{a=null,e.off?e.off(t,i):e.removeEventListener&&e.removeEventListener(t,i);},a=setTimeout(()=>{s(),o(new Error("Did not response in time"));},n);e.on?e.on(t,i):e.addEventListener&&e.addEventListener(t,i);})}function I(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}function V(e){return Promise.resolve(e)}var Ht=864e5;function nt(e){return Math.floor(e/1e4)}function zt(e){return Math.floor(e/100%100)}function gr(e){return Math.floor(e%100)}function us(e){return [nt(e),zt(e),gr(e)]}function Gt(e,t=!1){return t?new Date(`${yr(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}function qt(){return Ae(new Date)}function cs(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return Wt(e);if(Array.isArray(e)&&e.length===3){let[n,r,o]=e;return rt(n,r,o)}else if(e instanceof Date)return Ae(e,t)}function ls(e){return Gt(e,!0)}function Ae(e,t=!1){return t?Wt(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}function fs(e){return Ae(e,!0)}function tt(e,t=!0){return Gt(e,t).getTime()}function mr(e,t=!0){return Ae(new Date(e),t)}function yr(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}function rt(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}function Wt(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}function ps(e,t=0){let n=nt(e),r=zt(e);return t!==0&&(r+=t,n+=Math.floor((r-1)/12),r=Math.floor((r-1)%12)+1,r===0&&(r=12)),rt(n,r,1)}function ds(e,t=0){let n=nt(e);return rt(n+t,1,1)}function ve(e,t){return mr(tt(e)+t*864e5)}function gs(e,t){return Math.round((tt(t)-tt(e))/864e5)}function ms(e,t){let n=[];for(t==null&&(t=qt()),e<0&&(e=ve(t,e+1));e<=t;)n.push(e),e=ve(e,1);return n}function*ys(e,t){let n=[];for(t==null&&(t=qt()),e<0&&(e=ve(t,e+1));e<=t;)yield e,e=ve(e,1);return n}var H=class e{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=e.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 e(t)}static fromString(t){return e.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?e.fromString(t.toISOString().substr(0,10)):e.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return e.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new e(t);if(typeof t=="string")return e.fromString(t);if(Array.isArray(t)&&t.length===3){let[r,o=1,i=1]=t;return o<1||o>12||i<1||i>31?void 0:new e(r*1e4+o*100+i)}else {if(t instanceof Date)return e.fromDate(t,n);if(t instanceof e)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 e.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return e.from([this.year,this.month,1])}yearStart(){return e.from([this.year,1,1])}monthOffset(t){let n=this.month+t,r=Math.floor((n-1)%12)+1;r===0&&(r=12);let o=Math.floor((n-1)/12);return e.from([this.year+o,r,this.day])}daysUntil(t){return Math.round((new e(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};async function xs(e,t,n){let r=H.from(e),o=H.from(t);for(;r&&o&&r?.days<=o?.days;){let i=n(r);I(i)&&await i,r=r.dayOffset(1);}}function ws(){return new H}function Ts(e){return new H(e)}function Ls(e){return H.fromDate(new Date(e)).days}function hr(e,t=2){return +(+e).toFixed(t)}function As(e,t=2){return +(+e/10**t).toFixed(t)}function Cs(e,t=2){return Math.round(+e*10**t)}function Us(e,t=2){return t*(hr(e,t)%1)}function Fs(e,t,n){let r=e[t];return r===void 0&&(r=n(t,e),e[t]=r),r}async function Ss(e,t,n){let r=e[t];return r===void 0&&(r=await n(t,e),e[t]=r),r}function Jt(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}function Is(e){return e!=null&&e.length>0?e[0]:void 0}function Ps(e){return e!=null&&e.length>0?e[e.length-1]:void 0}function ks(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}function ot(e){return Object(e)!==e?e:JSON.parse(k(e))}function Rs(e){return Object(e)!==e?e:JSON.parse(k(e))}function Ms(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let r=e(n);return t.set(n,r),r}}function Bs(e){let t=new Map;return async(...n)=>{let r=k(n);if(t.has(r))return t.get(r);let o=await e(...n);return t.set(r,o),o}}function Os(e,t){let n=[];for(let r=0;r<e;r++)n.push(t(r,e));return n}function B(e){return e!=null&&typeof e=="object"}function it(e){return Object(e)!==e}function _(e){return Array.isArray(e)}function Ce(e){return B(e)&&!_(e)}function js(e){return e?.constructor===Object}function Ue(e){return typeof e=="string"}function Zt(e){return typeof e=="number"&&!Number.isNaN(e)}function Ns(e){return Zt(e)&&Number.isInteger(e)}function Vs(e){return Zt(e)&&Number.isSafeInteger(e)}function Yt(e){return typeof e=="boolean"}function Hs(e){return e==null}function zs(e){return e==null}function Gs(e){return B(e)&&e.constructor.name==="Uint8Array"}function qs(e){return e!=null}function st(e){return e==null||e===""||B(e)&&Jt(e)<=0}function Ws(e){return !st(e)}function Js(e){return e!=null&&e!==!1&&e!==!0}function Zs(e){return e!=null&&e!==!1&&e!==0&&e!==""}function br(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(it(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return !1;for(let r in e){if(!e.hasOwnProperty(r))continue;if(!t.hasOwnProperty(r))return !1;let o=e[r],i=t[r];if(!br(o,i,n))return !1}for(let r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return !1;return !0}function xr(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(it(e)||t.add(e),Ce(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}xr(e[n],t);}}else if(_(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}function De(e,...t){for(let n of t)B(e)||(e={}),!(n==null||!B(n))&&Object.keys(n).forEach(r=>{let o=e[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat(i):B(o)&&B(i)?e[r]=De(Object.assign({},o),i):e[r]=i;});return e}function wr(e,t,n={cyclesFix:!0},r=[]){let o=[],i=Array.isArray(e);for(let a in e){let u=e[a],g=i?+a:a;if(!(a in t)){o.push({type:"del",path:[g]});continue}let y=t[a],b=typeof u=="object"&&typeof y=="object";if(u&&y&&b&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!r.includes(u))){let w=wr(u,y,n,n.cyclesFix?r.concat([u]):[]);o=[...o,...w.map(L=>(L.path.unshift(g),L))];}else u!==y&&!(b&&(Number.isNaN(u)?`${u}`==`${y}`:+u==+y))&&o.push({path:[g],type:"upd",value:y});}let s=Array.isArray(t);for(let a in t)a in e||o.push({type:"new",path:[s?+a:a],value:t[a]});return o}function Kt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")}function ea(e){return e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&")}function na(e,t,n=[]){return e.filter(r=>!t.some(o=>!o(r))).map(r=>{for(let o of n)r=o(r);return r}).filter(r=>r!=null)}function ra(e,t){return e.reduce((n,r)=>{let o=String(r[t]);return (n[o]=n[o]||[]).push(r),n},{})}function oa(e,t){return Array.from(e.reduce((n,r)=>n.add(r[t]),new Set))}function ia(e,t){return e.map(n=>n[t])}function ua(e,t){return B(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>{let o=t(n,r);return _(o)&&o.length===2?o:[n,o]}).filter(n=>n!=null)):{}}function ca(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}function la(e){return Object.keys(e).length<=0}var Tr=/[\\\-\[\]\/{}()*+?.^$|]/g;function Ee(e){return e?e instanceof RegExp?e.source:e.replace(Tr,"\\$&"):""}var Lr=100,vr=/^\.+/,Ar=/\.+$/,Cr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function Xt(){return Cr}function Ur(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}function ga(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(Xt().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${Ee(t)})+`;return e=e.replace(Xt(),t).replace(vr,t).replace(Ar,"").replace(new RegExp(n,"gm"),t).trim(),e=Ur().test(e)?e+t:e,e.slice(0,Lr)}function fe(e){return Math.abs(e)%1===.5}function Qt(e){return e%2===0}var ya=e=>Math.ceil(e),ha=e=>Math.floor(e),ba=e=>Math.round(e),xa=e=>{let t=Math.round(e);return fe(e)&&Qt(t)?t-1:t},wa=e=>fe(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),Ta=e=>fe(e)?Math.floor(e):Math.round(e),La=e=>{let t=Math.round(e);return fe(e)?Qt(t)?t:t-1:t},va=e=>fe(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e);function en(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-F()}function tn(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+F()}function Ua(e,t,n){let r=n.length,o=e<t;if(r<=0||e>=r-1)return tn(n);if(e<=0)return en(n);n=Dr([...n]);let i=o?-1:0,s=n[e+i].sort_weight||0,u=(n[e+i+1].sort_weight||0)-s;if(u===0)return o?en(n):tn(n);let g=s+u/2,y=u*.01*(F()-.5);return g+y}function Dr(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}function Fa(e={}){let{getter:t=a=>a.sort}=e;function n(a){return a.sort((u,g)=>(t(u)||0)-(t(g)||0)),a}function r(a){return a.reduce((u,g)=>Math.min(u,t(g)||0),0)-1-F()}function o(a){return a.reduce((u,g)=>Math.max(u,t(g)||0),0)+1+F()}function i(a,u){a==null&&(a=(u??0)-1),u==null&&(u=(a??0)+1);let g=u-a,y=a+g/2,b=g*.01*(F()-.5);return y+b}function s(a,u,g){let y=g.length,b=a<u;if(y<=0||a>=y-1)return o(g);if(a<=0)return r(g);g=n([...g]);let w=b?-1:0,L=t(g[a+w])||0,x=(t(g[a+w+1])||0)-L;if(x===0)return b?r(g):o(g);let T=L+x/2,m=x*.01*(F()-.5);return T+m}return {start:r,end:o,between:i,move:s,items:n}}function Er(e){return t=>e?.[t]}var Fr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Sr=Er(Fr),Ir=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,Pr="\\u0300-\\u036f",kr="\\ufe20-\\ufe2f",Rr="\\u20d0-\\u20ff",Mr="\\u1ab0-\\u1aff",Br="\\u1dc0-\\u1dff",Or=Pr+kr+Rr+Mr+Br,$r=`[${Or}]`,_r=RegExp($r,"g");function nn(e){return e&&e.replace(Ir,Sr).replace(_r,"")}var jr=/((?:(?:(?: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 ka(e){return e.split(jr).map((t,n)=>{let r=Kt(t);return n%2?`<a target="_blank" href="${r}">${Nr(r)}</a>`:r}).join("")}function Nr(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}function rn(e,t){let n=[];for(let[r,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)t&&!t(i)||i!=null&&n.push(`${encodeURIComponent(r)}=${encodeURIComponent(String(i))}`);}return n.join("&")}function Ra(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let r=0;r<n.length;r++){let o=n[r].split("="),i=decodeURIComponent(o[0]),s=decodeURIComponent(o[1]||"");t[i]!=null?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(s)):t[i]=s;}return t}var on=["aardvark","absurd","accrue","acme","adrift","adult","afflict","ahead","aimless","Algol","allow","alone","ammo","ancient","apple","artist","assume","Athens","atlas","Aztec","baboon","backfield","backward","basalt","beaming","bedlamp","beehive","beeswax","befriend","Belfast","berserk","billiard","bison","blackjack","blockade","blowtorch","bluebird","bombast","bookshelf","brackish","breadline","breakup","brickyard","briefcase","Burbank","button","buzzard","cement","chairlift","chatter","checkup","chisel","choking","chopper","Christmas","clamshell","classic","classroom","cleanup","clockwork","cobra","commence","concert","cowbell","crackdown","cranky","crowfoot","crucial","crumpled","crusade","cubic","deadbolt","deckhand","dogsled","dosage","dragnet","drainage","dreadful","drifter","dropper","drumbeat","drunken","Dupont","dwelling","eating","edict","egghead","eightball","endorse","endow","enlist","erase","escape","exceed","eyeglass","eyetooth","facial","fallout","flagpole","flatfoot","flytrap","fracture","fragile","framework","freedom","frighten","gazelle","Geiger","Glasgow","glitter","glucose","goggles","goldfish","gremlin","guidance","hamlet","highchair","hockey","hotdog","indoors","indulge","inverse","involve","island","Janus","jawbone","keyboard","kickoff","kiwi","klaxon","lockup","merit","minnow","miser","Mohawk","mural","music","Neptune","newborn","nightbird","obtuse","offload","oilfield","optic","orca","payday","peachy","pheasant","physique","playhouse","Pluto","preclude","prefer","preshrunk","printer","profile","prowler","pupil","puppy","python","quadrant","quiver","quota","ragtime","ratchet","rebirth","reform","regain","reindeer","rematch","repay","retouch","revenge","reward","rhythm","ringbolt","robust","rocker","ruffled","sawdust","scallion","scenic","scorecard","Scotland","seabird","select","sentence","shadow","showgirl","skullcap","skydive","slingshot","slothful","slowdown","snapline","snapshot","snowcap","snowslide","solo","spaniel","spearhead","spellbind","spheroid","spigot","spindle","spoilage","spyglass","stagehand","stagnate","stairway","standard","stapler","steamship","stepchild","sterling","stockman","stopwatch","stormy","sugar","surmount","suspense","swelter","tactics","talon","tapeworm","tempest","tiger","tissue","tonic","tracker","transit","trauma","treadmill","Trojan","trouble","tumor","tunnel","tycoon","umpire","uncut","unearth","unwind","uproot","upset","upshot","vapor","village","virus","Vulcan","waffle","wallet","watchword","wayside","willow","woodlark","Zulu"],sn=["adroitness","adviser","aggregate","alkali","almighty","amulet","amusement","antenna","applicant","Apollo","armistice","article","asteroid","Atlantic","atmosphere","autopsy","Babylon","backwater","barbecue","belowground","bifocals","bodyguard","borderline","bottomless","Bradbury","Brazilian","breakaway","Burlington","businessman","butterfat","Camelot","candidate","cannonball","Capricorn","caravan","caretaker","celebrate","cellulose","certify","chambermaid","Cherokee","Chicago","clergyman","coherence","combustion","commando","company","component","concurrent","confidence","conformist","congregate","consensus","consulting","corporate","corrosion","councilman","crossover","cumbersome","customer","Dakota","decadence","December","decimal","designing","detector","detergent","determine","dictator","dinosaur","direction","disable","disbelief","disruptive","distortion","divisive","document","embezzle","enchanting","enrollment","enterprise","equation","equipment","escapade","Eskimo","everyday","examine","existence","exodus","fascinate","filament","finicky","forever","fortitude","frequency","gadgetry","Galveston","getaway","glossary","gossamer","graduate","gravity","guitarist","hamburger","Hamilton","handiwork","hazardous","headwaters","hemisphere","hesitate","hideaway","holiness","hurricane","hydraulic","impartial","impetus","inception","indigo","inertia","infancy","inferno","informant","insincere","insurgent","integrate","intention","inventive","Istanbul","Jamaica","Jupiter","leprosy","letterhead","liberty","maritime","matchmaker","maverick","Medusa","megaton","microscope","microwave","midsummer","millionaire","miracle","misnomer","molasses","molecule","Montana","monument","mosquito","narrative","nebula","newsletter","Norwegian","October","Ohio","onlooker","opulent","Orlando","outfielder","Pacific","pandemic","pandora","paperweight","paragon","paragraph","paramount","passenger","pedigree","Pegasus","penetrate","perceptive","performance","pharmacy","phonetic","photograph","pioneer","pocketful","politeness","positive","potato","processor","prophecy","provincial","proximate","puberty","publisher","pyramid","quantity","racketeer","rebellion","recipe","recover","repellent","replica","reproduce","resistor","responsive","retraction","retrieval","retrospect","revenue","revival","revolver","Sahara","sandalwood","sardonic","Saturday","savagery","scavenger","sensation","sociable","souvenir","specialist","speculate","stethoscope","stupendous","supportive","surrender","suspicious","sympathy","tambourine","telephone","therapist","tobacco","tolerance","tomorrow","torpedo","tradition","travesty","trombonist","truncated","typewriter","ultimate","undaunted","underfoot","unicorn","unify","universe","unravel","upcoming","vacancy","vagabond","versatile","vertigo","Virginia","visitor","vocalist","voyager","warranty","Waterloo","whimsical","Wichita","Wilmington","Wyoming","yesteryear","Yucatan"];function $a(e,t=" ",n=" "){return Array.from(e).map((r,o)=>o%2?sn[r]+n:on[r]+t).join("").slice(0,-(e.length%2?t:n).length)}function _a(e){return C(e.map((t,n)=>(n%2?sn:on).findIndex(r=>r.toLocaleLowerCase()===nn(t).toLocaleLowerCase().trim())))}var Vr=/\\\s|\s+|#[^\n]*\n?/gm,Hr=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,an=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function zr(e){return typeof e=="string"?e:e.source||""}function Na(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var un=class{constructor(t,n){this.namedGroups={};this.names=[];let r=n??"",o;if(t instanceof RegExp?(n==null&&(r=t.flags),o=t.source):o=t,r&&r.includes("x")&&(r=r.replace("x",""),o=o.replace(Vr,a=>a[0]==="\\"?a:"")),!(t instanceof RegExp)){let a=0;o=o.replace(Hr,(u,g)=>(a+=1,g?(g!=="index"&&g!=="length"&&!this.namedGroups[g]&&(this.namedGroups[g]=a),"("):u)),this.names=Object.keys(this.namedGroups);}o=zr(o),an.lastIndex=0;let s=an.exec(o);s&&(this.lookBehind={rx:new RegExp(`${s[3]}$(?!\\s)`),expect:s?s[2]==="=":!s},o=o.substr(s[0].length)),this.rx=new RegExp(o,r);}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=[],r;for(this.rx.lastIndex=0;r=this.exec(t);)n.push(r);return this.rx.lastIndex=0,n}replace(t,n){let r=typeof n=="function"?n:()=>n;return t.replace(this.rx,o=>r(o))}};function Gr(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}function qr(){return Gr(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}function O(e=qr()){let t,n=[],r=[];if(!e)t=function(o){return !1};else if(e==="*")t=function(o){return !0};else {let o,i=e.split(/[\s,]+/),s=i.length;for(o=0;o<s;o++){if(!i[o])continue;let a=i[o].replace(/\*/g,".*?");a[0]==="-"?n.push(new RegExp(`^${a.substr(1)}`)):r.push(new RegExp(`^${a}`));}t=function(a){if(n.length===0&&r.length===0)return !0;let u,g;for(u=0,g=n.length;u<g;u++)if(n[u].test(a))return !1;for(u=0,g=r.length;u<g;u++)if(r[u].test(a))return !0;return !1};}return t.accept=r,t.reject=n,t.filter=e,t}function Wr(){return 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 pe(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=Ft[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}function K(e=Wr()){let t=pe(e);return n=>n>=t}function $(...e){return Ue(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}function Fe(e={}){let{level:t=void 0,filter:n=void 0}=e,r=O(n),o=K(t);return i=>{if(!o(i.level)||!r(i.name))return;let s=i.name?`[${i.name}]`:"";switch(i.level){case 1:console.info(...$(`I|* ${s}`,...i.messages));break;case 2:console.warn(...$(`W|** ${s}`,...i.messages));break;case 3:console.error(...$(`E|*** ${s}`,...i.messages));break;default:console.debug(...$(`D| ${s}`,...i.messages));break}}}function cn(e=""){let t=[Fe()],n=u=>!0,r=!1,o=s,i=!1;function s(u="",g){let y=pe(g??-1);function b(h,x){return y<=h?x:()=>{}}let w=b(0,(...h)=>{L({name:u,messages:h,level:0});});w.label=u,w.extend=function(h){return o(u?`${u}:${h}`:h)};let L=h=>{if(n(u))for(let x of t)x&&x(h);};return w.debug=b(0,(...h)=>{L({name:u,messages:h,level:0});}),w.info=b(1,(...h)=>{L({name:u,messages:h,level:1});}),w.warn=b(2,(...h)=>{L({name:u,messages:h,level:2});}),w.error=b(3,(...h)=>{L({name:u,messages:h,level:3});}),w.fatal=b(4,(...h)=>{throw L({name:u,messages:h,level:4}),new Error(`${h.map(String).join(" ")}`)}),w.assert=b(4,(h,...x)=>{(h==null||typeof h=="number"&&Number.isNaN(h)||!h)&&w.fatal(...x);}),w}function a(u="",g){let y=o(u,g);return i&&y.debug(`+++ init of logger "${u}" on level "${y.level}".`),y}return a.registerHandler=function(u){t.push(u);},a.setFilter=function(u){n=O(u);},a.setLock=(u=!0)=>r=u,a.setDebug=(u=!0)=>i=u,a.setHandlers=function(u=[]){o!==s&&(o=s),!r&&(t=[...u].filter(g=>typeof g=="function"));},a.level=-1,a.setLogLevel=function(u=-1){r||(a.level=u);},a.setFactory=function(u){r||(o=u);},a}var j;function at(e){let t=cn();return e?e(t):t.setHandlers([Fe()]),t}function ut(e){if(j==null)try{let t=W();t!=null?t?.logger==null?(j=at(e),t.logger=j):j=t.logger:j=at(e);}catch{j=at(e);}return j}function ln(){if(j!=null)return j;try{let e=W();if(e?.logger!=null)return e.logger}catch{}}function P(e,t){return ut()(e,t)}var fn=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Se(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return fn[Math.abs(t)%fn.length]}function z(){return Date.now()}function ct(e){return e>999?`${(e/1e3).toFixed(1)} s`:`${e.toFixed(2)} ms`}function nu(...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 r=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);r&&(n=new Date(+r[1],+r[2]-1,+r[3],12,0));}if(n instanceof Date)return n}}}function pn(){return typeof performance<"u"?performance.now():Date.now()}function ru(){let e=pn();return function(){let t=pn()-e;return ct(t)}}function au(e){let{level:t=void 0,filter:n=void 0,messages:r=[]}=e,o=O(n),i=K(t);return s=>{i(s.level)&&o(s.name)&&(s.timestamp=z(),r.push(s));}}function Jr(...e){throw ln()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}function Zr(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&Jr(...t);}function dn(e,...t){Zr(e,...t);}function de(e,t,n){return new Uint8Array(e,t,n)}var X;function mn(){return X===void 0&&(X=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,X&&X.decode(new Uint8Array).length===1&&(X=null)),X}var lt=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};function Me(){return new lt}function ft(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}function Be(e){let t=new Uint8Array(ft(e)),n=0;for(let r=0;r<e.bufs.length;r++){let o=e.bufs[r];t.set(o,n),n+=o.length;}return t.set(de(e.cbuf.buffer,0,e.cpos),n),t}function Xr(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(de(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}function D(e,t){let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t;}var xn=D;function wn(e,t){D(e,t&255),D(e,t>>>8&255);}function Tn(e,t){for(let n=0;n<4;n++)D(e,t&255),t>>>=8;}function G(e,t){for(;t>127;)D(e,128|127&t),t=Math.floor(t/128);D(e,127&t);}function Qr(e){return e!==0?e<0:1/e<0}function pt(e,t){let n=Qr(t);for(n&&(t=-t),D(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)D(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}function Oe(e,t){let n=e.cbuf.length,r=e.cpos,o=Math.min(n-r,t.length),i=t.length-o;e.cbuf.set(t.subarray(0,o),r),e.cpos+=o,i>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Math.max(n*2,i)),e.cbuf.set(t.subarray(o)),e.cpos=i);}function $e(e,t){G(e,t.byteLength),Oe(e,t);}function to(e,t){let n=unescape(encodeURIComponent(t)),r=n.length;G(e,r);for(let o=0;o<r;o++)D(e,n.codePointAt(o));}function Re(e,t){return to(e,t)}function dt(e,t){Xr(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}function gt(e,t){return dt(e,4).setFloat32(0,t,!1)}function no(e,t){return dt(e,8).setFloat64(0,t,!1)}function ro(e,t){return dt(e,8).setBigInt64(0,t,!1)}var ke;function oo(e){return ke==null&&(ke=new DataView(new ArrayBuffer(4))),ke.setFloat32(0,e),ke.getFloat32(0)===e}function ee(e,t){switch(typeof t){case"string":D(e,119),Re(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(D(e,125),pt(e,t)):oo(t)?(D(e,124),gt(e,t)):(D(e,123),no(e,t));break;case"bigint":D(e,122),ro(e,t);break;case"object":if(t===null)D(e,126);else if(Array.isArray(t)){D(e,117),G(e,t.length);for(let n=0;n<t.length;n++)ee(e,t[n]);}else if(t instanceof Uint8Array)D(e,116),$e(e,t);else {D(e,118);let n=Object.keys(t);G(e,n.length);for(let r=0;r<n.length;r++){let o=n[r];Re(e,o),ee(e,t[o]);}}break;case"boolean":D(e,t?120:121);break;default:D(e,127);}}var Ln="Unexpected end of array",vn="Integer out of Range",mt=class{constructor(t){this.arr=t,this.pos=0;}};function je(e){return new mt(e)}function yt(e,t){let n=de(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}function te(e){let t=0,n=1,r=e.arr.length;for(;e.pos<r;){let o=e.arr[e.pos++];if(t=t+(o&127)*n,n*=128,o<128)return t;if(t>Number.MAX_SAFE_INTEGER)throw new Error(vn)}throw new Error(Ln)}function Ne(e){return yt(e,te(e))}function ye(e){return e.arr[e.pos++]}function An(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}function Cn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t}function ht(e){let t=e.arr[e.pos++],n=t&63,r=64,o=(t&64)>0?-1:1;if(!(t&128))return o*n;let i=e.arr.length;for(;e.pos<i;){if(t=e.arr[e.pos++],n=n+(t&127)*r,r*=128,t<128)return o*n;if(n>Number.MAX_SAFE_INTEGER)throw new Error(vn)}throw new Error(Ln)}function io(e){let t=te(e);if(t===0)return "";{let n=String.fromCodePoint(ye(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(ye(e));else for(;t>0;){let r=t<1e4?t:1e4,o=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,o),t-=r;}return decodeURIComponent(escape(n))}}function _e(e){let t=mn();return t?t.decode(Ne(e)):io(e)}function bt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}function xt(e){return bt(e,4).getFloat32(0,!1)}function so(e){return bt(e,8).getFloat64(0,!1)}function ao(e){return bt(e,8).getBigInt64(0,!1)}var uo=[e=>{},e=>null,ht,xt,so,ao,e=>!1,e=>!0,_e,e=>{let t=te(e),n={};for(let r=0;r<t;r++){let o=_e(e);n[o]=ne(e);}return n},e=>{let t=te(e),n=[];for(let r=0;r<t;r++)n.push(ne(e));return n},Ne];function ne(e){return uo[127-ye(e)](e)}var Un=class{async encode(t){let n=Me();return ee(n,t),Be(n)}async decode(t){return ne(je(C(t)))}};function Uu(e){let t=Me();return ee(t,e),Be(t)}function Du(e){return ne(je(C(e)))}function Eu(e){let t=Me();return e!=null&&Oe(t,C(e)),{writeBytes:(n,r)=>{let o=C(n);dn(!(r!=null&&o.length!==r),`Expected ${r} bytes, got ${o.length}`),Oe(t,o);},writeBytesVar:n=>$e(t,C(n)),writeUintVar:n=>G(t,n),writeUint8:n=>xn(t,n),writeUint16:n=>wn(t,n),writeUint32:n=>Tn(t,n),writeIntVar:n=>pt(t,n),writeFloat:n=>gt(t,n),writeStringVar:n=>Re(t,n),write:n=>ee(t,n),getUint8Array:()=>Be(t),getLength:()=>ft(t)}}function Fu(e){let t=je(C(e));return {readBytes:n=>yt(t,n),readBytesVar:()=>Ne(t),readUintVar:()=>te(t),readUint8:()=>ye(t),readUint16:()=>An(t),readUint32:()=>Cn(t),readIntVar:()=>ht(t),readFloat:()=>xt(t),readStringVar:()=>_e(t),read:()=>ne(t),getOffset:()=>t.pos||0}}function Su(e=0){return {setBit:(t,n=!0)=>n?e|=1<<t:e&=~(1<<t),unsetBit:t=>e&=1<<t,toggleBit:t=>e^=1<<t,getBit:t=>(e&1<<t)!==0,getValue:()=>e}}async function co(e){return await e.arrayBuffer()}async function Iu(e){let t=await co(e);if(t!=null)return C(t)}function re(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}var En="SHA-256",wt="AES-GCM",Dn="PBKDF2",lo=1e5;async function Ru(e,t=En){return C(await crypto.subtle.digest(t,C(e)))}async function Mu(e,t={}){let n=C(e),r=await crypto.subtle.importKey("raw",n,Dn,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:Dn,salt:t.salt?C(t.salt):new Uint8Array(0),iterations:t.iterations??lo,hash:En},r,{name:wt,length:256},!0,["encrypt","decrypt"])}function Fn(){return new Uint8Array([1,1])}async function Sn(e,t){let n=Fn(),r=re(12),o=await crypto.subtle.encrypt({name:wt,iv:r},t,e),i=new Uint8Array(o),s=n.length+r.length+i.length,a=new Uint8Array(s),u=0;return a.set(n,u),u+=n.length,a.set(r,u),u+=r.length,a.set(i,u),a}async function In(e,t){let n=e.subarray(0,2);if(!Bt(n,Fn()))return Promise.reject(new Error(`Unknown magic ${n}`));let r=e.subarray(2,2+12),o=e.subarray(2+12,e.length),i=await crypto.subtle.decrypt({name:wt,iv:r},t,o);return new Uint8Array(i)}var fo=",";function $u(e,t={}){let{separator:n=fo}=t,r="";for(let o=0;o<e.length;o++)r+=`${e[o].map(i=>{if(i==null||i==="")return "";if(Yt(i))return i?1:0;let s=String(i);return (Ce(i)||_(i))&&(s=k(i)),s.includes('"')||s.includes(`
8
8
  `)||s.includes(n)?`"${s.replace(/"/g,'""')}"`:s}).join(n)}
9
9
  `;return r}function po(e,t={}){let n=/("((?:(?:[^"]*?)(?:"")?)*)"|([^,;\t\n]*))([,;\t]|\n|\r\n)/g;t.separator&&(n=new RegExp(n.source.replaceAll(",;\\t",Ee(t.separator)),n.flags));let r=[],o=[],i,s=`${e.replaceAll(`\r
10
10
  `,`
11
11
  `).trim()}
12
12
  `;for(;i=n.exec(s);){let a=i[2]??i[3]??"";a=a.replaceAll('""','"'),o.push(a),i[4]===`
13
- `&&(r.push(o),o=[]);}return r}function $u(e,t={}){let n=po(e,t),r=n[0];return n.slice(1).map(o=>Object.fromEntries(o.map((i,s)=>[r[s],i])))}function go(e){let t;if(typeof e=="function"?t=e():I(e)?t=e:typeof e.dispose=="function"?t=e.dispose():I(e.dispose)&&(t=e.dispose),I(t))return t}function oe(e){let t=e;t!=null&&(Ue(t)?t={name:t}:"debug"in t&&"label"in t&&(t={name:t.label,log:t}));let n=t?.name,r=t?.log??k("zeed:dispose"),o=[];function i(g){if(g!=null&&o.includes(g)){Ze(o,b=>b!==g);let y=go(g);if(I(y))return y}}function s(g){if(g!=null)return o.unshift(g),()=>i(g)}function a(g=!1){n&&r.debug(`dispose "${n}": ${o.length} entries`);let y=[];for(;o.length>0;){let b=o[0],w=i(b);if(I(w)){if(g)throw new Error(`Async disposable found: ${b} -> ${w}`);y.push(w);}}if(y.length>0)return Promise.all(y)}function u(){a(!0);}return Object.assign(a,{add:s,remove:i,track:s,untrack:i,dispose:a,disposeSync:u,sync:u,exec:a,getSize(){return o.length},isDisposed(){return o.length<=0}})}function zu(e={}){let{mode:t="fifo"}=e,n=[],r=async(i=!1)=>{for(;n.length>0;){let s=n[0];if(Ze(n,a=>a!==s),typeof s=="function"){let a=s();if(I(a)){if(i)throw new Error(`Expected sync only function, but found async: ${s}`);await a;}}else if(I(s)){if(i)throw new Error(`Expected sync only function, but found async: ${s}`);await s;}else throw new Error(`Unhandled disposable: ${s}`)}};return Object.assign(r,{add:i=>{t==="lifo"?n.unshift(i):n.push(i);},exec:r,getSize(){return n.length}})}function Wu(){let e=!0;return (t,n)=>{let r=!1;if(e){e=!1;try{t(),r=!0;}finally{e=!0;}}else n!==void 0&&n();return r}}function Ju(){let e=!0;return async(t,n)=>{let r=!1;if(e){e=!1;try{let o=t();I(o)&&await o,r=!0;}finally{e=!0;}}else if(n!==void 0){let o=n();I(o)&&await o;}return r}}var R=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this._logEmitter=k("zeed:emitter","warn");this.dispose=oe();this.call=new Proxy({},{get:(t,n)=>async(...r)=>await this.emit(n,...r)});}async emit(t,...n){let r=!1;try{let o=this.subscribers[t]||[];if(this._logEmitter.debug("emit",this?.constructor?.name,t,...n,o),this.subscribersOnAny.forEach(i=>i(t,...n)),o.length>0){let i=o.map(({fn:s})=>{try{return V(s(...n))}catch(a){this._logEmitter.warn("emit warning:",a);}return null}).filter(s=>s!=null);r=!0,await Promise.all(i);}}catch(o){this._logEmitter.error("emit exception",o);}return r}onAny(t){this.subscribersOnAny.push(t);}on(t,n,r={}){let{priority:o=0}=r,i=this.subscribers[t]||[],s=i.length,a={fn:n,priority:o};if(s<=0)this.subscribers[t]=[a];else {let u=s;for(let g=i.length-1;g>=0;g--){let y=i[g];if(o<=y.priority)break;u-=1;}i.splice(u,0,a);}return ()=>{this.off(t,n);}}onCall(t){for(let[n,r]of Object.entries(t))this.on(n,r);}once(t,n){let r=async(...o)=>(this.off(t,r),await V(n(...o)));return this.on(t,r),()=>{this.off(t,n);}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(r=>n&&r.fn!==n),this}removeAllListeners(){return this.subscribers={},this}};function tc(){let e=W().emitter;return e||(e=new R,W().emitter=e),e}function nc(e,t){let n=Math.round(F()*100),r=[],o,i=(a,u)=>{let g={key:a,obj:u};r.push(g),o&&o();};return t?e.on?e.on(t,a=>{i(t,a);}):e.addEventListener?e.addEventListener(t,a=>{i(t,a);}):e.log.error(n,"Cannot listen to key"):e.onAny?e.onAny((a,u)=>{i(a,u);}):e.log.error(n,"cannot listen to all for",e),(a,u=!0)=>new Promise((g,y)=>{a||(a=t,a||r.length&&(a=r[0].key)),o=()=>{for(;r.length>0;){let b=r.shift();if(b.key===a)o=void 0,g(b.obj);else {if(u)continue;y(new Error(`Expected ${a}, but found ${b.key} with value=${b.obj}`));}break}},o();})}var Ve=16;function Lt(){return re(Ve)}function mo(e=Lt()){return Qe(e,22)}function yo(e){return Qe(e,22)}function ho(e){return _t(e,Ve)}function bo(e=Lt()){return Xe(e,26)}function xo(e){return Xe(e,26)}function wo(e){return $t(e,Ve)}var To="10000000-1000-4000-8000-100000000000",Lo=function(){return typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID():To.replace(/[018]/g,e=>(e^re(1)[0]&15>>e/4).toString(16))};function vo(e){let t=Rt(e);return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}function Ao(e){return Mt(e.replaceAll("-",""))}var kn=16e11;function Co(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let r=0;r<t.length;r++){let o=e&255;t[n-r]=o,e=(e-o)/256;}return t}function Pn(){let e=z()-kn;return new Uint8Array([...Co(e),...re(10)])}function uc(){return Do(Pn())}function cc(e){return Uo(Mn(e))}function Uo(e){return new Date(kn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}function lc(){return new Uint32Array(re(4))[0]}var vt={base62:{uuid:mo,uuidDecode:ho,uuidEncode:yo},base32:{uuid:bo,uuidDecode:wo,uuidEncode:xo},uuidv4:{uuid:Lo,uuidDecode:Ao,uuidEncode:vo}},He="base62",Rn=!1;function fc(e,t=!1){He=e,Rn=t;}function q(){return vt[He].uuid(Rn?Pn():Lt())}function Mn(e){return vt[He].uuidDecode(e)}function Do(e){return vt[He].uuidEncode(e)}function pc(e){try{return Mn(e).length===Ve}catch{}return !1}var Tt={};function M(e="id"){return Tt[e]==null&&(Tt[e]=0),`${e}-${Tt[e]++}`}var Eo=0;function dc(){return `id-${Eo++}`}var At=class extends R{constructor(){super(...arguments);this.id=q();}close(){this.dispose();}},ze=class extends At{constructor(){super(...arguments);this.isConnected=!0;}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:q()});}};function hc(){let e=new ze,t=new ze;return e.other=t,t.other=e,[e,t]}var Bn=class{async encode(t){return t}async decode(t){return t}},ie=class{async encode(t){return Ye(t)}async decode(t){return Ke(t)}},On=class{constructor(t){this.key=t;}async encode(t){let n=Ye(t);return await Sn(n,this.key)}async decode(t){let n=await In(t,this.key);return Ke(n)}};function $n(e,t,n={}){return new Proxy(n,{get:(r,o)=>o in r?r[o]:(...i)=>e(o,i,t)})}function Dc(e={}){let{name:t=M("hub"),encoder:n=new ie,retryAfter:r=1e3,ignoreUnhandled:o=!0,logLevel:i=!1}=e,s=k(t,i),a={},u,g=[],y,b={},w=()=>{clearTimeout(y);},L=async()=>{if(clearTimeout(y),u){if(u.isConnected)for(;g.length;){let m=g[0];try{u.postMessage(await n.encode(m)),g.shift();}catch(c){s.warn("postMessage",c);break}}g.length>0&&r>0&&(y=setTimeout(L,r));}},h=async m=>{s("enqueue postMessage",m),g.push(m),await L();},x=async m=>{u=m,u.on("connect",L),u.on("message",async c=>{s("onmessage",typeof c);let{name:p,args:d,id:l,result:f,error:v}=await n.decode(c.data);if(p){s(`name ${p} id ${l}`);try{if(a[p]==null)throw new Error(`handler for ${p} was not found`);let U=a[p](...d);I(U)&&(U=await U),s(`result ${U}`),l&&await h({id:l,result:U});}catch(U){let A=U instanceof Error?U:new Error(et(U));s.warn("execution error",A.name),await h({id:l,error:{message:A.message,stack:A.stack,name:A.name}});}}else if(l)if(s(`response for id=${l}: result=${f}, error=${v}`),b[l]==null)f===void 0?s(`skip response for ${l}`):s.warn(`no response hook for ${l}`);else {let[U,A]=b[l];if(U&&A)if(delete b[l],v){let E=new Error(v.message);E.stack=v.stack,E.name=v.name,s.warn("reject",E.name),A(E);}else s("resolve",f),U(f);}else o||s.warn("Unhandled message",c);}),await L();},T=async(m,c,p={})=>{let{timeout:d=5e3}=p,l=q();return await h({name:m,args:c,id:l}),Vt(new Promise((f,v)=>b[l]=[f,v]),d)};return e.channel&&x(e.channel),{dispose:w,connect:x,listen(m){Object.assign(a,m);},send(){return $n(T,{},{options(m){return $n(T,{...m})}})}}}var Ct=class extends R{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:r,encoder:o=new ie,channel:i,debug:s=!1}=n;this.channel=i,this.encoder=o,this.debug=s,this.name=r??this.channel.id??M("pubsub"),this.log=k(`${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 u=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${u?.event}, info=`,u):this.log(`channel message, event=${u?.event}`),u){let{event:g,args:y}=u;await this.emitSuper(g,...y);}});}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...r){return await super.emit(n,...r)}async emit(n,...r){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,r.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let o=await this.encoder.encode({event:n,args:r});return this.channel.postMessage(o),!0}catch(o){this.log.warn(`emit(${String(n)})`,o);}return !1}};function Pc(e){return new Ct(e)}var Fo=1;var _n=e=>e,So=_n;function jn(e,t,n=[]){let{post:r,on:o,serialize:i=_n,deserialize:s=So,log:a}=e,u=new Map;return o(async y=>{try{let b=s(y),[w,L,h,x]=b;if(w===1||w===2){let T,m;if(x!=null)try{let c=t[x];T=await c(...L);}catch(c){m=String(c);}else m="Method implementation missing";m&&a?.warn("error",b,m),w===1&&h&&r(i(m?[4,m,h]:[3,T,h]));}else if(h){let T=u.get(h);T!=null&&(w===4?T.reject(L):T.resolve(L)),u.delete(h);}}catch(b){a?.warn("Error on handling RPC data. Invalid?",b,y);}}),{post:r,serialize:i,rpcPromiseMap:u,proxyHandler:{get(y,b){let w=(...h)=>{r(i([2,h,null,b]));};if(e.onlyEvents||n.includes(b))return w.asEvent=w,w;let L=(...h)=>new Promise((x,T)=>{let m=Fo++;u.set(m,{resolve:x,reject:T}),r(i([1,h,m,b]));});return L.asEvent=w,L}}}}function Mc(e,t){let{eventNames:n=[]}=t,{proxyHandler:r}=jn(t,e,n);return new Proxy({},r)}function Bc(e){let t=[],n={},{proxyHandler:r}=jn(e,n);function o(){return new Proxy({},r)}return function(i,s=[]){return Object.assign(n,i??{}),t.push(...s),o()}}var he=class e extends R{constructor(n={}){super();this._isCancelled=!1;this._resetWhenFinished=!0;this._children=[];this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._resetWhenFinished=n.resetWhenFinished??!0,this.name=n.name??M("progress"),this.dispose.add(async()=>{for(let r of this._children)await r.dispose();await this.emit("progressDispose",this);});}update(){this.emit("progressChanged",this),this._isCancelled&&this._resetWhenFinished&&this.getTotalUnits()<=this.getCompletedUnits()&&this.reset();}reset(){if(this._isCancelled){this._isCancelled=!1;for(let n of this._children)n.reset();this.update();}}async cancel(){if(!this._isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel();this.update();}}addChild(n){n.on("progressDispose",()=>this.removeChild(n)),n.on("progressChanged",()=>this.update()),this._children.includes(n)||this._children.push(n),this.update();}createChildProgress(n){let r=new e(n);return this.addChild(r),r}removeChild(n){St(this._children,n),this.update();}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let r of this._children)n+=r.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let r of this._children)n+=r.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0&&this._children.length<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){if(this.isIndeterminate())return 0;let n=this.getCompletedUnits()/this.getTotalUnits();return Number.isNaN(n)&&(n=0),Math.min(1,Math.max(0,n))}getChildrenCount(){return this._children.length}setTotalUnits(n,r){this._totalUnits=n,r!=null&&(this._completedUnits=r),this.update();}incTotalUnits(n=1){this._totalUnits+=n,this.update();}setCompletetedUnits(n){this._completedUnits=n,this.update();}setCompleted(){this._completedUnits=this._totalUnits,this.update();}incCompletedUnits(n=1){this._completedUnits+=n,this.update();}toString(n=0){let r=`${" ".repeat(n)}${this.name}: ${this._completedUnits} of ${this._totalUnits} units, ${Math.floor(this.getFraction()*100)} %, cancel=${this._isCancelled}
14
- `;for(let o of this._children)r+=o.toString(n+1);return n===0?r.trim():r}};function Wc(e={}){let{maxParallel:t=3,name:n=M("pool"),idConflictResolution:r="memoize"}=e,o=new R,i=oe();i.add(c);let s=new he({name:n});s.on("progressCancelled",c);let a=0,u=0,g=0,y=0,b={};async function w(){if(a>0){let[l,f]=Nt();return o.once("didFinish",f),l}}async function L(){for(let l of Object.keys(b))b[l].state==="finished"&&(await b[l].progress.dispose(),delete b[l]);}function h(){o.emit("didFinish"),a=0,u=0,L(),s.reset();}function x(){let l=0,f=0;for(let{max:v,resolved:U,state:A}of Object.values(b))l+=v,f+=A==="finished"?v:Math.min(v,U);o.emit("didUpdate",a,u,l,f);}function T(){if(x(),a>0&&a===u&&h(),g>=t)return;let l=Object.values(b).filter(f=>f.state==="waiting");if(l.length>0){let f;for(let v of l)v.group!=null&&Object.values(b).some(U=>U.state==="running"&&U.id!==v.id&&U.group===v.group)||(f==null||v.priority<f.priority)&&(f=v);if(f!=null){let v=f.id,U=f.done;f.state="running",++g,o.emit("didStart",v);let A=E=>{f&&(f.result=E,f.state="finished",f.resolved=f.max,f.progress?.setCompleted()),--g,++u,T();};f.task(f).then(E=>{U(E),o.emit("didResolve",v,E),A(E);}).catch(E=>{U(),o.emit("didReject",v,E),A();});}}}function m(l){let f=b[l];f&&f.state==="waiting"&&(b[l].state="finished",++u,o.emit("didCancel",l),b[l].progress.dispose(),x());}function c(){Object.keys(b).forEach(m);}function p(l){return b[l]!=null}function d(l,f={}){let v,U=new Promise(S=>v=S),A=f.id??q();if(b[A]!=null){let S=f.idConflictResolution??r;if(S==="replace")m(A);else if(S==="memoize"||S==="prioritize"){let Et=b[A];return S==="prioritize"&&(Et.priority=++y),{id:A,promise:(async()=>{if(Et.state==="finished")return b[A].result})(),dispose:()=>m(A),cancel:()=>m(A)}}else throw new Error(`Pool task with id=${A} already exists!`)}let E=new he({name:A,totalUnits:f.max??1,completeUnits:f.resolved??0});return s.addChild(E),b[A]={id:A,task:l,priority:++y,group:f.group,state:"waiting",max:f.max??1,resolved:f.resolved??0,done:v,payload:f.payload,progress:E,setMax(S){E.setTotalUnits(S),b[A].max=S,x();},setResolved(S){E.setCompletetedUnits(S),b[A].resolved=S,x();},incResolved(S=1){E.incCompletedUnits(S),b[A].resolved+=S,x();}},++a,T(),{id:A,promise:U,dispose:()=>m(A),cancel:()=>m(A)}}return {events:o,cancel:m,cancelAll:c,hasById:p,progress:s,enqueue:d,dispose:i,waitFinishAll:w}}var Nn=class extends R{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:r=M("queue"),logLevel:o}=n;this.name=r,this.log=k(`zeed:queue:${r}`,o??9007199254740991);}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:r,task:o,resolve:i}=n;this.currentTask=o();let s;try{this.log.info(`start task ${r}`),s=await this.currentTask,this.log(`finished task ${r} with result =`,s);}catch(a){this.log.warn("Error performing task",a);}i(s),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,r={}){let{immediate:o=!1,name:i=M(this.name)}=r;return o?(this.log.info(`immediate execution ${i}`),await n()):(this.log(`enqueue ${i}`),new Promise(s=>{this.queue.push({name:i,task:n,resolve:s}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext();}))}async enqueueReentrant(n,r={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:r.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let r=this.queue.map(o=>o.resolve);this.queue=[],r.forEach(o=>o(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}};function el(e,t={}){let{delay:n=100,trailing:r=!0,leading:o=!0}=t,i=0,s=0,a=0,u;function g(){return i?(clearTimeout(i),i=void 0,!0):!1}function y(...b){let w=Date.now(),L=w-s,h=()=>{a=0,s=Date.now(),e.apply(this,b);};if(u=h,L>n||!i){o&&(L>n?h():++a);let x=L>n?n:n-L;g(),s=w,i=setTimeout(()=>{i=0,r&&(!o||a>0)&&u?.();},x);}else ++a;}return y.cancel=g,y.stop=()=>{g()&&u&&u();},y.immediate=async function(...w){g(),s=Date.now(),e.apply(this,w);},y.dispose=()=>y.stop(),y}function tl(e,t={}){let{delay:n=100}=t,r=0,o=!1,i;function s(){r&&(clearTimeout(r),r=0);}async function a(){try{if(s(),i!=null){let y=[...i];i=void 0,o=!0,await V(e(...y)),o=!1,i!=null&&(s(),r=setTimeout(a,n));}}catch{}}function u(...y){i=[...y],s(),o===!1&&(r=setTimeout(a,n));}async function g(...y){s(),i=[...y],await a();}return u.cancel=s,u.dispose=s,u.immediate=g,u}function Io(e,t=0){let n=setTimeout(e,t);return ()=>{n&&(clearTimeout(n),n=void 0);}}function ko(e,t){let n=setInterval(e,t);return ()=>{n&&(clearInterval(n),n=void 0);}}function Po(e,t,n=!1){let r,o=!1;async function i(s=!1){s&&await V(e()),o||(r=setTimeout(()=>i(!0),t));}return i(n),()=>{r&&(o=!0,clearInterval(r),r=void 0);}}function Ro(e,t,n,...r){return e==null?()=>{}:(e.on?e.on(t,n,...r):e.addEventListener&&e.addEventListener(t,n,...r),()=>{e.off?e.off(t,n,...r):e.removeEventListener&&e.removeEventListener(t,n,...r);})}function Mo(e,t,n,...r){return e==null?()=>{}:(e.on?e.once(t,n,...r):e.addEventListener&&e.addEventListener(t,n,...r),()=>{e.off?e.off(t,n,...r):e.removeEventListener&&e.removeEventListener(t,n,...r);})}function il(e){let t=oe(e);return Object.assign(t,{timeout:(n,r=0)=>t.add(Io(n,r)),interval:(n,r=0)=>t.add(ko(n,r)),intervalPause:(n,r=0)=>t.add(Po(n,r)),on:(n,r,o,...i)=>t.add(Ro(n,r,o,...i)),once:(n,r,o,...i)=>t.add(Mo(n,r,o,...i))})}function al(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")}var Ut={cache:"no-cache",redirect:"follow",headers:{}};function Bo(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,r]=t[1].split(":",2);return {url:e.replace(`${t[1]}@`,""),username:n,password:r}}}async function Vn(e,t={},n=fetch){try{_(t)&&(t=De({},...Y(t)));let r=Bo(String(e));r&&(e=r.url,t=De({},t,Oo(r.username,r.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let o=await n(String(e),t);if(o.status<400)return o;let i=k("zeed:network");try{i.warn(`Fetch of ${String(e)} returned status=${o.status}. Options:`,t),i.warn(`Response: ${await o.text()}`);}catch(s){i.error("Exception:",s);}}catch(r){k("zeed:network").error("fetchBasic",r);}}async function pl(e,t={},n=fetch){try{let r=await Vn(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(r)return await r.json()}catch(r){k("zeed:network").error("fetchJSON error:",r);}}async function dl(e,t={},n=fetch){try{let r=await Vn(e,[Ut,{method:"GET"},t],n);if(r)return await r.text()}catch(r){k("zeed:network").error("fetchHTML error:",r);}}function gl(e,t="POST"){return {method:t,...Ut,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:rn(e)}}function ml(e,t="POST"){return {method:t,...Ut,headers:{"Content-Type":"application/json; charset=utf-8"},body:P(e)}}function Oo(e,t){return {headers:{Authorization:`Basic ${le(`${e}:${t}`)}`}}}function Hn(){if(typeof window<"u")return window}function $o(){if(typeof navigator<"u")return navigator}function hl(){return Hn()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}function bl(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}){let t=$o(),n=Hn();return e.ios=t?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!t?.platform?.startsWith("Mac"),e.windows=!!t?.platform?.startsWith("Win"),e.beaker=n?.beaker!=null,e.electron=(t?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=n?.webkit?.messageHandlers!=null,e.pwa=t?.serviceWorker!=null,e.pwaInstalled=t?.standalone||n?.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=n&&"ontouchstart"in n||(t?.maxTouchPoints||0)>1||t?.msPointerEnabled&&n?.MSGesture||n?.DocumentTouch&&document instanceof DocumentTouch,e}function Dt(){return typeof window<"u"&&globalThis===window}function xl(e){Dt()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e);}var zn=class{constructor(t={}){this.store={};}setItem(t,n){this.store[t]=ot(n);}getItem(t){return ot(this.store[t])}removeItem(t){delete this.store[t];}clear(){this.store={};}allKeys(){return Object.keys(this.store)}};function vl(){}function Cl(e){let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(n),o=new Uint8Array(r.length);for(let i=0;i<r.length;++i)o[i]=r.charCodeAt(i);return o}function _o(e,t){let n="0123456789abcdef".split("");function r(m,c){let p=m[0],d=m[1],l=m[2],f=m[3];p=i(p,d,l,f,c[0],7,-680876936),f=i(f,p,d,l,c[1],12,-389564586),l=i(l,f,p,d,c[2],17,606105819),d=i(d,l,f,p,c[3],22,-1044525330),p=i(p,d,l,f,c[4],7,-176418897),f=i(f,p,d,l,c[5],12,1200080426),l=i(l,f,p,d,c[6],17,-1473231341),d=i(d,l,f,p,c[7],22,-45705983),p=i(p,d,l,f,c[8],7,1770035416),f=i(f,p,d,l,c[9],12,-1958414417),l=i(l,f,p,d,c[10],17,-42063),d=i(d,l,f,p,c[11],22,-1990404162),p=i(p,d,l,f,c[12],7,1804603682),f=i(f,p,d,l,c[13],12,-40341101),l=i(l,f,p,d,c[14],17,-1502002290),d=i(d,l,f,p,c[15],22,1236535329),p=s(p,d,l,f,c[1],5,-165796510),f=s(f,p,d,l,c[6],9,-1069501632),l=s(l,f,p,d,c[11],14,643717713),d=s(d,l,f,p,c[0],20,-373897302),p=s(p,d,l,f,c[5],5,-701558691),f=s(f,p,d,l,c[10],9,38016083),l=s(l,f,p,d,c[15],14,-660478335),d=s(d,l,f,p,c[4],20,-405537848),p=s(p,d,l,f,c[9],5,568446438),f=s(f,p,d,l,c[14],9,-1019803690),l=s(l,f,p,d,c[3],14,-187363961),d=s(d,l,f,p,c[8],20,1163531501),p=s(p,d,l,f,c[13],5,-1444681467),f=s(f,p,d,l,c[2],9,-51403784),l=s(l,f,p,d,c[7],14,1735328473),d=s(d,l,f,p,c[12],20,-1926607734),p=a(p,d,l,f,c[5],4,-378558),f=a(f,p,d,l,c[8],11,-2022574463),l=a(l,f,p,d,c[11],16,1839030562),d=a(d,l,f,p,c[14],23,-35309556),p=a(p,d,l,f,c[1],4,-1530992060),f=a(f,p,d,l,c[4],11,1272893353),l=a(l,f,p,d,c[7],16,-155497632),d=a(d,l,f,p,c[10],23,-1094730640),p=a(p,d,l,f,c[13],4,681279174),f=a(f,p,d,l,c[0],11,-358537222),l=a(l,f,p,d,c[3],16,-722521979),d=a(d,l,f,p,c[6],23,76029189),p=a(p,d,l,f,c[9],4,-640364487),f=a(f,p,d,l,c[12],11,-421815835),l=a(l,f,p,d,c[15],16,530742520),d=a(d,l,f,p,c[2],23,-995338651),p=u(p,d,l,f,c[0],6,-198630844),f=u(f,p,d,l,c[7],10,1126891415),l=u(l,f,p,d,c[14],15,-1416354905),d=u(d,l,f,p,c[5],21,-57434055),p=u(p,d,l,f,c[12],6,1700485571),f=u(f,p,d,l,c[3],10,-1894986606),l=u(l,f,p,d,c[10],15,-1051523),d=u(d,l,f,p,c[1],21,-2054922799),p=u(p,d,l,f,c[8],6,1873313359),f=u(f,p,d,l,c[15],10,-30611744),l=u(l,f,p,d,c[6],15,-1560198380),d=u(d,l,f,p,c[13],21,1309151649),p=u(p,d,l,f,c[4],6,-145523070),f=u(f,p,d,l,c[11],10,-1120210379),l=u(l,f,p,d,c[2],15,718787259),d=u(d,l,f,p,c[9],21,-343485551),m[0]=h(p,m[0]),m[1]=h(d,m[1]),m[2]=h(l,m[2]),m[3]=h(f,m[3]);}function o(m,c,p,d,l,f){return c=h(h(c,m),h(d,f)),h(c<<l|c>>>32-l,p)}function i(m,c,p,d,l,f,v){return o(c&p|~c&d,m,c,l,f,v)}function s(m,c,p,d,l,f,v){return o(c&d|p&~d,m,c,l,f,v)}function a(m,c,p,d,l,f,v){return o(c^p^d,m,c,l,f,v)}function u(m,c,p,d,l,f,v){return o(p^(c|~d),m,c,l,f,v)}function g(m){let c=m.length,p=[1732584193,-271733879,-1732584194,271733878],d;for(d=64;d<=m.length;d+=64)r(p,y(m.substring(d-64,d)));m=m.substring(d-64);let l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(d=0;d<m.length;d++)l[d>>2]|=m.charCodeAt(d)<<(d%4<<3);if(l[d>>2]|=128<<(d%4<<3),d>55)for(r(p,l),d=0;d<16;d++)l[d]=0;return l[14]=c*8,r(p,l),p}function y(m){let c=[],p;for(p=0;p<64;p+=4)c[p>>2]=m.charCodeAt(p)+(m.charCodeAt(p+1)<<8)+(m.charCodeAt(p+2)<<16)+(m.charCodeAt(p+3)<<24);return c}function b(m){let c="",p=0;for(;p<4;p++)c+=n[m>>p*8+4&15]+n[m>>p*8&15];return c}function w(m){for(let c=0;c<m.length;c++)m[c]=b(m[c]);return m.join("")}function L(m){return w(g(m))}function h(m,c){return m+c&4294967295}t=t||{};let x=[];t={size:t.size||"50",rating:t.rating||"g",secure:t.secure||location.protocol==="https:",backup:t.backup||""},e=e.trim().toLowerCase();let T=t.secure?"https://secure.gravatar.com/avatar/":"http://www.gravatar.com/avatar/";return t.rating&&x.push(`r=${t.rating}`),t.backup&&x.push(`d=${encodeURIComponent(t.backup)}`),t.size&&x.push(`s=${t.size}`),`${T+L(e)}?${x.join("&")}`}function Dl(e,t=""){try{return _o(e,{size:256,backup:"monsterid",secure:!0})}catch{return t}}var Gn=class{constructor(t){this.pretty=!1;this.name=t.name??"zeed",this.prefix=`${t.name}$`,this.objectToString=t.objectToString??(n=>this.pretty?P(n,null,2):P(n)),this.objectFromString=t.objectFromString??(n=>{try{return JSON.parse(n)}catch{}});}setItem(t,n){let r=this.objectToString(n);localStorage.setItem(`${this.prefix}${t}`,r);}getItem(t){let n=localStorage.getItem(`${this.prefix}${t}`);if(n!=null)return this.objectFromString(n)}removeItem(t){localStorage.removeItem(`${this.prefix}${t}`);}clear(){Object.keys(localStorage).filter(t=>t.startsWith(this.prefix)).forEach(t=>{localStorage.removeItem(t);});}allKeys(){let t=this.prefix.length;return Object.keys(localStorage).filter(n=>n.startsWith(this.prefix)).map(n=>n.substr(t))}};function Ge(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&Number.parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function qn(e={}){let t='font-family: "JetBrains Mono", Menlo; font-size: 11px;',n=`${t}`,r=`font-weight: 600; ${t}`,o=Ge(),i={},s=z(),{filter:a=void 0,level:u=void 0,colors:g=!0,padding:y=16,time:b=!0}=e,w=O(a),L=K(u);return h=>{if(!L(h.level)||!w(h.name))return;let x=b?`+${ct(z()-s)}`:"",T=h.name||"",m=i[T||""];m==null&&(m={color:Se(T)},i[T]=m);let c;switch(y>0&&(T=T.padEnd(16," ")),g&&o?(c=[`%c${T}%c %s %c${x}`],c.push(`color:${m.color}; ${r}`),c.push(n),c.push(h.messages?.[0]??""),c.push(`color:${m.color};`),c.push(...h.messages.slice(1))):c=[T,...h.messages,`+${x}`],c=c.map(p=>p instanceof Uint8Array?`<Uint8Array size=${p.length}>`:p),h.level){case 1:e.levelHelper&&(c[0]=`I|* ${c[0]}`),console.info(...$(...c));break;case 2:e.levelHelper&&(c[0]=`W|** ${c[0]}`),console.warn(...$(...c));break;case 3:e.levelHelper&&(c[0]=`E|*** ${c[0]}`),console.error(...$(...c));break;default:e.levelHelper&&(c[0]=`D| ${c[0]}`),console.debug(...$(...c));break}}}function Wn(e={}){let t=e.filter??localStorage.zeed??localStorage.debug,n='font-family: "JetBrains Mono", Menlo; font-size: 11px;',r=`${n}`,o=`font-weight: 600; ${n}`,i=Ge(),s=()=>{};return function a(u="",g){let y,b=O(t),w=pe(g??-1);if(b(u)&&w!==9007199254740991){let x=function(T,m){return w<=T?m:()=>{}};let h=[];if(i){let T=Se(u);h.push(`%c${u.padEnd(16," ")}%c %s`),h.push(`color:${T}; ${o}`),h.push(r);}else h.push(`[${u}] %s`);y=x(0,console.debug.bind(console,...h)),y.debug=x(0,console.debug.bind(console,...h)),y.info=x(1,console.info.bind(console,...h)),y.warn=x(2,console.warn.bind(console,...h)),y.error=x(3,console.error.bind(console,...h)),y.fatal=x(4,(...T)=>{throw y.error(...T),new Error(`${T.map(String).join(" ")}`)}),y.assert=x(4,(T,...m)=>{(T==null||typeof T=="number"&&Number.isNaN(T)||!T)&&y.fatal(...m);});}else y=()=>{},y.debug=s,y.info=s,y.warn=s,y.error=s,y.assert=s,y.fatal=s;return y.extend=h=>a(u?`${u}:${h}`:h),y.label=u,y}}function jl(e={}){console.info("activateConsoleDebug is activated by default in browsers");}function jo(e,t){return ut(n=>{Dt()&&!st(localStorage.getItem("zeed"))&&(n.setHandlers([qn()]),n.setFactory(Wn({})));})(e,t)}
13
+ `&&(r.push(o),o=[]);}return r}function _u(e,t={}){let n=po(e,t),r=n[0];return n.slice(1).map(o=>Object.fromEntries(o.map((i,s)=>[r[s],i])))}function go(e){let t;if(typeof e=="function"?t=e():I(e)?t=e:typeof e.dispose=="function"?t=e.dispose():I(e.dispose)&&(t=e.dispose),I(t))return t}function oe(e){let t=e;t!=null&&(Ue(t)?t={name:t}:"debug"in t&&"label"in t&&(t={name:t.label,log:t}));let n=t?.name,r=t?.log??P("zeed:dispose"),o=[];function i(g){if(g!=null&&o.includes(g)){Ze(o,b=>b!==g);let y=go(g);if(I(y))return y}}function s(g){if(g!=null)return o.unshift(g),()=>i(g)}function a(g=!1){n&&r.debug(`dispose "${n}": ${o.length} entries`);let y=[];for(;o.length>0;){let b=o[0],w=i(b);if(I(w)){if(g)throw new Error(`Async disposable found: ${b} -> ${w}`);y.push(w);}}if(y.length>0)return Promise.all(y)}function u(){a(!0);}return Object.assign(a,{add:s,remove:i,track:s,untrack:i,dispose:a,disposeSync:u,sync:u,exec:a,getSize(){return o.length},isDisposed(){return o.length<=0}})}function Gu(e={}){let{mode:t="fifo"}=e,n=[],r=async(i=!1)=>{for(;n.length>0;){let s=n[0];if(Ze(n,a=>a!==s),typeof s=="function"){let a=s();if(I(a)){if(i)throw new Error(`Expected sync only function, but found async: ${s}`);await a;}}else if(I(s)){if(i)throw new Error(`Expected sync only function, but found async: ${s}`);await s;}else throw new Error(`Unhandled disposable: ${s}`)}};return Object.assign(r,{add:i=>{t==="lifo"?n.unshift(i):n.push(i);},exec:r,getSize(){return n.length}})}function Ju(){let e=!0;return (t,n)=>{let r=!1;if(e){e=!1;try{t(),r=!0;}finally{e=!0;}}else n!==void 0&&n();return r}}function Zu(){let e=!0;return async(t,n)=>{let r=!1;if(e){e=!1;try{let o=t();I(o)&&await o,r=!0;}finally{e=!0;}}else if(n!==void 0){let o=n();I(o)&&await o;}return r}}var R=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this._logEmitter=P("zeed:emitter","warn");this.dispose=oe();this.call=new Proxy({},{get:(t,n)=>async(...r)=>await this.emit(n,...r)});}async emit(t,...n){let r=!1;try{let o=this.subscribers[t]||[];if(this._logEmitter.debug("emit",this?.constructor?.name,t,...n,o),this.subscribersOnAny.forEach(i=>i(t,...n)),o.length>0){let i=o.map(({fn:s})=>{try{return V(s(...n))}catch(a){this._logEmitter.warn("emit warning:",a);}return null}).filter(s=>s!=null);r=!0,await Promise.all(i);}}catch(o){this._logEmitter.error("emit exception",o);}return r}onAny(t){this.subscribersOnAny.push(t);}on(t,n,r={}){let{priority:o=0}=r,i=this.subscribers[t]||[],s=i.length,a={fn:n,priority:o};if(s<=0)this.subscribers[t]=[a];else {let u=s;for(let g=i.length-1;g>=0;g--){let y=i[g];if(o<=y.priority)break;u-=1;}i.splice(u,0,a);}return ()=>{this.off(t,n);}}onCall(t){for(let[n,r]of Object.entries(t))this.on(n,r);}once(t,n){let r=async(...o)=>(this.off(t,r),await V(n(...o)));return this.on(t,r),()=>{this.off(t,n);}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(r=>n&&r.fn!==n),this}removeAllListeners(){return this.subscribers={},this}};function nc(){let e=W().emitter;return e||(e=new R,W().emitter=e),e}function rc(e,t){let n=Math.round(F()*100),r=[],o,i=(a,u)=>{let g={key:a,obj:u};r.push(g),o&&o();};return t?e.on?e.on(t,a=>{i(t,a);}):e.addEventListener?e.addEventListener(t,a=>{i(t,a);}):e.log.error(n,"Cannot listen to key"):e.onAny?e.onAny((a,u)=>{i(a,u);}):e.log.error(n,"cannot listen to all for",e),(a,u=!0)=>new Promise((g,y)=>{a||(a=t,a||r.length&&(a=r[0].key)),o=()=>{for(;r.length>0;){let b=r.shift();if(b.key===a)o=void 0,g(b.obj);else {if(u)continue;y(new Error(`Expected ${a}, but found ${b.key} with value=${b.obj}`));}break}},o();})}var Ve=16;function Lt(){return re(Ve)}function mo(e=Lt()){return Qe(e,22)}function yo(e){return Qe(e,22)}function ho(e){return _t(e,Ve)}function bo(e=Lt()){return Xe(e,26)}function xo(e){return Xe(e,26)}function wo(e){return $t(e,Ve)}var To="10000000-1000-4000-8000-100000000000",Lo=function(){return typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID():To.replace(/[018]/g,e=>(e^re(1)[0]&15>>e/4).toString(16))};function vo(e){let t=Rt(e);return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}function Ao(e){return Mt(e.replaceAll("-",""))}var Pn=16e11;function Co(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let r=0;r<t.length;r++){let o=e&255;t[n-r]=o,e=(e-o)/256;}return t}function kn(){let e=z()-Pn;return new Uint8Array([...Co(e),...re(10)])}function cc(){return Do(kn())}function lc(e){return Uo(Mn(e))}function Uo(e){return new Date(Pn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}function fc(){return new Uint32Array(re(4))[0]}var vt={base62:{uuid:mo,uuidDecode:ho,uuidEncode:yo},base32:{uuid:bo,uuidDecode:wo,uuidEncode:xo},uuidv4:{uuid:Lo,uuidDecode:Ao,uuidEncode:vo}},He="base62",Rn=!1;function pc(e,t=!1){He=e,Rn=t;}function q(){return vt[He].uuid(Rn?kn():Lt())}function Mn(e){return vt[He].uuidDecode(e)}function Do(e){return vt[He].uuidEncode(e)}function dc(e){try{return Mn(e).length===Ve}catch{}return !1}var Tt={};function M(e="id"){return Tt[e]==null&&(Tt[e]=0),`${e}-${Tt[e]++}`}var Eo=0;function gc(){return `id-${Eo++}`}var At=class extends R{constructor(){super(...arguments);this.id=q();}close(){this.dispose();}},ze=class extends At{constructor(){super(...arguments);this.isConnected=!0;}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:q()});}};function bc(){let e=new ze,t=new ze;return e.other=t,t.other=e,[e,t]}var Bn=class{async encode(t){return t}async decode(t){return t}},ie=class{async encode(t){return Ye(t)}async decode(t){return Ke(t)}},On=class{constructor(t){this.key=t;}async encode(t){let n=Ye(t);return await Sn(n,this.key)}async decode(t){let n=await In(t,this.key);return Ke(n)}};function $n(e,t,n={}){return new Proxy(n,{get:(r,o)=>o in r?r[o]:(...i)=>e(o,i,t)})}function Ec(e={}){let{name:t=M("hub"),encoder:n=new ie,retryAfter:r=1e3,ignoreUnhandled:o=!0,logLevel:i=!1}=e,s=P(t,i),a={},u,g=[],y,b={},w=()=>{clearTimeout(y);},L=async()=>{if(clearTimeout(y),u){if(u.isConnected)for(;g.length;){let m=g[0];try{u.postMessage(await n.encode(m)),g.shift();}catch(c){s.warn("postMessage",c);break}}g.length>0&&r>0&&(y=setTimeout(L,r));}},h=async m=>{s("enqueue postMessage",m),g.push(m),await L();},x=async m=>{u=m,u.on("connect",L),u.on("message",async c=>{s("onmessage",typeof c);let{name:p,args:d,id:l,result:f,error:v}=await n.decode(c.data);if(p){s(`name ${p} id ${l}`);try{if(a[p]==null)throw new Error(`handler for ${p} was not found`);let U=a[p](...d);I(U)&&(U=await U),s(`result ${U}`),l&&await h({id:l,result:U});}catch(U){let A=U instanceof Error?U:new Error(et(U));s.warn("execution error",A.name),await h({id:l,error:{message:A.message,stack:A.stack,name:A.name}});}}else if(l)if(s(`response for id=${l}: result=${f}, error=${v}`),b[l]==null)f===void 0?s(`skip response for ${l}`):s.warn(`no response hook for ${l}`);else {let[U,A]=b[l];if(U&&A)if(delete b[l],v){let E=new Error(v.message);E.stack=v.stack,E.name=v.name,s.warn("reject",E.name),A(E);}else s("resolve",f),U(f);}else o||s.warn("Unhandled message",c);}),await L();},T=async(m,c,p={})=>{let{timeout:d=5e3}=p,l=q();return await h({name:m,args:c,id:l}),Vt(new Promise((f,v)=>b[l]=[f,v]),d)};return e.channel&&x(e.channel),{dispose:w,connect:x,listen(m){Object.assign(a,m);},send(){return $n(T,{},{options(m){return $n(T,{...m})}})}}}var Ct=class extends R{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:r,encoder:o=new ie,channel:i,debug:s=!1}=n;this.channel=i,this.encoder=o,this.debug=s,this.name=r??this.channel.id??M("pubsub"),this.log=P(`${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 u=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${u?.event}, info=`,u):this.log(`channel message, event=${u?.event}`),u){let{event:g,args:y}=u;await this.emitSuper(g,...y);}});}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...r){return await super.emit(n,...r)}async emit(n,...r){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,r.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let o=await this.encoder.encode({event:n,args:r});return this.channel.postMessage(o),!0}catch(o){this.log.warn(`emit(${String(n)})`,o);}return !1}};function Rc(e){return new Ct(e)}var Fo=1;var _n=e=>e,So=_n;function jn(e,t,n=[]){let{post:r,on:o,serialize:i=_n,deserialize:s=So,log:a}=e,u=new Map;return o(async y=>{try{let b=s(y),[w,L,h,x]=b;if(w===1||w===2){let T,m;if(x!=null)try{let c=t[x];T=await c(...L);}catch(c){m=String(c);}else m="Method implementation missing";m&&a?.warn("error",b,m),w===1&&h&&r(i(m?[4,m,h]:[3,T,h]));}else if(h){let T=u.get(h);T!=null&&(w===4?T.reject(L):T.resolve(L)),u.delete(h);}}catch(b){a?.warn("Error on handling RPC data. Invalid?",b,y);}}),{post:r,serialize:i,rpcPromiseMap:u,proxyHandler:{get(y,b){let w=(...h)=>{r(i([2,h,null,b]));};if(e.onlyEvents||n.includes(b))return w.asEvent=w,w;let L=(...h)=>new Promise((x,T)=>{let m=Fo++;u.set(m,{resolve:x,reject:T}),r(i([1,h,m,b]));});return L.asEvent=w,L}}}}function Bc(e,t){let{eventNames:n=[]}=t,{proxyHandler:r}=jn(t,e,n);return new Proxy({},r)}function Oc(e){let t=[],n={},{proxyHandler:r}=jn(e,n);function o(){return new Proxy({},r)}return function(i,s=[]){return Object.assign(n,i??{}),t.push(...s),o()}}var he=class e extends R{constructor(n={}){super();this._isCancelled=!1;this._resetWhenFinished=!0;this._children=[];this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._resetWhenFinished=n.resetWhenFinished??!0,this.name=n.name??M("progress"),this.dispose.add(async()=>{for(let r of this._children)await r.dispose();await this.emit("progressDispose",this);});}update(){this.emit("progressChanged",this),this._isCancelled&&this._resetWhenFinished&&this.getTotalUnits()<=this.getCompletedUnits()&&this.reset();}reset(){if(this._isCancelled){this._isCancelled=!1;for(let n of this._children)n.reset();this.update();}}async cancel(){if(!this._isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel();this.update();}}addChild(n){n.on("progressDispose",()=>this.removeChild(n)),n.on("progressChanged",()=>this.update()),this._children.includes(n)||this._children.push(n),this.update();}createChildProgress(n){let r=new e(n);return this.addChild(r),r}removeChild(n){St(this._children,n),this.update();}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let r of this._children)n+=r.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let r of this._children)n+=r.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0&&this._children.length<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){if(this.isIndeterminate())return 0;let n=this.getCompletedUnits()/this.getTotalUnits();return Number.isNaN(n)&&(n=0),Math.min(1,Math.max(0,n))}getChildrenCount(){return this._children.length}setTotalUnits(n,r){this._totalUnits=n,r!=null&&(this._completedUnits=r),this.update();}incTotalUnits(n=1){this._totalUnits+=n,this.update();}setCompletetedUnits(n){this._completedUnits=n,this.update();}setCompleted(){this._completedUnits=this._totalUnits,this.update();}incCompletedUnits(n=1){this._completedUnits+=n,this.update();}toString(n=0){let r=`${" ".repeat(n)}${this.name}: ${this._completedUnits} of ${this._totalUnits} units, ${Math.floor(this.getFraction()*100)} %, cancel=${this._isCancelled}
14
+ `;for(let o of this._children)r+=o.toString(n+1);return n===0?r.trim():r}};function Jc(e={}){let{maxParallel:t=3,name:n=M("pool"),idConflictResolution:r="memoize"}=e,o=new R,i=oe();i.add(c);let s=new he({name:n});s.on("progressCancelled",c);let a=0,u=0,g=0,y=0,b={};async function w(){if(a>0){let[l,f]=Nt();return o.once("didFinish",f),l}}async function L(){for(let l of Object.keys(b))b[l].state==="finished"&&(await b[l].progress.dispose(),delete b[l]);}function h(){o.emit("didFinish"),a=0,u=0,L(),s.reset();}function x(){let l=0,f=0;for(let{max:v,resolved:U,state:A}of Object.values(b))l+=v,f+=A==="finished"?v:Math.min(v,U);o.emit("didUpdate",a,u,l,f);}function T(){if(x(),a>0&&a===u&&h(),g>=t)return;let l=Object.values(b).filter(f=>f.state==="waiting");if(l.length>0){let f;for(let v of l)v.group!=null&&Object.values(b).some(U=>U.state==="running"&&U.id!==v.id&&U.group===v.group)||(f==null||v.priority<f.priority)&&(f=v);if(f!=null){let v=f.id,U=f.done;f.state="running",++g,o.emit("didStart",v);let A=E=>{f&&(f.result=E,f.state="finished",f.resolved=f.max,f.progress?.setCompleted()),--g,++u,T();};f.task(f).then(E=>{U(E),o.emit("didResolve",v,E),A(E);}).catch(E=>{U(),o.emit("didReject",v,E),A();});}}}function m(l){let f=b[l];f&&f.state==="waiting"&&(b[l].state="finished",++u,o.emit("didCancel",l),b[l].progress.dispose(),x());}function c(){Object.keys(b).forEach(m);}function p(l){return b[l]!=null}function d(l,f={}){let v,U=new Promise(S=>v=S),A=f.id??q();if(b[A]!=null){let S=f.idConflictResolution??r;if(S==="replace")m(A);else if(S==="memoize"||S==="prioritize"){let Et=b[A];return S==="prioritize"&&(Et.priority=++y),{id:A,promise:(async()=>{if(Et.state==="finished")return b[A].result})(),dispose:()=>m(A),cancel:()=>m(A)}}else throw new Error(`Pool task with id=${A} already exists!`)}let E=new he({name:A,totalUnits:f.max??1,completeUnits:f.resolved??0});return s.addChild(E),b[A]={id:A,task:l,priority:++y,group:f.group,state:"waiting",max:f.max??1,resolved:f.resolved??0,done:v,payload:f.payload,progress:E,setMax(S){E.setTotalUnits(S),b[A].max=S,x();},setResolved(S){E.setCompletetedUnits(S),b[A].resolved=S,x();},incResolved(S=1){E.incCompletedUnits(S),b[A].resolved+=S,x();}},++a,T(),{id:A,promise:U,dispose:()=>m(A),cancel:()=>m(A)}}return {events:o,cancel:m,cancelAll:c,hasById:p,progress:s,enqueue:d,dispose:i,waitFinishAll:w}}var Nn=class extends R{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:r=M("queue"),logLevel:o}=n;this.name=r,this.log=P(`zeed:queue:${r}`,o??9007199254740991);}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:r,task:o,resolve:i}=n;this.currentTask=o();let s;try{this.log.info(`start task ${r}`),s=await this.currentTask,this.log(`finished task ${r} with result =`,s);}catch(a){this.log.warn("Error performing task",a);}i(s),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,r={}){let{immediate:o=!1,name:i=M(this.name)}=r;return o?(this.log.info(`immediate execution ${i}`),await n()):(this.log(`enqueue ${i}`),new Promise(s=>{this.queue.push({name:i,task:n,resolve:s}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext();}))}async enqueueReentrant(n,r={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:r.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let r=this.queue.map(o=>o.resolve);this.queue=[],r.forEach(o=>o(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}};function tl(e,t={}){let{delay:n=100,trailing:r=!0,leading:o=!0}=t,i=0,s=0,a=0,u;function g(){return i?(clearTimeout(i),i=void 0,!0):!1}function y(...b){let w=Date.now(),L=w-s,h=()=>{a=0,s=Date.now(),e.apply(this,b);};if(u=h,L>n||!i){o&&(L>n?h():++a);let x=L>n?n:n-L;g(),s=w,i=setTimeout(()=>{i=0,r&&(!o||a>0)&&u?.();},x);}else ++a;}return y.cancel=g,y.stop=()=>{g()&&u&&u();},y.immediate=async function(...w){g(),s=Date.now(),e.apply(this,w);},y.dispose=()=>y.stop(),y}function nl(e,t={}){let{delay:n=100}=t,r=0,o=!1,i;function s(){r&&(clearTimeout(r),r=0);}async function a(){try{if(s(),i!=null){let y=[...i];i=void 0,o=!0,await V(e(...y)),o=!1,i!=null&&(s(),r=setTimeout(a,n));}}catch{}}function u(...y){i=[...y],s(),o===!1&&(r=setTimeout(a,n));}async function g(...y){s(),i=[...y],await a();}return u.cancel=s,u.dispose=s,u.immediate=g,u}function Io(e,t=0){let n=setTimeout(e,t);return ()=>{n&&(clearTimeout(n),n=void 0);}}function Po(e,t){let n=setInterval(e,t);return ()=>{n&&(clearInterval(n),n=void 0);}}function ko(e,t,n=!1){let r,o=!1;async function i(s=!1){s&&await V(e()),o||(r=setTimeout(()=>i(!0),t));}return i(n),()=>{r&&(o=!0,clearInterval(r),r=void 0);}}function Ro(e,t,n,...r){return e==null?()=>{}:(e.on?e.on(t,n,...r):e.addEventListener&&e.addEventListener(t,n,...r),()=>{e.off?e.off(t,n,...r):e.removeEventListener&&e.removeEventListener(t,n,...r);})}function Mo(e,t,n,...r){return e==null?()=>{}:(e.on?e.once(t,n,...r):e.addEventListener&&e.addEventListener(t,n,...r),()=>{e.off?e.off(t,n,...r):e.removeEventListener&&e.removeEventListener(t,n,...r);})}function sl(e){let t=oe(e);return Object.assign(t,{timeout:(n,r=0)=>t.add(Io(n,r)),interval:(n,r=0)=>t.add(Po(n,r)),intervalPause:(n,r=0)=>t.add(ko(n,r)),on:(n,r,o,...i)=>t.add(Ro(n,r,o,...i)),once:(n,r,o,...i)=>t.add(Mo(n,r,o,...i))})}function ul(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")}var Ut={cache:"no-cache",redirect:"follow",headers:{}};function Bo(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,r]=t[1].split(":",2);return {url:e.replace(`${t[1]}@`,""),username:n,password:r}}}async function Vn(e,t={},n=fetch){try{_(t)&&(t=De({},...Y(t)));let r=Bo(String(e));r&&(e=r.url,t=De({},t,Oo(r.username,r.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let o=await n(String(e),t);if(o.status<400)return o;let i=P("zeed:network");try{i.warn(`Fetch of ${String(e)} returned status=${o.status}. Options:`,t),i.warn(`Response: ${await o.text()}`);}catch(s){i.error("Exception:",s);}}catch(r){P("zeed:network").error("fetchBasic",r);}}async function dl(e,t={},n=fetch){try{let r=await Vn(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(r)return await r.json()}catch(r){P("zeed:network").error("fetchJSON error:",r);}}async function gl(e,t={},n=fetch){try{let r=await Vn(e,[Ut,{method:"GET"},t],n);if(r)return await r.text()}catch(r){P("zeed:network").error("fetchHTML error:",r);}}function ml(e,t="POST"){return {method:t,...Ut,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:rn(e)}}function yl(e,t="POST"){return {method:t,...Ut,headers:{"Content-Type":"application/json; charset=utf-8"},body:k(e)}}function Oo(e,t){return {headers:{Authorization:`Basic ${le(`${e}:${t}`)}`}}}function Hn(){if(typeof window<"u")return window}function $o(){if(typeof navigator<"u")return navigator}function bl(){return Hn()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}function xl(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}){let t=$o(),n=Hn();return e.ios=t?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!t?.platform?.startsWith("Mac"),e.windows=!!t?.platform?.startsWith("Win"),e.beaker=n?.beaker!=null,e.electron=(t?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=n?.webkit?.messageHandlers!=null,e.pwa=t?.serviceWorker!=null,e.pwaInstalled=t?.standalone||n?.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=n&&"ontouchstart"in n||(t?.maxTouchPoints||0)>1||t?.msPointerEnabled&&n?.MSGesture||n?.DocumentTouch&&document instanceof DocumentTouch,e}function Dt(){return typeof window<"u"&&globalThis===window}function wl(e){Dt()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e);}var zn=class{constructor(t={}){this.store={};}setItem(t,n){this.store[t]=ot(n);}getItem(t){return ot(this.store[t])}removeItem(t){delete this.store[t];}clear(){this.store={};}allKeys(){return Object.keys(this.store)}};function Al(){}function Ul(e){let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(n),o=new Uint8Array(r.length);for(let i=0;i<r.length;++i)o[i]=r.charCodeAt(i);return o}function _o(e,t){let n="0123456789abcdef".split("");function r(m,c){let p=m[0],d=m[1],l=m[2],f=m[3];p=i(p,d,l,f,c[0],7,-680876936),f=i(f,p,d,l,c[1],12,-389564586),l=i(l,f,p,d,c[2],17,606105819),d=i(d,l,f,p,c[3],22,-1044525330),p=i(p,d,l,f,c[4],7,-176418897),f=i(f,p,d,l,c[5],12,1200080426),l=i(l,f,p,d,c[6],17,-1473231341),d=i(d,l,f,p,c[7],22,-45705983),p=i(p,d,l,f,c[8],7,1770035416),f=i(f,p,d,l,c[9],12,-1958414417),l=i(l,f,p,d,c[10],17,-42063),d=i(d,l,f,p,c[11],22,-1990404162),p=i(p,d,l,f,c[12],7,1804603682),f=i(f,p,d,l,c[13],12,-40341101),l=i(l,f,p,d,c[14],17,-1502002290),d=i(d,l,f,p,c[15],22,1236535329),p=s(p,d,l,f,c[1],5,-165796510),f=s(f,p,d,l,c[6],9,-1069501632),l=s(l,f,p,d,c[11],14,643717713),d=s(d,l,f,p,c[0],20,-373897302),p=s(p,d,l,f,c[5],5,-701558691),f=s(f,p,d,l,c[10],9,38016083),l=s(l,f,p,d,c[15],14,-660478335),d=s(d,l,f,p,c[4],20,-405537848),p=s(p,d,l,f,c[9],5,568446438),f=s(f,p,d,l,c[14],9,-1019803690),l=s(l,f,p,d,c[3],14,-187363961),d=s(d,l,f,p,c[8],20,1163531501),p=s(p,d,l,f,c[13],5,-1444681467),f=s(f,p,d,l,c[2],9,-51403784),l=s(l,f,p,d,c[7],14,1735328473),d=s(d,l,f,p,c[12],20,-1926607734),p=a(p,d,l,f,c[5],4,-378558),f=a(f,p,d,l,c[8],11,-2022574463),l=a(l,f,p,d,c[11],16,1839030562),d=a(d,l,f,p,c[14],23,-35309556),p=a(p,d,l,f,c[1],4,-1530992060),f=a(f,p,d,l,c[4],11,1272893353),l=a(l,f,p,d,c[7],16,-155497632),d=a(d,l,f,p,c[10],23,-1094730640),p=a(p,d,l,f,c[13],4,681279174),f=a(f,p,d,l,c[0],11,-358537222),l=a(l,f,p,d,c[3],16,-722521979),d=a(d,l,f,p,c[6],23,76029189),p=a(p,d,l,f,c[9],4,-640364487),f=a(f,p,d,l,c[12],11,-421815835),l=a(l,f,p,d,c[15],16,530742520),d=a(d,l,f,p,c[2],23,-995338651),p=u(p,d,l,f,c[0],6,-198630844),f=u(f,p,d,l,c[7],10,1126891415),l=u(l,f,p,d,c[14],15,-1416354905),d=u(d,l,f,p,c[5],21,-57434055),p=u(p,d,l,f,c[12],6,1700485571),f=u(f,p,d,l,c[3],10,-1894986606),l=u(l,f,p,d,c[10],15,-1051523),d=u(d,l,f,p,c[1],21,-2054922799),p=u(p,d,l,f,c[8],6,1873313359),f=u(f,p,d,l,c[15],10,-30611744),l=u(l,f,p,d,c[6],15,-1560198380),d=u(d,l,f,p,c[13],21,1309151649),p=u(p,d,l,f,c[4],6,-145523070),f=u(f,p,d,l,c[11],10,-1120210379),l=u(l,f,p,d,c[2],15,718787259),d=u(d,l,f,p,c[9],21,-343485551),m[0]=h(p,m[0]),m[1]=h(d,m[1]),m[2]=h(l,m[2]),m[3]=h(f,m[3]);}function o(m,c,p,d,l,f){return c=h(h(c,m),h(d,f)),h(c<<l|c>>>32-l,p)}function i(m,c,p,d,l,f,v){return o(c&p|~c&d,m,c,l,f,v)}function s(m,c,p,d,l,f,v){return o(c&d|p&~d,m,c,l,f,v)}function a(m,c,p,d,l,f,v){return o(c^p^d,m,c,l,f,v)}function u(m,c,p,d,l,f,v){return o(p^(c|~d),m,c,l,f,v)}function g(m){let c=m.length,p=[1732584193,-271733879,-1732584194,271733878],d;for(d=64;d<=m.length;d+=64)r(p,y(m.substring(d-64,d)));m=m.substring(d-64);let l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(d=0;d<m.length;d++)l[d>>2]|=m.charCodeAt(d)<<(d%4<<3);if(l[d>>2]|=128<<(d%4<<3),d>55)for(r(p,l),d=0;d<16;d++)l[d]=0;return l[14]=c*8,r(p,l),p}function y(m){let c=[],p;for(p=0;p<64;p+=4)c[p>>2]=m.charCodeAt(p)+(m.charCodeAt(p+1)<<8)+(m.charCodeAt(p+2)<<16)+(m.charCodeAt(p+3)<<24);return c}function b(m){let c="",p=0;for(;p<4;p++)c+=n[m>>p*8+4&15]+n[m>>p*8&15];return c}function w(m){for(let c=0;c<m.length;c++)m[c]=b(m[c]);return m.join("")}function L(m){return w(g(m))}function h(m,c){return m+c&4294967295}t=t||{};let x=[];t={size:t.size||"50",rating:t.rating||"g",secure:t.secure||location.protocol==="https:",backup:t.backup||""},e=e.trim().toLowerCase();let T=t.secure?"https://secure.gravatar.com/avatar/":"http://www.gravatar.com/avatar/";return t.rating&&x.push(`r=${t.rating}`),t.backup&&x.push(`d=${encodeURIComponent(t.backup)}`),t.size&&x.push(`s=${t.size}`),`${T+L(e)}?${x.join("&")}`}function El(e,t=""){try{return _o(e,{size:256,backup:"monsterid",secure:!0})}catch{return t}}var Gn=class{constructor(t){this.pretty=!1;this.name=t.name??"zeed",this.prefix=`${t.name}$`,this.objectToString=t.objectToString??(n=>this.pretty?k(n,null,2):k(n)),this.objectFromString=t.objectFromString??(n=>{try{return JSON.parse(n)}catch{}});}setItem(t,n){let r=this.objectToString(n);localStorage.setItem(`${this.prefix}${t}`,r);}getItem(t){let n=localStorage.getItem(`${this.prefix}${t}`);if(n!=null)return this.objectFromString(n)}removeItem(t){localStorage.removeItem(`${this.prefix}${t}`);}clear(){Object.keys(localStorage).filter(t=>t.startsWith(this.prefix)).forEach(t=>{localStorage.removeItem(t);});}allKeys(){let t=this.prefix.length;return Object.keys(localStorage).filter(n=>n.startsWith(this.prefix)).map(n=>n.substr(t))}};function Ge(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&Number.parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function qn(e={}){let t='font-family: "JetBrains Mono", Menlo; font-size: 11px;',n=`${t}`,r=`font-weight: 600; ${t}`,o=Ge(),i={},s=z(),{filter:a=void 0,level:u=void 0,colors:g=!0,padding:y=16,time:b=!0}=e,w=O(a),L=K(u);return h=>{if(!L(h.level)||!w(h.name))return;let x=b?`+${ct(z()-s)}`:"",T=h.name||"",m=i[T||""];m==null&&(m={color:Se(T)},i[T]=m);let c;switch(y>0&&(T=T.padEnd(16," ")),g&&o?(c=[`%c${T}%c %s %c${x}`],c.push(`color:${m.color}; ${r}`),c.push(n),c.push(h.messages?.[0]??""),c.push(`color:${m.color};`),c.push(...h.messages.slice(1))):c=[T,...h.messages,`+${x}`],c=c.map(p=>p instanceof Uint8Array?`<Uint8Array size=${p.length}>`:p),h.level){case 1:e.levelHelper&&(c[0]=`I|* ${c[0]}`),console.info(...$(...c));break;case 2:e.levelHelper&&(c[0]=`W|** ${c[0]}`),console.warn(...$(...c));break;case 3:e.levelHelper&&(c[0]=`E|*** ${c[0]}`),console.error(...$(...c));break;default:e.levelHelper&&(c[0]=`D| ${c[0]}`),console.debug(...$(...c));break}}}function Wn(e={}){let t=e.filter??localStorage.zeed??localStorage.debug,n='font-family: "JetBrains Mono", Menlo; font-size: 11px;',r=`${n}`,o=`font-weight: 600; ${n}`,i=Ge(),s=()=>{};return function a(u="",g){let y,b=O(t),w=pe(g??-1);if(b(u)&&w!==9007199254740991){let x=function(T,m){return w<=T?m:()=>{}};let h=[];if(i){let T=Se(u);h.push(`%c${u.padEnd(16," ")}%c %s`),h.push(`color:${T}; ${o}`),h.push(r);}else h.push(`[${u}] %s`);y=x(0,console.debug.bind(console,...h)),y.debug=x(0,console.debug.bind(console,...h)),y.info=x(1,console.info.bind(console,...h)),y.warn=x(2,console.warn.bind(console,...h)),y.error=x(3,console.error.bind(console,...h)),y.fatal=x(4,(...T)=>{throw y.error(...T),new Error(`${T.map(String).join(" ")}`)}),y.assert=x(4,(T,...m)=>{(T==null||typeof T=="number"&&Number.isNaN(T)||!T)&&y.fatal(...m);});}else y=()=>{},y.debug=s,y.info=s,y.warn=s,y.error=s,y.assert=s,y.fatal=s;return y.extend=h=>a(u?`${u}:${h}`:h),y.label=u,y}}function Nl(e={}){console.info("activateConsoleDebug is activated by default in browsers");}function jo(e,t){return ut(n=>{Dt()&&!st(localStorage.getItem("zeed"))&&(n.setHandlers([qn()]),n.setFactory(Wn({})));})(e,t)}
15
15
 
16
16
  exports.BinaryEncoder = Un;
17
17
  exports.CRYPTO_DEFAULT_ALG = wt;
@@ -22,7 +22,7 @@ exports.Channel = At;
22
22
  exports.CryptoEncoder = On;
23
23
  exports.DAY_MS = Ht;
24
24
  exports.Day = H;
25
- exports.DefaultLogger = k;
25
+ exports.DefaultLogger = P;
26
26
  exports.Emitter = R;
27
27
  exports.JsonEncoder = ie;
28
28
  exports.LocalChannel = ze;
@@ -40,41 +40,42 @@ exports.LoggerBrowserHandler = qn;
40
40
  exports.LoggerBrowserSetupDebugFactory = Wn;
41
41
  exports.LoggerConsoleHandler = Fe;
42
42
  exports.LoggerContext = cn;
43
- exports.LoggerMemoryHandler = su;
43
+ exports.LoggerMemoryHandler = au;
44
44
  exports.MemStorage = zn;
45
45
  exports.NoopEncoder = Bn;
46
46
  exports.Progress = he;
47
47
  exports.PubSub = Ct;
48
48
  exports.SerialQueue = Nn;
49
- exports.Uint8ArrayToDataUri = Qi;
49
+ exports.Uint8ArrayToDataUri = es;
50
50
  exports.Uint8ArrayToHexDump = Ot;
51
51
  exports.Uint8ArrayToJson = Ke;
52
- exports.Uint8ArrayToString = Pt;
53
- exports.Uint8ArrayToWords = Oa;
52
+ exports.Uint8ArrayToString = kt;
53
+ exports.Uint8ArrayToWords = $a;
54
54
  exports.XRX = un;
55
55
  exports._decodeUtf8Polyfill = sr;
56
56
  exports._encodeUtf8Polyfill = ir;
57
57
  exports._useBase = ur;
58
- exports.activateConsoleDebug = jl;
59
- exports.arrayAvg = gi;
60
- exports.arrayBatches = mi;
58
+ exports.activateConsoleDebug = Nl;
59
+ exports.arrayAvg = mi;
60
+ exports.arrayBatches = yi;
61
61
  exports.arrayEmptyInPlace = si;
62
62
  exports.arrayFilterInPlace = Ze;
63
63
  exports.arrayFlatten = Y;
64
64
  exports.arrayIntersection = er;
65
65
  exports.arrayIsEqual = nr;
66
- exports.arrayMax = fi;
67
- exports.arrayMin = pi;
66
+ exports.arrayMax = pi;
67
+ exports.arrayMin = di;
68
68
  exports.arrayMinus = Xn;
69
- exports.arrayRandomElement = li;
69
+ exports.arrayRandomElement = fi;
70
70
  exports.arrayRemoveElement = St;
71
+ exports.arraySetArrayInPlace = ai;
71
72
  exports.arraySetElement = oi;
72
- exports.arrayShuffle = ui;
73
- exports.arrayShuffleForce = ci;
73
+ exports.arrayShuffle = ci;
74
+ exports.arrayShuffleForce = li;
74
75
  exports.arrayShuffleInPlace = It;
75
76
  exports.arraySorted = tr;
76
- exports.arraySortedNumbers = ai;
77
- exports.arraySum = di;
77
+ exports.arraySortedNumbers = ui;
78
+ exports.arraySum = gi;
78
79
  exports.arraySymmetricDifference = ri;
79
80
  exports.arrayToggleInPlace = ii;
80
81
  exports.arrayUnion = Qn;
@@ -83,106 +84,106 @@ exports.assert = Zr;
83
84
  exports.assertCondition = dn;
84
85
  exports.avg = Wo;
85
86
  exports.between = qo;
86
- exports.bitfield = Fu;
87
+ exports.bitfield = Su;
87
88
  exports.blobToArrayBuffer = co;
88
- exports.blobToDataUri = Xi;
89
- exports.blobToUint8Array = Su;
89
+ exports.blobToDataUri = Qi;
90
+ exports.blobToUint8Array = Iu;
90
91
  exports.browserSelectColorByName = Se;
91
92
  exports.browserSupportsColors = Ge;
92
- exports.cloneJsonObject = Ps;
93
+ exports.cloneJsonObject = Rs;
93
94
  exports.cloneObject = ot;
94
95
  exports.cmp = We;
95
96
  exports.composeOrderby = Xo;
96
- exports.createArray = yi;
97
- exports.createBinaryStreamDecoder = Eu;
98
- exports.createBinaryStreamEncoder = Du;
99
- exports.createLocalChannelPair = hc;
97
+ exports.createArray = hi;
98
+ exports.createBinaryStreamDecoder = Fu;
99
+ exports.createBinaryStreamEncoder = Eu;
100
+ exports.createLocalChannelPair = bc;
100
101
  exports.createPromise = Nt;
101
102
  exports.createPromiseProxy = $n;
102
103
  exports.csvParse = po;
103
- exports.csvParseToObjects = $u;
104
- exports.csvStringify = Ou;
105
- exports.dataUriToBlob = Ki;
106
- exports.dataUriToMimeType = Yi;
107
- exports.dataUriToUint8Array = Zi;
108
- exports.dateStringToDays = Ts;
109
- exports.day = ws;
104
+ exports.csvParseToObjects = _u;
105
+ exports.csvStringify = $u;
106
+ exports.dataUriToBlob = Xi;
107
+ exports.dataUriToMimeType = Ki;
108
+ exports.dataUriToUint8Array = Yi;
109
+ exports.dateStringToDays = Ls;
110
+ exports.day = Ts;
110
111
  exports.dayDay = gr;
111
- exports.dayDiff = ds;
112
- exports.dayFromAny = us;
112
+ exports.dayDiff = gs;
113
+ exports.dayFromAny = cs;
113
114
  exports.dayFromDate = Ae;
114
- exports.dayFromDateGMT = ls;
115
+ exports.dayFromDateGMT = fs;
115
116
  exports.dayFromParts = rt;
116
117
  exports.dayFromString = Wt;
117
118
  exports.dayFromTimestamp = mr;
118
119
  exports.dayFromToday = qt;
119
- exports.dayIterator = ms;
120
+ exports.dayIterator = ys;
120
121
  exports.dayMonth = zt;
121
- exports.dayMonthStart = fs;
122
+ exports.dayMonthStart = ps;
122
123
  exports.dayOffset = ve;
123
- exports.dayRange = gs;
124
+ exports.dayRange = ms;
124
125
  exports.dayToDate = Gt;
125
- exports.dayToDateGMT = cs;
126
- exports.dayToParts = as;
126
+ exports.dayToDateGMT = ls;
127
+ exports.dayToParts = us;
127
128
  exports.dayToString = yr;
128
129
  exports.dayToTimestamp = tt;
129
130
  exports.dayYear = nt;
130
- exports.dayYearStart = ps;
131
- exports.debounce = tl;
131
+ exports.dayYearStart = ds;
132
+ exports.debounce = nl;
132
133
  exports.deburr = nn;
133
134
  exports.decimal = hr;
134
- exports.decimalCentsPart = Cs;
135
- exports.decimalFromCents = vs;
136
- exports.decimalToCents = As;
137
- exports.decodeBase16 = Ei;
135
+ exports.decimalCentsPart = Us;
136
+ exports.decimalFromCents = As;
137
+ exports.decimalToCents = Cs;
138
+ exports.decodeBase16 = Fi;
138
139
  exports.decodeBase32 = $t;
139
- exports.decodeBase58 = Si;
140
+ exports.decodeBase58 = Ii;
140
141
  exports.decodeBase62 = _t;
141
- exports.decodeJson = Uu;
142
+ exports.decodeJson = Du;
142
143
  exports.decrypt = In;
143
144
  exports.deepEqual = br;
144
145
  exports.deepMerge = De;
145
146
  exports.deepStripUndefinedInPlace = xr;
146
- exports.deriveKeyPbkdf2 = Ru;
147
- exports.detect = bl;
147
+ exports.deriveKeyPbkdf2 = Mu;
148
+ exports.detect = xl;
148
149
  exports.diffObjects = wr;
149
- exports.digest = Pu;
150
- exports.duration = nu;
150
+ exports.digest = Ru;
151
+ exports.duration = ru;
151
152
  exports.empty = ks;
152
- exports.encodeBase16 = Di;
153
+ exports.encodeBase16 = Ei;
153
154
  exports.encodeBase32 = Xe;
154
- exports.encodeBase58 = Fi;
155
+ exports.encodeBase58 = Si;
155
156
  exports.encodeBase62 = Qe;
156
- exports.encodeJson = Cu;
157
+ exports.encodeJson = Uu;
157
158
  exports.encodeQuery = rn;
158
159
  exports.encrypt = Sn;
159
160
  exports.endSortWeight = tn;
160
- exports.ensureKey = Es;
161
- exports.ensureKeyAsync = Fs;
161
+ exports.ensureKey = Fs;
162
+ exports.ensureKeyAsync = Ss;
162
163
  exports.equalBinary = Bt;
163
164
  exports.escapeHTML = Kt;
164
165
  exports.escapeRegExp = Ee;
165
- exports.estimateSizeForBase = Ii;
166
+ exports.estimateSizeForBase = Pi;
166
167
  exports.fatal = Jr;
167
168
  exports.fetchBasic = Vn;
168
- exports.fetchJson = pl;
169
+ exports.fetchJson = dl;
169
170
  exports.fetchOptionsBasicAuth = Oo;
170
- exports.fetchOptionsFormURLEncoded = gl;
171
- exports.fetchOptionsJson = ml;
172
- exports.fetchText = dl;
173
- exports.first = Ss;
174
- exports.fixBrokenUth8String = qi;
175
- exports.forEachDay = bs;
176
- exports.forTimes = Bs;
171
+ exports.fetchOptionsFormURLEncoded = ml;
172
+ exports.fetchOptionsJson = yl;
173
+ exports.fetchText = gl;
174
+ exports.first = Is;
175
+ exports.fixBrokenUth8String = Wi;
176
+ exports.forEachDay = xs;
177
+ exports.forTimes = Os;
177
178
  exports.formatMessages = dr;
178
179
  exports.formatMilliseconds = ct;
179
180
  exports.fromBase64 = Te;
180
- exports.fromBase64String = Ai;
181
- exports.fromCamelCase = Mi;
181
+ exports.fromBase64String = Ci;
182
+ exports.fromCamelCase = Bi;
182
183
  exports.fromHex = Mt;
183
- exports.getGlobal = hl;
184
+ exports.getGlobal = bl;
184
185
  exports.getGlobalContext = W;
185
- exports.getGlobalEmitter = tc;
186
+ exports.getGlobalEmitter = nc;
186
187
  exports.getGlobalLogger = ut;
187
188
  exports.getGlobalLoggerIfExists = ln;
188
189
  exports.getNamespaceFilterString = Gr;
@@ -192,20 +193,20 @@ exports.getSecureRandom = Zn;
192
193
  exports.getSecureRandomIfPossible = F;
193
194
  exports.getTimestamp = z;
194
195
  exports.getWindow = Hn;
195
- exports.gravatarURLByEmail = Dl;
196
- exports.immediate = ns;
196
+ exports.gravatarURLByEmail = El;
197
+ exports.immediate = rs;
197
198
  exports.isArray = _;
198
199
  exports.isBoolean = Yt;
199
200
  exports.isBrowser = Dt;
200
201
  exports.isEmpty = st;
201
202
  exports.isEven = Qt;
202
203
  exports.isHalf = fe;
203
- exports.isInteger = js;
204
- exports.isLocalHost = al;
205
- exports.isNotEmpty = qs;
206
- exports.isNotNull = Gs;
207
- exports.isNull = Hs;
208
- exports.isNullOrUndefined = Vs;
204
+ exports.isInteger = Ns;
205
+ exports.isLocalHost = ul;
206
+ exports.isNotEmpty = Ws;
207
+ exports.isNotNull = qs;
208
+ exports.isNull = zs;
209
+ exports.isNullOrUndefined = Hs;
209
210
  exports.isNumber = Zt;
210
211
  exports.isObject = B;
211
212
  exports.isPrime = Zo;
@@ -213,113 +214,113 @@ exports.isPrimeRX = Jo;
213
214
  exports.isPrimitive = it;
214
215
  exports.isPromise = I;
215
216
  exports.isRecord = Ce;
216
- exports.isRecordPlain = _s;
217
- exports.isSafeInteger = Ns;
217
+ exports.isRecordPlain = js;
218
+ exports.isSafeInteger = Vs;
218
219
  exports.isString = Ue;
219
- exports.isTimeout = os;
220
- exports.isTruthy = Js;
221
- exports.isUint8Array = zs;
222
- exports.isValue = Ws;
220
+ exports.isTimeout = is;
221
+ exports.isTruthy = Zs;
222
+ exports.isUint8Array = Gs;
223
+ exports.isValue = Js;
223
224
  exports.joinLogStrings = $;
224
- exports.joinToUint8Array = Li;
225
- exports.jsonStringify = xi;
226
- exports.jsonStringifySafe = P;
227
- exports.jsonStringifySorted = bi;
225
+ exports.joinToUint8Array = vi;
226
+ exports.jsonStringify = wi;
227
+ exports.jsonStringifySafe = k;
228
+ exports.jsonStringifySorted = xi;
228
229
  exports.jsonToUint8Array = Ye;
229
- exports.last = Is;
230
- exports.lazyListener = nc;
230
+ exports.last = Ps;
231
+ exports.lazyListener = rc;
231
232
  exports.linkifyPlainText = ka;
232
- exports.listDistinctUnion = ra;
233
- exports.listGroupBy = na;
234
- exports.listOfKey = oa;
235
- exports.listQuery = ta;
236
- exports.memoize = Rs;
237
- exports.memoizeAsync = Ms;
238
- exports.moveSortWeight = Ca;
239
- exports.noop = vl;
240
- exports.objectIsEmpty = ca;
241
- exports.objectMap = aa;
242
- exports.objectMergeDisposable = ua;
233
+ exports.listDistinctUnion = oa;
234
+ exports.listGroupBy = ra;
235
+ exports.listOfKey = ia;
236
+ exports.listQuery = na;
237
+ exports.memoize = Ms;
238
+ exports.memoizeAsync = Bs;
239
+ exports.moveSortWeight = Ua;
240
+ exports.noop = Al;
241
+ exports.objectIsEmpty = la;
242
+ exports.objectMap = ua;
243
+ exports.objectMergeDisposable = ca;
243
244
  exports.parseBasicAuth = Bo;
244
- exports.parseDate = tu;
245
+ exports.parseDate = nu;
245
246
  exports.parseLogLevel = pe;
246
247
  exports.parseOrderby = Kn;
247
- exports.parseQuery = Pa;
248
+ exports.parseQuery = Ra;
248
249
  exports.promisify = V;
249
- exports.qid = dc;
250
+ exports.qid = gc;
250
251
  exports.randomBoolean = Ho;
251
252
  exports.randomFloat = Go;
252
253
  exports.randomInt = zo;
253
254
  exports.randomUint8Array = re;
254
- exports.regExpEscape = ja;
255
+ exports.regExpEscape = Na;
255
256
  exports.regExpString = zr;
256
- exports.renderMessages = Gi;
257
- exports.roundDown = ya;
258
- exports.roundHalfAwayFromZero = xa;
259
- exports.roundHalfDown = wa;
260
- exports.roundHalfEven = Ta;
261
- exports.roundHalfOdd = ba;
262
- exports.roundHalfTowardsZero = La;
263
- exports.roundHalfUp = ha;
264
- exports.roundUp = ma;
257
+ exports.renderMessages = qi;
258
+ exports.roundDown = ha;
259
+ exports.roundHalfAwayFromZero = wa;
260
+ exports.roundHalfDown = Ta;
261
+ exports.roundHalfEven = La;
262
+ exports.roundHalfOdd = xa;
263
+ exports.roundHalfTowardsZero = va;
264
+ exports.roundHalfUp = ba;
265
+ exports.roundUp = ya;
265
266
  exports.seededRandom = Yo;
266
- exports.setUuidDefaultEncoding = fc;
267
+ exports.setUuidDefaultEncoding = pc;
267
268
  exports.size = Jt;
268
- exports.sleep = ts;
269
+ exports.sleep = ns;
269
270
  exports.sortedItems = Dr;
270
271
  exports.sortedOrderby = Qo;
271
272
  exports.startSortWeight = en;
272
- exports.stringToBoolean = $i;
273
- exports.stringToFloat = ji;
274
- exports.stringToInteger = _i;
275
- exports.stringToUInt8Array = kt;
276
- exports.suid = uc;
277
- exports.suidBytes = Pn;
273
+ exports.stringToBoolean = _i;
274
+ exports.stringToFloat = Ni;
275
+ exports.stringToInteger = ji;
276
+ exports.stringToUInt8Array = Pt;
277
+ exports.suid = cc;
278
+ exports.suidBytes = kn;
278
279
  exports.suidBytesDate = Uo;
279
- exports.suidDate = cc;
280
+ exports.suidDate = lc;
280
281
  exports.sum = Yn;
281
- exports.throttle = el;
282
- exports.timeout = rs;
282
+ exports.throttle = tl;
283
+ exports.timeout = os;
283
284
  exports.toBase64 = le;
284
- exports.toBase64Url = vi;
285
- exports.toBool = zi;
286
- exports.toCamelCase = Pi;
285
+ exports.toBase64Url = Ai;
286
+ exports.toBool = Gi;
287
+ exports.toCamelCase = Ri;
287
288
  exports.toCapitalize = cr;
288
- exports.toCapitalizeWords = Ri;
289
- exports.toFloat = Ni;
289
+ exports.toCapitalizeWords = Mi;
290
+ exports.toFloat = Vi;
290
291
  exports.toHex = Rt;
291
292
  exports.toHumanReadableUrl = Nr;
292
- exports.toInt = Vi;
293
- exports.toString = Hi;
293
+ exports.toInt = Hi;
294
+ exports.toString = zi;
294
295
  exports.toUint8Array = C;
295
- exports.toValidFilename = da;
296
- exports.today = xs;
296
+ exports.toValidFilename = ga;
297
+ exports.today = ws;
297
298
  exports.tryTimeout = Vt;
298
299
  exports.uname = M;
299
- exports.unescapeHTML = Qs;
300
- exports.urlBase64ToUint8Array = Cl;
301
- exports.useAsyncMutex = Ju;
300
+ exports.unescapeHTML = ea;
301
+ exports.urlBase64ToUint8Array = Ul;
302
+ exports.useAsyncMutex = Zu;
302
303
  exports.useBase = N;
303
- exports.useDefer = zu;
304
+ exports.useDefer = Gu;
304
305
  exports.useDispose = oe;
305
- exports.useDisposeWithUtils = il;
306
+ exports.useDisposeWithUtils = sl;
306
307
  exports.useEventListener = Ro;
307
308
  exports.useEventListenerOnce = Mo;
308
- exports.useExitHandler = xl;
309
- exports.useInterval = ko;
310
- exports.useIntervalPause = Po;
309
+ exports.useExitHandler = wl;
310
+ exports.useInterval = Po;
311
+ exports.useIntervalPause = ko;
311
312
  exports.useLevelFilter = K;
312
- exports.useMessageHub = Dc;
313
- exports.useMutex = Wu;
313
+ exports.useMessageHub = Ec;
314
+ exports.useMutex = Ju;
314
315
  exports.useNamespaceFilter = O;
315
- exports.usePool = Wc;
316
- exports.usePubSub = Pc;
317
- exports.useRPC = Mc;
318
- exports.useRPCHub = Bc;
319
- exports.useSorted = Ea;
316
+ exports.usePool = Jc;
317
+ exports.usePubSub = Rc;
318
+ exports.useRPC = Bc;
319
+ exports.useRPCHub = Oc;
320
+ exports.useSorted = Fa;
320
321
  exports.useTimeout = Io;
321
322
  exports.uuid = q;
322
- exports.uuid32bit = lc;
323
+ exports.uuid32bit = fc;
323
324
  exports.uuidB32 = bo;
324
325
  exports.uuidB62 = mo;
325
326
  exports.uuidBytes = Lt;
@@ -331,13 +332,13 @@ exports.uuidEncode = Do;
331
332
  exports.uuidEncodeB32 = xo;
332
333
  exports.uuidEncodeB62 = yo;
333
334
  exports.uuidEncodeV4 = vo;
334
- exports.uuidIsValid = pc;
335
+ exports.uuidIsValid = dc;
335
336
  exports.uuidv4 = Lo;
336
337
  exports.valueToBoolean = lr;
337
338
  exports.valueToFloat = pr;
338
339
  exports.valueToInteger = fr;
339
340
  exports.valueToString = et;
340
- exports.waitOn = is;
341
- exports.wordsToUint8Array = $a;
341
+ exports.waitOn = ss;
342
+ exports.wordsToUint8Array = _a;
342
343
  //# sourceMappingURL=out.js.map
343
344
  //# sourceMappingURL=index.browser.cjs.map