zeed 0.13.8 → 0.13.10

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.
@@ -2,7 +2,7 @@ function On(){if(typeof self<"u")return self;if(typeof window<"u")return window;
2
2
  `)}var Yn={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 Kn(e){let t=Yn[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 c=0;c<n.length;c++)n[c]=255;for(let c=0;c<t.length;c++){let f=t.charAt(c),l=f.charCodeAt(0);if(n[l]!==255)throw new TypeError(`${f} is ambiguous`);n[l]=c;}let r=t.length,o=t.charAt(0),i=Math.log(r)/Math.log(256),a=Math.log(256)/Math.log(r);function s(c,f=-1){let l=A(c);if(l.byteLength===0)return "";let d=0,g=0,p=l.byteLength;for(;g!==p&&l[g]===0;)g++;let y=(p-g)*a+1>>>0,b=new Uint8Array(y);for(;g!==p;){let E=l[g],B=0;for(let h=y-1;(E!==0||B<d)&&h!==-1;h--,B++)E+=256*b[h]>>>0,b[h]=E%r>>>0,E=E/r>>>0;if(E!==0)throw new Error("Non-zero carry");d=B,g++;}let x=y-d;for(;x!==y&&b[x]===0;)x++;let U="";for(;x<y;++x)U+=t.charAt(b[x]);return f>0?U.padStart(f,o):U}function u(c,f=-1){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;c=c.replace(/\s+/gi,"");let l=0,d=0;for(;c[l]===o;)l++;let g=(c.length-l)*i+1>>>0,p=new Uint8Array(g);for(;c[l];){let b=n[c.charCodeAt(l)];if(b===255)throw new Error(`Unsupported character "${c[l]}"`);let x=0;for(let U=g-1;(b!==0||x<d)&&U!==-1;U--,x++)b+=r*p[U]>>>0,p[U]=b%256>>>0,b=b/256>>>0;if(b!==0)throw new Error("Non-zero carry");d=x,l++;}let y=g-d;for(;y!==g&&p[y]===0;)y++;return f>0?new Uint8Array([...new Uint8Array(f-p.length+y),...p.slice(y)]):p.slice(y)}return {encode:s,decode:u}}var de;function $(e){de==null&&(de=new Map);function t(){let o=de.get(e);return o==null&&(o=Kn(e),de.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 Ze(e,t=-1){return $(32).encode(e,t)}function St(e,t=-1){return $(32).decode(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"),t)}function fi(e,t=-1){return $(16).encode(e,t)}function pi(e,t=-1){return $(16).decode(e,t)}function di(e,t=-1){return $(58).encode(e,t)}function gi(e,t=-1){return $(58).decode(e,t)}function Ye(e,t=-1){return $(62).encode(e,t)}function Mt(e,t=-1){return $(62).decode(e,t)}function yi(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}function hi(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 Xn(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}function xi(e){return e.replace(/\w\S*/g,Xn)}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 kt=["1","true","yes","y","on"];function Li(e,t=!1){return e==null||typeof e!="string"?t:kt.includes(String(e).trim().toLowerCase())}function Ai(e,t=0){return e==null||typeof e!="string"?t:Number.parseInt(e.trim(),10)??t}function Ci(e,t=0){return e==null||typeof e!="string"?t:Number.parseFloat(e.trim())??t}function Qn(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:kt.includes(String(e).trim().toLowerCase())}function er(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 tr(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 Ke(e,t=""){return e==null?t:String(e)??t}var Ui=tr,vi=er,Di=Ke,Ei=Qn;function nr(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
3
  ${It(o)}
4
4
  `;if(o instanceof Error)return n?`${o.name||"Error"}: ${o.message}
5
- ${o.stack}`:`${o.name||"Error"}: ${o.message}`;try{return r?JSON.stringify(o,null,2):JSON.stringify(o)}catch{}}return String(o)})}function Fi(e,t={}){return nr(e,t).join(" ")}function Pi(e){try{return decodeURIComponent(escape(e))}catch{}return e}function Si(e){if(e.startsWith("data:"))return pe(e.split(",",2)[1])}function Mi(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([pe(n)],{type:t})}}async function Bi(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${te(t)}`}function Oi(e,t="application/octet-stream"){return `data:${t},${te(e)}`}var Bt=864e5;function Qe(e){return Math.floor(e/1e4)}function Ot(e){return Math.floor(e/100%100)}function rr(e){return Math.floor(e%100)}function $i(e){return [Qe(e),Ot(e),rr(e)]}function _t(e,t=!1){return t?new Date(`${ir(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}function $t(){return ye(new Date)}function Vi(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return Vt(e);if(Array.isArray(e)&&e.length===3){let[n,r,o]=e;return et(n,r,o)}else if(e instanceof Date)return ye(e,t)}function Ni(e){return _t(e,!0)}function ye(e,t=!1){return t?Vt(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}function ji(e){return ye(e,!0)}function Xe(e,t=!0){return _t(e,t).getTime()}function or(e,t=!0){return ye(new Date(e),t)}function ir(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}function et(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}function Vt(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}function Hi(e,t=0){let n=Qe(e),r=Ot(e);return t!==0&&(r+=t,n+=Math.floor((r-1)/12),r=Math.floor((r-1)%12)+1,r===0&&(r=12)),et(n,r,1)}function zi(e,t=0){let n=Qe(e);return et(n+t,1,1)}function ge(e,t){return or(Xe(e)+t*864e5)}function Gi(e,t){return Math.round((Xe(t)-Xe(e))/864e5)}function qi(e,t){let n=[];for(t==null&&(t=$t()),e<0&&(e=ge(t,e+1));e<=t;)n.push(e),e=ge(e,1);return n}function*Wi(e,t){let n=[];for(t==null&&(t=$t()),e<0&&(e=ge(t,e+1));e<=t;)yield e,e=ge(e,1);return n}function Nt(){let e,t;return [new Promise((r,o)=>{e=r,t=o;}),e,t]}async function Zi(e){return new Promise(t=>setTimeout(t,e))}async function Yi(){return new Promise(e=>setTimeout(e,0))}async function Ki(e,t,n="timeoutReached"){return new Promise(async(r,o)=>{let i=!1,a=setTimeout(()=>{i=!0,r(n);},t);try{let s=await e;clearTimeout(a),i||r(s);}catch(s){clearTimeout(a),i||o(s);}})}function Xi(e){return e==="timeoutReached"||e?.name==="Timeout reached"}async function jt(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 a=await e;clearTimeout(i),o||n(a);}catch(a){clearTimeout(i),o||r(a);}})}function Qi(e,t,n=1e3){return new Promise((r,o)=>{let i=u=>{s&&(clearTimeout(s),a(),r(u));},a=()=>{s=null,e.off?e.off(t,i):e.removeEventListener&&e.removeEventListener(t,i);},s=setTimeout(()=>{a(),o(new Error("Did not response in time"));},n);e.on?e.on(t,i):e.addEventListener&&e.addEventListener(t,i);})}function P(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}function V(e){return Promise.resolve(e)}var N=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 ns(e,t,n){let r=N.from(e),o=N.from(t);for(;r&&o&&r?.days<=o?.days;){let i=n(r);P(i)&&await i,r=r.dayOffset(1);}}function rs(){return new N}function os(e){return new N(e)}function is(e){return N.fromDate(new Date(e)).days}function sr(e,t=2){return +(+e).toFixed(t)}function as(e,t=2){return +(+e/10**t).toFixed(t)}function us(e,t=2){return Math.round(+e*10**t)}function cs(e,t=2){return t*(sr(e,t)%1)}function ps(e,t,n){let r=e[t];return r===void 0&&(r=n(t,e),e[t]=r),r}async function ds(e,t,n){let r=e[t];return r===void 0&&(r=await n(t,e),e[t]=r),r}function Ht(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}function gs(e){return e!=null&&e.length>0?e[0]:void 0}function ys(e){return e!=null&&e.length>0?e[e.length-1]:void 0}function ms(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 tt(e){return Object(e)!==e?e:JSON.parse(S(e))}function hs(e){return Object(e)!==e?e:JSON.parse(S(e))}function xs(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=S(n);if(t.has(r))return t.get(r);let o=await e(...n);return t.set(r,o),o}}function Ts(e,t){let n=[];for(let r=0;r<e;r++)n.push(t(r,e));return n}function k(e){return e!=null&&typeof e=="object"}function nt(e){return Object(e)!==e}function O(e){return Array.isArray(e)}function me(e){return k(e)&&!O(e)}function As(e){return e?.constructor===Object}function he(e){return typeof e=="string"}function zt(e){return typeof e=="number"&&!Number.isNaN(e)}function Cs(e){return zt(e)&&Number.isInteger(e)}function Us(e){return zt(e)&&Number.isSafeInteger(e)}function Gt(e){return typeof e=="boolean"}function vs(e){return e==null}function Ds(e){return e==null}function Es(e){return k(e)&&e.constructor.name==="Uint8Array"}function Fs(e){return e!=null}function ar(e){return e==null||e===""||k(e)&&Ht(e)<=0}function Ps(e){return !ar(e)}function Rs(e){return e!=null&&e!==!1&&e!==!0}function Is(e){return e!=null&&e!==!1&&e!==0&&e!==""}function ur(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(nt(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(!ur(o,i,n))return !1}for(let r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return !1;return !0}function cr(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(nt(e)||t.add(e),me(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}cr(e[n],t);}}else if(O(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}function xe(e,...t){for(let n of t)k(e)||(e={}),!(n==null||!k(n))&&Object.keys(n).forEach(r=>{let o=e[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat(i):k(o)&&k(i)?e[r]=xe(Object.assign({},o),i):e[r]=i;});return e}function lr(e,t,n={cyclesFix:!0},r=[]){let o=[],i=Array.isArray(e);for(let s in e){let u=e[s],c=i?+s:s;if(!(s in t)){o.push({type:"del",path:[c]});continue}let f=t[s],l=typeof u=="object"&&typeof f=="object";if(u&&f&&l&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!r.includes(u))){let d=lr(u,f,n,n.cyclesFix?r.concat([u]):[]);o=[...o,...d.map(g=>(g.path.unshift(c),g))];}else u!==f&&!(l&&(Number.isNaN(u)?`${u}`==`${f}`:+u==+f))&&o.push({path:[c],type:"upd",value:f});}let a=Array.isArray(t);for(let s in t)s in e||o.push({type:"new",path:[a?+s:s],value:t[s]});return o}function qt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")}function Os(e){return e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&")}function $s(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 Vs(e,t){return e.reduce((n,r)=>{let o=String(r[t]);return (n[o]=n[o]||[]).push(r),n},{})}function Ns(e,t){return Array.from(e.reduce((n,r)=>n.add(r[t]),new Set))}function js(e,t){return e.map(n=>n[t])}function Gs(e,t){return k(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>{let o=t(n,r);return O(o)&&o.length===2?o:[n,o]}).filter(n=>n!=null)):{}}function qs(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}function Ws(e){return Object.keys(e).length<=0}var fr=/[\\\-\[\]\/{}()*+?.^$|]/g;function be(e){return e?e instanceof RegExp?e.source:e.replace(fr,"\\$&"):""}var pr=100,dr=/^\.+/,gr=/\.+$/,yr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function Wt(){return yr}function mr(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}function Ks(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(Wt().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${be(t)})+`;return e=e.replace(Wt(),t).replace(dr,t).replace(gr,"").replace(new RegExp(n,"gm"),t).trim(),e=mr().test(e)?e+t:e,e.slice(0,pr)}function ne(e){return Math.abs(e)%1===.5}function Jt(e){return e%2===0}var Qs=e=>Math.ceil(e),ea=e=>Math.floor(e),ta=e=>Math.round(e),na=e=>{let t=Math.round(e);return ne(e)&&Jt(t)?t-1:t},ra=e=>ne(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),oa=e=>ne(e)?Math.floor(e):Math.round(e),ia=e=>{let t=Math.round(e);return ne(e)?Jt(t)?t:t-1:t},sa=e=>ne(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e);function Zt(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-D()}function Yt(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+D()}function ca(e,t,n){let r=n.length,o=e<t;if(r<=0||e>=r-1)return Yt(n);if(e<=0)return Zt(n);n=hr([...n]);let i=o?-1:0,a=n[e+i].sort_weight||0,u=(n[e+i+1].sort_weight||0)-a;if(u===0)return o?Zt(n):Yt(n);let c=a+u/2,f=u*.01*(D()-.5);return c+f}function hr(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}function pa(e={}){let{getter:t=s=>s.sort}=e;function n(s){return s.sort((u,c)=>(t(u)||0)-(t(c)||0)),s}function r(s){return s.reduce((u,c)=>Math.min(u,t(c)||0),0)-1-D()}function o(s){return s.reduce((u,c)=>Math.max(u,t(c)||0),0)+1+D()}function i(s,u){s==null&&(s=(u??0)-1),u==null&&(u=(s??0)+1);let c=u-s,f=s+c/2,l=c*.01*(D()-.5);return f+l}function a(s,u,c){let f=c.length,l=s<u;if(f<=0||s>=f-1)return o(c);if(s<=0)return r(c);c=n([...c]);let d=l?-1:0,g=t(c[s+d])||0,y=(t(c[s+d+1])||0)-g;if(y===0)return l?r(c):o(c);let b=g+y/2,x=y*.01*(D()-.5);return b+x}return {start:r,end:o,between:i,move:a,items:n}}var xr=/((?:(?:(?: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 ya(e){return e.split(xr).map((t,n)=>{let r=qt(t);return n%2?`<a target="_blank" href="${r}">${br(r)}</a>`:r}).join("")}function br(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}function Kt(e){let t=[];for(let[n,r]of Object.entries(e))if(r!=null){Array.isArray(r)||(r=[r]);for(let o of r)o!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(o))}`);}return t.join("&")}function ma(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]),a=decodeURIComponent(o[1]||"");t[i]!=null?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(a)):t[i]=a;}return t}var Tr=/\\\s|\s+|#[^\n]*\n?/gm,wr=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,Xt=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function Lr(e){return typeof e=="string"?e:e.source||""}function xa(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var Qt=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(Tr,s=>s[0]==="\\"?s:"")),!(t instanceof RegExp)){let s=0;o=o.replace(wr,(u,c)=>(s+=1,c?(c!=="index"&&c!=="length"&&!this.namedGroups[c]&&(this.namedGroups[c]=s),"("):u)),this.names=Object.keys(this.namedGroups);}o=Lr(o),Xt.lastIndex=0;let a=Xt.exec(o);a&&(this.lookBehind={rx:new RegExp(`${a[3]}$(?!\\s)`),expect:a?a[2]==="=":!a},o=o.substr(a[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 Ar(e){return t=>e?.[t]}var Cr={\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"},Ur=Ar(Cr),vr=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,Dr="\\u0300-\\u036f",Er="\\ufe20-\\ufe2f",Fr="\\u20d0-\\u20ff",Pr="\\u1ab0-\\u1aff",Rr="\\u1dc0-\\u1dff",Ir=Dr+Er+Fr+Pr+Rr,Sr=`[${Ir}]`,Mr=RegExp(Sr,"g");function Ta(e){return e&&e.replace(vr,Ur).replace(Mr,"")}function kr(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 Br(){return kr(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}function q(e=Br()){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,]+/),a=i.length;for(o=0;o<a;o++){if(!i[o])continue;let s=i[o].replace(/\*/g,".*?");s[0]==="-"?n.push(new RegExp(`^${s.substr(1)}$`)):r.push(new RegExp(`^${s}$`));}t=function(s){if(n.length===0&&r.length===0)return !0;let u,c;for(u=0,c=n.length;u<c;u++)if(n[u].test(s))return !1;for(u=0,c=r.length;u<c;u++)if(r[u].test(s))return !0;return !1};}return t.accept=r,t.reject=n,t.filter=e,t}function Or(){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 rt(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=Ct[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}function Te(e=Or()){let t=rt(e);return n=>n>=t}function re(...e){return he(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}function we(e={}){let{level:t=void 0,filter:n=void 0}=e,r=q(n),o=Te(t);return i=>{if(!o(i.level)||!r(i.name))return;let a=i.name?`[${i.name}]`:"";switch(i.level){case 1:console.info(...re(`I|* ${a}`,...i.messages));break;case 2:console.warn(...re(`W|** ${a}`,...i.messages));break;case 3:console.error(...re(`E|*** ${a}`,...i.messages));break;default:console.debug(...re(`D| ${a}`,...i.messages));break}}}function en(e=""){let t=[we()],n=u=>!0,r=!1,o=a,i=!1;function a(u="",c){let f=rt(c??-1);function l(p,y){return f<=p?y:()=>{}}let d=l(0,(...p)=>{g({name:u,messages:p,level:0});});d.label=u,d.extend=function(p){return o(u?`${u}:${p}`:p)};let g=p=>{if(n(u))for(let y of t)y&&y(p);};return d.debug=l(0,(...p)=>{g({name:u,messages:p,level:0});}),d.info=l(1,(...p)=>{g({name:u,messages:p,level:1});}),d.warn=l(2,(...p)=>{g({name:u,messages:p,level:2});}),d.error=l(3,(...p)=>{g({name:u,messages:p,level:3});}),d.fatal=l(4,(...p)=>{throw g({name:u,messages:p,level:4}),new Error(`${p.map(String).join(" ")}`)}),d.assert=l(4,(p,...y)=>{(p==null||typeof p=="number"&&Number.isNaN(p)||!p)&&d.fatal(...y);}),d}function s(u="",c){let f=o(u,c);return i&&f.debug(`+++ init of logger "${u}" on level "${f.level}".`),f}return s.registerHandler=function(u){t.push(u);},s.setFilter=function(u){n=q(u);},s.setLock=(u=!0)=>r=u,s.setDebug=(u=!0)=>i=u,s.setHandlers=function(u=[]){o!==a&&(o=a),!r&&(t=[...u].filter(c=>typeof c=="function"));},s.level=-1,s.setLogLevel=function(u=-1){r||(s.level=u);},s.setFactory=function(u){r||(o=u);},s}var _;function ot(e){let t=en();return e?e(t):t.setHandlers([we()]),t}function _r(e){if(_==null)try{let t=z();t!=null?t?.logger==null?(_=ot(e),t.logger=_):_=t.logger:_=ot(e);}catch{_=ot(e);}return _}function tn(){if(_!=null)return _;try{let e=z();if(e?.logger!=null)return e.logger}catch{}}function R(e,t){return _r()(e,t)}var nn=["#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 Ma(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return nn[Math.abs(t)%nn.length]}function Le(){return Date.now()}function $r(e){return e>999?`${(e/1e3).toFixed(1)}s`:`${e.toFixed(2)}ms`}function Ba(...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 rn(){return typeof performance<"u"?performance.now():Date.now()}function Oa(){let e=rn();return function(){let t=rn()-e;return $r(t)}}function Na(e){let{level:t=void 0,filter:n=void 0,messages:r=[]}=e,o=q(n),i=Te(t);return a=>{i(a.level)&&o(a.name)&&(a.timestamp=Le(),r.push(a));}}function Vr(...e){throw tn()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}function Nr(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&Vr(...t);}function on(e,...t){Nr(e,...t);}function oe(e,t,n){return new Uint8Array(e,t,n)}var W;function an(){return W===void 0&&(W=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,W&&W.decode(new Uint8Array).length===1&&(W=null)),W}var it=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};function De(){return new it}function st(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}function Ee(e){let t=new Uint8Array(st(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(oe(e.cbuf.buffer,0,e.cpos),n),t}function zr(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(oe(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}function C(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 fn=C;function pn(e,t){C(e,t&255),C(e,t>>>8&255);}function dn(e,t){for(let n=0;n<4;n++)C(e,t&255),t>>>=8;}function j(e,t){for(;t>127;)C(e,128|127&t),t=Math.floor(t/128);C(e,127&t);}function Gr(e){return e!==0?e<0:1/e<0}function at(e,t){let n=Gr(t);for(n&&(t=-t),C(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)C(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}function Fe(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 Pe(e,t){j(e,t.byteLength),Fe(e,t);}function Wr(e,t){let n=unescape(encodeURIComponent(t)),r=n.length;j(e,r);for(let o=0;o<r;o++)C(e,n.codePointAt(o));}function ve(e,t){return Wr(e,t)}function ut(e,t){zr(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}function ct(e,t){return ut(e,4).setFloat32(0,t,!1)}function Jr(e,t){return ut(e,8).setFloat64(0,t,!1)}function Zr(e,t){return ut(e,8).setBigInt64(0,t,!1)}var Ue;function Yr(e){return Ue==null&&(Ue=new DataView(new ArrayBuffer(4))),Ue.setFloat32(0,e),Ue.getFloat32(0)===e}function Z(e,t){switch(typeof t){case"string":C(e,119),ve(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(C(e,125),at(e,t)):Yr(t)?(C(e,124),ct(e,t)):(C(e,123),Jr(e,t));break;case"bigint":C(e,122),Zr(e,t);break;case"object":if(t===null)C(e,126);else if(Array.isArray(t)){C(e,117),j(e,t.length);for(let n=0;n<t.length;n++)Z(e,t[n]);}else if(t instanceof Uint8Array)C(e,116),Pe(e,t);else {C(e,118);let n=Object.keys(t);j(e,n.length);for(let r=0;r<n.length;r++){let o=n[r];ve(e,o),Z(e,t[o]);}}break;case"boolean":C(e,t?120:121);break;default:C(e,127);}}var gn="Unexpected end of array",yn="Integer out of Range",lt=class{constructor(t){this.arr=t,this.pos=0;}};function Ie(e){return new lt(e)}function ft(e,t){let n=oe(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}function Y(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(yn)}throw new Error(gn)}function Se(e){return ft(e,Y(e))}function ae(e){return e.arr[e.pos++]}function mn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}function hn(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 pt(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(yn)}throw new Error(gn)}function Kr(e){let t=Y(e);if(t===0)return "";{let n=String.fromCodePoint(ae(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(ae(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 Re(e){let t=an();return t?t.decode(Se(e)):Kr(e)}function dt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}function gt(e){return dt(e,4).getFloat32(0,!1)}function Xr(e){return dt(e,8).getFloat64(0,!1)}function Qr(e){return dt(e,8).getBigInt64(0,!1)}var eo=[e=>{},e=>null,pt,gt,Xr,Qr,e=>!1,e=>!0,Re,e=>{let t=Y(e),n={};for(let r=0;r<t;r++){let o=Re(e);n[o]=K(e);}return n},e=>{let t=Y(e),n=[];for(let r=0;r<t;r++)n.push(K(e));return n},Se];function K(e){return eo[127-ae(e)](e)}var xn=class{async encode(t){let n=De();return Z(n,t),Ee(n)}async decode(t){return K(Ie(A(t)))}};function su(e){let t=De();return Z(t,e),Ee(t)}function au(e){return K(Ie(A(e)))}function uu(e){let t=De();return e!=null&&Fe(t,A(e)),{writeBytes:(n,r)=>{let o=A(n);on(!(r!=null&&o.length!==r),`Expected ${r} bytes, got ${o.length}`),Fe(t,o);},writeBytesVar:n=>Pe(t,A(n)),writeUintVar:n=>j(t,n),writeUint8:n=>fn(t,n),writeUint16:n=>pn(t,n),writeUint32:n=>dn(t,n),writeIntVar:n=>at(t,n),writeFloat:n=>ct(t,n),writeStringVar:n=>ve(t,n),write:n=>Z(t,n),getUint8Array:()=>Ee(t),getLength:()=>st(t)}}function cu(e){let t=Ie(A(e));return {readBytes:n=>ft(t,n),readBytesVar:()=>Se(t),readUintVar:()=>Y(t),readUint8:()=>ae(t),readUint16:()=>mn(t),readUint32:()=>hn(t),readIntVar:()=>pt(t),readFloat:()=>gt(t),readStringVar:()=>Re(t),read:()=>K(t),getOffset:()=>t.pos||0}}function lu(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 to(e){return await e.arrayBuffer()}async function fu(e){let t=await to(e);if(t!=null)return A(t)}function X(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 Tn="SHA-256",yt="AES-GCM",bn="PBKDF2",no=1e5;async function gu(e,t=Tn){return A(await crypto.subtle.digest(t,A(e)))}async function yu(e,t={}){let n=A(e),r=await crypto.subtle.importKey("raw",n,bn,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:bn,salt:t.salt?A(t.salt):new Uint8Array(0),iterations:t.iterations??no,hash:Tn},r,{name:yt,length:256},!0,["encrypt","decrypt"])}function wn(){return new Uint8Array([1,1])}async function Ln(e,t){let n=wn(),r=X(12),o=await crypto.subtle.encrypt({name:yt,iv:r},t,e),i=new Uint8Array(o),a=n.length+r.length+i.length,s=new Uint8Array(a),u=0;return s.set(n,u),u+=n.length,s.set(r,u),u+=r.length,s.set(i,u),s}async function An(e,t){let n=e.subarray(0,2);if(!Rt(n,wn()))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:yt,iv:r},t,o);return new Uint8Array(i)}var ro=",";function xu(e,t={}){let{separator:n=ro}=t,r="";for(let o=0;o<e.length;o++)r+=`${e[o].map(i=>{if(i==null||i==="")return "";if(Gt(i))return i?1:0;let a=String(i);return (me(i)||O(i))&&(a=S(i)),a.includes('"')||a.includes(`
5
+ ${o.stack}`:`${o.name||"Error"}: ${o.message}`;try{return r?JSON.stringify(o,null,2):JSON.stringify(o)}catch{}}return String(o)})}function Fi(e,t={}){return nr(e,t).join(" ")}function Pi(e){try{return decodeURIComponent(escape(e))}catch{}return e}function Si(e){if(e.startsWith("data:"))return pe(e.split(",",2)[1])}function Mi(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([pe(n)],{type:t})}}async function Bi(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${te(t)}`}function Oi(e,t="application/octet-stream"){return `data:${t},${te(e)}`}var Bt=864e5;function Qe(e){return Math.floor(e/1e4)}function Ot(e){return Math.floor(e/100%100)}function rr(e){return Math.floor(e%100)}function $i(e){return [Qe(e),Ot(e),rr(e)]}function _t(e,t=!1){return t?new Date(`${ir(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}function $t(){return ye(new Date)}function Vi(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return Vt(e);if(Array.isArray(e)&&e.length===3){let[n,r,o]=e;return et(n,r,o)}else if(e instanceof Date)return ye(e,t)}function Ni(e){return _t(e,!0)}function ye(e,t=!1){return t?Vt(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}function ji(e){return ye(e,!0)}function Xe(e,t=!0){return _t(e,t).getTime()}function or(e,t=!0){return ye(new Date(e),t)}function ir(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}function et(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}function Vt(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}function Hi(e,t=0){let n=Qe(e),r=Ot(e);return t!==0&&(r+=t,n+=Math.floor((r-1)/12),r=Math.floor((r-1)%12)+1,r===0&&(r=12)),et(n,r,1)}function zi(e,t=0){let n=Qe(e);return et(n+t,1,1)}function ge(e,t){return or(Xe(e)+t*864e5)}function Gi(e,t){return Math.round((Xe(t)-Xe(e))/864e5)}function qi(e,t){let n=[];for(t==null&&(t=$t()),e<0&&(e=ge(t,e+1));e<=t;)n.push(e),e=ge(e,1);return n}function*Wi(e,t){let n=[];for(t==null&&(t=$t()),e<0&&(e=ge(t,e+1));e<=t;)yield e,e=ge(e,1);return n}function Nt(){let e,t;return [new Promise((r,o)=>{e=r,t=o;}),e,t]}async function Zi(e){return new Promise(t=>setTimeout(t,e))}async function Yi(){return new Promise(e=>setTimeout(e,0))}async function Ki(e,t,n="timeoutReached"){return new Promise(async(r,o)=>{let i=!1,a=setTimeout(()=>{i=!0,r(n);},t);try{let s=await e;clearTimeout(a),i||r(s);}catch(s){clearTimeout(a),i||o(s);}})}function Xi(e){return e==="timeoutReached"||e?.name==="Timeout reached"}async function jt(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 a=await e;clearTimeout(i),o||n(a);}catch(a){clearTimeout(i),o||r(a);}})}function Qi(e,t,n=1e3){return new Promise((r,o)=>{let i=u=>{s&&(clearTimeout(s),a(),r(u));},a=()=>{s=null,e.off?e.off(t,i):e.removeEventListener&&e.removeEventListener(t,i);},s=setTimeout(()=>{a(),o(new Error("Did not response in time"));},n);e.on?e.on(t,i):e.addEventListener&&e.addEventListener(t,i);})}function P(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}function V(e){return Promise.resolve(e)}var N=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 ns(e,t,n){let r=N.from(e),o=N.from(t);for(;r&&o&&r?.days<=o?.days;){let i=n(r);P(i)&&await i,r=r.dayOffset(1);}}function rs(){return new N}function os(e){return new N(e)}function is(e){return N.fromDate(new Date(e)).days}function sr(e,t=2){return +(+e).toFixed(t)}function as(e,t=2){return +(+e/10**t).toFixed(t)}function us(e,t=2){return Math.round(+e*10**t)}function cs(e,t=2){return t*(sr(e,t)%1)}function ps(e,t,n){let r=e[t];return r===void 0&&(r=n(t,e),e[t]=r),r}async function ds(e,t,n){let r=e[t];return r===void 0&&(r=await n(t,e),e[t]=r),r}function Ht(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}function gs(e){return e!=null&&e.length>0?e[0]:void 0}function ys(e){return e!=null&&e.length>0?e[e.length-1]:void 0}function ms(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 tt(e){return Object(e)!==e?e:JSON.parse(S(e))}function hs(e){return Object(e)!==e?e:JSON.parse(S(e))}function xs(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=S(n);if(t.has(r))return t.get(r);let o=await e(...n);return t.set(r,o),o}}function Ts(e,t){let n=[];for(let r=0;r<e;r++)n.push(t(r,e));return n}function k(e){return e!=null&&typeof e=="object"}function nt(e){return Object(e)!==e}function O(e){return Array.isArray(e)}function me(e){return k(e)&&!O(e)}function As(e){return e?.constructor===Object}function he(e){return typeof e=="string"}function zt(e){return typeof e=="number"&&!Number.isNaN(e)}function Cs(e){return zt(e)&&Number.isInteger(e)}function Us(e){return zt(e)&&Number.isSafeInteger(e)}function Gt(e){return typeof e=="boolean"}function vs(e){return e==null}function Ds(e){return e==null}function Es(e){return k(e)&&e.constructor.name==="Uint8Array"}function Fs(e){return e!=null}function ar(e){return e==null||e===""||k(e)&&Ht(e)<=0}function Ps(e){return !ar(e)}function Rs(e){return e!=null&&e!==!1&&e!==!0}function Is(e){return e!=null&&e!==!1&&e!==0&&e!==""}function ur(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(nt(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(!ur(o,i,n))return !1}for(let r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return !1;return !0}function cr(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(nt(e)||t.add(e),me(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}cr(e[n],t);}}else if(O(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}function xe(e,...t){for(let n of t)k(e)||(e={}),!(n==null||!k(n))&&Object.keys(n).forEach(r=>{let o=e[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat(i):k(o)&&k(i)?e[r]=xe(Object.assign({},o),i):e[r]=i;});return e}function lr(e,t,n={cyclesFix:!0},r=[]){let o=[],i=Array.isArray(e);for(let s in e){let u=e[s],c=i?+s:s;if(!(s in t)){o.push({type:"del",path:[c]});continue}let f=t[s],l=typeof u=="object"&&typeof f=="object";if(u&&f&&l&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!r.includes(u))){let d=lr(u,f,n,n.cyclesFix?r.concat([u]):[]);o=[...o,...d.map(g=>(g.path.unshift(c),g))];}else u!==f&&!(l&&(Number.isNaN(u)?`${u}`==`${f}`:+u==+f))&&o.push({path:[c],type:"upd",value:f});}let a=Array.isArray(t);for(let s in t)s in e||o.push({type:"new",path:[a?+s:s],value:t[s]});return o}function qt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")}function Os(e){return e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&")}function $s(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 Vs(e,t){return e.reduce((n,r)=>{let o=String(r[t]);return (n[o]=n[o]||[]).push(r),n},{})}function Ns(e,t){return Array.from(e.reduce((n,r)=>n.add(r[t]),new Set))}function js(e,t){return e.map(n=>n[t])}function Gs(e,t){return k(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>{let o=t(n,r);return O(o)&&o.length===2?o:[n,o]}).filter(n=>n!=null)):{}}function qs(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}function Ws(e){return Object.keys(e).length<=0}var fr=/[\\\-\[\]\/{}()*+?.^$|]/g;function be(e){return e?e instanceof RegExp?e.source:e.replace(fr,"\\$&"):""}var pr=100,dr=/^\.+/,gr=/\.+$/,yr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function Wt(){return yr}function mr(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}function Ks(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(Wt().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${be(t)})+`;return e=e.replace(Wt(),t).replace(dr,t).replace(gr,"").replace(new RegExp(n,"gm"),t).trim(),e=mr().test(e)?e+t:e,e.slice(0,pr)}function ne(e){return Math.abs(e)%1===.5}function Jt(e){return e%2===0}var Qs=e=>Math.ceil(e),ea=e=>Math.floor(e),ta=e=>Math.round(e),na=e=>{let t=Math.round(e);return ne(e)&&Jt(t)?t-1:t},ra=e=>ne(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),oa=e=>ne(e)?Math.floor(e):Math.round(e),ia=e=>{let t=Math.round(e);return ne(e)?Jt(t)?t:t-1:t},sa=e=>ne(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e);function Zt(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-D()}function Yt(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+D()}function ca(e,t,n){let r=n.length,o=e<t;if(r<=0||e>=r-1)return Yt(n);if(e<=0)return Zt(n);n=hr([...n]);let i=o?-1:0,a=n[e+i].sort_weight||0,u=(n[e+i+1].sort_weight||0)-a;if(u===0)return o?Zt(n):Yt(n);let c=a+u/2,f=u*.01*(D()-.5);return c+f}function hr(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}function pa(e={}){let{getter:t=s=>s.sort}=e;function n(s){return s.sort((u,c)=>(t(u)||0)-(t(c)||0)),s}function r(s){return s.reduce((u,c)=>Math.min(u,t(c)||0),0)-1-D()}function o(s){return s.reduce((u,c)=>Math.max(u,t(c)||0),0)+1+D()}function i(s,u){s==null&&(s=(u??0)-1),u==null&&(u=(s??0)+1);let c=u-s,f=s+c/2,l=c*.01*(D()-.5);return f+l}function a(s,u,c){let f=c.length,l=s<u;if(f<=0||s>=f-1)return o(c);if(s<=0)return r(c);c=n([...c]);let d=l?-1:0,g=t(c[s+d])||0,y=(t(c[s+d+1])||0)-g;if(y===0)return l?r(c):o(c);let b=g+y/2,x=y*.01*(D()-.5);return b+x}return {start:r,end:o,between:i,move:a,items:n}}var xr=/((?:(?:(?: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 ya(e){return e.split(xr).map((t,n)=>{let r=qt(t);return n%2?`<a target="_blank" href="${r}">${br(r)}</a>`:r}).join("")}function br(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}function Kt(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 ma(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]),a=decodeURIComponent(o[1]||"");t[i]!=null?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(a)):t[i]=a;}return t}var Tr=/\\\s|\s+|#[^\n]*\n?/gm,wr=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,Xt=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function Lr(e){return typeof e=="string"?e:e.source||""}function xa(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var Qt=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(Tr,s=>s[0]==="\\"?s:"")),!(t instanceof RegExp)){let s=0;o=o.replace(wr,(u,c)=>(s+=1,c?(c!=="index"&&c!=="length"&&!this.namedGroups[c]&&(this.namedGroups[c]=s),"("):u)),this.names=Object.keys(this.namedGroups);}o=Lr(o),Xt.lastIndex=0;let a=Xt.exec(o);a&&(this.lookBehind={rx:new RegExp(`${a[3]}$(?!\\s)`),expect:a?a[2]==="=":!a},o=o.substr(a[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 Ar(e){return t=>e?.[t]}var Cr={\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"},Ur=Ar(Cr),vr=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,Dr="\\u0300-\\u036f",Er="\\ufe20-\\ufe2f",Fr="\\u20d0-\\u20ff",Pr="\\u1ab0-\\u1aff",Rr="\\u1dc0-\\u1dff",Ir=Dr+Er+Fr+Pr+Rr,Sr=`[${Ir}]`,Mr=RegExp(Sr,"g");function Ta(e){return e&&e.replace(vr,Ur).replace(Mr,"")}function kr(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 Br(){return kr(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}function q(e=Br()){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,]+/),a=i.length;for(o=0;o<a;o++){if(!i[o])continue;let s=i[o].replace(/\*/g,".*?");s[0]==="-"?n.push(new RegExp(`^${s.substr(1)}$`)):r.push(new RegExp(`^${s}$`));}t=function(s){if(n.length===0&&r.length===0)return !0;let u,c;for(u=0,c=n.length;u<c;u++)if(n[u].test(s))return !1;for(u=0,c=r.length;u<c;u++)if(r[u].test(s))return !0;return !1};}return t.accept=r,t.reject=n,t.filter=e,t}function Or(){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 rt(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=Ct[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}function Te(e=Or()){let t=rt(e);return n=>n>=t}function re(...e){return he(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}function we(e={}){let{level:t=void 0,filter:n=void 0}=e,r=q(n),o=Te(t);return i=>{if(!o(i.level)||!r(i.name))return;let a=i.name?`[${i.name}]`:"";switch(i.level){case 1:console.info(...re(`I|* ${a}`,...i.messages));break;case 2:console.warn(...re(`W|** ${a}`,...i.messages));break;case 3:console.error(...re(`E|*** ${a}`,...i.messages));break;default:console.debug(...re(`D| ${a}`,...i.messages));break}}}function en(e=""){let t=[we()],n=u=>!0,r=!1,o=a,i=!1;function a(u="",c){let f=rt(c??-1);function l(p,y){return f<=p?y:()=>{}}let d=l(0,(...p)=>{g({name:u,messages:p,level:0});});d.label=u,d.extend=function(p){return o(u?`${u}:${p}`:p)};let g=p=>{if(n(u))for(let y of t)y&&y(p);};return d.debug=l(0,(...p)=>{g({name:u,messages:p,level:0});}),d.info=l(1,(...p)=>{g({name:u,messages:p,level:1});}),d.warn=l(2,(...p)=>{g({name:u,messages:p,level:2});}),d.error=l(3,(...p)=>{g({name:u,messages:p,level:3});}),d.fatal=l(4,(...p)=>{throw g({name:u,messages:p,level:4}),new Error(`${p.map(String).join(" ")}`)}),d.assert=l(4,(p,...y)=>{(p==null||typeof p=="number"&&Number.isNaN(p)||!p)&&d.fatal(...y);}),d}function s(u="",c){let f=o(u,c);return i&&f.debug(`+++ init of logger "${u}" on level "${f.level}".`),f}return s.registerHandler=function(u){t.push(u);},s.setFilter=function(u){n=q(u);},s.setLock=(u=!0)=>r=u,s.setDebug=(u=!0)=>i=u,s.setHandlers=function(u=[]){o!==a&&(o=a),!r&&(t=[...u].filter(c=>typeof c=="function"));},s.level=-1,s.setLogLevel=function(u=-1){r||(s.level=u);},s.setFactory=function(u){r||(o=u);},s}var _;function ot(e){let t=en();return e?e(t):t.setHandlers([we()]),t}function _r(e){if(_==null)try{let t=z();t!=null?t?.logger==null?(_=ot(e),t.logger=_):_=t.logger:_=ot(e);}catch{_=ot(e);}return _}function tn(){if(_!=null)return _;try{let e=z();if(e?.logger!=null)return e.logger}catch{}}function R(e,t){return _r()(e,t)}var nn=["#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 Ma(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return nn[Math.abs(t)%nn.length]}function Le(){return Date.now()}function $r(e){return e>999?`${(e/1e3).toFixed(1)}s`:`${e.toFixed(2)}ms`}function Ba(...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 rn(){return typeof performance<"u"?performance.now():Date.now()}function Oa(){let e=rn();return function(){let t=rn()-e;return $r(t)}}function Na(e){let{level:t=void 0,filter:n=void 0,messages:r=[]}=e,o=q(n),i=Te(t);return a=>{i(a.level)&&o(a.name)&&(a.timestamp=Le(),r.push(a));}}function Vr(...e){throw tn()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}function Nr(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&Vr(...t);}function on(e,...t){Nr(e,...t);}function oe(e,t,n){return new Uint8Array(e,t,n)}var W;function an(){return W===void 0&&(W=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,W&&W.decode(new Uint8Array).length===1&&(W=null)),W}var it=class{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};function De(){return new it}function st(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}function Ee(e){let t=new Uint8Array(st(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(oe(e.cbuf.buffer,0,e.cpos),n),t}function zr(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(oe(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}function C(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 fn=C;function pn(e,t){C(e,t&255),C(e,t>>>8&255);}function dn(e,t){for(let n=0;n<4;n++)C(e,t&255),t>>>=8;}function j(e,t){for(;t>127;)C(e,128|127&t),t=Math.floor(t/128);C(e,127&t);}function Gr(e){return e!==0?e<0:1/e<0}function at(e,t){let n=Gr(t);for(n&&(t=-t),C(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)C(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}function Fe(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 Pe(e,t){j(e,t.byteLength),Fe(e,t);}function Wr(e,t){let n=unescape(encodeURIComponent(t)),r=n.length;j(e,r);for(let o=0;o<r;o++)C(e,n.codePointAt(o));}function ve(e,t){return Wr(e,t)}function ut(e,t){zr(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}function ct(e,t){return ut(e,4).setFloat32(0,t,!1)}function Jr(e,t){return ut(e,8).setFloat64(0,t,!1)}function Zr(e,t){return ut(e,8).setBigInt64(0,t,!1)}var Ue;function Yr(e){return Ue==null&&(Ue=new DataView(new ArrayBuffer(4))),Ue.setFloat32(0,e),Ue.getFloat32(0)===e}function Z(e,t){switch(typeof t){case"string":C(e,119),ve(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(C(e,125),at(e,t)):Yr(t)?(C(e,124),ct(e,t)):(C(e,123),Jr(e,t));break;case"bigint":C(e,122),Zr(e,t);break;case"object":if(t===null)C(e,126);else if(Array.isArray(t)){C(e,117),j(e,t.length);for(let n=0;n<t.length;n++)Z(e,t[n]);}else if(t instanceof Uint8Array)C(e,116),Pe(e,t);else {C(e,118);let n=Object.keys(t);j(e,n.length);for(let r=0;r<n.length;r++){let o=n[r];ve(e,o),Z(e,t[o]);}}break;case"boolean":C(e,t?120:121);break;default:C(e,127);}}var gn="Unexpected end of array",yn="Integer out of Range",lt=class{constructor(t){this.arr=t,this.pos=0;}};function Ie(e){return new lt(e)}function ft(e,t){let n=oe(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}function Y(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(yn)}throw new Error(gn)}function Se(e){return ft(e,Y(e))}function ae(e){return e.arr[e.pos++]}function mn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}function hn(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 pt(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(yn)}throw new Error(gn)}function Kr(e){let t=Y(e);if(t===0)return "";{let n=String.fromCodePoint(ae(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(ae(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 Re(e){let t=an();return t?t.decode(Se(e)):Kr(e)}function dt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}function gt(e){return dt(e,4).getFloat32(0,!1)}function Xr(e){return dt(e,8).getFloat64(0,!1)}function Qr(e){return dt(e,8).getBigInt64(0,!1)}var eo=[e=>{},e=>null,pt,gt,Xr,Qr,e=>!1,e=>!0,Re,e=>{let t=Y(e),n={};for(let r=0;r<t;r++){let o=Re(e);n[o]=K(e);}return n},e=>{let t=Y(e),n=[];for(let r=0;r<t;r++)n.push(K(e));return n},Se];function K(e){return eo[127-ae(e)](e)}var xn=class{async encode(t){let n=De();return Z(n,t),Ee(n)}async decode(t){return K(Ie(A(t)))}};function su(e){let t=De();return Z(t,e),Ee(t)}function au(e){return K(Ie(A(e)))}function uu(e){let t=De();return e!=null&&Fe(t,A(e)),{writeBytes:(n,r)=>{let o=A(n);on(!(r!=null&&o.length!==r),`Expected ${r} bytes, got ${o.length}`),Fe(t,o);},writeBytesVar:n=>Pe(t,A(n)),writeUintVar:n=>j(t,n),writeUint8:n=>fn(t,n),writeUint16:n=>pn(t,n),writeUint32:n=>dn(t,n),writeIntVar:n=>at(t,n),writeFloat:n=>ct(t,n),writeStringVar:n=>ve(t,n),write:n=>Z(t,n),getUint8Array:()=>Ee(t),getLength:()=>st(t)}}function cu(e){let t=Ie(A(e));return {readBytes:n=>ft(t,n),readBytesVar:()=>Se(t),readUintVar:()=>Y(t),readUint8:()=>ae(t),readUint16:()=>mn(t),readUint32:()=>hn(t),readIntVar:()=>pt(t),readFloat:()=>gt(t),readStringVar:()=>Re(t),read:()=>K(t),getOffset:()=>t.pos||0}}function lu(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 to(e){return await e.arrayBuffer()}async function fu(e){let t=await to(e);if(t!=null)return A(t)}function X(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 Tn="SHA-256",yt="AES-GCM",bn="PBKDF2",no=1e5;async function gu(e,t=Tn){return A(await crypto.subtle.digest(t,A(e)))}async function yu(e,t={}){let n=A(e),r=await crypto.subtle.importKey("raw",n,bn,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:bn,salt:t.salt?A(t.salt):new Uint8Array(0),iterations:t.iterations??no,hash:Tn},r,{name:yt,length:256},!0,["encrypt","decrypt"])}function wn(){return new Uint8Array([1,1])}async function Ln(e,t){let n=wn(),r=X(12),o=await crypto.subtle.encrypt({name:yt,iv:r},t,e),i=new Uint8Array(o),a=n.length+r.length+i.length,s=new Uint8Array(a),u=0;return s.set(n,u),u+=n.length,s.set(r,u),u+=r.length,s.set(i,u),s}async function An(e,t){let n=e.subarray(0,2);if(!Rt(n,wn()))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:yt,iv:r},t,o);return new Uint8Array(i)}var ro=",";function xu(e,t={}){let{separator:n=ro}=t,r="";for(let o=0;o<e.length;o++)r+=`${e[o].map(i=>{if(i==null||i==="")return "";if(Gt(i))return i?1:0;let a=String(i);return (me(i)||O(i))&&(a=S(i)),a.includes('"')||a.includes(`
6
6
  `)||a.includes(n)?`"${a.replace(/"/g,'""')}"`:a}).join(n)}
7
7
  `;return r}function oo(e,t={}){let n=/("((?:(?:[^"]*?)(?:"")?)*)"|([^,;\t\n]*))([,;\t]|\n|\r\n)/g;t.separator&&(n=new RegExp(n.source.replaceAll(",;\\t",be(t.separator)),n.flags));let r=[],o=[],i,a=`${e.replaceAll(`\r
8
8
  `,`
@@ -13,4 +13,4 @@ ${o.stack}`:`${o.name||"Error"}: ${o.message}`;try{return r?JSON.stringify(o,nul
13
13
 
14
14
  export { Dt as $, $t as $a, Gt as $b, _r as $c, Gu as $d, jn as A, xi as Aa, rs as Ab, ea as Ac, yu as Ad, Nc as Ae, G as B, bi as Ba, os as Bb, ta as Bc, Ln as Bd, jc as Be, Hn as C, Li as Ca, is as Cb, na as Cc, An as Cd, zc as Ce, No as D, Ai as Da, sr as Db, ra as Dc, xu as Dd, wo as De, Ut as E, Ci as Ea, as as Eb, oa as Ec, oo as Ed, Mn as Ee, jo as F, Qn as Fa, us as Fb, ia as Fc, bu as Fd, Zc as Fe, qe as G, er as Ga, cs as Gb, sa as Gc, Me as Gd, Yc as Ge, Ho as H, tr as Ha, ps as Hb, Zt as Hc, Uu as Hd, Kc as He, zo as I, Ke as Ia, ds as Ib, Yt as Ic, Eu as Id, Xc as Ie, zn as J, Ui as Ja, Ht as Jb, ca as Jc, Fu as Jd, Lo as Je, Go as K, vi as Ka, gs as Kb, hr as Kc, I as Kd, kn as Ke, Gn as L, Di as La, ys as Lb, pa as Lc, Bu as Ld, Ao as Le, vt as M, Ei as Ma, ms as Mb, ya as Mc, Ou as Md, el as Me, qo as N, nr as Na, tt as Nb, br as Nc, ht as Nd, tl as Ne, Wo as O, Fi as Oa, hs as Ob, Kt as Oc, so as Od, Co as Oe, Jo as P, Pi as Pa, xs as Pb, ma as Pc, ao as Pd, nl as Pe, Zo as Q, Si as Qa, bs as Qb, Lr as Qc, uo as Qd, Bn as Qe, Yo as R, Mi as Ra, Ts as Rb, xa as Rc, co as Rd, sl as Re, Ko as S, ki as Sa, k as Sb, Qt as Sc, lo as Sd, Xo as T, Bi as Ta, nt as Tb, Ta as Tc, fo as Td, Qo as U, Oi as Ua, O as Ub, kr as Uc, go as Ud, ei as V, Bt as Va, me as Vb, q as Vc, yo as Vd, ni as W, Qe as Wa, As as Wb, rt as Wc, mo as Wd, S as X, Ot as Xa, he as Xb, Te as Xc, Un as Xd, ri as Y, rr as Ya, zt as Yb, re as Yc, Hu as Yd, Jn as Z, $i as Za, Cs as Zb, we as Zc, zu as Zd, Zn as _, _t as _a, Us as _b, en as _c, xo as _d, z as a, Et as aa, Vi as ab, vs as ac, tn as ad, qu as ae, ee as b, A as ba, Ni as bb, Ds as bc, R as bd, H as be, ce as c, si as ca, ye as cb, Es as cc, Ma as cd, Dn as ce, _e as d, Ft as da, ji as db, Fs as dc, Le as dd, bo as de, $e as e, Pt as ea, Xe as eb, ar as ec, $r as ed, Wu as ee, Ve as f, te as fa, or as fb, Ps as fc, Ba as fd, M as fe, Ne as g, ai as ga, ir as gb, Rs as gc, rn as gd, Ju as ge, je as h, pe as ha, et as hb, Is as hc, Oa as hd, bt as he, Ct as i, ui as ia, Vt as ib, ur as ic, Na as id, Oe as ie, _n as j, Rt as ja, Hi as jb, cr as jc, Vr as jd, Xu as je, D as k, We as ka, zi as kb, xe as kc, Nr as kd, En as ke, Do as l, Je as la, ge as lb, lr as lc, on as ld, Q as le, Eo as m, It as ma, Gi as mb, qt as mc, xn as md, Fn as me, Fo as n, Kn as na, qi as nb, Os as nc, su as nd, Pn as ne, Po as o, $ as oa, Wi as ob, $s as oc, au as od, uc as oe, $n as p, Ze as pa, Nt as pb, Vs as pc, uu as pd, Tt as pe, Ro as q, St as qa, Zi as qb, Ns as qc, cu as qd, gc as qe, Io as r, fi as ra, Yi as rb, js as rc, lu as rd, mc as re, So as s, pi as sa, Ki as sb, Gs as sc, to as sd, hc as se, Mo as t, di as ta, Xi as tb, qs as tc, fu as td, ue as te, Vn as u, gi as ua, jt as ub, Ws as uc, X as ud, Ec as ue, Bo as v, Ye as va, Qi as vb, be as vc, Tn as vd, Sn as ve, ze as w, Mt as wa, P as wb, Ks as wc, yt as wd, kc as we, Oo as x, yi as xa, V as xb, ne as xc, bn as xd, Bc as xe, Ge as y, hi as ya, N as yb, Jt as yc, no as yd, $c as ye, Nn as z, Xn as za, ns as zb, Qs as zc, gu as zd, Vc as ze };
15
15
  //# sourceMappingURL=out.js.map
16
- //# sourceMappingURL=chunk-35DQMRL5.js.map
16
+ //# sourceMappingURL=chunk-5YIMH4N4.js.map