@genome-spy/core 0.52.0 → 0.53.0

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.
Files changed (56) hide show
  1. package/dist/bundle/{index-C8lYPtq_.js → index-B5cesONJ.js} +21 -21
  2. package/dist/bundle/index-BJLu48Hz.js +274 -0
  3. package/dist/bundle/{index-Sk-Wtwdn.js → index-BywMLhhd.js} +963 -989
  4. package/dist/bundle/{index-BwFvhduA.js → index-CSayoXbw.js} +7 -9
  5. package/dist/bundle/{index-CkI3Kd2P.js → index-DAJ8JQLE.js} +6 -5
  6. package/dist/bundle/{index-BtRKzKhM.js → index-_tI-fMQF.js} +414 -415
  7. package/dist/bundle/{index-CmBp-spD.js → index-e0oKgZbZ.js} +36 -36
  8. package/dist/bundle/{index-Z7JiNsFI.js → index-oqw_s02W.js} +10 -11
  9. package/dist/bundle/{index-mihmTLo-.js → index-uO0O4Uv-.js} +22 -22
  10. package/dist/bundle/index.es.js +3622 -3668
  11. package/dist/bundle/index.js +102 -103
  12. package/dist/bundle/{long-CYrAUkxh.js → long-D4tVjLLz.js} +5 -5
  13. package/dist/bundle/remoteFile-BkTxwFub.js +90 -0
  14. package/dist/schema.json +1 -1
  15. package/dist/src/data/sources/dataUtils.d.ts +5 -0
  16. package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
  17. package/dist/src/data/sources/dataUtils.js +9 -0
  18. package/dist/src/data/sources/lazy/axisTickSource.js +1 -1
  19. package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
  20. package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
  21. package/dist/src/data/sources/lazy/bigWigSource.js +1 -1
  22. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts +4 -6
  23. package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
  24. package/dist/src/data/sources/lazy/singleAxisLazySource.js +4 -18
  25. package/dist/src/data/sources/urlSource.d.ts.map +1 -1
  26. package/dist/src/data/sources/urlSource.js +12 -7
  27. package/dist/src/data/transforms/clone.d.ts +1 -2
  28. package/dist/src/data/transforms/clone.d.ts.map +1 -1
  29. package/dist/src/data/transforms/clone.js +19 -4
  30. package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
  31. package/dist/src/data/transforms/filterScoredLabels.js +1 -4
  32. package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
  33. package/dist/src/encoder/encoder.d.ts +1 -1
  34. package/dist/src/encoder/encoder.d.ts.map +1 -1
  35. package/dist/src/fonts/bmFontMetrics.d.ts.map +1 -1
  36. package/dist/src/genomeSpy.d.ts.map +1 -1
  37. package/dist/src/gl/dataToVertices.d.ts.map +1 -1
  38. package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
  39. package/dist/src/spec/axis.d.ts +0 -2
  40. package/dist/src/spec/scale.d.ts +1 -1
  41. package/dist/src/utils/cloner.d.ts +8 -2
  42. package/dist/src/utils/cloner.d.ts.map +1 -1
  43. package/dist/src/utils/cloner.js +19 -2
  44. package/dist/src/utils/cloner.test.js +16 -5
  45. package/dist/src/utils/expression.d.ts.map +1 -1
  46. package/dist/src/utils/ui/tooltip.d.ts +1 -1
  47. package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
  48. package/dist/src/view/paramMediator.d.ts +1 -1
  49. package/dist/src/view/paramMediator.d.ts.map +1 -1
  50. package/dist/src/view/scaleResolution.d.ts +9 -0
  51. package/dist/src/view/scaleResolution.d.ts.map +1 -1
  52. package/dist/src/view/scaleResolution.js +30 -0
  53. package/dist/src/view/zoom.d.ts.map +1 -1
  54. package/package.json +2 -2
  55. package/dist/bundle/index-Dixm7K89.js +0 -279
  56. package/dist/bundle/remoteFile-1_eCK3VV.js +0 -96
@@ -1,35 +1,35 @@
1
- (function(de,Ee){typeof exports=="object"&&typeof module<"u"?Ee(exports):typeof define=="function"&&define.amd?define(["exports"],Ee):(de=typeof globalThis<"u"?globalThis:de||self,Ee(de.genomeSpyEmbed={}))})(this,function(de){"use strict";var WG=Object.defineProperty;var ZG=(de,Ee,Ie)=>Ee in de?WG(de,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):de[Ee]=Ie;var Pt=(de,Ee,Ie)=>(ZG(de,typeof Ee!="symbol"?Ee+"":Ee,Ie),Ie),Lm=(de,Ee,Ie)=>{if(!Ee.has(de))throw TypeError("Cannot "+Ie)};var z=(de,Ee,Ie)=>(Lm(de,Ee,"read from private field"),Ie?Ie.call(de):Ee.get(de)),Z=(de,Ee,Ie)=>{if(Ee.has(de))throw TypeError("Cannot add the same private member more than once");Ee instanceof WeakSet?Ee.add(de):Ee.set(de,Ie)},le=(de,Ee,Ie,Po)=>(Lm(de,Ee,"write to private field"),Po?Po.call(de,Ie):Ee.set(de,Ie),Ie);var M_=(de,Ee,Ie,Po)=>({set _(Yh){le(de,Ee,Yh,Ie)},get _(){return z(de,Ee,Po)}}),X=(de,Ee,Ie)=>(Lm(de,Ee,"access private method"),Ie);var w_,Eo,Xu,xi,_o,$a,qa,bu,yu,Ih,P_,Bh,L_,nr,wu,Nm,vu,Om,Wa,Dh,N_,Er,Za,en,xu,Au,zm,Eu,Um,Dn,Rr,_u,Gm,Rh,O_,Fh,z_,Su,Hm,Cu,Vm,Ya,qh,ku,jm,_r,Fo,Tu,$m,Mh,U_,Iu,qm,Qa,Bu,Du,Ru,Fu,So,Ku,Mu,Wm,Pu,Ph,G_,Sr,Lu,Co,ko,Nu,Zm,Ou,Ym,zu,Qm,Lh,H_,Xa,Ka,Ja,Uu,es,ts,Gu,Xm,Hu,Km,To,Vu,ju,$u,Cr,Io,Ai,Ei,ns,rs,tn,Bo,is,kr,Mo,Nh,V_,Do,Ju,qu,Jm,Wu,e1,Zu,t1,Oh,j_,os,Wh,zh,$_,as,Yu,_i,Ro,ss,ls,Zh,Uh,q_,Gh,W_,Hh,Z_;function Ee(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ie(e,t,n){return e.fields=t||[],e.fname=n,e}function Po(e){return e==null?null:e.fname}function Yh(e){return e==null?null:e.fields}function Y_(e){return e.length===1?Q_(e[0]):X_(e)}const Q_=e=>function(t){return t[e]},X_=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function it(e){throw Error(e)}function K_(e){const t=[],n=e.length;let r=null,i=0,o="",a,s,u;e=e+"";function l(){t.push(o+e.substring(a,s)),o="",a=s+1}for(a=s=0;s<n;++s)if(u=e[s],u==="\\")o+=e.substring(a,s++),a=s;else if(u===r)l(),r=null,i=-1;else{if(r)continue;a===i&&u==='"'||a===i&&u==="'"?(a=s+1,r=u):u==="."&&!i?s>a?l():a=s+1:u==="["?(s>a&&l(),i=a=s+1):u==="]"&&(i||it("Access path missing open bracket: "+e),i>0&&l(),i=0,a=s+1)}return i&&it("Access path missing closing bracket: "+e),r&&it("Access path missing closing quote: "+e),s>a&&(s++,l()),t}function ec(e,t,n){const r=K_(e);return e=r.length===1?r[0]:e,Ie((n&&n.get||Y_)(r),[e],t||e)}ec("id");const tc=Ie(e=>e,[],"identity");Ie(()=>0,[],"zero"),Ie(()=>1,[],"one"),Ie(()=>!0,[],"true"),Ie(()=>!1,[],"false");var xt=Array.isArray;function At(e){return e===Object(e)}function vn(e){return e[e.length-1]}function us(e){return e==null||e===""?null:+e}const n1=e=>t=>e*Math.exp(t),r1=e=>t=>Math.log(e*t),J_=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),eS=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,nc=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Qh(e,t,n,r){const i=n(e[0]),o=n(vn(e)),a=(o-i)*t;return[r(i-a),r(o-a)]}function tS(e,t){return Qh(e,t,us,tc)}function nS(e,t){var n=Math.sign(e[0]);return Qh(e,t,r1(n),n1(n))}function rS(e,t,n){return Qh(e,t,nc(n),nc(1/n))}function rc(e,t,n,r,i){const o=r(e[0]),a=r(vn(e)),s=t!=null?r(t):(o+a)/2;return[i(s+(o-s)*n),i(s+(a-s)*n)]}function i1(e,t,n){return rc(e,t,n,us,tc)}function o1(e,t,n){const r=Math.sign(e[0]);return rc(e,t,n,r1(r),n1(r))}function Xh(e,t,n,r){return rc(e,t,n,nc(r),nc(1/r))}function iS(e,t,n,r){return rc(e,t,n,J_(r),eS(r))}function Kh(e){return e!=null?xt(e)?e:[e]:[]}function oS(e,t,n){let r=e[0],i=e[1],o;return i<r&&(o=i,i=r,r=o),o=i-r,o>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-o),r+o]}function nn(e){return typeof e=="function"}const aS="descending";function a1(e,t,n){n=n||{},t=Kh(t)||[];const r=[],i=[],o={},a=n.comparator||sS;return Kh(e).forEach((s,u)=>{s!=null&&(r.push(t[u]===aS?-1:1),i.push(s=nn(s)?s:ec(s,null,n)),(Yh(s)||[]).forEach(l=>o[l]=1))}),i.length===0?null:Ie(a(i,r),Object.keys(o))}const s1=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),sS=(e,t)=>e.length===1?lS(e[0],t[0]):uS(e,t,e.length),lS=(e,t)=>function(n,r){return s1(e(n),e(r))*t},uS=(e,t,n)=>(t.push(0),function(r,i){let o,a=0,s=-1;for(;a===0&&++s<n;)o=e[s],a=s1(o(r),o(i));return a*t[s]});function cS(e){for(let t,n,r=1,i=arguments.length;r<i;++r){t=arguments[r];for(n in t)e[n]=t[n]}return e}const fS=Object.prototype.hasOwnProperty;function Lo(e,t){return fS.call(e,t)}function cs(e){return typeof e=="boolean"}function hS(e){return Object.prototype.toString.call(e)==="[object Date]"}function dS(e){return e&&nn(e[Symbol.iterator])}function Tt(e){return typeof e=="number"}function pS(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Be(e){return typeof e=="string"}function l1(e,t){const n=e[0],r=vn(e),i=+t;return i?i===1?r:n+i*(r-n):n}function ic(e){return e&&vn(e)-e[0]||0}function Jh(e){return xt(e)?"["+e.map(Jh)+"]":At(e)||Be(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function gS(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const mS=e=>Tt(e)||hS(e)?e:Date.parse(e);function bS(e,t){return t=t||mS,e==null||e===""?null:t(e)}function yS(e){return e==null||e===""?null:e+""}function oc(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}/**
1
+ (function(de,Ee){typeof exports=="object"&&typeof module<"u"?Ee(exports):typeof define=="function"&&define.amd?define(["exports"],Ee):(de=typeof globalThis<"u"?globalThis:de||self,Ee(de.genomeSpyEmbed={}))})(this,function(de){"use strict";var ZG=Object.defineProperty;var YG=(de,Ee,Ie)=>Ee in de?ZG(de,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):de[Ee]=Ie;var Pt=(de,Ee,Ie)=>(YG(de,typeof Ee!="symbol"?Ee+"":Ee,Ie),Ie),Um=(de,Ee,Ie)=>{if(!Ee.has(de))throw TypeError("Cannot "+Ie)};var z=(de,Ee,Ie)=>(Um(de,Ee,"read from private field"),Ie?Ie.call(de):Ee.get(de)),Z=(de,Ee,Ie)=>{if(Ee.has(de))throw TypeError("Cannot add the same private member more than once");Ee instanceof WeakSet?Ee.add(de):Ee.set(de,Ie)},ae=(de,Ee,Ie,Po)=>(Um(de,Ee,"write to private field"),Po?Po.call(de,Ie):Ee.set(de,Ie),Ie);var D_=(de,Ee,Ie,Po)=>({set _(Xh){ae(de,Ee,Xh,Ie)},get _(){return z(de,Ee,Po)}}),X=(de,Ee,Ie)=>(Um(de,Ee,"access private method"),Ie);var m_,Eo,Ku,bi,_o,$s,qs,bu,yu,Dh,R_,Rh,F_,nr,wu,Gm,vu,Hm,Ws,Fh,M_,Er,Zs,en,Au,xu,Vm,Eu,jm,Rn,Rr,_u,$m,Mh,P_,Ph,L_,Su,qm,Cu,Wm,Ys,Zh,ku,Zm,_r,Fo,Tu,Ym,Lh,N_,Iu,Qm,Qs,Bu,Du,Ru,Fu,So,Ju,Mu,Xm,Pu,Nh,O_,Sr,Lu,Co,ko,Nu,Km,Ou,Jm,zu,e1,Oh,z_,Xs,Ks,Js,Uu,ea,ta,Gu,t1,Hu,n1,To,Vu,ju,na,$u,qu,Cr,Io,yi,wi,ra,ia,tn,Bo,oa,kr,Mo,zh,U_,Do,ec,Wu,r1,Zu,i1,Yu,o1,Uh,G_,sa,Yh,Gh,H_,aa,Qu,vi,Ro,la,ua,Qh,Hh,V_,Vh,j_,jh,$_;function Ee(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ie(e,t,n){return e.fields=t||[],e.fname=n,e}function Po(e){return e==null?null:e.fname}function Xh(e){return e==null?null:e.fields}function q_(e){return e.length===1?W_(e[0]):Z_(e)}const W_=e=>function(t){return t[e]},Z_=e=>{const t=e.length;return function(n){for(let r=0;r<t;++r)n=n[e[r]];return n}};function it(e){throw Error(e)}function Y_(e){const t=[],n=e.length;let r=null,i=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===r)l(),r=null,i=-1;else{if(r)continue;s===i&&u==='"'||s===i&&u==="'"?(s=a+1,r=u):u==="."&&!i?a>s?l():s=a+1:u==="["?(a>s&&l(),i=s=a+1):u==="]"&&(i||it("Access path missing open bracket: "+e),i>0&&l(),i=0,s=a+1)}return i&&it("Access path missing closing bracket: "+e),r&&it("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function tc(e,t,n){const r=Y_(e);return e=r.length===1?r[0]:e,Ie((n&&n.get||q_)(r),[e],t||e)}tc("id");const nc=Ie(e=>e,[],"identity");Ie(()=>0,[],"zero"),Ie(()=>1,[],"one"),Ie(()=>!0,[],"true"),Ie(()=>!1,[],"false");var vt=Array.isArray;function At(e){return e===Object(e)}function An(e){return e[e.length-1]}function ca(e){return e==null||e===""?null:+e}const s1=e=>t=>e*Math.exp(t),a1=e=>t=>Math.log(e*t),Q_=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),X_=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,rc=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function Kh(e,t,n,r){const i=n(e[0]),o=n(An(e)),s=(o-i)*t;return[r(i-s),r(o-s)]}function K_(e,t){return Kh(e,t,ca,nc)}function J_(e,t){var n=Math.sign(e[0]);return Kh(e,t,a1(n),s1(n))}function eS(e,t,n){return Kh(e,t,rc(n),rc(1/n))}function ic(e,t,n,r,i){const o=r(e[0]),s=r(An(e)),a=t!=null?r(t):(o+s)/2;return[i(a+(o-a)*n),i(a+(s-a)*n)]}function l1(e,t,n){return ic(e,t,n,ca,nc)}function u1(e,t,n){const r=Math.sign(e[0]);return ic(e,t,n,a1(r),s1(r))}function Jh(e,t,n,r){return ic(e,t,n,rc(r),rc(1/r))}function tS(e,t,n,r){return ic(e,t,n,Q_(r),X_(r))}function ed(e){return e!=null?vt(e)?e:[e]:[]}function nS(e,t,n){let r=e[0],i=e[1],o;return i<r&&(o=i,i=r,r=o),o=i-r,o>=n-t?[t,n]:[r=Math.min(Math.max(r,t),n-o),r+o]}function nn(e){return typeof e=="function"}const rS="descending";function c1(e,t,n){n=n||{},t=ed(t)||[];const r=[],i=[],o={},s=n.comparator||iS;return ed(e).forEach((a,u)=>{a!=null&&(r.push(t[u]===rS?-1:1),i.push(a=nn(a)?a:tc(a,null,n)),(Xh(a)||[]).forEach(l=>o[l]=1))}),i.length===0?null:Ie(s(i,r),Object.keys(o))}const f1=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),iS=(e,t)=>e.length===1?oS(e[0],t[0]):sS(e,t,e.length),oS=(e,t)=>function(n,r){return f1(e(n),e(r))*t},sS=(e,t,n)=>(t.push(0),function(r,i){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=f1(o(r),o(i));return s*t[a]});function aS(e){for(let t,n,r=1,i=arguments.length;r<i;++r){t=arguments[r];for(n in t)e[n]=t[n]}return e}const lS=Object.prototype.hasOwnProperty;function Lo(e,t){return lS.call(e,t)}function fa(e){return typeof e=="boolean"}function uS(e){return Object.prototype.toString.call(e)==="[object Date]"}function cS(e){return e&&nn(e[Symbol.iterator])}function Tt(e){return typeof e=="number"}function fS(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Be(e){return typeof e=="string"}function h1(e,t){const n=e[0],r=An(e),i=+t;return i?i===1?r:n+i*(r-n):n}function oc(e){return e&&An(e)-e[0]||0}function td(e){return vt(e)?"["+e.map(td)+"]":At(e)||Be(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function hS(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const dS=e=>Tt(e)||uS(e)?e:Date.parse(e);function pS(e,t){return t=t||dS,e==null||e===""?null:t(e)}function gS(e){return e==null||e===""?null:e+""}function sc(e){const t={},n=e.length;for(let r=0;r<n;++r)t[e[r]]=!0;return t}/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const ac=globalThis,ed=ac.ShadowRoot&&(ac.ShadyCSS===void 0||ac.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,u1=Symbol(),c1=new WeakMap;let wS=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==u1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(ed&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=c1.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&c1.set(n,t))}return t}toString(){return this.cssText}};const vS=e=>new wS(typeof e=="string"?e:e+"",void 0,u1),xS=(e,t)=>{if(ed)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=ac.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},f1=ed?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return vS(n)})(e):e;/**
5
+ */const ac=globalThis,nd=ac.ShadowRoot&&(ac.ShadyCSS===void 0||ac.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d1=Symbol(),p1=new WeakMap;let mS=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==d1)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(nd&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=p1.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&p1.set(n,t))}return t}toString(){return this.cssText}};const bS=e=>new mS(typeof e=="string"?e:e+"",void 0,d1),yS=(e,t)=>{if(nd)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const r=document.createElement("style"),i=ac.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},g1=nd?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return bS(n)})(e):e;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:AS,defineProperty:ES,getOwnPropertyDescriptor:_S,getOwnPropertyNames:SS,getOwnPropertySymbols:CS,getPrototypeOf:kS}=Object,Fr=globalThis,h1=Fr.trustedTypes,TS=h1?h1.emptyScript:"",td=Fr.reactiveElementPolyfillSupport,fs=(e,t)=>e,nd={toAttribute(e,t){switch(t){case Boolean:e=e?TS:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},d1=(e,t)=>!AS(e,t),p1={attribute:!0,type:String,converter:nd,reflect:!1,hasChanged:d1};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Fr.litPropertyMetadata??(Fr.litPropertyMetadata=new WeakMap);class No extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=p1){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&ES(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:o}=_S(this.prototype,t)??{get(){return this[n]},set(a){this[n]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){const s=i==null?void 0:i.call(this);o.call(this,a),this.requestUpdate(t,s,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??p1}static _$Ei(){if(this.hasOwnProperty(fs("elementProperties")))return;const t=kS(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(fs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(fs("properties"))){const n=this.properties,r=[...SS(n),...CS(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(f1(i))}else t!==void 0&&n.push(f1(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return xS(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EC(t,n){var o;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const a=(((o=r.converter)==null?void 0:o.toAttribute)!==void 0?r.converter:nd).toAttribute(n,r.type);this._$Em=t,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(t,n){var o;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=r.getPropertyOptions(i),s=typeof a.converter=="function"?{fromAttribute:a.converter}:((o=a.converter)==null?void 0:o.fromAttribute)!==void 0?a.converter:nd;this._$Em=i,this[i]=s.fromAttribute(n,a.type),this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??d1)(this[t],n))return;this.P(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,a]of i)a.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],a)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(n)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}No.elementStyles=[],No.shadowRootOptions={mode:"open"},No[fs("elementProperties")]=new Map,No[fs("finalized")]=new Map,td==null||td({ReactiveElement:No}),(Fr.reactiveElementVersions??(Fr.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:wS,defineProperty:vS,getOwnPropertyDescriptor:AS,getOwnPropertyNames:xS,getOwnPropertySymbols:ES,getPrototypeOf:_S}=Object,Fr=globalThis,m1=Fr.trustedTypes,SS=m1?m1.emptyScript:"",rd=Fr.reactiveElementPolyfillSupport,ha=(e,t)=>e,id={toAttribute(e,t){switch(t){case Boolean:e=e?SS:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},b1=(e,t)=>!wS(e,t),y1={attribute:!0,type:String,converter:id,reflect:!1,hasChanged:b1};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Fr.litPropertyMetadata??(Fr.litPropertyMetadata=new WeakMap);class No extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=y1){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&vS(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:o}=AS(this.prototype,t)??{get(){return this[n]},set(s){this[n]=s}};return{get(){return i==null?void 0:i.call(this)},set(s){const a=i==null?void 0:i.call(this);o.call(this,s),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y1}static _$Ei(){if(this.hasOwnProperty(ha("elementProperties")))return;const t=_S(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ha("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ha("properties"))){const n=this.properties,r=[...xS(n),...ES(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(g1(i))}else t!==void 0&&n.push(g1(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yS(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$EC(t,n){var o;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const s=(((o=r.converter)==null?void 0:o.toAttribute)!==void 0?r.converter:id).toAttribute(n,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,n){var o;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const s=r.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((o=s.converter)==null?void 0:o.fromAttribute)!==void 0?s.converter:id;this._$Em=i,this[i]=a.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){if(r??(r=this.constructor.getPropertyOptions(t)),!(r.hasChanged??b1)(this[t],n))return;this.P(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,r){this._$AL.has(t)||this._$AL.set(t,n),r.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,s]of i)s.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],s)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(n)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}No.elementStyles=[],No.shadowRootOptions={mode:"open"},No[ha("elementProperties")]=new Map,No[ha("finalized")]=new Map,rd==null||rd({ReactiveElement:No}),(Fr.reactiveElementVersions??(Fr.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const hs=globalThis,sc=hs.trustedTypes,g1=sc?sc.createPolicy("lit-html",{createHTML:e=>e}):void 0,m1="$lit$",Mr=`lit$${(Math.random()+"").slice(9)}$`,b1="?"+Mr,IS=`<${b1}>`,Ri=document,ds=()=>Ri.createComment(""),ps=e=>e===null||typeof e!="object"&&typeof e!="function",y1=Array.isArray,BS=e=>y1(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",rd=`[
14
- \f\r]`,gs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,w1=/-->/g,v1=/>/g,Fi=RegExp(`>|${rd}(?:([^\\s"'>=/]+)(${rd}*=${rd}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),x1=/'/g,A1=/"/g,E1=/^(?:script|style|textarea|title)$/i,DS=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Ke=DS(1),Mi=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),_1=new WeakMap,Pi=Ri.createTreeWalker(Ri,129);function S1(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return g1!==void 0?g1.createHTML(t):t}const RS=(e,t)=>{const n=e.length-1,r=[];let i,o=t===2?"<svg>":"",a=gs;for(let s=0;s<n;s++){const u=e[s];let l,c,f=-1,h=0;for(;h<u.length&&(a.lastIndex=h,c=a.exec(u),c!==null);)h=a.lastIndex,a===gs?c[1]==="!--"?a=w1:c[1]!==void 0?a=v1:c[2]!==void 0?(E1.test(c[2])&&(i=RegExp("</"+c[2],"g")),a=Fi):c[3]!==void 0&&(a=Fi):a===Fi?c[0]===">"?(a=i??gs,f=-1):c[1]===void 0?f=-2:(f=a.lastIndex-c[2].length,l=c[1],a=c[3]===void 0?Fi:c[3]==='"'?A1:x1):a===A1||a===x1?a=Fi:a===w1||a===v1?a=gs:(a=Fi,i=void 0);const d=a===Fi&&e[s+1].startsWith("/>")?" ":"";o+=a===gs?u+IS:f>=0?(r.push(l),u.slice(0,f)+m1+u.slice(f)+Mr+d):u+Mr+(f===-2?s:d)}return[S1(e,o+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class ms{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let o=0,a=0;const s=t.length-1,u=this.parts,[l,c]=RS(t,n);if(this.el=ms.createElement(l,r),Pi.currentNode=this.el.content,n===2){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=Pi.nextNode())!==null&&u.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(m1)){const h=c[a++],d=i.getAttribute(f).split(Mr),p=/([.?@])?(.*)/.exec(h);u.push({type:1,index:o,name:p[2],strings:d,ctor:p[1]==="."?MS:p[1]==="?"?PS:p[1]==="@"?LS:lc}),i.removeAttribute(f)}else f.startsWith(Mr)&&(u.push({type:6,index:o}),i.removeAttribute(f));if(E1.test(i.tagName)){const f=i.textContent.split(Mr),h=f.length-1;if(h>0){i.textContent=sc?sc.emptyScript:"";for(let d=0;d<h;d++)i.append(f[d],ds()),Pi.nextNode(),u.push({type:2,index:++o});i.append(f[h],ds())}}}else if(i.nodeType===8)if(i.data===b1)u.push({type:2,index:o});else{let f=-1;for(;(f=i.data.indexOf(Mr,f+1))!==-1;)u.push({type:7,index:o}),f+=Mr.length-1}o++}}static createElement(t,n){const r=Ri.createElement("template");return r.innerHTML=t,r}}function Oo(e,t,n=e,r){var a,s;if(t===Mi)return t;let i=r!==void 0?(a=n._$Co)==null?void 0:a[r]:n._$Cl;const o=ps(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((s=i==null?void 0:i._$AO)==null||s.call(i,!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=Oo(e,i._$AS(e,t.values),i,r)),t}class FS{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:r}=this._$AD,i=((t==null?void 0:t.creationScope)??Ri).importNode(n,!0);Pi.currentNode=i;let o=Pi.nextNode(),a=0,s=0,u=r[0];for(;u!==void 0;){if(a===u.index){let l;u.type===2?l=new bs(o,o.nextSibling,this,t):u.type===1?l=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(l=new NS(o,this,t)),this._$AV.push(l),u=r[++s]}a!==(u==null?void 0:u.index)&&(o=Pi.nextNode(),a++)}return Pi.currentNode=Ri,i}p(t){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}class bs{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,n,r,i){this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=Oo(this,t,n),ps(t)?t===nt||t==null||t===""?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==Mi&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):BS(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==nt&&ps(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ri.createTextNode(t)),this._$AH=t}$(t){var o;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=ms.createElement(S1(r.h,r.h[0]),this.options)),r);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(n);else{const a=new FS(i,this),s=a.u(this.options);a.p(n),this.T(s),this._$AH=a}}_$AC(t){let n=_1.get(t.strings);return n===void 0&&_1.set(t.strings,n=new ms(t)),n}k(t){y1(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const o of t)i===n.length?n.push(r=new bs(this.S(ds()),this.S(ds()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(t=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var n;this._$AM===void 0&&(this._$Cv=t,(n=this._$AP)==null||n.call(this,t))}}let lc=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,o){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=nt}_$AI(t,n=this,r,i){const o=this.strings;let a=!1;if(o===void 0)t=Oo(this,t,n,0),a=!ps(t)||t!==this._$AH&&t!==Mi,a&&(this._$AH=t);else{const s=t;let u,l;for(t=o[0],u=0;u<o.length-1;u++)l=Oo(this,s[r+u],n,u),l===Mi&&(l=this._$AH[u]),a||(a=!ps(l)||l!==this._$AH[u]),l===nt?t=nt:t!==nt&&(t+=(l??"")+o[u+1]),this._$AH[u]=l}a&&!i&&this.j(t)}j(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class MS extends lc{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nt?void 0:t}}class PS extends lc{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class LS extends lc{constructor(t,n,r,i,o){super(t,n,r,i,o),this.type=5}_$AI(t,n=this){if((t=Oo(this,t,n,0)??nt)===Mi)return;const r=this._$AH,i=t===nt&&r!==nt||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==nt&&(r===nt||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}class NS{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Oo(this,t)}}const id=hs.litHtmlPolyfillSupport;id==null||id(ms,bs),(hs.litHtmlVersions??(hs.litHtmlVersions=[])).push("3.1.2");const ys=(e,t,n)=>{const r=(n==null?void 0:n.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const o=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new bs(t.insertBefore(ds(),o),o,void 0,n??{})}return i._$AI(e),i};/**
13
+ */const da=globalThis,lc=da.trustedTypes,w1=lc?lc.createPolicy("lit-html",{createHTML:e=>e}):void 0,v1="$lit$",Mr=`lit$${Math.random().toFixed(9).slice(2)}$`,A1="?"+Mr,CS=`<${A1}>`,Ti=document,pa=()=>Ti.createComment(""),ga=e=>e===null||typeof e!="object"&&typeof e!="function",x1=Array.isArray,kS=e=>x1(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",od=`[
14
+ \f\r]`,ma=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E1=/-->/g,_1=/>/g,Ii=RegExp(`>|${od}(?:([^\\s"'>=/]+)(${od}*=${od}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),S1=/'/g,C1=/"/g,k1=/^(?:script|style|textarea|title)$/i,TS=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Ke=TS(1),Bi=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),T1=new WeakMap,Di=Ti.createTreeWalker(Ti,129);function I1(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return w1!==void 0?w1.createHTML(t):t}const IS=(e,t)=>{const n=e.length-1,r=[];let i,o=t===2?"<svg>":"",s=ma;for(let a=0;a<n;a++){const u=e[a];let l,c,f=-1,h=0;for(;h<u.length&&(s.lastIndex=h,c=s.exec(u),c!==null);)h=s.lastIndex,s===ma?c[1]==="!--"?s=E1:c[1]!==void 0?s=_1:c[2]!==void 0?(k1.test(c[2])&&(i=RegExp("</"+c[2],"g")),s=Ii):c[3]!==void 0&&(s=Ii):s===Ii?c[0]===">"?(s=i??ma,f=-1):c[1]===void 0?f=-2:(f=s.lastIndex-c[2].length,l=c[1],s=c[3]===void 0?Ii:c[3]==='"'?C1:S1):s===C1||s===S1?s=Ii:s===E1||s===_1?s=ma:(s=Ii,i=void 0);const d=s===Ii&&e[a+1].startsWith("/>")?" ":"";o+=s===ma?u+CS:f>=0?(r.push(l),u.slice(0,f)+v1+u.slice(f)+Mr+d):u+Mr+(f===-2?a:d)}return[I1(e,o+(e[n]||"<?>")+(t===2?"</svg>":"")),r]};class ba{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let o=0,s=0;const a=t.length-1,u=this.parts,[l,c]=IS(t,n);if(this.el=ba.createElement(l,r),Di.currentNode=this.el.content,n===2){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=Di.nextNode())!==null&&u.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(v1)){const h=c[s++],d=i.getAttribute(f).split(Mr),p=/([.?@])?(.*)/.exec(h);u.push({type:1,index:o,name:p[2],strings:d,ctor:p[1]==="."?DS:p[1]==="?"?RS:p[1]==="@"?FS:uc}),i.removeAttribute(f)}else f.startsWith(Mr)&&(u.push({type:6,index:o}),i.removeAttribute(f));if(k1.test(i.tagName)){const f=i.textContent.split(Mr),h=f.length-1;if(h>0){i.textContent=lc?lc.emptyScript:"";for(let d=0;d<h;d++)i.append(f[d],pa()),Di.nextNode(),u.push({type:2,index:++o});i.append(f[h],pa())}}}else if(i.nodeType===8)if(i.data===A1)u.push({type:2,index:o});else{let f=-1;for(;(f=i.data.indexOf(Mr,f+1))!==-1;)u.push({type:7,index:o}),f+=Mr.length-1}o++}}static createElement(t,n){const r=Ti.createElement("template");return r.innerHTML=t,r}}function Oo(e,t,n=e,r){var s,a;if(t===Bi)return t;let i=r!==void 0?(s=n._$Co)==null?void 0:s[r]:n._$Cl;const o=ga(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),o===void 0?i=void 0:(i=new o(e),i._$AT(e,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=i:n._$Cl=i),i!==void 0&&(t=Oo(e,i._$AS(e,t.values),i,r)),t}class BS{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:r}=this._$AD,i=((t==null?void 0:t.creationScope)??Ti).importNode(n,!0);Di.currentNode=i;let o=Di.nextNode(),s=0,a=0,u=r[0];for(;u!==void 0;){if(s===u.index){let l;u.type===2?l=new ya(o,o.nextSibling,this,t):u.type===1?l=new u.ctor(o,u.name,u.strings,this,t):u.type===6&&(l=new MS(o,this,t)),this._$AV.push(l),u=r[++a]}s!==(u==null?void 0:u.index)&&(o=Di.nextNode(),s++)}return Di.currentNode=Ti,i}p(t){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}class ya{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,n,r,i){this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=Oo(this,t,n),ga(t)?t===nt||t==null||t===""?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==Bi&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):kS(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==nt&&ga(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ti.createTextNode(t)),this._$AH=t}$(t){var o;const{values:n,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=ba.createElement(I1(r.h,r.h[0]),this.options)),r);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(n);else{const s=new BS(i,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(t){let n=T1.get(t.strings);return n===void 0&&T1.set(t.strings,n=new ba(t)),n}k(t){x1(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const o of t)i===n.length?n.push(r=new ya(this.S(pa()),this.S(pa()),this,this.options)):r=n[i],r._$AI(o),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(t=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var n;this._$AM===void 0&&(this._$Cv=t,(n=this._$AP)==null||n.call(this,t))}}let uc=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,r,i,o){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=n,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=nt}_$AI(t,n=this,r,i){const o=this.strings;let s=!1;if(o===void 0)t=Oo(this,t,n,0),s=!ga(t)||t!==this._$AH&&t!==Bi,s&&(this._$AH=t);else{const a=t;let u,l;for(t=o[0],u=0;u<o.length-1;u++)l=Oo(this,a[r+u],n,u),l===Bi&&(l=this._$AH[u]),s||(s=!ga(l)||l!==this._$AH[u]),l===nt?t=nt:t!==nt&&(t+=(l??"")+o[u+1]),this._$AH[u]=l}s&&!i&&this.j(t)}j(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}};class DS extends uc{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nt?void 0:t}}class RS extends uc{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class FS extends uc{constructor(t,n,r,i,o){super(t,n,r,i,o),this.type=5}_$AI(t,n=this){if((t=Oo(this,t,n,0)??nt)===Bi)return;const r=this._$AH,i=t===nt&&r!==nt||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==nt&&(r===nt||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}class MS{constructor(t,n,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Oo(this,t)}}const sd=da.litHtmlPolyfillSupport;sd==null||sd(ba,ya),(da.litHtmlVersions??(da.litHtmlVersions=[])).push("3.1.3");const wa=(e,t,n)=>{const r=(n==null?void 0:n.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const o=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new ya(t.insertBefore(pa(),o),o,void 0,n??{})}return i._$AI(e),i};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */class uc extends No{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ys(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Mi}}uc._$litElement$=!0,uc.finalized=!0,(w_=globalThis.litElementHydrateSupport)==null||w_.call(globalThis,{LitElement:uc});const od=globalThis.litElementPolyfillSupport;od==null||od({LitElement:uc}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.4");var C1={},ad={},sd=34,ws=10,ld=13;function k1(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function OS(e,t){var n=k1(e);return function(r,i){return t(n(r),i,e)}}function T1(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Lt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function zS(e){return e<0?"-"+Lt(-e,6):e>9999?"+"+Lt(e,6):Lt(e,4)}function US(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":zS(e.getUTCFullYear())+"-"+Lt(e.getUTCMonth()+1,2)+"-"+Lt(e.getUTCDate(),2)+(i?"T"+Lt(t,2)+":"+Lt(n,2)+":"+Lt(r,2)+"."+Lt(i,3)+"Z":r?"T"+Lt(t,2)+":"+Lt(n,2)+":"+Lt(r,2)+"Z":n||t?"T"+Lt(t,2)+":"+Lt(n,2)+"Z":"")}function I1(e){var t=new RegExp('["'+e+`
20
- \r]`),n=e.charCodeAt(0);function r(f,h){var d,p,m=i(f,function(y,w){if(d)return d(y,w-1);p=y,d=h?OS(y,h):k1(y)});return m.columns=p||[],m}function i(f,h){var d=[],p=f.length,m=0,y=0,w,A=p<=0,S=!1;f.charCodeAt(p-1)===ws&&--p,f.charCodeAt(p-1)===ld&&--p;function _(){if(A)return ad;if(S)return S=!1,C1;var B,I=m,D;if(f.charCodeAt(I)===sd){for(;m++<p&&f.charCodeAt(m)!==sd||f.charCodeAt(++m)===sd;);return(B=m)>=p?A=!0:(D=f.charCodeAt(m++))===ws?S=!0:D===ld&&(S=!0,f.charCodeAt(m)===ws&&++m),f.slice(I+1,B-1).replace(/""/g,'"')}for(;m<p;){if((D=f.charCodeAt(B=m++))===ws)S=!0;else if(D===ld)S=!0,f.charCodeAt(m)===ws&&++m;else if(D!==n)continue;return f.slice(I,B)}return A=!0,f.slice(I,p)}for(;(w=_())!==ad;){for(var k=[];w!==C1&&w!==ad;)k.push(w),w=_();h&&(k=h(k,y++))==null||d.push(k)}return d}function o(f,h){return f.map(function(d){return h.map(function(p){return c(d[p])}).join(e)})}function a(f,h){return h==null&&(h=T1(f)),[h.map(c).join(e)].concat(o(f,h)).join(`
21
- `)}function s(f,h){return h==null&&(h=T1(f)),o(f,h).join(`
19
+ */class cc extends No{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=wa(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return Bi}}cc._$litElement$=!0,cc.finalized=!0,(m_=globalThis.litElementHydrateSupport)==null||m_.call(globalThis,{LitElement:cc});const ad=globalThis.litElementPolyfillSupport;ad==null||ad({LitElement:cc}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.5");var B1={},ld={},ud=34,va=10,cd=13;function D1(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function PS(e,t){var n=D1(e);return function(r,i){return t(n(r),i,e)}}function R1(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Lt(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function LS(e){return e<0?"-"+Lt(-e,6):e>9999?"+"+Lt(e,6):Lt(e,4)}function NS(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":LS(e.getUTCFullYear())+"-"+Lt(e.getUTCMonth()+1,2)+"-"+Lt(e.getUTCDate(),2)+(i?"T"+Lt(t,2)+":"+Lt(n,2)+":"+Lt(r,2)+"."+Lt(i,3)+"Z":r?"T"+Lt(t,2)+":"+Lt(n,2)+":"+Lt(r,2)+"Z":n||t?"T"+Lt(t,2)+":"+Lt(n,2)+"Z":"")}function F1(e){var t=new RegExp('["'+e+`
20
+ \r]`),n=e.charCodeAt(0);function r(f,h){var d,p,m=i(f,function(y,w){if(d)return d(y,w-1);p=y,d=h?PS(y,h):D1(y)});return m.columns=p||[],m}function i(f,h){var d=[],p=f.length,m=0,y=0,w,x=p<=0,S=!1;f.charCodeAt(p-1)===va&&--p,f.charCodeAt(p-1)===cd&&--p;function _(){if(x)return ld;if(S)return S=!1,B1;var B,I=m,D;if(f.charCodeAt(I)===ud){for(;m++<p&&f.charCodeAt(m)!==ud||f.charCodeAt(++m)===ud;);return(B=m)>=p?x=!0:(D=f.charCodeAt(m++))===va?S=!0:D===cd&&(S=!0,f.charCodeAt(m)===va&&++m),f.slice(I+1,B-1).replace(/""/g,'"')}for(;m<p;){if((D=f.charCodeAt(B=m++))===va)S=!0;else if(D===cd)S=!0,f.charCodeAt(m)===va&&++m;else if(D!==n)continue;return f.slice(I,B)}return x=!0,f.slice(I,p)}for(;(w=_())!==ld;){for(var k=[];w!==B1&&w!==ld;)k.push(w),w=_();h&&(k=h(k,y++))==null||d.push(k)}return d}function o(f,h){return f.map(function(d){return h.map(function(p){return c(d[p])}).join(e)})}function s(f,h){return h==null&&(h=R1(f)),[h.map(c).join(e)].concat(o(f,h)).join(`
21
+ `)}function a(f,h){return h==null&&(h=R1(f)),o(f,h).join(`
22
22
  `)}function u(f){return f.map(l).join(`
23
- `)}function l(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?US(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:l,formatValue:c}}var GS=I1(" "),HS=GS.parseRows;function VS(e){return e}function jS(e){if(e==null)return VS;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],a=e.translate[1];return function(s,u){u||(t=n=0);var l=2,c=s.length,f=new Array(c);for(f[0]=(t+=s[0])*r+o,f[1]=(n+=s[1])*i+a;l<c;)f[l]=s[l],++l;return f}}function $S(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function qS(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return B1(e,n)})}:B1(e,t)}function B1(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,o=D1(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:o}:r==null?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function D1(e,t){var n=jS(e.transform),r=e.arcs;function i(c,f){f.length&&f.pop();for(var h=r[c<0?~c:c],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));c<0&&$S(f,p)}function o(c){return n(c)}function a(c){for(var f=[],h=0,d=c.length;h<d;++h)i(c[h],f);return f.length<2&&f.push(f[0]),f}function s(c){for(var f=a(c);f.length<4;)f.push(f[0]);return f}function u(c){return c.map(s)}function l(c){var f=c.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(l)};case"Point":h=o(c.coordinates);break;case"MultiPoint":h=c.coordinates.map(o);break;case"LineString":h=a(c.arcs);break;case"MultiLineString":h=c.arcs.map(a);break;case"Polygon":h=u(c.arcs);break;case"MultiPolygon":h=c.arcs.map(u);break;default:return null}return{type:f,coordinates:h}}return l(t)}function WS(e,t){var n={},r={},i={},o=[],a=-1;t.forEach(function(l,c){var f=e.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=t[++a],t[a]=l,t[c]=h)}),t.forEach(function(l){var c=s(l),f=c[0],h=c[1],d,p;if(d=i[f])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var m=p===d?d:d.concat(p);r[m.start=d.start]=i[m.end=p.end]=m}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=i[f]){delete i[p.end];var y=p===d?d:p.concat(d);r[y.start=p.start]=i[y.end=d.end]=y}else r[d.start]=i[d.end]=d;else d=[l],r[d.start=f]=i[d.end=h]=d});function s(l){var c=e.arcs[l<0?~l:l],f=c[0],h;return e.transform?(h=[0,0],c.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=c[c.length-1],l<0?[h,f]:[f,h]}function u(l,c){for(var f in l){var h=l[f];delete c[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),o.push(h)}}return u(i,r),u(r,i),t.forEach(function(l){n[l<0?~l:l]||o.push([l])}),o}function ZS(e){return D1(e,YS.apply(this,arguments))}function YS(e,t,n){var r,i,o;if(arguments.length>1)r=QS(e,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:WS(e,r)}}function QS(e,t,n){var r=[],i=[],o;function a(f){var h=f<0?~f:f;(i[h]||(i[h]=[])).push({i:f,g:o})}function s(f){f.forEach(a)}function u(f){f.forEach(s)}function l(f){f.forEach(u)}function c(f){switch(o=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":s(f.arcs);break;case"MultiLineString":case"Polygon":u(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return c(t),i.forEach(n==null?function(f){r.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function vs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function XS(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zo(e){let t,n,r;e.length!==2?(t=vs,n=(s,u)=>vs(e(s),u),r=(s,u)=>e(s)-u):(t=e===vs||e===XS?e:KS,n=e,r=e);function i(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function KS(){return 0}function R1(e){return e===null?NaN:+e}const F1=zo(vs),Pr=F1.right;F1.left,zo(R1).center;function JS(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class or extends Map{constructor(t,n=nC){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(M1(this,t))}has(t){return super.has(M1(this,t))}set(t,n){return super.set(eC(this,t),n)}delete(t){return super.delete(tC(this,t))}}function M1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function eC({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function tC({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function nC(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ud(e){return e}function cc(e,...t){return P1(e,ud,ud,t)}function rC(e,...t){return P1(e,Array.from,ud,t)}function P1(e,t,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new or,u=r[a++];let l=-1;for(const c of o){const f=u(c,++l,o),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,a));return t(s)}(e,0)}const iC=Math.sqrt(50),oC=Math.sqrt(10),aC=Math.sqrt(2);function fc(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=iC?10:o>=oC?5:o>=aC?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/l<e&&++s,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*l<e&&++s,u*l>t&&--u),u<s&&.5<=n&&n<2?fc(e,t,n*2):[s,u,l]}function hc(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?fc(t,e,n):fc(e,t,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)u[l]=(o-l)/-a;else for(let l=0;l<s;++l)u[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)u[l]=(i+l)/-a;else for(let l=0;l<s;++l)u[l]=(i+l)*a;return u}function cd(e,t,n){return t=+t,e=+e,n=+n,fc(e,t,n)[2]}function Lr(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?cd(t,e,n):cd(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function L1(e,t,n=R1){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function xs(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function dc(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function sC(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function pc(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Uo(e){return e=pc(Math.abs(e)),e?e[1]:NaN}function lC(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function uC(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var cC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Nr(e){if(!(t=cC.exec(e)))throw new Error("invalid format: "+e);var t;return new fd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Nr.prototype=fd.prototype;function fd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}fd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fC(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var N1;function hC(e,t){var n=pc(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(N1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+pc(e,Math.max(0,t+o-1))[0]}function O1(e,t){var n=pc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const z1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:sC,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>O1(e*100,t),r:O1,s:hC,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function U1(e){return e}var G1=Array.prototype.map,H1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dC(e){var t=e.grouping===void 0||e.thousands===void 0?U1:lC(G1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?U1:uC(G1.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Nr(f);var h=f.fill,d=f.align,p=f.sign,m=f.symbol,y=f.zero,w=f.width,A=f.comma,S=f.precision,_=f.trim,k=f.type;k==="n"?(A=!0,k="g"):z1[k]||(S===void 0&&(S=12),_=!0,k="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var B=m==="$"?n:m==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",I=m==="$"?r:/[%p]/.test(k)?a:"",D=z1[k],M=/[defgprs%]/.test(k);S=S===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function G(N){var ne=B,ie=I,he,me,Fe;if(k==="c")ie=D(N)+ie,N="";else{N=+N;var Ae=N<0||1/N<0;if(N=isNaN(N)?u:D(Math.abs(N),S),_&&(N=fC(N)),Ae&&+N==0&&p!=="+"&&(Ae=!1),ne=(Ae?p==="("?p:s:p==="-"||p==="("?"":p)+ne,ie=(k==="s"?H1[8+N1/3]:"")+ie+(Ae&&p==="("?")":""),M){for(he=-1,me=N.length;++he<me;)if(Fe=N.charCodeAt(he),48>Fe||Fe>57){ie=(Fe===46?i+N.slice(he+1):N.slice(he))+ie,N=N.slice(0,he);break}}}A&&!y&&(N=t(N,1/0));var Le=ne.length+N.length+ie.length,Oe=Le<w?new Array(w-Le+1).join(h):"";switch(A&&y&&(N=t(Oe+N,Oe.length?w-ie.length:1/0),Oe=""),d){case"<":N=ne+N+ie+Oe;break;case"=":N=ne+Oe+N+ie;break;case"^":N=Oe.slice(0,Le=Oe.length>>1)+ne+N+ie+Oe.slice(Le);break;default:N=Oe+ne+N+ie;break}return o(N)}return G.toString=function(){return f+""},G}function c(f,h){var d=l((f=Nr(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Uo(h)/3)))*3,m=Math.pow(10,-p),y=H1[8+p/3];return function(w){return d(m*w)+y}}return{format:l,formatPrefix:c}}var gc,mt,hd;pC({thousands:",",grouping:[3],currency:["$",""]});function pC(e){return gc=dC(e),mt=gc.format,hd=gc.formatPrefix,gc}function V1(e){return Math.max(0,-Uo(Math.abs(e)))}function j1(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Uo(t)/3)))*3-Uo(Math.abs(e)))}function $1(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Uo(t)-Uo(e))+1}const dd=new Date,pd=new Date;function ot(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(l<o&&o<a);return u},i.filter=o=>ot(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(dd.setTime(+o),pd.setTime(+a),e(dd),e(pd),Math.floor(n(dd,pd))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Go=ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Go.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Go),Go.range;const ar=1e3,rn=ar*60,sr=rn*60,lr=sr*24,gd=lr*7,q1=lr*30,md=lr*365,ur=ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCSeconds());ur.range;const mc=ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ar)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getMinutes());mc.range;const bc=ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCMinutes());bc.range;const yc=ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ar-e.getMinutes()*rn)},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getHours());yc.range;const wc=ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getUTCHours());wc.range;const Or=ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rn)/lr,e=>e.getDate()-1);Or.range;const Li=ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>e.getUTCDate()-1);Li.range;const W1=ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>Math.floor(e/lr));W1.range;function Ni(e){return ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*rn)/gd)}const As=Ni(0),vc=Ni(1),gC=Ni(2),mC=Ni(3),Ho=Ni(4),bC=Ni(5),yC=Ni(6);As.range,vc.range,gC.range,mC.range,Ho.range,bC.range,yC.range;function Oi(e){return ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/gd)}const Es=Oi(0),xc=Oi(1),wC=Oi(2),vC=Oi(3),Vo=Oi(4),xC=Oi(5),AC=Oi(6);Es.range,xc.range,wC.range,vC.range,Vo.range,xC.range,AC.range;const _s=ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());_s.range;const Ss=ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ss.range;const Pn=ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Pn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Pn.range;const Ln=ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Ln.range;function Z1(e,t,n,r,i,o){const a=[[ur,1,ar],[ur,5,5*ar],[ur,15,15*ar],[ur,30,30*ar],[o,1,rn],[o,5,5*rn],[o,15,15*rn],[o,30,30*rn],[i,1,sr],[i,3,3*sr],[i,6,6*sr],[i,12,12*sr],[r,1,lr],[r,2,2*lr],[n,1,gd],[t,1,q1],[t,3,3*q1],[e,1,md]];function s(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const d=f&&typeof f.range=="function"?f:u(l,c,f),p=d?d.range(l,+c+1):[];return h?p.reverse():p}function u(l,c,f){const h=Math.abs(c-l)/f,d=zo(([,,y])=>y).right(a,h);if(d===a.length)return e.every(Lr(l/md,c/md,f));if(d===0)return Go.every(Math.max(Lr(l,c,f),1));const[p,m]=a[h/a[d-1][2]<a[d][2]/h?d-1:d];return p.every(m)}return[s,u]}const[EC,_C]=Z1(Ln,Ss,Es,W1,wc,bc),[SC,CC]=Z1(Pn,_s,As,Or,yc,mc),Cs="year",ks="quarter",Ts="month",Is="week",Bs="date",Ac="day",bd="dayofyear",Ds="hours",Rs="minutes",Fs="seconds",Ec="milliseconds";[Cs,ks,Ts,Is,Bs,Ac,bd,Ds,Rs,Fs,Ec].reduce((e,t,n)=>(e[t]=1+n,e),{});const kC={[Cs]:Pn,[ks]:_s.every(3),[Ts]:_s,[Is]:As,[Bs]:Or,[Ac]:Or,[bd]:Or,[Ds]:yc,[Rs]:mc,[Fs]:ur,[Ec]:Go},TC={[Cs]:Ln,[ks]:Ss.every(3),[Ts]:Ss,[Is]:Es,[Bs]:Li,[Ac]:Li,[bd]:Li,[Ds]:wc,[Rs]:bc,[Fs]:ur,[Ec]:Go};function IC(e){return kC[e]}function BC(e){return TC[e]}function yd(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function wd(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ms(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Y1(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=Ps(i),c=Ls(i),f=Ps(o),h=Ls(o),d=Ps(a),p=Ls(a),m=Ps(s),y=Ls(s),w=Ps(u),A=Ls(u),S={a:Ae,A:Le,b:Oe,B:Je,c:null,d:tb,e:tb,f:JC,g:u6,G:f6,H:QC,I:XC,j:KC,L:nb,m:e6,M:t6,p:Ce,q:ke,Q:lb,s:ub,S:n6,u:r6,U:i6,V:o6,w:a6,W:s6,x:null,X:null,y:l6,Y:c6,Z:h6,"%":sb},_={a:gt,A:$t,b:He,B:L,c:null,d:ib,e:ib,f:m6,g:C6,G:T6,H:d6,I:p6,j:g6,L:ob,m:b6,M:y6,p:P,q,Q:lb,s:ub,S:w6,u:v6,U:x6,V:A6,w:E6,W:_6,x:null,X:null,y:S6,Y:k6,Z:I6,"%":sb},k={a:G,A:N,b:ne,B:ie,c:he,d:J1,e:J1,f:qC,g:K1,G:X1,H:eb,I:eb,j:HC,L:$C,m:GC,M:VC,p:M,q:UC,Q:ZC,s:YC,S:jC,u:PC,U:LC,V:NC,w:MC,W:OC,x:me,X:Fe,y:K1,Y:X1,Z:zC,"%":WC};S.x=B(n,S),S.X=B(r,S),S.c=B(t,S),_.x=B(n,_),_.X=B(r,_),_.c=B(t,_);function B(j,Y){return function(C){var x=[],V=-1,W=0,ue=j.length,te,ce,qt;for(C instanceof Date||(C=new Date(+C));++V<ue;)j.charCodeAt(V)===37&&(x.push(j.slice(W,V)),(ce=Q1[te=j.charAt(++V)])!=null?te=j.charAt(++V):ce=te==="e"?" ":"0",(qt=Y[te])&&(te=qt(C,ce)),x.push(te),W=V+1);return x.push(j.slice(W,V)),x.join("")}}function I(j,Y){return function(C){var x=Ms(1900,void 0,1),V=D(x,j,C+="",0),W,ue;if(V!=C.length)return null;if("Q"in x)return new Date(x.Q);if("s"in x)return new Date(x.s*1e3+("L"in x?x.L:0));if(Y&&!("Z"in x)&&(x.Z=0),"p"in x&&(x.H=x.H%12+x.p*12),x.m===void 0&&(x.m="q"in x?x.q:0),"V"in x){if(x.V<1||x.V>53)return null;"w"in x||(x.w=1),"Z"in x?(W=wd(Ms(x.y,0,1)),ue=W.getUTCDay(),W=ue>4||ue===0?xc.ceil(W):xc(W),W=Li.offset(W,(x.V-1)*7),x.y=W.getUTCFullYear(),x.m=W.getUTCMonth(),x.d=W.getUTCDate()+(x.w+6)%7):(W=yd(Ms(x.y,0,1)),ue=W.getDay(),W=ue>4||ue===0?vc.ceil(W):vc(W),W=Or.offset(W,(x.V-1)*7),x.y=W.getFullYear(),x.m=W.getMonth(),x.d=W.getDate()+(x.w+6)%7)}else("W"in x||"U"in x)&&("w"in x||(x.w="u"in x?x.u%7:"W"in x?1:0),ue="Z"in x?wd(Ms(x.y,0,1)).getUTCDay():yd(Ms(x.y,0,1)).getDay(),x.m=0,x.d="W"in x?(x.w+6)%7+x.W*7-(ue+5)%7:x.w+x.U*7-(ue+6)%7);return"Z"in x?(x.H+=x.Z/100|0,x.M+=x.Z%100,wd(x)):yd(x)}}function D(j,Y,C,x){for(var V=0,W=Y.length,ue=C.length,te,ce;V<W;){if(x>=ue)return-1;if(te=Y.charCodeAt(V++),te===37){if(te=Y.charAt(V++),ce=k[te in Q1?Y.charAt(V++):te],!ce||(x=ce(j,C,x))<0)return-1}else if(te!=C.charCodeAt(x++))return-1}return x}function M(j,Y,C){var x=l.exec(Y.slice(C));return x?(j.p=c.get(x[0].toLowerCase()),C+x[0].length):-1}function G(j,Y,C){var x=d.exec(Y.slice(C));return x?(j.w=p.get(x[0].toLowerCase()),C+x[0].length):-1}function N(j,Y,C){var x=f.exec(Y.slice(C));return x?(j.w=h.get(x[0].toLowerCase()),C+x[0].length):-1}function ne(j,Y,C){var x=w.exec(Y.slice(C));return x?(j.m=A.get(x[0].toLowerCase()),C+x[0].length):-1}function ie(j,Y,C){var x=m.exec(Y.slice(C));return x?(j.m=y.get(x[0].toLowerCase()),C+x[0].length):-1}function he(j,Y,C){return D(j,t,Y,C)}function me(j,Y,C){return D(j,n,Y,C)}function Fe(j,Y,C){return D(j,r,Y,C)}function Ae(j){return a[j.getDay()]}function Le(j){return o[j.getDay()]}function Oe(j){return u[j.getMonth()]}function Je(j){return s[j.getMonth()]}function Ce(j){return i[+(j.getHours()>=12)]}function ke(j){return 1+~~(j.getMonth()/3)}function gt(j){return a[j.getUTCDay()]}function $t(j){return o[j.getUTCDay()]}function He(j){return u[j.getUTCMonth()]}function L(j){return s[j.getUTCMonth()]}function P(j){return i[+(j.getUTCHours()>=12)]}function q(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var Y=B(j+="",S);return Y.toString=function(){return j},Y},parse:function(j){var Y=I(j+="",!1);return Y.toString=function(){return j},Y},utcFormat:function(j){var Y=B(j+="",_);return Y.toString=function(){return j},Y},utcParse:function(j){var Y=I(j+="",!0);return Y.toString=function(){return j},Y}}}var Q1={"-":"",_:" ",0:"0"},ut=/^\s*\d+/,DC=/^%/,RC=/[\\^$*+?|[\]().{}]/g;function we(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function FC(e){return e.replace(RC,"\\$&")}function Ps(e){return new RegExp("^(?:"+e.map(FC).join("|")+")","i")}function Ls(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function MC(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function PC(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function LC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function NC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function OC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function X1(e,t,n){var r=ut.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function K1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zC(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function UC(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function GC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function J1(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function HC(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eb(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function VC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function jC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function $C(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function qC(e,t,n){var r=ut.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function WC(e,t,n){var r=DC.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ZC(e,t,n){var r=ut.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function YC(e,t,n){var r=ut.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function tb(e,t){return we(e.getDate(),t,2)}function QC(e,t){return we(e.getHours(),t,2)}function XC(e,t){return we(e.getHours()%12||12,t,2)}function KC(e,t){return we(1+Or.count(Pn(e),e),t,3)}function nb(e,t){return we(e.getMilliseconds(),t,3)}function JC(e,t){return nb(e,t)+"000"}function e6(e,t){return we(e.getMonth()+1,t,2)}function t6(e,t){return we(e.getMinutes(),t,2)}function n6(e,t){return we(e.getSeconds(),t,2)}function r6(e){var t=e.getDay();return t===0?7:t}function i6(e,t){return we(As.count(Pn(e)-1,e),t,2)}function rb(e){var t=e.getDay();return t>=4||t===0?Ho(e):Ho.ceil(e)}function o6(e,t){return e=rb(e),we(Ho.count(Pn(e),e)+(Pn(e).getDay()===4),t,2)}function a6(e){return e.getDay()}function s6(e,t){return we(vc.count(Pn(e)-1,e),t,2)}function l6(e,t){return we(e.getFullYear()%100,t,2)}function u6(e,t){return e=rb(e),we(e.getFullYear()%100,t,2)}function c6(e,t){return we(e.getFullYear()%1e4,t,4)}function f6(e,t){var n=e.getDay();return e=n>=4||n===0?Ho(e):Ho.ceil(e),we(e.getFullYear()%1e4,t,4)}function h6(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+we(t/60|0,"0",2)+we(t%60,"0",2)}function ib(e,t){return we(e.getUTCDate(),t,2)}function d6(e,t){return we(e.getUTCHours(),t,2)}function p6(e,t){return we(e.getUTCHours()%12||12,t,2)}function g6(e,t){return we(1+Li.count(Ln(e),e),t,3)}function ob(e,t){return we(e.getUTCMilliseconds(),t,3)}function m6(e,t){return ob(e,t)+"000"}function b6(e,t){return we(e.getUTCMonth()+1,t,2)}function y6(e,t){return we(e.getUTCMinutes(),t,2)}function w6(e,t){return we(e.getUTCSeconds(),t,2)}function v6(e){var t=e.getUTCDay();return t===0?7:t}function x6(e,t){return we(Es.count(Ln(e)-1,e),t,2)}function ab(e){var t=e.getUTCDay();return t>=4||t===0?Vo(e):Vo.ceil(e)}function A6(e,t){return e=ab(e),we(Vo.count(Ln(e),e)+(Ln(e).getUTCDay()===4),t,2)}function E6(e){return e.getUTCDay()}function _6(e,t){return we(xc.count(Ln(e)-1,e),t,2)}function S6(e,t){return we(e.getUTCFullYear()%100,t,2)}function C6(e,t){return e=ab(e),we(e.getUTCFullYear()%100,t,2)}function k6(e,t){return we(e.getUTCFullYear()%1e4,t,4)}function T6(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Vo(e):Vo.ceil(e),we(e.getUTCFullYear()%1e4,t,4)}function I6(){return"+0000"}function sb(){return"%"}function lb(e){return+e}function ub(e){return Math.floor(+e/1e3)}var jo,vd,cb,xd,fb;B6({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function B6(e){return jo=Y1(e),vd=jo.format,cb=jo.parse,xd=jo.utcFormat,fb=jo.utcParse,jo}function Ns(e){const t={};return n=>t[n]||(t[n]=e(n))}function D6(e,t){return n=>{const r=e(n),i=r.indexOf(t);if(i<0)return r;let o=R6(r,i);const a=o<r.length?r.slice(o):"";for(;--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+a}}function R6(e,t){let n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}function F6(e){const t=Ns(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat(r){const i=Nr(r||",");if(i.precision==null){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1;break}return D6(t(i),t(".1f")(1)[1])}else return t(i)},formatSpan(r,i,o,a){a=Nr(a??",f");const s=Lr(r,i,o),u=Math.max(Math.abs(r),Math.abs(i));let l;if(a.precision==null)switch(a.type){case"s":return isNaN(l=j1(s,u))||(a.precision=l),n(a,u);case"":case"e":case"g":case"p":case"r":{isNaN(l=$1(s,u))||(a.precision=l-(a.type==="e"));break}case"f":case"%":{isNaN(l=V1(s))||(a.precision=l-(a.type==="%")*2);break}}return t(a)}}}M6();function M6(){return F6({format:mt,formatPrefix:hd})}function hb(e,t,n){n=n||{},At(n)||it(`Invalid time multi-format specifier: ${n}`);const r=t(Fs),i=t(Rs),o=t(Ds),a=t(Bs),s=t(Is),u=t(Ts),l=t(ks),c=t(Cs),f=e(n[Ec]||".%L"),h=e(n[Fs]||":%S"),d=e(n[Rs]||"%I:%M"),p=e(n[Ds]||"%I %p"),m=e(n[Bs]||n[Ac]||"%a %d"),y=e(n[Is]||"%b %d"),w=e(n[Ts]||"%B"),A=e(n[ks]||"%B"),S=e(n[Cs]||"%Y");return _=>(r(_)<_?f:i(_)<_?h:o(_)<_?d:a(_)<_?p:u(_)<_?s(_)<_?m:y:c(_)<_?l(_)<_?w:A:S)(_)}function db(e){const t=Ns(e.format),n=Ns(e.utcFormat);return{timeFormat:r=>Be(r)?t(r):hb(t,IC,r),utcFormat:r=>Be(r)?n(r):hb(n,BC,r),timeParse:Ns(e.parse),utcParse:Ns(e.utcParse)}}let Ad;P6();function P6(){return Ad=db({format:vd,parse:cb,utcFormat:xd,utcParse:fb})}function L6(e){return db(Y1(e))}function N6(e){return arguments.length?Ad=L6(e):Ad}const O6=e=>e!=null&&e===e,z6=e=>e==="true"||e==="false"||e===!0||e===!1,U6=e=>!Number.isNaN(Date.parse(e)),pb=e=>!Number.isNaN(+e)&&!(e instanceof Date),G6=e=>pb(e)&&Number.isInteger(+e),gb={boolean:gS,integer:us,number:us,date:bS,string:yS,unknown:tc},_c=[z6,G6,pb,U6],H6=["boolean","integer","number","date"];function V6(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=_c.length,i=_c.map((o,a)=>a+1);for(let o=0,a=0,s,u;o<n;++o)for(u=t?e[o][t]:e[o],s=0;s<r;++s)if(i[s]&&O6(u)&&!_c[s](u)&&(i[s]=0,++a,a===_c.length))return"string";return H6[i.reduce((o,a)=>o===0?a:o,0)-1]}function j6(e,t){return t.reduce((n,r)=>(n[r]=V6(e,r),n),{})}function mb(e){const t=function(n,r){const i={delimiter:e};return Ed(n,r?cS(r,i):i)};return t.responseType="text",t}function Ed(e,t){return t.header&&(e=t.header.map(Jh).join(t.delimiter)+`
24
- `+e),I1(t.delimiter).parse(e+"")}Ed.responseType="text";function $6(e){return typeof Buffer=="function"&&nn(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function _d(e,t){const n=t&&t.property?ec(t.property):tc;return At(e)&&!$6(e)?q6(n(e),t):n(JSON.parse(e))}_d.responseType="json";function q6(e,t){return!xt(e)&&dS(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const W6={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function bb(e,t){let n,r,i,o;return e=_d(e,t),t&&t.feature?(n=qS,i=t.feature):t&&t.mesh?(n=ZS,i=t.mesh,o=W6[t.filter]):it("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,o):it("Invalid TopoJSON object: "+i),r&&r.features||[r]}bb.responseType="json";const Sd={dsv:Ed,csv:mb(","),tsv:mb(" "),json:_d,topojson:bb};function yb(e,t){return arguments.length>1?(Sd[e]=t,this):Lo(Sd,e)?Sd[e]:null}function wb(e,t,n,r){t=t||{};const i=yb(t.type||"json");return i||it("Unknown data format type: "+t.type),e=i(e,t),t.parse&&Z6(e,t.parse,n,r),Lo(e,"columns")&&delete e.columns,e}function Z6(e,t,n,r){if(!e.length)return;const i=N6();n=n||i.timeParse,r=r||i.utcParse;let o=e.columns||Object.keys(e[0]),a,s,u,l,c,f;t==="auto"&&(t=j6(e,o)),o=Object.keys(t);const h=o.map(d=>{const p=t[d];let m,y;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),y=m[1],(y[0]==="'"&&y[y.length-1]==="'"||y[0]==='"'&&y[y.length-1]==='"')&&(y=y.slice(1,-1)),(m[0]==="utc"?r:n)(y);if(!gb[p])throw Error("Illegal format pattern: "+d+":"+p);return gb[p]});for(u=0,c=e.length,f=o.length;u<c;++u)for(a=e[u],l=0;l<f;++l)s=o[l],a[s]=h[l](a[s])}/**
23
+ `)}function l(f){return f.map(c).join(e)}function c(f){return f==null?"":f instanceof Date?NS(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:s,formatBody:a,formatRows:u,formatRow:l,formatValue:c}}var OS=F1(" "),zS=OS.parseRows;function US(e){return e}function GS(e){if(e==null)return US;var t,n,r=e.scale[0],i=e.scale[1],o=e.translate[0],s=e.translate[1];return function(a,u){u||(t=n=0);var l=2,c=a.length,f=new Array(c);for(f[0]=(t+=a[0])*r+o,f[1]=(n+=a[1])*i+s;l<c;)f[l]=a[l],++l;return f}}function HS(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}function VS(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return M1(e,n)})}:M1(e,t)}function M1(e,t){var n=t.id,r=t.bbox,i=t.properties==null?{}:t.properties,o=P1(e,t);return n==null&&r==null?{type:"Feature",properties:i,geometry:o}:r==null?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function P1(e,t){var n=GS(e.transform),r=e.arcs;function i(c,f){f.length&&f.pop();for(var h=r[c<0?~c:c],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));c<0&&HS(f,p)}function o(c){return n(c)}function s(c){for(var f=[],h=0,d=c.length;h<d;++h)i(c[h],f);return f.length<2&&f.push(f[0]),f}function a(c){for(var f=s(c);f.length<4;)f.push(f[0]);return f}function u(c){return c.map(a)}function l(c){var f=c.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:c.geometries.map(l)};case"Point":h=o(c.coordinates);break;case"MultiPoint":h=c.coordinates.map(o);break;case"LineString":h=s(c.arcs);break;case"MultiLineString":h=c.arcs.map(s);break;case"Polygon":h=u(c.arcs);break;case"MultiPolygon":h=c.arcs.map(u);break;default:return null}return{type:f,coordinates:h}}return l(t)}function jS(e,t){var n={},r={},i={},o=[],s=-1;t.forEach(function(l,c){var f=e.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=t[++s],t[s]=l,t[c]=h)}),t.forEach(function(l){var c=a(l),f=c[0],h=c[1],d,p;if(d=i[f])if(delete i[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var m=p===d?d:d.concat(p);r[m.start=d.start]=i[m.end=p.end]=m}else r[d.start]=i[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=i[f]){delete i[p.end];var y=p===d?d:p.concat(d);r[y.start=p.start]=i[y.end=d.end]=y}else r[d.start]=i[d.end]=d;else d=[l],r[d.start=f]=i[d.end=h]=d});function a(l){var c=e.arcs[l<0?~l:l],f=c[0],h;return e.transform?(h=[0,0],c.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=c[c.length-1],l<0?[h,f]:[f,h]}function u(l,c){for(var f in l){var h=l[f];delete c[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),o.push(h)}}return u(i,r),u(r,i),t.forEach(function(l){n[l<0?~l:l]||o.push([l])}),o}function $S(e){return P1(e,qS.apply(this,arguments))}function qS(e,t,n){var r,i,o;if(arguments.length>1)r=WS(e,t,n);else for(i=0,r=new Array(o=e.arcs.length);i<o;++i)r[i]=i;return{type:"MultiLineString",arcs:jS(e,r)}}function WS(e,t,n){var r=[],i=[],o;function s(f){var h=f<0?~f:f;(i[h]||(i[h]=[])).push({i:f,g:o})}function a(f){f.forEach(s)}function u(f){f.forEach(a)}function l(f){f.forEach(u)}function c(f){switch(o=f,f.type){case"GeometryCollection":f.geometries.forEach(c);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":u(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return c(t),i.forEach(n==null?function(f){r.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function Aa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ZS(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zo(e){let t,n,r;e.length!==2?(t=Aa,n=(a,u)=>Aa(e(a),u),r=(a,u)=>e(a)-u):(t=e===Aa||e===ZS?e:YS,n=e,r=e);function i(a,u,l=0,c=a.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(a[f],u)<0?l=f+1:c=f}while(l<c)}return l}function o(a,u,l=0,c=a.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(a[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function s(a,u,l=0,c=a.length){const f=i(a,u,l,c-1);return f>l&&r(a[f-1],u)>-r(a[f],u)?f-1:f}return{left:i,center:s,right:o}}function YS(){return 0}function L1(e){return e===null?NaN:+e}const N1=zo(Aa),Pr=N1.right;N1.left,zo(L1).center;function QS(e,t){let n,r;for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class or extends Map{constructor(t,n=JS){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(O1(this,t))}has(t){return super.has(O1(this,t))}set(t,n){return super.set(XS(this,t),n)}delete(t){return super.delete(KS(this,t))}}function O1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function XS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function KS({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function JS(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fd(e){return e}function fc(e,...t){return z1(e,fd,fd,t)}function eC(e,...t){return z1(e,Array.from,fd,t)}function z1(e,t,n,r){return function i(o,s){if(s>=r.length)return n(o);const a=new or,u=r[s++];let l=-1;for(const c of o){const f=u(c,++l,o),h=a.get(f);h?h.push(c):a.set(f,[c])}for(const[c,f]of a)a.set(c,i(f,s));return t(a)}(e,0)}const tC=Math.sqrt(50),nC=Math.sqrt(10),rC=Math.sqrt(2);function hc(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=tC?10:o>=nC?5:o>=rC?2:1;let a,u,l;return i<0?(l=Math.pow(10,-i)/s,a=Math.round(e*l),u=Math.round(t*l),a/l<e&&++a,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*s,a=Math.round(e/l),u=Math.round(t/l),a*l<e&&++a,u*l>t&&--u),u<a&&.5<=n&&n<2?hc(e,t,n*2):[a,u,l]}function dc(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,s]=r?hc(t,e,n):hc(e,t,n);if(!(o>=i))return[];const a=o-i+1,u=new Array(a);if(r)if(s<0)for(let l=0;l<a;++l)u[l]=(o-l)/-s;else for(let l=0;l<a;++l)u[l]=(o-l)*s;else if(s<0)for(let l=0;l<a;++l)u[l]=(i+l)/-s;else for(let l=0;l<a;++l)u[l]=(i+l)*s;return u}function hd(e,t,n){return t=+t,e=+e,n=+n,hc(e,t,n)[2]}function Ri(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?hd(t,e,n):hd(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function U1(e,t,n=L1){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e),a=+n(e[o+1],o+1,e);return s+(a-s)*(i-o)}}function xa(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function pc(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function iC(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gc(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Uo(e){return e=gc(Math.abs(e)),e?e[1]:NaN}function oC(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),o.push(n.substring(i-=a,i+a)),!((u+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}function sC(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var aC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Go(e){if(!(t=aC.exec(e)))throw new Error("invalid format: "+e);var t;return new dd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Go.prototype=dd.prototype;function dd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}dd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function lC(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var G1;function uC(e,t){var n=gc(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(G1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+gc(e,Math.max(0,t+o-1))[0]}function H1(e,t){var n=gc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const V1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:iC,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>H1(e*100,t),r:H1,s:uC,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function j1(e){return e}var $1=Array.prototype.map,q1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function cC(e){var t=e.grouping===void 0||e.thousands===void 0?j1:oC($1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?j1:sC($1.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Go(f);var h=f.fill,d=f.align,p=f.sign,m=f.symbol,y=f.zero,w=f.width,x=f.comma,S=f.precision,_=f.trim,k=f.type;k==="n"?(x=!0,k="g"):V1[k]||(S===void 0&&(S=12),_=!0,k="g"),(y||h==="0"&&d==="=")&&(y=!0,h="0",d="=");var B=m==="$"?n:m==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",I=m==="$"?r:/[%p]/.test(k)?s:"",D=V1[k],M=/[defgprs%]/.test(k);S=S===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function G(N){var ne=B,ie=I,he,me,Fe;if(k==="c")ie=D(N)+ie,N="";else{N=+N;var xe=N<0||1/N<0;if(N=isNaN(N)?u:D(Math.abs(N),S),_&&(N=lC(N)),xe&&+N==0&&p!=="+"&&(xe=!1),ne=(xe?p==="("?p:a:p==="-"||p==="("?"":p)+ne,ie=(k==="s"?q1[8+G1/3]:"")+ie+(xe&&p==="("?")":""),M){for(he=-1,me=N.length;++he<me;)if(Fe=N.charCodeAt(he),48>Fe||Fe>57){ie=(Fe===46?i+N.slice(he+1):N.slice(he))+ie,N=N.slice(0,he);break}}}x&&!y&&(N=t(N,1/0));var Le=ne.length+N.length+ie.length,Oe=Le<w?new Array(w-Le+1).join(h):"";switch(x&&y&&(N=t(Oe+N,Oe.length?w-ie.length:1/0),Oe=""),d){case"<":N=ne+N+ie+Oe;break;case"=":N=ne+Oe+N+ie;break;case"^":N=Oe.slice(0,Le=Oe.length>>1)+ne+N+ie+Oe.slice(Le);break;default:N=Oe+ne+N+ie;break}return o(N)}return G.toString=function(){return f+""},G}function c(f,h){var d=l((f=Go(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Uo(h)/3)))*3,m=Math.pow(10,-p),y=q1[8+p/3];return function(w){return d(m*w)+y}}return{format:l,formatPrefix:c}}var mc,xt,W1;fC({thousands:",",grouping:[3],currency:["$",""]});function fC(e){return mc=cC(e),xt=mc.format,W1=mc.formatPrefix,mc}function hC(e){return Math.max(0,-Uo(Math.abs(e)))}function dC(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Uo(t)/3)))*3-Uo(Math.abs(e)))}function pC(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Uo(t)-Uo(e))+1}const pd=new Date,gd=new Date;function ot(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const u=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return u;let l;do u.push(l=new Date(+o)),t(o,a),e(o);while(l<o&&o<s);return u},i.filter=o=>ot(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(i.count=(o,s)=>(pd.setTime(+o),gd.setTime(+s),e(pd),e(gd),Math.floor(n(pd,gd))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Ho=ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ho.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ho),Ho.range;const sr=1e3,rn=sr*60,ar=rn*60,lr=ar*24,md=lr*7,Z1=lr*30,bd=lr*365,ur=ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getUTCSeconds());ur.range;const bc=ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sr)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getMinutes());bc.range;const yc=ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCMinutes());yc.range;const wc=ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*sr-e.getMinutes()*rn)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());wc.range;const vc=ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());vc.range;const Lr=ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rn)/lr,e=>e.getDate()-1);Lr.range;const Fi=ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>e.getUTCDate()-1);Fi.range;const Y1=ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lr,e=>Math.floor(e/lr));Y1.range;function Mi(e){return ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*rn)/md)}const Ea=Mi(0),Ac=Mi(1),gC=Mi(2),mC=Mi(3),Vo=Mi(4),bC=Mi(5),yC=Mi(6);Ea.range,Ac.range,gC.range,mC.range,Vo.range,bC.range,yC.range;function Pi(e){return ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/md)}const _a=Pi(0),xc=Pi(1),wC=Pi(2),vC=Pi(3),jo=Pi(4),AC=Pi(5),xC=Pi(6);_a.range,xc.range,wC.range,vC.range,jo.range,AC.range,xC.range;const Sa=ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Sa.range;const Ca=ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Ca.range;const Ln=ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Ln.range;const Nn=ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Nn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Nn.range;function Q1(e,t,n,r,i,o){const s=[[ur,1,sr],[ur,5,5*sr],[ur,15,15*sr],[ur,30,30*sr],[o,1,rn],[o,5,5*rn],[o,15,15*rn],[o,30,30*rn],[i,1,ar],[i,3,3*ar],[i,6,6*ar],[i,12,12*ar],[r,1,lr],[r,2,2*lr],[n,1,md],[t,1,Z1],[t,3,3*Z1],[e,1,bd]];function a(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const d=f&&typeof f.range=="function"?f:u(l,c,f),p=d?d.range(l,+c+1):[];return h?p.reverse():p}function u(l,c,f){const h=Math.abs(c-l)/f,d=zo(([,,y])=>y).right(s,h);if(d===s.length)return e.every(Ri(l/bd,c/bd,f));if(d===0)return Ho.every(Math.max(Ri(l,c,f),1));const[p,m]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return p.every(m)}return[a,u]}const[EC,_C]=Q1(Nn,Ca,_a,Y1,vc,yc),[SC,CC]=Q1(Ln,Sa,Ea,Lr,wc,bc),ka="year",Ta="quarter",Ia="month",Ba="week",Da="date",Ec="day",yd="dayofyear",Ra="hours",Fa="minutes",Ma="seconds",_c="milliseconds";[ka,Ta,Ia,Ba,Da,Ec,yd,Ra,Fa,Ma,_c].reduce((e,t,n)=>(e[t]=1+n,e),{});const kC={[ka]:Ln,[Ta]:Sa.every(3),[Ia]:Sa,[Ba]:Ea,[Da]:Lr,[Ec]:Lr,[yd]:Lr,[Ra]:wc,[Fa]:bc,[Ma]:ur,[_c]:Ho},TC={[ka]:Nn,[Ta]:Ca.every(3),[Ia]:Ca,[Ba]:_a,[Da]:Fi,[Ec]:Fi,[yd]:Fi,[Ra]:vc,[Fa]:yc,[Ma]:ur,[_c]:Ho};function IC(e){return kC[e]}function BC(e){return TC[e]}function wd(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function vd(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Pa(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function X1(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,u=e.shortMonths,l=La(i),c=Na(i),f=La(o),h=Na(o),d=La(s),p=Na(s),m=La(a),y=Na(a),w=La(u),x=Na(u),S={a:xe,A:Le,b:Oe,B:Je,c:null,d:r2,e:r2,f:JC,g:u6,G:f6,H:QC,I:XC,j:KC,L:i2,m:e6,M:t6,p:Ce,q:ke,Q:c2,s:f2,S:n6,u:r6,U:i6,V:o6,w:s6,W:a6,x:null,X:null,y:l6,Y:c6,Z:h6,"%":u2},_={a:gt,A:$t,b:Ve,B:L,c:null,d:s2,e:s2,f:m6,g:C6,G:T6,H:d6,I:p6,j:g6,L:a2,m:b6,M:y6,p:P,q,Q:c2,s:f2,S:w6,u:v6,U:A6,V:x6,w:E6,W:_6,x:null,X:null,y:S6,Y:k6,Z:I6,"%":u2},k={a:G,A:N,b:ne,B:ie,c:he,d:t2,e:t2,f:qC,g:e2,G:J1,H:n2,I:n2,j:HC,L:$C,m:GC,M:VC,p:M,q:UC,Q:ZC,s:YC,S:jC,u:PC,U:LC,V:NC,w:MC,W:OC,x:me,X:Fe,y:e2,Y:J1,Z:zC,"%":WC};S.x=B(n,S),S.X=B(r,S),S.c=B(t,S),_.x=B(n,_),_.X=B(r,_),_.c=B(t,_);function B(j,Y){return function(C){var A=[],V=-1,W=0,ue=j.length,te,ce,qt;for(C instanceof Date||(C=new Date(+C));++V<ue;)j.charCodeAt(V)===37&&(A.push(j.slice(W,V)),(ce=K1[te=j.charAt(++V)])!=null?te=j.charAt(++V):ce=te==="e"?" ":"0",(qt=Y[te])&&(te=qt(C,ce)),A.push(te),W=V+1);return A.push(j.slice(W,V)),A.join("")}}function I(j,Y){return function(C){var A=Pa(1900,void 0,1),V=D(A,j,C+="",0),W,ue;if(V!=C.length)return null;if("Q"in A)return new Date(A.Q);if("s"in A)return new Date(A.s*1e3+("L"in A?A.L:0));if(Y&&!("Z"in A)&&(A.Z=0),"p"in A&&(A.H=A.H%12+A.p*12),A.m===void 0&&(A.m="q"in A?A.q:0),"V"in A){if(A.V<1||A.V>53)return null;"w"in A||(A.w=1),"Z"in A?(W=vd(Pa(A.y,0,1)),ue=W.getUTCDay(),W=ue>4||ue===0?xc.ceil(W):xc(W),W=Fi.offset(W,(A.V-1)*7),A.y=W.getUTCFullYear(),A.m=W.getUTCMonth(),A.d=W.getUTCDate()+(A.w+6)%7):(W=wd(Pa(A.y,0,1)),ue=W.getDay(),W=ue>4||ue===0?Ac.ceil(W):Ac(W),W=Lr.offset(W,(A.V-1)*7),A.y=W.getFullYear(),A.m=W.getMonth(),A.d=W.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),ue="Z"in A?vd(Pa(A.y,0,1)).getUTCDay():wd(Pa(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(ue+5)%7:A.w+A.U*7-(ue+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,vd(A)):wd(A)}}function D(j,Y,C,A){for(var V=0,W=Y.length,ue=C.length,te,ce;V<W;){if(A>=ue)return-1;if(te=Y.charCodeAt(V++),te===37){if(te=Y.charAt(V++),ce=k[te in K1?Y.charAt(V++):te],!ce||(A=ce(j,C,A))<0)return-1}else if(te!=C.charCodeAt(A++))return-1}return A}function M(j,Y,C){var A=l.exec(Y.slice(C));return A?(j.p=c.get(A[0].toLowerCase()),C+A[0].length):-1}function G(j,Y,C){var A=d.exec(Y.slice(C));return A?(j.w=p.get(A[0].toLowerCase()),C+A[0].length):-1}function N(j,Y,C){var A=f.exec(Y.slice(C));return A?(j.w=h.get(A[0].toLowerCase()),C+A[0].length):-1}function ne(j,Y,C){var A=w.exec(Y.slice(C));return A?(j.m=x.get(A[0].toLowerCase()),C+A[0].length):-1}function ie(j,Y,C){var A=m.exec(Y.slice(C));return A?(j.m=y.get(A[0].toLowerCase()),C+A[0].length):-1}function he(j,Y,C){return D(j,t,Y,C)}function me(j,Y,C){return D(j,n,Y,C)}function Fe(j,Y,C){return D(j,r,Y,C)}function xe(j){return s[j.getDay()]}function Le(j){return o[j.getDay()]}function Oe(j){return u[j.getMonth()]}function Je(j){return a[j.getMonth()]}function Ce(j){return i[+(j.getHours()>=12)]}function ke(j){return 1+~~(j.getMonth()/3)}function gt(j){return s[j.getUTCDay()]}function $t(j){return o[j.getUTCDay()]}function Ve(j){return u[j.getUTCMonth()]}function L(j){return a[j.getUTCMonth()]}function P(j){return i[+(j.getUTCHours()>=12)]}function q(j){return 1+~~(j.getUTCMonth()/3)}return{format:function(j){var Y=B(j+="",S);return Y.toString=function(){return j},Y},parse:function(j){var Y=I(j+="",!1);return Y.toString=function(){return j},Y},utcFormat:function(j){var Y=B(j+="",_);return Y.toString=function(){return j},Y},utcParse:function(j){var Y=I(j+="",!0);return Y.toString=function(){return j},Y}}}var K1={"-":"",_:" ",0:"0"},ut=/^\s*\d+/,DC=/^%/,RC=/[\\^$*+?|[\]().{}]/g;function ye(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function FC(e){return e.replace(RC,"\\$&")}function La(e){return new RegExp("^(?:"+e.map(FC).join("|")+")","i")}function Na(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function MC(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function PC(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function LC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function NC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function OC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function J1(e,t,n){var r=ut.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function e2(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zC(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function UC(e,t,n){var r=ut.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function GC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function t2(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function HC(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function n2(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function VC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function jC(e,t,n){var r=ut.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function $C(e,t,n){var r=ut.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function qC(e,t,n){var r=ut.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function WC(e,t,n){var r=DC.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ZC(e,t,n){var r=ut.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function YC(e,t,n){var r=ut.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function r2(e,t){return ye(e.getDate(),t,2)}function QC(e,t){return ye(e.getHours(),t,2)}function XC(e,t){return ye(e.getHours()%12||12,t,2)}function KC(e,t){return ye(1+Lr.count(Ln(e),e),t,3)}function i2(e,t){return ye(e.getMilliseconds(),t,3)}function JC(e,t){return i2(e,t)+"000"}function e6(e,t){return ye(e.getMonth()+1,t,2)}function t6(e,t){return ye(e.getMinutes(),t,2)}function n6(e,t){return ye(e.getSeconds(),t,2)}function r6(e){var t=e.getDay();return t===0?7:t}function i6(e,t){return ye(Ea.count(Ln(e)-1,e),t,2)}function o2(e){var t=e.getDay();return t>=4||t===0?Vo(e):Vo.ceil(e)}function o6(e,t){return e=o2(e),ye(Vo.count(Ln(e),e)+(Ln(e).getDay()===4),t,2)}function s6(e){return e.getDay()}function a6(e,t){return ye(Ac.count(Ln(e)-1,e),t,2)}function l6(e,t){return ye(e.getFullYear()%100,t,2)}function u6(e,t){return e=o2(e),ye(e.getFullYear()%100,t,2)}function c6(e,t){return ye(e.getFullYear()%1e4,t,4)}function f6(e,t){var n=e.getDay();return e=n>=4||n===0?Vo(e):Vo.ceil(e),ye(e.getFullYear()%1e4,t,4)}function h6(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function s2(e,t){return ye(e.getUTCDate(),t,2)}function d6(e,t){return ye(e.getUTCHours(),t,2)}function p6(e,t){return ye(e.getUTCHours()%12||12,t,2)}function g6(e,t){return ye(1+Fi.count(Nn(e),e),t,3)}function a2(e,t){return ye(e.getUTCMilliseconds(),t,3)}function m6(e,t){return a2(e,t)+"000"}function b6(e,t){return ye(e.getUTCMonth()+1,t,2)}function y6(e,t){return ye(e.getUTCMinutes(),t,2)}function w6(e,t){return ye(e.getUTCSeconds(),t,2)}function v6(e){var t=e.getUTCDay();return t===0?7:t}function A6(e,t){return ye(_a.count(Nn(e)-1,e),t,2)}function l2(e){var t=e.getUTCDay();return t>=4||t===0?jo(e):jo.ceil(e)}function x6(e,t){return e=l2(e),ye(jo.count(Nn(e),e)+(Nn(e).getUTCDay()===4),t,2)}function E6(e){return e.getUTCDay()}function _6(e,t){return ye(xc.count(Nn(e)-1,e),t,2)}function S6(e,t){return ye(e.getUTCFullYear()%100,t,2)}function C6(e,t){return e=l2(e),ye(e.getUTCFullYear()%100,t,2)}function k6(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function T6(e,t){var n=e.getUTCDay();return e=n>=4||n===0?jo(e):jo.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function I6(){return"+0000"}function u2(){return"%"}function c2(e){return+e}function f2(e){return Math.floor(+e/1e3)}var $o,Ad,h2,xd,d2;B6({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function B6(e){return $o=X1(e),Ad=$o.format,h2=$o.parse,xd=$o.utcFormat,d2=$o.utcParse,$o}function Sc(e){const t={};return n=>t[n]||(t[n]=e(n))}function p2(e,t,n){n=n||{},At(n)||it(`Invalid time multi-format specifier: ${n}`);const r=t(Ma),i=t(Fa),o=t(Ra),s=t(Da),a=t(Ba),u=t(Ia),l=t(Ta),c=t(ka),f=e(n[_c]||".%L"),h=e(n[Ma]||":%S"),d=e(n[Fa]||"%I:%M"),p=e(n[Ra]||"%I %p"),m=e(n[Da]||n[Ec]||"%a %d"),y=e(n[Ba]||"%b %d"),w=e(n[Ia]||"%B"),x=e(n[Ta]||"%B"),S=e(n[ka]||"%Y");return _=>(r(_)<_?f:i(_)<_?h:o(_)<_?d:s(_)<_?p:u(_)<_?a(_)<_?m:y:c(_)<_?l(_)<_?w:x:S)(_)}function g2(e){const t=Sc(e.format),n=Sc(e.utcFormat);return{timeFormat:r=>Be(r)?t(r):p2(t,IC,r),utcFormat:r=>Be(r)?n(r):p2(n,BC,r),timeParse:Sc(e.parse),utcParse:Sc(e.utcParse)}}let Ed;D6();function D6(){return Ed=g2({format:Ad,parse:h2,utcFormat:xd,utcParse:d2})}function R6(e){return g2(X1(e))}function F6(e){return arguments.length?Ed=R6(e):Ed}const M6=e=>e!=null&&e===e,P6=e=>e==="true"||e==="false"||e===!0||e===!1,L6=e=>!Number.isNaN(Date.parse(e)),m2=e=>!Number.isNaN(+e)&&!(e instanceof Date),N6=e=>m2(e)&&Number.isInteger(+e),b2={boolean:hS,integer:ca,number:ca,date:pS,string:gS,unknown:nc},Cc=[P6,N6,m2,L6],O6=["boolean","integer","number","date"];function z6(e,t){if(!e||!e.length)return"unknown";const n=e.length,r=Cc.length,i=Cc.map((o,s)=>s+1);for(let o=0,s=0,a,u;o<n;++o)for(u=t?e[o][t]:e[o],a=0;a<r;++a)if(i[a]&&M6(u)&&!Cc[a](u)&&(i[a]=0,++s,s===Cc.length))return"string";return O6[i.reduce((o,s)=>o===0?s:o,0)-1]}function U6(e,t){return t.reduce((n,r)=>(n[r]=z6(e,r),n),{})}function y2(e){const t=function(n,r){const i={delimiter:e};return _d(n,r?aS(r,i):i)};return t.responseType="text",t}function _d(e,t){return t.header&&(e=t.header.map(td).join(t.delimiter)+`
24
+ `+e),F1(t.delimiter).parse(e+"")}_d.responseType="text";function G6(e){return typeof Buffer=="function"&&nn(Buffer.isBuffer)?Buffer.isBuffer(e):!1}function Sd(e,t){const n=t&&t.property?tc(t.property):nc;return At(e)&&!G6(e)?H6(n(e),t):n(JSON.parse(e))}Sd.responseType="json";function H6(e,t){return!vt(e)&&cS(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}const V6={interior:(e,t)=>e!==t,exterior:(e,t)=>e===t};function w2(e,t){let n,r,i,o;return e=Sd(e,t),t&&t.feature?(n=VS,i=t.feature):t&&t.mesh?(n=$S,i=t.mesh,o=V6[t.filter]):it("Missing TopoJSON feature or mesh parameter."),r=(r=e.objects[i])?n(e,r,o):it("Invalid TopoJSON object: "+i),r&&r.features||[r]}w2.responseType="json";const Cd={dsv:_d,csv:y2(","),tsv:y2(" "),json:Sd,topojson:w2};function kd(e,t){return arguments.length>1?(Cd[e]=t,this):Lo(Cd,e)?Cd[e]:null}function v2(e,t,n,r){t=t||{};const i=kd(t.type||"json");return i||it("Unknown data format type: "+t.type),e=i(e,t),t.parse&&j6(e,t.parse,n,r),Lo(e,"columns")&&delete e.columns,e}function j6(e,t,n,r){if(!e.length)return;const i=F6();n=n||i.timeParse,r=r||i.utcParse;let o=e.columns||Object.keys(e[0]),s,a,u,l,c,f;t==="auto"&&(t=U6(e,o)),o=Object.keys(t);const h=o.map(d=>{const p=t[d];let m,y;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),y=m[1],(y[0]==="'"&&y[y.length-1]==="'"||y[0]==='"'&&y[y.length-1]==='"')&&(y=y.slice(1,-1)),(m[0]==="utc"?r:n)(y);if(!b2[p])throw Error("Illegal format pattern: "+d+":"+p);return b2[p]});for(u=0,c=e.length,f=o.length;u<c;++u)for(s=e[u],l=0;l<f;++l)a=o[l],s[a]=h[l](s[a])}/**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
- */const Y6={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Q6=e=>(...t)=>({_$litDirective$:e,values:t});let X6=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};/**
28
+ */const $6={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},q6=e=>(...t)=>({_$litDirective$:e,values:t});let W6=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};/**
29
29
  * @license
30
30
  * Copyright 2018 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */const vb="important",K6=" !"+vb,J6=Q6(class extends X6{constructor(e){var t;if(super(e),e.type!==Y6.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return r==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(e,[t]){const{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?n.removeProperty(r):n[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const o=typeof i=="string"&&i.endsWith(K6);r.includes("-")||o?n.setProperty(r,o?i.slice(0,-11):i,o?vb:""):n[r]=i}}return Mi}}),e8="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e.spinner_ajPY{transform-origin:center;animation:spinner_AtaB%20.75s%20infinite%20linear}@keyframes%20spinner_AtaB{100%25{transform:rotate(360deg)}}%3c/style%3e%3cpath%20d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z'%20opacity='.25'/%3e%3cpath%20d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%20class='spinner_ajPY'/%3e%3c/svg%3e",t8=`
32
+ */const A2="important",Z6=" !"+A2,Y6=q6(class extends W6{constructor(e){var t;if(super(e),e.type!==$6.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return r==null?t:t+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(e,[t]){const{style:n}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?n.removeProperty(r):n[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const o=typeof i=="string"&&i.endsWith(Z6);r.includes("-")||o?n.setProperty(r,o?i.slice(0,-11):i,o?A2:""):n[r]=i}}return Bi}}),Q6="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e.spinner_ajPY{transform-origin:center;animation:spinner_AtaB%20.75s%20infinite%20linear}@keyframes%20spinner_AtaB{100%25{transform:rotate(360deg)}}%3c/style%3e%3cpath%20d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z'%20opacity='.25'/%3e%3cpath%20d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%20class='spinner_ajPY'/%3e%3c/svg%3e",X6=`
33
33
  .genome-spy {
34
34
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
35
35
  position: relative;
@@ -222,9 +222,9 @@
222
222
  font-size: 14px;
223
223
  padding: 10px;
224
224
  }
225
- `;function n8(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function Cd(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Nt(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function Os(e){return e[e.length-1]}class r8{constructor(t){this.container=t,this.element=document.createElement("div"),this.element.className="tooltip",this._visible=!0,this.container.appendChild(this.element),this._previousTooltipDatum=void 0,this.enabledStack=[!0],this._penaltyUntil=0,this._lastCoords=void 0,this._previousMove=0,this.clear()}set visible(t){t!=this._visible&&(this.element.style.display=t?null:"none",this._visible=t)}get visible(){return this._visible}get enabled(){return Os(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=n8(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&i8(this.mouseCoords,this._lastCoords)>20&&(this._penaltyUntil=n+400),this._lastCoords=this.mouseCoords,this.visible&&this.updatePlacement(),this._previousMove=n}updatePlacement(){const[n,r]=this.mouseCoords;let i=n+20;i>this.container.clientWidth-this.element.offsetWidth&&(i=n-20-this.element.offsetWidth),this.element.style.left=i+"px",this.element.style.top=Math.min(r+20,this.container.clientHeight-this.element.offsetHeight)+"px"}setContent(t){if(!t||!this.enabled||this._isPenalty()){this.visible&&(ys("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}ys(t,this.element),this.visible=!0,this.updatePlacement()}clear(){this._previousTooltipDatum=void 0,this.setContent(void 0)}updateWithDatum(t,n){t!==this._previousTooltipDatum&&(this._previousTooltipDatum=t,n||(n=r=>Promise.resolve(Ke` ${JSON.stringify(r)} `)),n(t).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return this._penaltyUntil&&this._penaltyUntil>performance.now()}}function i8(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])**2;return Math.sqrt(n)}/* @license twgl.js 4.22.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
225
+ `;function K6(e,t){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}function kc(e,t){return e.length==t.length&&e.every((n,r)=>e[r]===t[r])}function Nt(e){return Array.isArray(e)?e:typeof e<"u"?[e]:[]}function Oa(e){return e[e.length-1]}class J6{constructor(t){this.container=t,this.element=document.createElement("div"),this.element.className="tooltip",this._visible=!0,this.container.appendChild(this.element),this._previousTooltipDatum=void 0,this.enabledStack=[!0],this._penaltyUntil=0,this._lastCoords=void 0,this._previousMove=0,this.clear()}set visible(t){t!=this._visible&&(this.element.style.display=t?null:"none",this._visible=t)}get visible(){return this._visible}get enabled(){return Oa(this.enabledStack)??!0}pushEnabledState(t){this.enabledStack.push(t),t||(this.visible=!1)}popEnabledState(){this.enabledStack.pop()}handleMouseMove(t){this.mouseCoords=K6(this.container,t);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this._previousMove>500&&(this._penaltyUntil=n+70),this._lastCoords&&e8(this.mouseCoords,this._lastCoords)>20&&(this._penaltyUntil=n+400),this._lastCoords=this.mouseCoords,this.visible&&this.updatePlacement(),this._previousMove=n}updatePlacement(){const[n,r]=this.mouseCoords;let i=n+20;i>this.container.clientWidth-this.element.offsetWidth&&(i=n-20-this.element.offsetWidth),this.element.style.left=i+"px",this.element.style.top=Math.min(r+20,this.container.clientHeight-this.element.offsetHeight)+"px"}setContent(t){if(!t||!this.enabled||this._isPenalty()){this.visible&&(wa("",this.element),this.visible=!1),this._previousTooltipDatum=void 0;return}wa(t,this.element),this.visible=!0,this.updatePlacement()}clear(){this._previousTooltipDatum=void 0,this.setContent(void 0)}updateWithDatum(t,n){t!==this._previousTooltipDatum&&(this._previousTooltipDatum=t,n||(n=r=>Promise.resolve(Ke` ${JSON.stringify(r)} `)),n(t).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return this._penaltyUntil&&this._penaltyUntil>performance.now()}}function e8(e,t){let n=0;for(let r=0;r<e.length;r++)n+=(e[r]-t[r])**2;return Math.sqrt(n)}/* @license twgl.js 4.24.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
226
226
  Available via the MIT license.
227
- see: http://github.com/greggman/twgl.js for details */const kd=5120,zs=5121,Td=5122,Id=5123,Bd=5124,Dd=5125,Rd=5126,o8=32819,a8=32820,s8=33635,l8=5131,u8=33640,c8=35899,f8=35902,h8=36269,d8=34042,xb={};{const e=xb;e[kd]=Int8Array,e[zs]=Uint8Array,e[Td]=Int16Array,e[Id]=Uint16Array,e[Bd]=Int32Array,e[Dd]=Uint32Array,e[Rd]=Float32Array,e[o8]=Uint16Array,e[a8]=Uint16Array,e[s8]=Uint16Array,e[l8]=Uint16Array,e[u8]=Uint32Array,e[c8]=Uint32Array,e[f8]=Uint32Array,e[h8]=Uint32Array,e[d8]=Uint32Array}function Fd(e){if(e instanceof Int8Array)return kd;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return zs;if(e instanceof Int16Array)return Td;if(e instanceof Uint16Array)return Id;if(e instanceof Int32Array)return Bd;if(e instanceof Uint32Array)return Dd;if(e instanceof Float32Array)return Rd;throw new Error("unsupported typed array type")}function p8(e){if(e===Int8Array)return kd;if(e===Uint8Array||e===Uint8ClampedArray)return zs;if(e===Int16Array)return Td;if(e===Uint16Array)return Id;if(e===Int32Array)return Bd;if(e===Uint32Array)return Dd;if(e===Float32Array)return Rd;throw new Error("unsupported typed array type")}function g8(e){const t=xb[e];if(!t)throw new Error("unknown gl type");return t}const Sc=typeof SharedArrayBuffer<"u"?function(t){return t&&t.buffer&&(t.buffer instanceof ArrayBuffer||t.buffer instanceof SharedArrayBuffer)}:function(t){return t&&t.buffer&&t.buffer instanceof ArrayBuffer};function m8(...e){console.error(...e)}function Ab(...e){console.warn(...e)}function b8(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function Eb(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function Cc(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function y8(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const _b=35044,Nn=34962,w8=34963,v8=34660,x8=5120,A8=5121,E8=5122,_8=5123,S8=5124,C8=5125,k8=5126,Sb={attribPrefix:""};function Cb(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||_b)}function kb(e,t,n,r){if(b8(e,t))return t;n=n||Nn;const i=e.createBuffer();return Cb(e,n,i,t,r),i}function Tb(e){return e==="indices"}function T8(e){return e instanceof Int8Array||e instanceof Uint8Array}function I8(e){return e===Int8Array||e===Uint8Array}function B8(e){return e.length?e:e.data}const D8=/coord|texture/i,R8=/color|colour/i;function Ib(e,t){let n;if(D8.test(e)?n=2:R8.test(e)?n=4:n=3,t%n>0)throw new Error(`Can not guess numComponents for attribute '${e}'. Tried ${n} but ${t} values is not evenly divisible by ${n}. You should specify it.`);return n}function F8(e,t){return e.numComponents||e.size||Ib(t,B8(e).length)}function Md(e,t){if(Sc(e))return e;if(Sc(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(Tb(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function M8(e,t){const n={};return Object.keys(t).forEach(function(r){if(!Tb(r)){const i=t[r],o=i.attrib||i.name||i.attribName||Sb.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!Sc(i.value))throw new Error("array.value is not array or typedarray");n[o]={value:i.value}}else{let a,s,u,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)a=i.buffer,l=i.numComponents||i.size,s=i.type,u=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const c=i.data||i,f=i.type||Float32Array,h=c*f.BYTES_PER_ELEMENT;s=p8(f),u=i.normalize!==void 0?i.normalize:I8(f),l=i.numComponents||i.size||Ib(r,c),a=e.createBuffer(),e.bindBuffer(Nn,a),e.bufferData(Nn,h,i.drawType||_b)}else{const c=Md(i,r);a=kb(e,c,void 0,i.drawType),s=Fd(c),u=i.normalize!==void 0?i.normalize:T8(c),l=F8(i,r)}n[o]={buffer:a,numComponents:l,type:s,normalize:u,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(Nn,null),n}function P8(e,t,n,r){n=Md(n),r!==void 0?(e.bindBuffer(Nn,t.buffer),e.bufferSubData(Nn,r,n)):Cb(e,Nn,t.buffer,n,t.drawType)}function L8(e,t){return t===x8||t===A8?1:t===E8||t===_8?2:t===S8||t===C8||t===k8?4:0}const Pd=["position","positions","a_position"];function N8(e,t){let n,r;for(r=0;r<Pd.length&&(n=Pd[r],!(n in t||(n=Sb.attribPrefix+n,n in t)));++r);r===Pd.length&&(n=Object.keys(t)[0]);const i=t[n];e.bindBuffer(Nn,i.buffer);const o=e.getBufferParameter(Nn,v8);e.bindBuffer(Nn,null);const a=L8(e,i.type),s=o/a,u=i.numComponents||i.size,l=s/u;if(l%1!==0)throw new Error(`numComponents ${u} not correct for length ${length}`);return l}function O8(e,t,n){const r=M8(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const o=t.indices;if(o){const a=Md(o,"indices");i.indices=kb(e,a,w8),i.numElements=a.length,i.elementType=Fd(a)}else i.numElements||(i.numElements=N8(e,i.attribs));return i}function $o(e){return!!e.texStorage2D}const Ld=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const o in r)if(typeof r[o]=="number"){const a=t[r[o]];t[r[o]]=a?`${a} | ${o}`:o}e[i]=!0}}return function(i,o){return n(i),t[o]||(typeof o=="number"?`0x${o.toString(16)}`:o)}}(),zr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},qo=Sc,Bb=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),Db=6406,On=6407,qe=6408,Rb=6409,Fb=6410,Us=6402,Mb=34041,kc=33071,z8=9728,U8=9729,cr=3553,fr=34067,Ur=32879,Gr=35866,Tc=34069,G8=34070,H8=34071,V8=34072,j8=34073,$8=34074,Nd=10241,Od=10240,Ic=10242,Bc=10243,Pb=32882,q8=33082,W8=33083,Z8=33084,Y8=33085,zd=3317,Lb=3314,Nb=32878,Ob=3316,zb=3315,Ub=32877,Q8=37443,X8=37441,K8=37440,J8=33321,e5=36756,t5=33325,n5=33326,r5=33330,i5=33329,o5=33338,a5=33337,s5=33340,l5=33339,u5=33323,c5=36757,f5=33327,h5=33328,d5=33336,p5=33335,g5=33332,m5=33331,b5=33334,y5=33333,w5=32849,v5=35905,x5=36194,A5=36758,E5=35898,_5=35901,S5=34843,C5=34837,k5=36221,T5=36239,I5=36215,B5=36233,D5=36209,R5=36227,F5=32856,M5=35907,P5=36759,L5=32855,N5=32854,O5=32857,z5=34842,U5=34836,G5=36220,H5=36238,V5=36975,j5=36214,$5=36232,q5=36226,W5=36208,Z5=33189,Y5=33190,Q5=36012,X5=36013,K5=35056,Hr=5120,We=5121,Dc=5122,Wo=5123,Rc=5124,zi=5125,Et=5126,Gb=32819,Hb=32820,Vb=33635,xn=5131,Gs=36193,Ud=33640,J5=35899,ek=35902,tk=36269,nk=34042,Fc=33319,Zo=33320,Mc=6403,Yo=36244,Qo=36248,Ui=36249;let Gd;function Pc(e){if(!Gd){const t={};t[Db]={textureFormat:Db,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[We,xn,Gs,Et]},t[Rb]={textureFormat:Rb,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[We,xn,Gs,Et]},t[Fb]={textureFormat:Fb,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[We,xn,Gs,Et]},t[On]={textureFormat:On,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[We,xn,Gs,Et,Vb]},t[qe]={textureFormat:qe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[We,xn,Gs,Et,Gb,Hb]},t[Us]={textureFormat:Us,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[zi,Wo]},t[J8]={textureFormat:Mc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[We]},t[e5]={textureFormat:Mc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Hr]},t[t5]={textureFormat:Mc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Et,xn]},t[n5]={textureFormat:Mc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Et]},t[r5]={textureFormat:Yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[We]},t[i5]={textureFormat:Yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Hr]},t[g5]={textureFormat:Yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Wo]},t[m5]={textureFormat:Yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Dc]},t[b5]={textureFormat:Yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[zi]},t[y5]={textureFormat:Yo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Rc]},t[u5]={textureFormat:Fc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[We]},t[c5]={textureFormat:Fc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Hr]},t[f5]={textureFormat:Fc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Et,xn]},t[h5]={textureFormat:Fc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Et]},t[d5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[We]},t[p5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Hr]},t[o5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Wo]},t[a5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Dc]},t[s5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[zi]},t[l5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Rc]},t[w5]={textureFormat:On,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[We]},t[v5]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[We]},t[x5]={textureFormat:On,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[We,Vb]},t[A5]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Hr]},t[E5]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Et,xn,J5]},t[_5]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Et,xn,ek]},t[S5]={textureFormat:On,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Et,xn]},t[C5]={textureFormat:On,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Et]},t[k5]={textureFormat:Qo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[We]},t[T5]={textureFormat:Qo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Hr]},t[I5]={textureFormat:Qo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Wo]},t[B5]={textureFormat:Qo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Dc]},t[D5]={textureFormat:Qo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[zi]},t[R5]={textureFormat:Qo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Rc]},t[F5]={textureFormat:qe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[We]},t[M5]={textureFormat:qe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[We]},t[P5]={textureFormat:qe,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Hr]},t[L5]={textureFormat:qe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[We,Hb,Ud]},t[N5]={textureFormat:qe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[We,Gb]},t[O5]={textureFormat:qe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Ud]},t[z5]={textureFormat:qe,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Et,xn]},t[U5]={textureFormat:qe,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Et]},t[G5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[We]},t[H5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Hr]},t[V5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ud]},t[j5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Wo]},t[$5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Dc]},t[q5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Rc]},t[W5]={textureFormat:Ui,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[zi]},t[Z5]={textureFormat:Us,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Wo,zi]},t[Y5]={textureFormat:Us,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[zi]},t[Q5]={textureFormat:Us,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Et]},t[K5]={textureFormat:Mb,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[nk]},t[X5]={textureFormat:Mb,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[tk]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,o){const a=r.type[o];r.bytesPerElementMap[a]=i})}),Gd=t}return Gd[e]}function rk(e,t){const n=Pc(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function Xo(e){const t=Pc(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function jb(e){return(e&e-1)===0}function ik(e,t,n,r){if(!$o(e))return jb(t)&&jb(n);const i=Pc(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function ok(e){const t=Pc(e);if(!t)throw"unknown internal format";return t.textureFilterable}function $b(e,t,n){return qo(t)?Fd(t):n||We}function Lc(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const o=Math.sqrt(i/(t===fr?6:1));o%1===0?(n=o,r=o):(n=i,r=1)}else if(r){if(!n&&(n=i/r,n%1))throw"can't guess dimensions"}else if(r=i/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function Ko(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(Q8,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(X8,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(K8,t.flipY)}function qb(e){e.pixelStorei(zd,4),$o(e)&&(e.pixelStorei(Lb,0),e.pixelStorei(Nb,0),e.pixelStorei(Ob,0),e.pixelStorei(zb,0),e.pixelStorei(Ub,0))}function ak(e,t,n,r){r.minMag&&(n.call(e,t,Nd,r.minMag),n.call(e,t,Od,r.minMag)),r.min&&n.call(e,t,Nd,r.min),r.mag&&n.call(e,t,Od,r.mag),r.wrap&&(n.call(e,t,Ic,r.wrap),n.call(e,t,Bc,r.wrap),(t===Ur||y8(e,t))&&n.call(e,t,Pb,r.wrap)),r.wrapR&&n.call(e,t,Pb,r.wrapR),r.wrapS&&n.call(e,t,Ic,r.wrapS),r.wrapT&&n.call(e,t,Bc,r.wrapT),r.minLod&&n.call(e,t,q8,r.minLod),r.maxLod&&n.call(e,t,W8,r.maxLod),r.baseLevel&&n.call(e,t,Z8,r.baseLevel),r.maxLevel&&n.call(e,t,Y8,r.maxLevel)}function Wb(e,t,n){const r=n.target||cr;e.bindTexture(r,t),ak(e,r,e.texParameteri,n)}function sk(e){return e=e||zr.textureColor,qo(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function Hd(e,t,n,r,i,o){n=n||zr.textureOptions,o=o||qe;const a=n.target||cr;if(r=r||n.width,i=i||n.height,e.bindTexture(a,t),ik(e,r,i,o))e.generateMipmap(a);else{const s=ok(o)?U8:z8;e.texParameteri(a,Nd,s),e.texParameteri(a,Od,s),e.texParameteri(a,Ic,kc),e.texParameteri(a,Bc,kc)}}function Hs(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function Vd(e,t){return t=t||{},t.cubeFaceOrder||[Tc,G8,H8,V8,j8,$8]}function jd(e,t){const r=Vd(e,t).map(function(i,o){return{face:i,ndx:o}});return r.sort(function(i,o){return i.face-o.face}),r}function Zb(e,t,n,r){r=r||zr.textureOptions;const i=r.target||cr,o=r.level||0;let a=n.width,s=n.height;const u=r.internalFormat||r.format||qe,l=Xo(u),c=r.format||l.format,f=r.type||l.type;if(Ko(e,r),e.bindTexture(i,t),i===fr){const h=n.width,d=n.height;let p,m;if(h/6===d)p=d,m=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,m=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,m=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,m=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const y=Bb();y?(y.canvas.width=p,y.canvas.height=p,a=p,s=p,jd(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;y.drawImage(n,A,S,p,p,0,0,p,p),e.texImage2D(w.face,o,u,c,f,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(a=p,s=p,jd(e,r).forEach(function(w){const A=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;e.texImage2D(w.face,o,u,p,p,0,c,f,null),createImageBitmap(n,A,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(_){Ko(e,r),e.bindTexture(i,t),e.texImage2D(w.face,o,u,c,f,_),Hs(r)&&Hd(e,t,r,a,s,u)})}))}else if(i===Ur||i===Gr){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const m=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(zd,1),e.pixelStorei(Lb,n.width),e.pixelStorei(Nb,0),e.pixelStorei(Ub,0),e.texImage3D(i,o,u,h,h,h,0,c,f,null);for(let w=0;w<p;++w){const A=w*h*m,S=w*h*y;e.pixelStorei(Ob,A),e.pixelStorei(zb,S),e.texSubImage3D(i,o,0,0,w,h,h,1,c,f,n)}qb(e)}else e.texImage2D(i,o,u,c,f,n);Hs(r)&&Hd(e,t,r,a,s,u),Wb(e,t,r)}function Vs(){}function lk(e){if(typeof document<"u"){const t=document.createElement("a");return t.href=e,t.hostname===location.hostname&&t.port===location.port&&t.protocol===location.protocol}else{const t=new URL(location.href).origin;return new URL(e,location.href).origin===t}}function uk(e,t){return t===void 0&&!lk(e)?"anonymous":t}function ck(e,t,n){n=n||Vs;let r;if(t=t!==void 0?t:zr.crossOrigin,t=uk(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",o),r.removeEventListener("load",a),r=null},o=function(){const u="couldn't load image: "+e;m8(u),n(u,r),i()},a=function(){n(null,r),i()};return r.addEventListener("error",o),r.addEventListener("load",a),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,o;const a=function(){n(i,o)},s={};t&&(s.mode="cors"),fetch(e,s).then(function(u){if(!u.ok)throw u;return u.blob()}).then(function(u){return createImageBitmap(u,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(u){o=u,setTimeout(a)}).catch(function(u){i=u,setTimeout(a)}),r=null}return r}function Yb(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function $d(e,t,n){return Yb(e)?(setTimeout(function(){n(null,e)}),e):ck(e,t,n)}function qd(e,t,n){n=n||zr.textureOptions;const r=n.target||cr;if(e.bindTexture(r,t),n.color===!1)return;const i=sk(n.color);if(r===fr)for(let o=0;o<6;++o)e.texImage2D(Tc+o,0,qe,1,1,0,qe,We,i);else r===Ur||r===Gr?e.texImage3D(r,0,qe,1,1,1,0,qe,We,i):e.texImage2D(r,0,qe,1,1,0,qe,We,i)}function fk(e,t,n,r){return r=r||Vs,n=n||zr.textureOptions,qd(e,t,n),n=Object.assign({},n),$d(n.src,n.crossOrigin,function(o,a){o?r(o,t,a):(Zb(e,t,a,n),r(null,t,a))})}function hk(e,t,n,r){r=r||Vs;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const o=n.level||0,a=n.internalFormat||n.format||qe,s=Xo(a),u=n.format||s.format,l=n.type||We,c=n.target||cr;if(c!==fr)throw"target must be TEXTURE_CUBE_MAP";qd(e,t,n),n=Object.assign({},n);let f=6;const h=[],d=Vd(e,n);let p;function m(y){return function(w,A){--f,w?h.push(w):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(Ko(e,n),e.bindTexture(c,t),f===5?Vd().forEach(function(S){e.texImage2D(S,o,a,u,l,A)}):e.texImage2D(y,o,a,u,l,A),Hs(n)&&e.generateMipmap(c)),f===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return $d(y,n.crossOrigin,m(d[w]))})}function dk(e,t,n,r){r=r||Vs;const i=n.src,o=n.internalFormat||n.format||qe,a=Xo(o),s=n.format||a.format,u=n.type||We,l=n.target||Gr;if(l!==Ur&&l!==Gr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";qd(e,t,n),n=Object.assign({},n);let c=i.length;const f=[];let h;const d=n.level||0;let p=n.width,m=n.height;const y=i.length;let w=!0;function A(S){return function(_,k){if(--c,_)f.push(_);else{if(Ko(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||k.width,m=n.height||k.height,e.texImage3D(l,d,o,p,m,y,0,s,u,null);for(let B=0;B<y;++B)e.texSubImage3D(l,d,0,0,B,p,m,1,s,u,k)}else{let B=k,I;(k.width!==p||k.height!==m)&&(I=Bb(),B=I.canvas,I.canvas.width=p,I.canvas.height=m,I.drawImage(k,0,0,p,m)),e.texSubImage3D(l,d,0,0,S,p,m,1,s,u,B),I&&B===I.canvas&&(I.canvas.width=0,I.canvas.height=0)}Hs(n)&&e.generateMipmap(l)}c===0&&r(f.length?f:void 0,t,h)}}h=i.map(function(S,_){return $d(S,n.crossOrigin,A(_))})}function Qb(e,t,n,r){r=r||zr.textureOptions;const i=r.target||cr;e.bindTexture(i,t);let o=r.width,a=r.height,s=r.depth;const u=r.level||0,l=r.internalFormat||r.format||qe,c=Xo(l),f=r.format||c.format,h=r.type||$b(e,n,c.type);if(qo(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=g8(h);n=new y(n)}const d=rk(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+Ld(e,f);let m;if(i===Ur||i===Gr)if(!o&&!a&&!s){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;o=y,a=y,s=y}else o&&(!a||!s)?(m=Lc(e,i,a,s,p/o),a=m.width,s=m.height):a&&(!o||!s)?(m=Lc(e,i,o,s,p/a),o=m.width,s=m.height):(m=Lc(e,i,o,a,p/s),o=m.width,a=m.height);else m=Lc(e,i,o,a,p),o=m.width,a=m.height;if(qb(e),e.pixelStorei(zd,r.unpackAlignment||1),Ko(e,r),i===fr){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;jd(e,r).forEach(A=>{const S=w*A.ndx,_=n.subarray(S,S+w);e.texImage2D(A.face,u,l,o,a,0,f,h,_)})}else i===Ur||i===Gr?e.texImage3D(i,u,l,o,a,s,0,f,h,n):e.texImage2D(i,u,l,o,a,0,f,h,n);return{width:o,height:a,depth:s,type:h}}function pk(e,t,n){const r=n.target||cr;e.bindTexture(r,t);const i=n.level||0,o=n.internalFormat||n.format||qe,a=Xo(o),s=n.format||a.format,u=n.type||a.type;if(Ko(e,n),r===fr)for(let l=0;l<6;++l)e.texImage2D(Tc+l,i,o,n.width,n.height,0,s,u,null);else r===Ur||r===Gr?e.texImage3D(r,i,o,n.width,n.height,n.depth,0,s,u,null):e.texImage2D(r,i,o,n.width,n.height,0,s,u,null)}function js(e,t,n){n=n||Vs,t=t||zr.textureOptions;const r=e.createTexture(),i=t.target||cr;let o=t.width||1,a=t.height||1;const s=t.internalFormat||qe;e.bindTexture(i,r),i===fr&&(e.texParameteri(i,Ic,kc),e.texParameteri(i,Bc,kc));let u=t.src;if(u)if(typeof u=="function"&&(u=u(e,t)),typeof u=="string")fk(e,r,t,n);else if(qo(u)||Array.isArray(u)&&(typeof u[0]=="number"||Array.isArray(u[0])||qo(u[0]))){const l=Qb(e,r,u,t);o=l.width,a=l.height}else Array.isArray(u)&&(typeof u[0]=="string"||Yb(u[0]))?i===fr?hk(e,r,t,n):dk(e,r,t,n):(Zb(e,r,u,t),o=u.width,a=u.height);else pk(e,r,t);return Hs(t)&&Hd(e,r,t,o,a,s),Wb(e,r,t),r}function gk(e,t,n,r,i,o){r=r||n.width,i=i||n.height,o=o||n.depth;const a=n.target||cr;e.bindTexture(a,t);const s=n.level||0,u=n.internalFormat||n.format||qe,l=Xo(u),c=n.format||l.format;let f;const h=n.src;if(h&&(qo(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||$b(e,h,l.type):f=n.type||l.type,a===fr)for(let d=0;d<6;++d)e.texImage2D(Tc+d,s,u,r,i,0,c,f,null);else a===Ur||a===Gr?e.texImage3D(a,s,u,r,i,o,0,c,f,null):e.texImage2D(a,s,u,r,i,0,c,f,null)}const mk=Ab,Nc=33984,bk=35048,Oc=34962,yk=34963,Wd=35345,Xb=35718,wk=35721,vk=35971,xk=35382,Ak=35396,Ek=35398,_k=35392,Sk=35395,zc=5126,Kb=35664,Jb=35665,e2=35666,Zd=5124,t2=35667,n2=35668,r2=35669,i2=35670,o2=35671,a2=35672,s2=35673,l2=35674,u2=35675,c2=35676,Ck=35678,kk=35680,Tk=35679,Ik=35682,Bk=35685,Dk=35686,Rk=35687,Fk=35688,Mk=35689,Pk=35690,Lk=36289,Nk=36292,Ok=36293,Yd=5125,f2=36294,h2=36295,d2=36296,zk=36298,Uk=36299,Gk=36300,Hk=36303,Vk=36306,jk=36307,$k=36308,qk=36311,Uc=3553,Gc=34067,Qd=32879,Hc=35866,se={};function p2(e,t){return se[t].bindPoint}function Wk(e,t){return function(n){e.uniform1f(t,n)}}function Zk(e,t){return function(n){e.uniform1fv(t,n)}}function Yk(e,t){return function(n){e.uniform2fv(t,n)}}function Qk(e,t){return function(n){e.uniform3fv(t,n)}}function Xk(e,t){return function(n){e.uniform4fv(t,n)}}function g2(e,t){return function(n){e.uniform1i(t,n)}}function m2(e,t){return function(n){e.uniform1iv(t,n)}}function b2(e,t){return function(n){e.uniform2iv(t,n)}}function y2(e,t){return function(n){e.uniform3iv(t,n)}}function w2(e,t){return function(n){e.uniform4iv(t,n)}}function Kk(e,t){return function(n){e.uniform1ui(t,n)}}function Jk(e,t){return function(n){e.uniform1uiv(t,n)}}function eT(e,t){return function(n){e.uniform2uiv(t,n)}}function tT(e,t){return function(n){e.uniform3uiv(t,n)}}function nT(e,t){return function(n){e.uniform4uiv(t,n)}}function rT(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function iT(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function oT(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function aT(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function sT(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function lT(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function uT(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function cT(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function fT(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function It(e,t,n,r){const i=p2(e,t);return $o(e)?function(o){let a,s;Cc(e,o)?(a=o,s=null):(a=o.texture,s=o.sampler),e.uniform1i(r,n),e.activeTexture(Nc+n),e.bindTexture(i,a),e.bindSampler(n,s)}:function(o){e.uniform1i(r,n),e.activeTexture(Nc+n),e.bindTexture(i,o)}}function Bt(e,t,n,r,i){const o=p2(e,t),a=new Int32Array(i);for(let s=0;s<i;++s)a[s]=n+s;return $o(e)?function(s){e.uniform1iv(r,a),s.forEach(function(u,l){e.activeTexture(Nc+a[l]);let c,f;Cc(e,u)?(c=u,f=null):(c=u.texture,f=u.sampler),e.bindSampler(n,f),e.bindTexture(o,c)})}:function(s){e.uniform1iv(r,a),s.forEach(function(u,l){e.activeTexture(Nc+a[l]),e.bindTexture(o,u)})}}se[zc]={Type:Float32Array,size:4,setter:Wk,arraySetter:Zk},se[Kb]={Type:Float32Array,size:8,setter:Yk,cols:2},se[Jb]={Type:Float32Array,size:12,setter:Qk,cols:3},se[e2]={Type:Float32Array,size:16,setter:Xk,cols:4},se[Zd]={Type:Int32Array,size:4,setter:g2,arraySetter:m2},se[t2]={Type:Int32Array,size:8,setter:b2,cols:2},se[n2]={Type:Int32Array,size:12,setter:y2,cols:3},se[r2]={Type:Int32Array,size:16,setter:w2,cols:4},se[Yd]={Type:Uint32Array,size:4,setter:Kk,arraySetter:Jk},se[f2]={Type:Uint32Array,size:8,setter:eT,cols:2},se[h2]={Type:Uint32Array,size:12,setter:tT,cols:3},se[d2]={Type:Uint32Array,size:16,setter:nT,cols:4},se[i2]={Type:Uint32Array,size:4,setter:g2,arraySetter:m2},se[o2]={Type:Uint32Array,size:8,setter:b2,cols:2},se[a2]={Type:Uint32Array,size:12,setter:y2,cols:3},se[s2]={Type:Uint32Array,size:16,setter:w2,cols:4},se[l2]={Type:Float32Array,size:32,setter:rT,rows:2,cols:2},se[u2]={Type:Float32Array,size:48,setter:iT,rows:3,cols:3},se[c2]={Type:Float32Array,size:64,setter:oT,rows:4,cols:4},se[Bk]={Type:Float32Array,size:32,setter:aT,rows:2,cols:3},se[Dk]={Type:Float32Array,size:32,setter:lT,rows:2,cols:4},se[Rk]={Type:Float32Array,size:48,setter:sT,rows:3,cols:2},se[Fk]={Type:Float32Array,size:48,setter:cT,rows:3,cols:4},se[Mk]={Type:Float32Array,size:64,setter:uT,rows:4,cols:2},se[Pk]={Type:Float32Array,size:64,setter:fT,rows:4,cols:3},se[Ck]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Uc},se[kk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},se[Tk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Qd},se[Ik]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Uc},se[Lk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},se[Nk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},se[Ok]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},se[zk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Uc},se[Uk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Qd},se[Gk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},se[Hk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},se[Vk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Uc},se[jk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Qd},se[$k]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},se[qk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc};function Vc(e,t){return function(n){if(n.value)switch(e.disableVertexAttribArray(t),n.value.length){case 4:e.vertexAttrib4fv(t,n.value);break;case 3:e.vertexAttrib3fv(t,n.value);break;case 2:e.vertexAttrib2fv(t,n.value);break;case 1:e.vertexAttrib1fv(t,n.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else e.bindBuffer(Oc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||zc,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Vr(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4iv(t,n.value);else throw new Error("The length of an integer constant value must be 4!");else e.bindBuffer(Oc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Zd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function jc(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4uiv(t,n.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else e.bindBuffer(Oc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Yd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Xd(e,t,n){const r=n.size,i=n.count;return function(o){e.bindBuffer(Oc,o.buffer);const a=o.size||o.numComponents||r,s=a/i,u=o.type||zc,c=se[u].size*a,f=o.normalize||!1,h=o.offset||0,d=c/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,s,u,f,c,h+d*p),o.divisor!==void 0&&e.vertexAttribDivisor(t+p,o.divisor)}}const rt={};rt[zc]={size:4,setter:Vc},rt[Kb]={size:8,setter:Vc},rt[Jb]={size:12,setter:Vc},rt[e2]={size:16,setter:Vc},rt[Zd]={size:4,setter:Vr},rt[t2]={size:8,setter:Vr},rt[n2]={size:12,setter:Vr},rt[r2]={size:16,setter:Vr},rt[Yd]={size:4,setter:jc},rt[f2]={size:8,setter:jc},rt[h2]={size:12,setter:jc},rt[d2]={size:16,setter:jc},rt[i2]={size:4,setter:Vr},rt[o2]={size:8,setter:Vr},rt[a2]={size:12,setter:Vr},rt[s2]={size:16,setter:Vr},rt[l2]={size:4,setter:Xd,count:2},rt[u2]={size:9,setter:Xd,count:3},rt[c2]={size:16,setter:Xd,count:4};function v2(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const hT=/(\.|\[|]|\w+)/g,dT=e=>e>="0"&&e<="9";function x2(e,t,n,r){const i=e.split(hT).filter(s=>s!=="");let o=0,a="";for(;;){const s=i[o++];a+=s;const u=dT(s[0]),l=u?parseInt(s):s;if(u&&(a+=i[o++]),o===i.length){n[l]=t;break}else{const f=i[o++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[a]=r[a]||function(p){return function(m){C2(p,m)}}(d),a+=f}}}function pT(e,t){let n=0;function r(s,u,l){const c=u.name.endsWith("[0]"),f=u.type,h=se[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=u.size,c?d=h.arraySetter(e,f,p,l,u.size):d=h.setter(e,f,p,l,u.size)}else h.arraySetter&&c?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},o={},a=e.getProgramParameter(t,Xb);for(let s=0;s<a;++s){const u=e.getActiveUniform(t,s);if(v2(u))continue;let l=u.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const c=e.getUniformLocation(t,u.name);if(c){const f=r(t,u,c);i[l]=f,x2(l,f,o,i)}}return i}function gT(e,t){const n={},r=e.getProgramParameter(t,vk);for(let i=0;i<r;++i){const o=e.getTransformFeedbackVarying(t,i);n[o.name]={index:i,type:o.type,size:o.size}}return n}function mT(e,t){const n=e.getProgramParameter(t,Xb),r=[],i=[];for(let s=0;s<n;++s){i.push(s),r.push({});const u=e.getActiveUniform(t,s);r[s].name=u.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(s){const u=s[0],l=s[1];e.getActiveUniforms(t,i,e[u]).forEach(function(c,f){r[f][l]=c})});const o={},a=e.getProgramParameter(t,xk);for(let s=0;s<a;++s){const u=e.getActiveUniformBlockName(t,s),l={index:e.getUniformBlockIndex(t,u),usedByVertexShader:e.getActiveUniformBlockParameter(t,s,Ak),usedByFragmentShader:e.getActiveUniformBlockParameter(t,s,Ek),size:e.getActiveUniformBlockParameter(t,s,_k),uniformIndices:e.getActiveUniformBlockParameter(t,s,Sk)};l.used=l.usedByVertexShader||l.usedByFragmentShader,o[u]=l}return{blockSpecs:o,uniformData:r}}const A2=/\[\d+\]\.$/,bT=(e,t)=>((e+(t-1))/t|0)*t;function yT(e,t,n,r){if(t||n){r=r||1;const o=e.length/4;return function(a){let s=0,u=0;for(let l=0;l<o;++l){for(let c=0;c<r;++c)e[s++]=a[u++];s+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function wT(e,t,n,r){const i=n.blockSpecs,o=n.uniformData,a=i[r];if(!a)return mk("no uniform block object named:",r),{name:r,uniforms:{}};const s=new ArrayBuffer(a.size),u=e.createBuffer(),l=a.index;e.bindBuffer(Wd,u),e.uniformBlockBinding(t,a.index,l);let c=r+".";A2.test(c)&&(c=c.replace(A2,"."));const f={},h={},d={};return a.uniformIndices.forEach(function(p){const m=o[p];let y=m.name;y.startsWith(c)&&(y=y.substr(c.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const A=se[m.type],S=A.Type,_=w?bT(A.size,16)*m.size:A.size*m.size,k=new S(s,m.offset,_/S.BYTES_PER_ELEMENT);f[y]=k;const B=yT(k,w,A.rows,A.cols);h[y]=B,x2(y,B,d,h)}),{name:r,array:s,asFloat:new Float32Array(s),buffer:u,uniforms:f,setters:h}}function E2(e,t,n){return wT(e,t.program,t.uniformBlockSpec,n)}function _2(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const o=i.index;return e.bindBufferRange(Wd,o,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function S2(e,t,n){_2(e,t,n)&&e.bufferData(Wd,n.array,bk)}function $s(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const o=t[r];i(o)}}}function C2(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):C2(e[n],t[n])}}function Jo(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const o=t[i];if(Array.isArray(o)){const a=o.length;for(let s=0;s<a;++s)Jo(n,o[s])}else for(const a in o){const s=n[a];s&&s(o[a])}}}function vT(e,t){const n={},r=e.getProgramParameter(t,wk);for(let i=0;i<r;++i){const o=e.getActiveAttrib(t,i);if(v2(o))continue;const a=e.getAttribLocation(t,o.name),s=rt[o.type],u=s.setter(e,a,s);u.location=a,n[o.name]=u}return n}function xT(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function Gi(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(xT(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(yk,n.indices))}function AT(e,t){const n=pT(e,t),r=vT(e,t),i={program:t,uniformSetters:n,attribSetters:r};return $o(e)&&(i.uniformBlockSpec=mT(e,t),i.transformFeedbackInfo=gT(e,t)),i}const ET=4,k2=5123;function $c(e,t,n,r,i,o){n=n===void 0?ET:n;const a=t.indices,s=t.elementType,u=r===void 0?t.numElements:r;i=i===void 0?0:i,s||a?o!==void 0?e.drawElementsInstanced(n,u,s===void 0?k2:t.elementType,i,o):e.drawElements(n,u,s===void 0?k2:t.elementType,i):o!==void 0?e.drawArraysInstanced(n,i,u,o):e.drawArrays(n,i,u)}const _T=36160,Hi=36161,ST=3553,CT=5121,kT=6402,TT=6408,IT=33190,BT=36012,DT=35056,RT=36013,FT=32854,MT=32855,PT=36194,T2=33189,I2=6401,B2=36168,Kd=34041,LT=36064,qc=36096,D2=36128,Jd=33306,e0=33071,t0=9729,R2=[{format:TT,type:CT,min:t0,wrap:e0},{format:Kd}],An={};An[Kd]=Jd,An[I2]=D2,An[B2]=D2,An[kT]=qc,An[T2]=qc,An[IT]=qc,An[BT]=qc,An[DT]=Jd,An[RT]=Jd;function NT(e,t){return An[e]||An[t]}const jr={};jr[FT]=!0,jr[MT]=!0,jr[PT]=!0,jr[Kd]=!0,jr[T2]=!0,jr[I2]=!0,jr[B2]=!0;function OT(e){return jr[e]}function zT(e,t,n,r){const i=_T,o=e.createFramebuffer();e.bindFramebuffer(i,o),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||R2;let a=0;const s={framebuffer:o,attachments:[],width:n,height:r};return t.forEach(function(u){let l=u.attachment;const c=u.samples,f=u.format;let h=u.attachmentPoint||NT(f,u.internalFormat);if(h||(h=LT+a++),!l)if(c!==void 0||OT(f))l=e.createRenderbuffer(),e.bindRenderbuffer(Hi,l),c>1?e.renderbufferStorageMultisample(Hi,c,f,n,r):e.renderbufferStorage(Hi,f,n,r);else{const d=Object.assign({},u);d.width=n,d.height=r,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||t0,d.mag=d.mag||d.minMag||t0,d.wrapS=d.wrapS||d.wrap||e0,d.wrapT=d.wrapT||d.wrap||e0),l=js(e,d)}if(Eb(e,l))e.framebufferRenderbuffer(i,h,Hi,l);else if(Cc(e,l))u.layer!==void 0?e.framebufferTextureLayer(i,h,l,u.level||0,u.layer):e.framebufferTexture2D(i,h,u.target||ST,l,u.level||0);else throw new Error("unknown attachment type");s.attachments.push(l)}),s}function UT(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||R2,n.forEach(function(o,a){const s=t.attachments[a],u=o.format,l=o.samples;if(l!==void 0||Eb(e,s))e.bindRenderbuffer(Hi,s),l>1?e.renderbufferStorageMultisample(Hi,l,u,r,i):e.renderbufferStorage(Hi,u,r,i);else if(Cc(e,s))gk(e,s,o,r,i);else throw new Error("unknown attachment type")})}function GT(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){Gi(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const HT=/^(.*?)_/;function VT(e,t){Ld(e,0);const n=e.getExtension(t);if(n){const r={},i=HT.exec(t)[1],o="_"+i;for(const a in n){const s=n[a],u=typeof s=="function",l=u?i:o;let c=a;a.endsWith(l)&&(c=a.substring(0,a.length-l.length)),e[c]!==void 0?!u&&e[c]!==s&&Ab(c,e[c],s,a):u?e[c]=function(f){return function(){return f.apply(n,arguments)}}(s):(e[c]=s,r[c]=s)}r.constructor={name:n.constructor.name},Ld(r,0)}return n}const F2=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function M2(e){for(let t=0;t<F2.length;++t)VT(e,F2[t])}function jT(e,t){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i)if(r=e.getContext(n[i],t),r){M2(r);break}return r}function $T(e,t){return jT(e,t)}const qT=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
227
+ see: http://github.com/greggman/twgl.js for details */const Td=5120,za=5121,Id=5122,Bd=5123,Dd=5124,Rd=5125,Fd=5126,t8=32819,n8=32820,r8=33635,i8=5131,o8=33640,s8=35899,a8=35902,l8=36269,u8=34042,x2={};{const e=x2;e[Td]=Int8Array,e[za]=Uint8Array,e[Id]=Int16Array,e[Bd]=Uint16Array,e[Dd]=Int32Array,e[Rd]=Uint32Array,e[Fd]=Float32Array,e[t8]=Uint16Array,e[n8]=Uint16Array,e[r8]=Uint16Array,e[i8]=Uint16Array,e[o8]=Uint32Array,e[s8]=Uint32Array,e[a8]=Uint32Array,e[l8]=Uint32Array,e[u8]=Uint32Array}function Md(e){if(e instanceof Int8Array)return Td;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return za;if(e instanceof Int16Array)return Id;if(e instanceof Uint16Array)return Bd;if(e instanceof Int32Array)return Dd;if(e instanceof Uint32Array)return Rd;if(e instanceof Float32Array)return Fd;throw new Error("unsupported typed array type")}function c8(e){if(e===Int8Array)return Td;if(e===Uint8Array||e===Uint8ClampedArray)return za;if(e===Int16Array)return Id;if(e===Uint16Array)return Bd;if(e===Int32Array)return Dd;if(e===Uint32Array)return Rd;if(e===Float32Array)return Fd;throw new Error("unsupported typed array type")}function f8(e){const t=x2[e];if(!t)throw new Error("unknown gl type");return t}const Tc=typeof SharedArrayBuffer<"u"?function(t){return t&&t.buffer&&(t.buffer instanceof ArrayBuffer||t.buffer instanceof SharedArrayBuffer)}:function(t){return t&&t.buffer&&t.buffer instanceof ArrayBuffer};function h8(...e){console.error(...e)}function E2(...e){console.warn(...e)}function d8(e,t){return typeof WebGLBuffer<"u"&&t instanceof WebGLBuffer}function _2(e,t){return typeof WebGLRenderbuffer<"u"&&t instanceof WebGLRenderbuffer}function Ic(e,t){return typeof WebGLTexture<"u"&&t instanceof WebGLTexture}function p8(e,t){return typeof WebGLSampler<"u"&&t instanceof WebGLSampler}const S2=35044,On=34962,g8=34963,m8=34660,b8=5120,y8=5121,w8=5122,v8=5123,A8=5124,x8=5125,E8=5126,C2={attribPrefix:""};function k2(e,t,n,r,i){e.bindBuffer(t,n),e.bufferData(t,r,i||S2)}function T2(e,t,n,r){if(d8(e,t))return t;n=n||On;const i=e.createBuffer();return k2(e,n,i,t,r),i}function I2(e){return e==="indices"}function _8(e){return e instanceof Int8Array||e instanceof Uint8Array}function S8(e){return e===Int8Array||e===Uint8Array}function C8(e){return e.length?e:e.data}const k8=/coord|texture/i,T8=/color|colour/i;function B2(e,t){let n;if(k8.test(e)?n=2:T8.test(e)?n=4:n=3,t%n>0)throw new Error(`Can not guess numComponents for attribute '${e}'. Tried ${n} but ${t} values is not evenly divisible by ${n}. You should specify it.`);return n}function I8(e,t){return e.numComponents||e.size||B2(t,C8(e).length)}function Pd(e,t){if(Tc(e))return e;if(Tc(e.data))return e.data;Array.isArray(e)&&(e={data:e});let n=e.type;return n||(I2(t)?n=Uint16Array:n=Float32Array),new n(e.data)}function B8(e,t){const n={};return Object.keys(t).forEach(function(r){if(!I2(r)){const i=t[r],o=i.attrib||i.name||i.attribName||C2.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!Tc(i.value))throw new Error("array.value is not array or typedarray");n[o]={value:i.value}}else{let s,a,u,l;if(i.buffer&&i.buffer instanceof WebGLBuffer)s=i.buffer,l=i.numComponents||i.size,a=i.type,u=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const c=i.data||i,f=i.type||Float32Array,h=c*f.BYTES_PER_ELEMENT;a=c8(f),u=i.normalize!==void 0?i.normalize:S8(f),l=i.numComponents||i.size||B2(r,c),s=e.createBuffer(),e.bindBuffer(On,s),e.bufferData(On,h,i.drawType||S2)}else{const c=Pd(i,r);s=T2(e,c,void 0,i.drawType),a=Md(c),u=i.normalize!==void 0?i.normalize:_8(c),l=I8(i,r)}n[o]={buffer:s,numComponents:l,type:a,normalize:u,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),e.bindBuffer(On,null),n}function D8(e,t,n,r){n=Pd(n),r!==void 0?(e.bindBuffer(On,t.buffer),e.bufferSubData(On,r,n)):k2(e,On,t.buffer,n,t.drawType)}function R8(e,t){return t===b8||t===y8?1:t===w8||t===v8?2:t===A8||t===x8||t===E8?4:0}const Ld=["position","positions","a_position"];function F8(e,t){let n,r;for(r=0;r<Ld.length&&(n=Ld[r],!(n in t||(n=C2.attribPrefix+n,n in t)));++r);r===Ld.length&&(n=Object.keys(t)[0]);const i=t[n];if(!i.buffer)return 1;e.bindBuffer(On,i.buffer);const o=e.getBufferParameter(On,m8);e.bindBuffer(On,null);const s=R8(e,i.type),a=o/s,u=i.numComponents||i.size,l=a/u;if(l%1!==0)throw new Error(`numComponents ${u} not correct for length ${length}`);return l}function M8(e,t,n){const r=B8(e,t),i=Object.assign({},n||{});i.attribs=Object.assign({},n?n.attribs:{},r);const o=t.indices;if(o){const s=Pd(o,"indices");i.indices=T2(e,s,g8),i.numElements=s.length,i.elementType=Md(s)}else i.numElements||(i.numElements=F8(e,i.attribs));return i}function qo(e){return!!e.texStorage2D}const Nd=function(){const e={},t={};function n(r){const i=r.constructor.name;if(!e[i]){for(const o in r)if(typeof r[o]=="number"){const s=t[r[o]];t[r[o]]=s?`${s} | ${o}`:o}e[i]=!0}}return function(i,o){return n(i),t[o]||(typeof o=="number"?`0x${o.toString(16)}`:o)}}(),Nr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Wo=Tc,D2=function(){let e;return function(){return e=e||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),e}}(),Od=6406,on=6407,Ue=6408,zd=6409,Ud=6410,Zo=6402,Gd=34041,Bc=33071,P8=9728,L8=9729,cr=3553,fr=34067,Or=32879,zr=35866,Dc=34069,N8=34070,O8=34071,z8=34072,U8=34073,G8=34074,Hd=10241,Vd=10240,Rc=10242,Fc=10243,R2=32882,H8=33082,V8=33083,j8=33084,$8=33085,jd=3317,F2=3314,M2=32878,P2=3316,L2=3315,N2=32877,q8=37443,W8=37441,Z8=37440,Y8=33321,Q8=36756,X8=33325,K8=33326,J8=33330,e5=33329,t5=33338,n5=33337,r5=33340,i5=33339,o5=33323,s5=36757,a5=33327,l5=33328,u5=33336,c5=33335,f5=33332,h5=33331,d5=33334,p5=33333,g5=32849,m5=35905,b5=36194,y5=36758,w5=35898,v5=35901,A5=34843,x5=34837,E5=36221,_5=36239,S5=36215,C5=36233,k5=36209,T5=36227,I5=32856,B5=35907,D5=36759,R5=32855,F5=32854,M5=32857,P5=34842,L5=34836,N5=36220,O5=36238,z5=36975,U5=36214,G5=36232,H5=36226,V5=36208,j5=33189,$5=33190,q5=36012,W5=36013,Z5=35056,Ur=5120,We=5121,Mc=5122,Yo=5123,Pc=5124,Li=5125,Et=5126,O2=32819,z2=32820,U2=33635,xn=5131,Ua=36193,$d=33640,Y5=35899,Q5=35902,X5=36269,K5=34042,Ga=33319,Ni=33320,Ha=6403,Oi=36244,zi=36248,Gr=36249,J5={};{const e=J5;e[Od]={numColorComponents:1},e[zd]={numColorComponents:1},e[Ud]={numColorComponents:2},e[on]={numColorComponents:3},e[Ue]={numColorComponents:4},e[Ha]={numColorComponents:1},e[Oi]={numColorComponents:1},e[Ga]={numColorComponents:2},e[Ni]={numColorComponents:2},e[on]={numColorComponents:3},e[zi]={numColorComponents:3},e[Ue]={numColorComponents:4},e[Gr]={numColorComponents:4},e[Zo]={numColorComponents:1},e[Gd]={numColorComponents:2}}let qd;function Lc(e){if(!qd){const t={};t[Od]={textureFormat:Od,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[We,xn,Ua,Et]},t[zd]={textureFormat:zd,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[We,xn,Ua,Et]},t[Ud]={textureFormat:Ud,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[We,xn,Ua,Et]},t[on]={textureFormat:on,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[We,xn,Ua,Et,U2]},t[Ue]={textureFormat:Ue,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[We,xn,Ua,Et,O2,z2]},t[Zo]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Li,Yo]},t[Y8]={textureFormat:Ha,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[We]},t[Q8]={textureFormat:Ha,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Ur]},t[X8]={textureFormat:Ha,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Et,xn]},t[K8]={textureFormat:Ha,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Et]},t[J8]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[We]},t[e5]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Ur]},t[f5]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Yo]},t[h5]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Mc]},t[d5]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Li]},t[p5]={textureFormat:Oi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Pc]},t[o5]={textureFormat:Ga,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[We]},t[s5]={textureFormat:Ga,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Ur]},t[a5]={textureFormat:Ga,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Et,xn]},t[l5]={textureFormat:Ga,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Et]},t[u5]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[We]},t[c5]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ur]},t[t5]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yo]},t[n5]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mc]},t[r5]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Li]},t[i5]={textureFormat:Ni,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Pc]},t[g5]={textureFormat:on,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[We]},t[m5]={textureFormat:on,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[We]},t[b5]={textureFormat:on,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[We,U2]},t[y5]={textureFormat:on,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Ur]},t[w5]={textureFormat:on,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Et,xn,Y5]},t[v5]={textureFormat:on,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Et,xn,Q5]},t[A5]={textureFormat:on,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Et,xn]},t[x5]={textureFormat:on,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Et]},t[E5]={textureFormat:zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[We]},t[_5]={textureFormat:zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Ur]},t[S5]={textureFormat:zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Yo]},t[C5]={textureFormat:zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Mc]},t[k5]={textureFormat:zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Li]},t[T5]={textureFormat:zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Pc]},t[I5]={textureFormat:Ue,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[We]},t[B5]={textureFormat:Ue,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[We]},t[D5]={textureFormat:Ue,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Ur]},t[R5]={textureFormat:Ue,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[We,z2,$d]},t[F5]={textureFormat:Ue,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[We,O2]},t[M5]={textureFormat:Ue,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[$d]},t[P5]={textureFormat:Ue,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Et,xn]},t[L5]={textureFormat:Ue,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Et]},t[N5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[We]},t[O5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ur]},t[z5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[$d]},t[U5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Yo]},t[G5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Mc]},t[H5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Pc]},t[V5]={textureFormat:Gr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Li]},t[j5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Yo,Li]},t[$5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Li]},t[q5]={textureFormat:Zo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Et]},t[Z5]={textureFormat:Gd,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[K5]},t[W5]={textureFormat:Gd,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[X5]},Object.keys(t).forEach(function(n){const r=t[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,o){const s=r.type[o];r.bytesPerElementMap[s]=i})}),qd=t}return qd[e]}function ek(e,t){const n=Lc(e);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[t];if(r===void 0)throw"unknown internal format";return r}function Qo(e){const t=Lc(e);if(!t)throw"unknown internal format";return{format:t.textureFormat,type:t.type[0]}}function G2(e){return(e&e-1)===0}function tk(e,t,n,r){if(!qo(e))return G2(t)&&G2(n);const i=Lc(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function nk(e){const t=Lc(e);if(!t)throw"unknown internal format";return t.textureFilterable}function H2(e,t,n){return Wo(t)?Md(t):n||We}function Nc(e,t,n,r,i){if(i%1!==0)throw"can't guess dimensions";if(!n&&!r){const o=Math.sqrt(i/(t===fr?6:1));o%1===0?(n=o,r=o):(n=i,r=1)}else if(r){if(!n&&(n=i/r,n%1))throw"can't guess dimensions"}else if(r=i/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function Xo(e,t){t.colorspaceConversion!==void 0&&e.pixelStorei(q8,t.colorspaceConversion),t.premultiplyAlpha!==void 0&&e.pixelStorei(W8,t.premultiplyAlpha),t.flipY!==void 0&&e.pixelStorei(Z8,t.flipY)}function V2(e){e.pixelStorei(jd,4),qo(e)&&(e.pixelStorei(F2,0),e.pixelStorei(M2,0),e.pixelStorei(P2,0),e.pixelStorei(L2,0),e.pixelStorei(N2,0))}function rk(e,t,n,r){r.minMag&&(n.call(e,t,Hd,r.minMag),n.call(e,t,Vd,r.minMag)),r.min&&n.call(e,t,Hd,r.min),r.mag&&n.call(e,t,Vd,r.mag),r.wrap&&(n.call(e,t,Rc,r.wrap),n.call(e,t,Fc,r.wrap),(t===Or||p8(e,t))&&n.call(e,t,R2,r.wrap)),r.wrapR&&n.call(e,t,R2,r.wrapR),r.wrapS&&n.call(e,t,Rc,r.wrapS),r.wrapT&&n.call(e,t,Fc,r.wrapT),r.minLod&&n.call(e,t,H8,r.minLod),r.maxLod&&n.call(e,t,V8,r.maxLod),r.baseLevel&&n.call(e,t,j8,r.baseLevel),r.maxLevel&&n.call(e,t,$8,r.maxLevel)}function j2(e,t,n){const r=n.target||cr;e.bindTexture(r,t),rk(e,r,e.texParameteri,n)}function ik(e){return e=e||Nr.textureColor,Wo(e)?e:new Uint8Array([e[0]*255,e[1]*255,e[2]*255,e[3]*255])}function Wd(e,t,n,r,i,o){n=n||Nr.textureOptions,o=o||Ue;const s=n.target||cr;if(r=r||n.width,i=i||n.height,e.bindTexture(s,t),tk(e,r,i,o))e.generateMipmap(s);else{const a=nk(o)?L8:P8;e.texParameteri(s,Hd,a),e.texParameteri(s,Vd,a),e.texParameteri(s,Rc,Bc),e.texParameteri(s,Fc,Bc)}}function Va(e){return e.auto===!0||e.auto===void 0&&e.level===void 0}function Zd(e,t){return t=t||{},t.cubeFaceOrder||[Dc,N8,O8,z8,U8,G8]}function Yd(e,t){const r=Zd(e,t).map(function(i,o){return{face:i,ndx:o}});return r.sort(function(i,o){return i.face-o.face}),r}function $2(e,t,n,r){r=r||Nr.textureOptions;const i=r.target||cr,o=r.level||0;let s=n.width,a=n.height;const u=r.internalFormat||r.format||Ue,l=Qo(u),c=r.format||l.format,f=r.type||l.type;if(Xo(e,r),e.bindTexture(i,t),i===fr){const h=n.width,d=n.height;let p,m;if(h/6===d)p=d,m=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,m=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,m=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/2,m=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const y=D2();y?(y.canvas.width=p,y.canvas.height=p,s=p,a=p,Yd(e,r).forEach(function(w){const x=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;y.drawImage(n,x,S,p,p,0,0,p,p),e.texImage2D(w.face,o,u,c,f,y.canvas)}),y.canvas.width=1,y.canvas.height=1):typeof createImageBitmap<"u"&&(s=p,a=p,Yd(e,r).forEach(function(w){const x=m[w.ndx*2+0]*p,S=m[w.ndx*2+1]*p;e.texImage2D(w.face,o,u,p,p,0,c,f,null),createImageBitmap(n,x,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(_){Xo(e,r),e.bindTexture(i,t),e.texImage2D(w.face,o,u,c,f,_),Va(r)&&Wd(e,t,r,s,a,u)})}))}else if(i===Or||i===zr){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const m=n.width===d?1:0,y=n.height===d?1:0;e.pixelStorei(jd,1),e.pixelStorei(F2,n.width),e.pixelStorei(M2,0),e.pixelStorei(N2,0),e.texImage3D(i,o,u,h,h,h,0,c,f,null);for(let w=0;w<p;++w){const x=w*h*m,S=w*h*y;e.pixelStorei(P2,x),e.pixelStorei(L2,S),e.texSubImage3D(i,o,0,0,w,h,h,1,c,f,n)}V2(e)}else e.texImage2D(i,o,u,c,f,n);Va(r)&&Wd(e,t,r,s,a,u),j2(e,t,r)}function ja(){}function ok(e){if(typeof document<"u"){const t=document.createElement("a");return t.href=e,t.hostname===location.hostname&&t.port===location.port&&t.protocol===location.protocol}else{const t=new URL(location.href).origin;return new URL(e,location.href).origin===t}}function sk(e,t){return t===void 0&&!ok(e)?"anonymous":t}function ak(e,t,n){n=n||ja;let r;if(t=t!==void 0?t:Nr.crossOrigin,t=sk(e,t),typeof Image<"u"){r=new Image,t!==void 0&&(r.crossOrigin=t);const i=function(){r.removeEventListener("error",o),r.removeEventListener("load",s),r=null},o=function(){const u="couldn't load image: "+e;h8(u),n(u,r),i()},s=function(){n(null,r),i()};return r.addEventListener("error",o),r.addEventListener("load",s),r.src=e,r}else if(typeof ImageBitmap<"u"){let i,o;const s=function(){n(i,o)},a={};t&&(a.mode="cors"),fetch(e,a).then(function(u){if(!u.ok)throw u;return u.blob()}).then(function(u){return createImageBitmap(u,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(u){o=u,setTimeout(s)}).catch(function(u){i=u,setTimeout(s)}),r=null}return r}function q2(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof ImageData<"u"&&e instanceof ImageData||typeof HTMLElement<"u"&&e instanceof HTMLElement}function Qd(e,t,n){return q2(e)?(setTimeout(function(){n(null,e)}),e):ak(e,t,n)}function Xd(e,t,n){n=n||Nr.textureOptions;const r=n.target||cr;if(e.bindTexture(r,t),n.color===!1)return;const i=ik(n.color);if(r===fr)for(let o=0;o<6;++o)e.texImage2D(Dc+o,0,Ue,1,1,0,Ue,We,i);else r===Or||r===zr?e.texImage3D(r,0,Ue,1,1,1,0,Ue,We,i):e.texImage2D(r,0,Ue,1,1,0,Ue,We,i)}function lk(e,t,n,r){return r=r||ja,n=n||Nr.textureOptions,Xd(e,t,n),n=Object.assign({},n),Qd(n.src,n.crossOrigin,function(o,s){o?r(o,t,s):($2(e,t,s,n),r(null,t,s))})}function uk(e,t,n,r){r=r||ja;const i=n.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const o=n.level||0,s=n.internalFormat||n.format||Ue,a=Qo(s),u=n.format||a.format,l=n.type||We,c=n.target||cr;if(c!==fr)throw"target must be TEXTURE_CUBE_MAP";Xd(e,t,n),n=Object.assign({},n);let f=6;const h=[],d=Zd(e,n);let p;function m(y){return function(w,x){--f,w?h.push(w):x.width!==x.height?h.push("cubemap face img is not a square: "+x.src):(Xo(e,n),e.bindTexture(c,t),f===5?Zd().forEach(function(S){e.texImage2D(S,o,s,u,l,x)}):e.texImage2D(y,o,s,u,l,x),Va(n)&&e.generateMipmap(c)),f===0&&r(h.length?h:void 0,t,p)}}p=i.map(function(y,w){return Qd(y,n.crossOrigin,m(d[w]))})}function ck(e,t,n,r){r=r||ja;const i=n.src,o=n.internalFormat||n.format||Ue,s=Qo(o),a=n.format||s.format,u=n.type||We,l=n.target||zr;if(l!==Or&&l!==zr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Xd(e,t,n),n=Object.assign({},n);let c=i.length;const f=[];let h;const d=n.level||0;let p=n.width,m=n.height;const y=i.length;let w=!0;function x(S){return function(_,k){if(--c,_)f.push(_);else{if(Xo(e,n),e.bindTexture(l,t),w){w=!1,p=n.width||k.width,m=n.height||k.height,e.texImage3D(l,d,o,p,m,y,0,a,u,null);for(let B=0;B<y;++B)e.texSubImage3D(l,d,0,0,B,p,m,1,a,u,k)}else{let B=k,I;(k.width!==p||k.height!==m)&&(I=D2(),B=I.canvas,I.canvas.width=p,I.canvas.height=m,I.drawImage(k,0,0,p,m)),e.texSubImage3D(l,d,0,0,S,p,m,1,a,u,B),I&&B===I.canvas&&(I.canvas.width=0,I.canvas.height=0)}Va(n)&&e.generateMipmap(l)}c===0&&r(f.length?f:void 0,t,h)}}h=i.map(function(S,_){return Qd(S,n.crossOrigin,x(_))})}function W2(e,t,n,r){r=r||Nr.textureOptions;const i=r.target||cr;e.bindTexture(i,t);let o=r.width,s=r.height,a=r.depth;const u=r.level||0,l=r.internalFormat||r.format||Ue,c=Qo(l),f=r.format||c.format,h=r.type||H2(e,n,c.type);if(Wo(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const y=f8(h);n=new y(n)}const d=ek(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+Nd(e,f);let m;if(i===Or||i===zr)if(!o&&!s&&!a){const y=Math.cbrt(p);if(y%1!==0)throw"can't guess cube size of array of numElements: "+p;o=y,s=y,a=y}else o&&(!s||!a)?(m=Nc(e,i,s,a,p/o),s=m.width,a=m.height):s&&(!o||!a)?(m=Nc(e,i,o,a,p/s),o=m.width,a=m.height):(m=Nc(e,i,o,s,p/a),o=m.width,s=m.height);else m=Nc(e,i,o,s,p),o=m.width,s=m.height;if(V2(e),e.pixelStorei(jd,r.unpackAlignment||1),Xo(e,r),i===fr){const y=d/n.BYTES_PER_ELEMENT,w=p/6*y;Yd(e,r).forEach(x=>{const S=w*x.ndx,_=n.subarray(S,S+w);e.texImage2D(x.face,u,l,o,s,0,f,h,_)})}else i===Or||i===zr?e.texImage3D(i,u,l,o,s,a,0,f,h,n):e.texImage2D(i,u,l,o,s,0,f,h,n);return{width:o,height:s,depth:a,type:h}}function fk(e,t,n){const r=n.target||cr;e.bindTexture(r,t);const i=n.level||0,o=n.internalFormat||n.format||Ue,s=Qo(o),a=n.format||s.format,u=n.type||s.type;if(Xo(e,n),r===fr)for(let l=0;l<6;++l)e.texImage2D(Dc+l,i,o,n.width,n.height,0,a,u,null);else r===Or||r===zr?e.texImage3D(r,i,o,n.width,n.height,n.depth,0,a,u,null):e.texImage2D(r,i,o,n.width,n.height,0,a,u,null)}function $a(e,t,n){n=n||ja,t=t||Nr.textureOptions;const r=e.createTexture(),i=t.target||cr;let o=t.width||1,s=t.height||1;const a=t.internalFormat||Ue;e.bindTexture(i,r),i===fr&&(e.texParameteri(i,Rc,Bc),e.texParameteri(i,Fc,Bc));let u=t.src;if(u)if(typeof u=="function"&&(u=u(e,t)),typeof u=="string")lk(e,r,t,n);else if(Wo(u)||Array.isArray(u)&&(typeof u[0]=="number"||Array.isArray(u[0])||Wo(u[0]))){const l=W2(e,r,u,t);o=l.width,s=l.height}else Array.isArray(u)&&(typeof u[0]=="string"||q2(u[0]))?i===fr?uk(e,r,t,n):ck(e,r,t,n):($2(e,r,u,t),o=u.width,s=u.height);else fk(e,r,t);return Va(t)&&Wd(e,r,t,o,s,a),j2(e,r,t),r}function hk(e,t,n,r,i,o){r=r||n.width,i=i||n.height,o=o||n.depth;const s=n.target||cr;e.bindTexture(s,t);const a=n.level||0,u=n.internalFormat||n.format||Ue,l=Qo(u),c=n.format||l.format;let f;const h=n.src;if(h&&(Wo(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||H2(e,h,l.type):f=n.type||l.type,s===fr)for(let d=0;d<6;++d)e.texImage2D(Dc+d,a,u,r,i,0,c,f,null);else s===Or||s===zr?e.texImage3D(s,a,u,r,i,o,0,c,f,null):e.texImage2D(s,a,u,r,i,0,c,f,null)}const dk=E2,Oc=33984,pk=35048,zc=34962,gk=34963,Kd=35345,Z2=35718,mk=35721,bk=35971,yk=35382,wk=35396,vk=35398,Ak=35392,xk=35395,Uc=5126,Y2=35664,Q2=35665,X2=35666,Jd=5124,K2=35667,J2=35668,eb=35669,tb=35670,nb=35671,rb=35672,ib=35673,ob=35674,sb=35675,ab=35676,Ek=35678,_k=35680,Sk=35679,Ck=35682,kk=35685,Tk=35686,Ik=35687,Bk=35688,Dk=35689,Rk=35690,Fk=36289,Mk=36292,Pk=36293,e0=5125,lb=36294,ub=36295,cb=36296,Lk=36298,Nk=36299,Ok=36300,zk=36303,Uk=36306,Gk=36307,Hk=36308,Vk=36311,Gc=3553,Hc=34067,t0=32879,Vc=35866,le={};function fb(e,t){return le[t].bindPoint}function jk(e,t){return function(n){e.uniform1f(t,n)}}function $k(e,t){return function(n){e.uniform1fv(t,n)}}function qk(e,t){return function(n){e.uniform2fv(t,n)}}function Wk(e,t){return function(n){e.uniform3fv(t,n)}}function Zk(e,t){return function(n){e.uniform4fv(t,n)}}function hb(e,t){return function(n){e.uniform1i(t,n)}}function db(e,t){return function(n){e.uniform1iv(t,n)}}function pb(e,t){return function(n){e.uniform2iv(t,n)}}function gb(e,t){return function(n){e.uniform3iv(t,n)}}function mb(e,t){return function(n){e.uniform4iv(t,n)}}function Yk(e,t){return function(n){e.uniform1ui(t,n)}}function Qk(e,t){return function(n){e.uniform1uiv(t,n)}}function Xk(e,t){return function(n){e.uniform2uiv(t,n)}}function Kk(e,t){return function(n){e.uniform3uiv(t,n)}}function Jk(e,t){return function(n){e.uniform4uiv(t,n)}}function eT(e,t){return function(n){e.uniformMatrix2fv(t,!1,n)}}function tT(e,t){return function(n){e.uniformMatrix3fv(t,!1,n)}}function nT(e,t){return function(n){e.uniformMatrix4fv(t,!1,n)}}function rT(e,t){return function(n){e.uniformMatrix2x3fv(t,!1,n)}}function iT(e,t){return function(n){e.uniformMatrix3x2fv(t,!1,n)}}function oT(e,t){return function(n){e.uniformMatrix2x4fv(t,!1,n)}}function sT(e,t){return function(n){e.uniformMatrix4x2fv(t,!1,n)}}function aT(e,t){return function(n){e.uniformMatrix3x4fv(t,!1,n)}}function lT(e,t){return function(n){e.uniformMatrix4x3fv(t,!1,n)}}function It(e,t,n,r){const i=fb(e,t);return qo(e)?function(o){let s,a;Ic(e,o)?(s=o,a=null):(s=o.texture,a=o.sampler),e.uniform1i(r,n),e.activeTexture(Oc+n),e.bindTexture(i,s),e.bindSampler(n,a)}:function(o){e.uniform1i(r,n),e.activeTexture(Oc+n),e.bindTexture(i,o)}}function Bt(e,t,n,r,i){const o=fb(e,t),s=new Int32Array(i);for(let a=0;a<i;++a)s[a]=n+a;return qo(e)?function(a){e.uniform1iv(r,s),a.forEach(function(u,l){e.activeTexture(Oc+s[l]);let c,f;Ic(e,u)?(c=u,f=null):(c=u.texture,f=u.sampler),e.bindSampler(n,f),e.bindTexture(o,c)})}:function(a){e.uniform1iv(r,s),a.forEach(function(u,l){e.activeTexture(Oc+s[l]),e.bindTexture(o,u)})}}le[Uc]={Type:Float32Array,size:4,setter:jk,arraySetter:$k},le[Y2]={Type:Float32Array,size:8,setter:qk,cols:2},le[Q2]={Type:Float32Array,size:12,setter:Wk,cols:3},le[X2]={Type:Float32Array,size:16,setter:Zk,cols:4},le[Jd]={Type:Int32Array,size:4,setter:hb,arraySetter:db},le[K2]={Type:Int32Array,size:8,setter:pb,cols:2},le[J2]={Type:Int32Array,size:12,setter:gb,cols:3},le[eb]={Type:Int32Array,size:16,setter:mb,cols:4},le[e0]={Type:Uint32Array,size:4,setter:Yk,arraySetter:Qk},le[lb]={Type:Uint32Array,size:8,setter:Xk,cols:2},le[ub]={Type:Uint32Array,size:12,setter:Kk,cols:3},le[cb]={Type:Uint32Array,size:16,setter:Jk,cols:4},le[tb]={Type:Uint32Array,size:4,setter:hb,arraySetter:db},le[nb]={Type:Uint32Array,size:8,setter:pb,cols:2},le[rb]={Type:Uint32Array,size:12,setter:gb,cols:3},le[ib]={Type:Uint32Array,size:16,setter:mb,cols:4},le[ob]={Type:Float32Array,size:32,setter:eT,rows:2,cols:2},le[sb]={Type:Float32Array,size:48,setter:tT,rows:3,cols:3},le[ab]={Type:Float32Array,size:64,setter:nT,rows:4,cols:4},le[kk]={Type:Float32Array,size:32,setter:rT,rows:2,cols:3},le[Tk]={Type:Float32Array,size:32,setter:oT,rows:2,cols:4},le[Ik]={Type:Float32Array,size:48,setter:iT,rows:3,cols:2},le[Bk]={Type:Float32Array,size:48,setter:aT,rows:3,cols:4},le[Dk]={Type:Float32Array,size:64,setter:sT,rows:4,cols:2},le[Rk]={Type:Float32Array,size:64,setter:lT,rows:4,cols:3},le[Ek]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},le[_k]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},le[Sk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:t0},le[Ck]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},le[Fk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Vc},le[Mk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Vc},le[Pk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},le[Lk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},le[Nk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:t0},le[Ok]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},le[zk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Vc},le[Uk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Gc},le[Gk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:t0},le[Hk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Hc},le[Vk]={Type:null,size:0,setter:It,arraySetter:Bt,bindPoint:Vc};function jc(e,t){return function(n){if(n.value)switch(e.disableVertexAttribArray(t),n.value.length){case 4:e.vertexAttrib4fv(t,n.value);break;case 3:e.vertexAttrib3fv(t,n.value);break;case 2:e.vertexAttrib2fv(t,n.value);break;case 1:e.vertexAttrib1fv(t,n.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else e.bindBuffer(zc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,n.numComponents||n.size,n.type||Uc,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function Hr(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4iv(t,n.value);else throw new Error("The length of an integer constant value must be 4!");else e.bindBuffer(zc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||Jd,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function $c(e,t){return function(n){if(n.value)if(e.disableVertexAttribArray(t),n.value.length===4)e.vertexAttrib4uiv(t,n.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else e.bindBuffer(zc,n.buffer),e.enableVertexAttribArray(t),e.vertexAttribIPointer(t,n.numComponents||n.size,n.type||e0,n.stride||0,n.offset||0),n.divisor!==void 0&&e.vertexAttribDivisor(t,n.divisor)}}function n0(e,t,n){const r=n.size,i=n.count;return function(o){e.bindBuffer(zc,o.buffer);const s=o.size||o.numComponents||r,a=s/i,u=o.type||Uc,c=le[u].size*s,f=o.normalize||!1,h=o.offset||0,d=c/i;for(let p=0;p<i;++p)e.enableVertexAttribArray(t+p),e.vertexAttribPointer(t+p,a,u,f,c,h+d*p),o.divisor!==void 0&&e.vertexAttribDivisor(t+p,o.divisor)}}const rt={};rt[Uc]={size:4,setter:jc},rt[Y2]={size:8,setter:jc},rt[Q2]={size:12,setter:jc},rt[X2]={size:16,setter:jc},rt[Jd]={size:4,setter:Hr},rt[K2]={size:8,setter:Hr},rt[J2]={size:12,setter:Hr},rt[eb]={size:16,setter:Hr},rt[e0]={size:4,setter:$c},rt[lb]={size:8,setter:$c},rt[ub]={size:12,setter:$c},rt[cb]={size:16,setter:$c},rt[tb]={size:4,setter:Hr},rt[nb]={size:8,setter:Hr},rt[rb]={size:12,setter:Hr},rt[ib]={size:16,setter:Hr},rt[ob]={size:4,setter:n0,count:2},rt[sb]={size:9,setter:n0,count:3},rt[ab]={size:16,setter:n0,count:4};function bb(e){const t=e.name;return t.startsWith("gl_")||t.startsWith("webgl_")}const uT=/(\.|\[|]|\w+)/g,cT=e=>e>="0"&&e<="9";function yb(e,t,n,r){const i=e.split(uT).filter(a=>a!=="");let o=0,s="";for(;;){const a=i[o++];s+=a;const u=cT(a[0]),l=u?parseInt(a):a;if(u&&(s+=i[o++]),o===i.length){n[l]=t;break}else{const f=i[o++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[s]=r[s]||function(p){return function(m){Eb(p,m)}}(d),s+=f}}}function fT(e,t){let n=0;function r(a,u,l){const c=u.name.endsWith("[0]"),f=u.type,h=le[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=u.size,c?d=h.arraySetter(e,f,p,l,u.size):d=h.setter(e,f,p,l,u.size)}else h.arraySetter&&c?d=h.arraySetter(e,l):d=h.setter(e,l);return d.location=l,d}const i={},o={},s=e.getProgramParameter(t,Z2);for(let a=0;a<s;++a){const u=e.getActiveUniform(t,a);if(bb(u))continue;let l=u.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const c=e.getUniformLocation(t,u.name);if(c){const f=r(t,u,c);i[l]=f,yb(l,f,o,i)}}return i}function hT(e,t){const n={},r=e.getProgramParameter(t,bk);for(let i=0;i<r;++i){const o=e.getTransformFeedbackVarying(t,i);n[o.name]={index:i,type:o.type,size:o.size}}return n}function dT(e,t){const n=e.getProgramParameter(t,Z2),r=[],i=[];for(let a=0;a<n;++a){i.push(a),r.push({});const u=e.getActiveUniform(t,a);r[a].name=u.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const u=a[0],l=a[1];e.getActiveUniforms(t,i,e[u]).forEach(function(c,f){r[f][l]=c})});const o={},s=e.getProgramParameter(t,yk);for(let a=0;a<s;++a){const u=e.getActiveUniformBlockName(t,a),l={index:e.getUniformBlockIndex(t,u),usedByVertexShader:e.getActiveUniformBlockParameter(t,a,wk),usedByFragmentShader:e.getActiveUniformBlockParameter(t,a,vk),size:e.getActiveUniformBlockParameter(t,a,Ak),uniformIndices:e.getActiveUniformBlockParameter(t,a,xk)};l.used=l.usedByVertexShader||l.usedByFragmentShader,o[u]=l}return{blockSpecs:o,uniformData:r}}const wb=/\[\d+\]\.$/,pT=(e,t)=>((e+(t-1))/t|0)*t;function gT(e,t,n,r){if(t||n){r=r||1;const o=e.length/4;return function(s){let a=0,u=0;for(let l=0;l<o;++l){for(let c=0;c<r;++c)e[a++]=s[u++];a+=4-r}}}else return function(i){i.length?e.set(i):e[0]=i}}function mT(e,t,n,r){const i=n.blockSpecs,o=n.uniformData,s=i[r];if(!s)return dk("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),u=e.createBuffer(),l=s.index;e.bindBuffer(Kd,u),e.uniformBlockBinding(t,s.index,l);let c=r+".";wb.test(c)&&(c=c.replace(wb,"."));const f={},h={},d={};return s.uniformIndices.forEach(function(p){const m=o[p];let y=m.name;y.startsWith(c)&&(y=y.substr(c.length));const w=y.endsWith("[0]");w&&(y=y.substr(0,y.length-3));const x=le[m.type],S=x.Type,_=w?pT(x.size,16)*m.size:x.size*m.size,k=new S(a,m.offset,_/S.BYTES_PER_ELEMENT);f[y]=k;const B=gT(k,w,x.rows,x.cols);h[y]=B,yb(y,B,d,h)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:u,uniforms:f,setters:h}}function vb(e,t,n){return mT(e,t.program,t.uniformBlockSpec,n)}function Ab(e,t,n){const i=(t.uniformBlockSpec||t).blockSpecs[n.name];if(i){const o=i.index;return e.bindBufferRange(Kd,o,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function xb(e,t,n){Ab(e,t,n)&&e.bufferData(Kd,n.array,pk)}function qa(e,t){const n=e.setters;for(const r in t){const i=n[r];if(i){const o=t[r];i(o)}}}function Eb(e,t){for(const n in t){const r=e[n];typeof r=="function"?r(t[n]):Eb(e[n],t[n])}}function Ko(e,...t){const n=e.uniformSetters||e,r=t.length;for(let i=0;i<r;++i){const o=t[i];if(Array.isArray(o)){const s=o.length;for(let a=0;a<s;++a)Ko(n,o[a])}else for(const s in o){const a=n[s];a&&a(o[s])}}}function bT(e,t){const n={},r=e.getProgramParameter(t,mk);for(let i=0;i<r;++i){const o=e.getActiveAttrib(t,i);if(bb(o))continue;const s=e.getAttribLocation(t,o.name),a=rt[o.type],u=a.setter(e,s,a);u.location=s,n[o.name]=u}return n}function yT(e,t){for(const n in t){const r=e[n];r&&r(t[n])}}function Ui(e,t,n){n.vertexArrayObject?e.bindVertexArray(n.vertexArrayObject):(yT(t.attribSetters||t,n.attribs),n.indices&&e.bindBuffer(gk,n.indices))}function wT(e,t){const n=fT(e,t),r=bT(e,t),i={program:t,uniformSetters:n,attribSetters:r};return qo(e)&&(i.uniformBlockSpec=dT(e,t),i.transformFeedbackInfo=hT(e,t)),i}const vT=4,_b=5123;function qc(e,t,n,r,i,o){n=n===void 0?vT:n;const s=t.indices,a=t.elementType,u=r===void 0?t.numElements:r;i=i===void 0?0:i,a||s?o!==void 0?e.drawElementsInstanced(n,u,a===void 0?_b:t.elementType,i,o):e.drawElements(n,u,a===void 0?_b:t.elementType,i):o!==void 0?e.drawArraysInstanced(n,i,u,o):e.drawArrays(n,i,u)}const AT=36160,Gi=36161,xT=3553,ET=5121,_T=6402,ST=6408,CT=33190,kT=36012,TT=35056,IT=36013,BT=32854,DT=32855,RT=36194,Sb=33189,Cb=6401,kb=36168,r0=34041,i0=36064,Wc=36096,Tb=36128,o0=33306,s0=33071,a0=9729,Ib=[{format:ST,type:ET,min:a0,wrap:s0},{format:r0}],En={};En[r0]=o0,En[Cb]=Tb,En[kb]=Tb,En[_T]=Wc,En[Sb]=Wc,En[CT]=Wc,En[kT]=Wc,En[TT]=o0,En[IT]=o0;function FT(e,t){return En[e]||En[t]}const Vr={};Vr[BT]=!0,Vr[DT]=!0,Vr[RT]=!0,Vr[r0]=!0,Vr[Sb]=!0,Vr[Cb]=!0,Vr[kb]=!0;function MT(e){return Vr[e]}const PT=32;function LT(e){return e>=i0&&e<i0+PT}function NT(e,t,n,r){const i=AT,o=e.createFramebuffer();e.bindFramebuffer(i,o),n=n||e.drawingBufferWidth,r=r||e.drawingBufferHeight,t=t||Ib;const s=[],a={framebuffer:o,attachments:[],width:n,height:r};return t.forEach(function(u,l){let c=u.attachment;const f=u.samples,h=u.format;let d=u.attachmentPoint||FT(h,u.internalFormat);if(d||(d=i0+l),LT(d)&&s.push(d),!c)if(f!==void 0||MT(h))c=e.createRenderbuffer(),e.bindRenderbuffer(Gi,c),f>1?e.renderbufferStorageMultisample(Gi,f,h,n,r):e.renderbufferStorage(Gi,h,n,r);else{const p=Object.assign({},u);p.width=n,p.height=r,p.auto===void 0&&(p.auto=!1,p.min=p.min||p.minMag||a0,p.mag=p.mag||p.minMag||a0,p.wrapS=p.wrapS||p.wrap||s0,p.wrapT=p.wrapT||p.wrap||s0),c=$a(e,p)}if(_2(e,c))e.framebufferRenderbuffer(i,d,Gi,c);else if(Ic(e,c))u.layer!==void 0?e.framebufferTextureLayer(i,d,c,u.level||0,u.layer):e.framebufferTexture2D(i,d,u.target||xT,c,u.level||0);else throw new Error("unknown attachment type");a.attachments.push(c)}),e.drawBuffers&&e.drawBuffers(s),a}function OT(e,t,n,r,i){r=r||e.drawingBufferWidth,i=i||e.drawingBufferHeight,t.width=r,t.height=i,n=n||Ib,n.forEach(function(o,s){const a=t.attachments[s],u=o.format,l=o.samples;if(l!==void 0||_2(e,a))e.bindRenderbuffer(Gi,a),l>1?e.renderbufferStorageMultisample(Gi,l,u,r,i):e.renderbufferStorage(Gi,u,r,i);else if(Ic(e,a))hk(e,a,o,r,i);else throw new Error("unknown attachment type")})}function zT(e,t,n){const r=e.createVertexArray();return e.bindVertexArray(r),t.length||(t=[t]),t.forEach(function(i){Ui(e,i,n)}),e.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const UT=/^(.*?)_/;function GT(e,t){Nd(e,0);const n=e.getExtension(t);if(n){const r={},i=UT.exec(t)[1],o="_"+i;for(const s in n){const a=n[s],u=typeof a=="function",l=u?i:o;let c=s;s.endsWith(l)&&(c=s.substring(0,s.length-l.length)),e[c]!==void 0?!u&&e[c]!==a&&E2(c,e[c],a,s):u?e[c]=function(f){return function(){return f.apply(n,arguments)}}(a):(e[c]=a,r[c]=a)}r.constructor={name:n.constructor.name},Nd(r,0)}return n}const Bb=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function Db(e){for(let t=0;t<Bb.length;++t)GT(e,Bb[t])}function HT(e,t){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i)if(r=e.getContext(n[i],t),r){Db(r);break}return r}function VT(e,t){return HT(e,t)}const jT=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
228
228
  #if defined(ROUNDED_CORNERS) || defined(STROKED)
229
229
  out vec2 vPosInPixels;
230
230
  #endif
@@ -232,7 +232,7 @@ out vec2 vHalfSizeInPixels;/***Clamps the minimumSize and returns an opacity tha
232
232
  #if defined(ROUNDED_CORNERS) || defined(STROKED)
233
233
  float aaPadding=1.0/uDevicePixelRatio;float strokeWidth=getScaled_strokeWidth();float strokeOpacity=getScaled_strokeOpacity()*opaFactor;vec2 centeredFrac=frac-0.5;vec2 expand=centeredFrac*(strokeWidth+aaPadding)/uViewportSize;pos+=expand;vec2 sizeInPixels=size*uViewportSize;vPosInPixels=(centeredFrac+expand/size)*sizeInPixels;vHalfSizeInPixels=sizeInPixels/2.0;vCornerRadii=min(cornerRadii,min(vHalfSizeInPixels.x,vHalfSizeInPixels.y));vHalfStrokeWidth=strokeWidth/2.0;vStrokeColor=vec4(getScaled_stroke()*strokeOpacity,strokeOpacity);
234
234
  #endif
235
- gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,WT=`#if defined(ROUNDED_CORNERS) || defined(STROKED)
235
+ gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,$T=`#if defined(ROUNDED_CORNERS) || defined(STROKED)
236
236
  in vec2 vPosInPixels;
237
237
  #endif
238
238
  in vec2 vHalfSizeInPixels;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in float vHalfStrokeWidth;in vec4 vCornerRadii;out lowp vec4 fragColor;float sdRoundedBox(vec2 p,vec2 b,vec4 r){r.xy=p.x>0.0 ? r.xy : r.zw;r.x=p.y>0.0 ? r.x : r.y;vec2 q=abs(p)-b+r.x;return min(max(q.x,q.y),0.0)+length(max(q,0.0))-r.x;}float sdSharpBox(vec2 p,vec2 b){vec2 q=abs(p)-b;return max(q.x,q.y);}void main(void){
@@ -246,60 +246,60 @@ fragColor=distanceToColor(d,vFillColor,vStrokeColor,vHalfStrokeWidth);if(fragCol
246
246
  #else
247
247
  fragColor=vFillColor;
248
248
  #endif
249
- if(uPickingEnabled){fragColor=vPickingColor;}}`,ZT=`layout(std140)uniform Mark{uniform float uMinWidth;uniform float uMinHeight;uniform float uMinOpacity;uniform float uCornerRadiusTopRight;uniform float uCornerRadiusBottomRight;uniform float uCornerRadiusTopLeft;uniform float uCornerRadiusBottomLeft;
249
+ if(uPickingEnabled){fragColor=vPickingColor;}}`,qT=`layout(std140)uniform Mark{uniform float uMinWidth;uniform float uMinHeight;uniform float uMinOpacity;uniform float uCornerRadiusTopRight;uniform float uCornerRadiusBottomRight;uniform float uCornerRadiusTopLeft;uniform float uCornerRadiusBottomLeft;
250
250
  #pragma markUniforms
251
- };`;function zn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function $r(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const n0=Symbol("implicit");function r0(){var e=new or,t=[],n=[],r=n0;function i(o){let a=e.get(o);if(a===void 0){if(r!==n0)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new or;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return r0(t,n).unknown(r)},zn.apply(i,arguments),i}function ea(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qs(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qr(){}var Vi=.7,ta=1/Vi,na="\\s*([+-]?\\d+)\\s*",Ws="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",YT=/^#([0-9a-f]{3,8})$/,QT=new RegExp(`^rgb\\(${na},${na},${na}\\)$`),XT=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),KT=new RegExp(`^rgba\\(${na},${na},${na},${Ws}\\)$`),JT=new RegExp(`^rgba\\(${Un},${Un},${Un},${Ws}\\)$`),eI=new RegExp(`^hsl\\(${Ws},${Un},${Un}\\)$`),tI=new RegExp(`^hsla\\(${Ws},${Un},${Un},${Ws}\\)$`),P2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ea(qr,Wr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:L2,formatHex:L2,formatHex8:nI,formatHsl:rI,formatRgb:N2,toString:N2});function L2(){return this.rgb().formatHex()}function nI(){return this.rgb().formatHex8()}function rI(){return H2(this).formatHsl()}function N2(){return this.rgb().formatRgb()}function Wr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=YT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?O2(t):n===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Wc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Wc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=QT.exec(e))?new ct(t[1],t[2],t[3],1):(t=XT.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KT.exec(e))?Wc(t[1],t[2],t[3],t[4]):(t=JT.exec(e))?Wc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eI.exec(e))?G2(t[1],t[2]/100,t[3]/100,1):(t=tI.exec(e))?G2(t[1],t[2]/100,t[3]/100,t[4]):P2.hasOwnProperty(e)?O2(P2[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function O2(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function Wc(e,t,n,r){return r<=0&&(e=t=n=NaN),new ct(e,t,n,r)}function i0(e){return e instanceof qr||(e=Wr(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function Zc(e,t,n,r){return arguments.length===1?i0(e):new ct(e,t,n,r??1)}function ct(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ea(ct,Zc,qs(qr,{brighter(e){return e=e==null?ta:Math.pow(ta,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Vi:Math.pow(Vi,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(ji(this.r),ji(this.g),ji(this.b),Yc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z2,formatHex:z2,formatHex8:iI,formatRgb:U2,toString:U2}));function z2(){return`#${$i(this.r)}${$i(this.g)}${$i(this.b)}`}function iI(){return`#${$i(this.r)}${$i(this.g)}${$i(this.b)}${$i((isNaN(this.opacity)?1:this.opacity)*255)}`}function U2(){const e=Yc(this.opacity);return`${e===1?"rgb(":"rgba("}${ji(this.r)}, ${ji(this.g)}, ${ji(this.b)}${e===1?")":`, ${e})`}`}function Yc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ji(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $i(e){return e=ji(e),(e<16?"0":"")+e.toString(16)}function G2(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new En(e,t,n,r)}function H2(e){if(e instanceof En)return new En(e.h,e.s,e.l,e.opacity);if(e instanceof qr||(e=Wr(e)),!e)return new En;if(e instanceof En)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new En(a,s,u,e.opacity)}function o0(e,t,n,r){return arguments.length===1?H2(e):new En(e,t,n,r??1)}function En(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ea(En,o0,qs(qr,{brighter(e){return e=e==null?ta:Math.pow(ta,e),new En(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vi:Math.pow(Vi,e),new En(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ct(a0(e>=240?e-240:e+120,i,r),a0(e,i,r),a0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new En(V2(this.h),Qc(this.s),Qc(this.l),Yc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Yc(this.opacity);return`${e===1?"hsl(":"hsla("}${V2(this.h)}, ${Qc(this.s)*100}%, ${Qc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function V2(e){return e=(e||0)%360,e<0?e+360:e}function Qc(e){return Math.max(0,Math.min(1,e||0))}function a0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const j2=Math.PI/180,$2=180/Math.PI,Xc=18,q2=.96422,W2=1,Z2=.82521,Y2=4/29,ra=6/29,Q2=3*ra*ra,oI=ra*ra*ra;function X2(e){if(e instanceof Gn)return new Gn(e.l,e.a,e.b,e.opacity);if(e instanceof hr)return K2(e);e instanceof ct||(e=i0(e));var t=f0(e.r),n=f0(e.g),r=f0(e.b),i=l0((.2225045*t+.7168786*n+.0606169*r)/W2),o,a;return t===n&&n===r?o=a=i:(o=l0((.4360747*t+.3850649*n+.1430804*r)/q2),a=l0((.0139322*t+.0971045*n+.7141733*r)/Z2)),new Gn(116*i-16,500*(o-i),200*(i-a),e.opacity)}function s0(e,t,n,r){return arguments.length===1?X2(e):new Gn(e,t,n,r??1)}function Gn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ea(Gn,s0,qs(qr,{brighter(e){return new Gn(this.l+Xc*(e??1),this.a,this.b,this.opacity)},darker(e){return new Gn(this.l-Xc*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=q2*u0(t),e=W2*u0(e),n=Z2*u0(n),new ct(c0(3.1338561*t-1.6168667*e-.4906146*n),c0(-.9787684*t+1.9161415*e+.033454*n),c0(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function l0(e){return e>oI?Math.pow(e,1/3):e/Q2+Y2}function u0(e){return e>ra?e*e*e:Q2*(e-Y2)}function c0(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function f0(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function aI(e){if(e instanceof hr)return new hr(e.h,e.c,e.l,e.opacity);if(e instanceof Gn||(e=X2(e)),e.a===0&&e.b===0)return new hr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*$2;return new hr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function h0(e,t,n,r){return arguments.length===1?aI(e):new hr(e,t,n,r??1)}function hr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function K2(e){if(isNaN(e.h))return new Gn(e.l,0,0,e.opacity);var t=e.h*j2;return new Gn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ea(hr,h0,qs(qr,{brighter(e){return new hr(this.h,this.c,this.l+Xc*(e??1),this.opacity)},darker(e){return new hr(this.h,this.c,this.l-Xc*(e??1),this.opacity)},rgb(){return K2(this).rgb()}}));var J2=-.14861,d0=1.78277,p0=-.29227,Kc=-.90649,Zs=1.97294,ey=Zs*Kc,ty=Zs*d0,ny=d0*p0-Kc*J2;function sI(e){if(e instanceof qi)return new qi(e.h,e.s,e.l,e.opacity);e instanceof ct||(e=i0(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(ny*r+ey*t-ty*n)/(ny+ey-ty),o=r-i,a=(Zs*(n-i)-p0*o)/Kc,s=Math.sqrt(a*a+o*o)/(Zs*i*(1-i)),u=s?Math.atan2(a,o)*$2-120:NaN;return new qi(u<0?u+360:u,s,i,e.opacity)}function g0(e,t,n,r){return arguments.length===1?sI(e):new qi(e,t,n,r??1)}function qi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ea(qi,g0,qs(qr,{brighter(e){return e=e==null?ta:Math.pow(ta,e),new qi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Vi:Math.pow(Vi,e),new qi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*j2,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new ct(255*(t+n*(J2*r+d0*i)),255*(t+n*(p0*r+Kc*i)),255*(t+n*(Zs*r)),this.opacity)}}));function ry(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function iy(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return ry((n-r/t)*t,a,i,o,s)}}function oy(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return ry((n-r/t)*t,i,o,a,s)}}const Jc=e=>()=>e;function ay(e,t){return function(n){return e+n*t}}function lI(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ef(e,t){var n=t-e;return n?ay(e,n>180||n<-180?n-360*Math.round(n/360):n):Jc(isNaN(e)?t:e)}function uI(e){return(e=+e)==1?ft:function(t,n){return n-t?lI(t,n,e):Jc(isNaN(t)?n:t)}}function ft(e,t){var n=t-e;return n?ay(e,n):Jc(isNaN(e)?t:e)}const m0=function e(t){var n=uI(t);function r(i,o){var a=n((i=Zc(i)).r,(o=Zc(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=ft(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function sy(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Zc(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var cI=sy(iy),fI=sy(oy);function b0(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function ly(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function hI(e,t){return(ly(t)?b0:uy)(e,t)}function uy(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Zr(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function cy(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function _n(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function fy(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Zr(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var y0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,w0=new RegExp(y0.source,"g");function dI(e){return function(){return e}}function pI(e){return function(t){return e(t)+""}}function hy(e,t){var n=y0.lastIndex=w0.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(e=e+"",t=t+"";(r=y0.exec(e))&&(i=w0.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:_n(r,i)})),n=w0.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?pI(u[0].x):dI(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function Zr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Jc(t):(n==="number"?_n:n==="string"?(r=Wr(t))?(t=r,m0):hy:t instanceof Wr?m0:t instanceof Date?cy:ly(t)?b0:Array.isArray(t)?uy:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?fy:_n)(e,t)}function gI(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function mI(e,t){var n=ef(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ys(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var dy=180/Math.PI,v0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function py(e,t,n,r,i,o){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*dy,skewX:Math.atan(u)*dy,scaleX:a,scaleY:s}}var tf;function bI(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?v0:py(t.a,t.b,t.c,t.d,t.e,t.f)}function yI(e){return e==null||(tf||(tf=document.createElementNS("http://www.w3.org/2000/svg","g")),tf.setAttribute("transform",e),!(e=tf.transform.baseVal.consolidate()))?v0:(e=e.matrix,py(e.a,e.b,e.c,e.d,e.e,e.f))}function gy(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push("translate(",null,t,null,n);p.push({i:m-4,x:_n(l,f)},{i:m-2,x:_n(c,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function a(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:_n(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:_n(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");p.push({i:m-4,x:_n(l,f)},{i:m-2,x:_n(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=e(l),c=e(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),a(l.rotate,c.rotate,f,h),s(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(d){for(var p=-1,m=h.length,y;++p<m;)f[(y=h[p]).i]=y.x(d);return f.join("")}}}var wI=gy(bI,"px, ","px)","deg)"),vI=gy(yI,", ",")",")"),xI=1e-12;function my(e){return((e=Math.exp(e))+1/e)/2}function AI(e){return((e=Math.exp(e))-1/e)/2}function EI(e){return((e=Math.exp(2*e))-1)/(e+1)}const _I=function e(t,n,r){function i(o,a){var s=o[0],u=o[1],l=o[2],c=a[0],f=a[1],h=a[2],d=c-s,p=f-u,m=d*d+p*p,y,w;if(m<xI)w=Math.log(h/l)/t,y=function(I){return[s+I*d,u+I*p,l*Math.exp(t*I*w)]};else{var A=Math.sqrt(m),S=(h*h-l*l+r*m)/(2*l*n*A),_=(h*h-l*l-r*m)/(2*h*n*A),k=Math.log(Math.sqrt(S*S+1)-S),B=Math.log(Math.sqrt(_*_+1)-_);w=(B-k)/t,y=function(I){var D=I*w,M=my(k),G=l/(n*A)*(M*EI(t*D+k)-AI(k));return[s+G*d,u+G*p,l*M/my(t*D+k)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return e(a,s,u)},i}(Math.SQRT2,2,4);function by(e){return function(t,n){var r=e((t=o0(t)).h,(n=o0(n)).h),i=ft(t.s,n.s),o=ft(t.l,n.l),a=ft(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const SI=by(ef);var CI=by(ft);function kI(e,t){var n=ft((e=s0(e)).l,(t=s0(t)).l),r=ft(e.a,t.a),i=ft(e.b,t.b),o=ft(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function yy(e){return function(t,n){var r=e((t=h0(t)).h,(n=h0(n)).h),i=ft(t.c,n.c),o=ft(t.l,n.l),a=ft(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const TI=yy(ef);var II=yy(ft);function wy(e){return function t(n){n=+n;function r(i,o){var a=e((i=g0(i)).h,(o=g0(o)).h),s=ft(i.s,o.s),u=ft(i.l,o.l),l=ft(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=t,r}(1)}const BI=wy(ef);var DI=wy(ft);function x0(e,t){t===void 0&&(t=e,e=Zr);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function RI(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const FI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Zr,interpolateArray:hI,interpolateBasis:iy,interpolateBasisClosed:oy,interpolateCubehelix:BI,interpolateCubehelixLong:DI,interpolateDate:cy,interpolateDiscrete:gI,interpolateHcl:TI,interpolateHclLong:II,interpolateHsl:SI,interpolateHslLong:CI,interpolateHue:mI,interpolateLab:kI,interpolateNumber:_n,interpolateNumberArray:b0,interpolateObject:fy,interpolateRgb:m0,interpolateRgbBasis:cI,interpolateRgbBasisClosed:fI,interpolateRound:Ys,interpolateString:hy,interpolateTransformCss:wI,interpolateTransformSvg:vI,interpolateZoom:_I,piecewise:x0,quantize:RI},Symbol.toStringTag,{value:"Module"}));function MI(e){return function(){return e}}function A0(e){return+e}var vy=[0,1];function Ot(e){return e}function E0(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:MI(isNaN(t)?NaN:.5)}function PI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function LI(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=E0(i,r),o=n(a,o)):(r=E0(r,i),o=n(o,a)),function(s){return o(r(s))}}function NI(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=E0(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var u=Pr(e,s,1,r)-1;return o[u](i[u](s))}}function Qs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function nf(){var e=vy,t=vy,n=Zr,r,i,o,a=Ot,s,u,l;function c(){var h=Math.min(e.length,t.length);return a!==Ot&&(a=PI(e[0],e[h-1])),s=h>2?NI:LI,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),_n)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,A0),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Ys,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Ot,c()):a!==Ot},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,d){return r=h,i=d,c()}}function xy(){return nf()(Ot,Ot)}function Ay(e,t,n,r){var i=Lr(e,t,n),o;switch(r=Nr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=j1(i,a))&&(r.precision=o),hd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=$1(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=V1(i))&&(r.precision=o-(r.type==="%")*2);break}}return mt(r)}function Wi(e){var t=e.domain;return e.ticks=function(n){var r=t();return hc(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Ay(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);c-- >0;){if(l=cd(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Ey(){var e=xy();return e.copy=function(){return Qs(e,Ey())},zn.apply(e,arguments),Wi(e)}function _y(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,A0),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return _y(e).unknown(t)},e=arguments.length?Array.from(e,A0):[0,1],Wi(n)}function Sy(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Cy(e){return Math.log(e)}function ky(e){return Math.exp(e)}function OI(e){return-Math.log(-e)}function zI(e){return-Math.exp(-e)}function UI(e){return isFinite(e)?+("1e"+e):e<0?0:e}function GI(e){return e===10?UI:e===Math.E?Math.exp:t=>Math.pow(e,t)}function HI(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Ty(e){return(t,n)=>-e(-t,n)}function _0(e){const t=e(Cy,ky),n=t.domain;let r=10,i,o;function a(){return i=HI(r),o=GI(r),n()[0]<0?(i=Ty(i),o=Ty(o),e(OI,zI)):e(Cy,ky),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),d=i(c),p,m;const y=s==null?10:+s;let w=[];if(!(r%1)&&d-h<y){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(m=h<0?p/o(-h):p*o(h),!(m<l)){if(m>c)break;w.push(m)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(m=h>0?p/o(-h):p*o(h),!(m<l)){if(m>c)break;w.push(m)}w.length*2<y&&(w=hc(l,c,y))}else w=hc(h,d,Math.min(d-h,y)).map(o);return f?w.reverse():w},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Nr(u)).precision==null&&(u.trim=!0),u=mt(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},t.nice=()=>n(Sy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function S0(){const e=_0(nf()).domain([1,10]);return e.copy=()=>Qs(e,S0()).base(e.base()),zn.apply(e,arguments),e}function Iy(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function By(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function C0(e){var t=1,n=e(Iy(t),By(t));return n.constant=function(r){return arguments.length?e(Iy(t=+r),By(t)):t},Wi(n)}function Dy(){var e=C0(nf());return e.copy=function(){return Qs(e,Dy()).constant(e.constant())},zn.apply(e,arguments)}function Ry(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function VI(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jI(e){return e<0?-e*e:e*e}function k0(e){var t=e(Ot,Ot),n=1;function r(){return n===1?e(Ot,Ot):n===.5?e(VI,jI):e(Ry(n),Ry(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wi(t)}function T0(){var e=k0(nf());return e.copy=function(){return Qs(e,T0()).exponent(e.exponent())},zn.apply(e,arguments),e}function $I(){return T0.apply(null,arguments).exponent(.5)}function Fy(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=L1(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[Pr(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(vs),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Fy().domain(e).range(t).unknown(r)},zn.apply(o,arguments)}function My(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Pr(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return a}return a.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return My().domain([e,t]).range(i).unknown(o)},zn.apply(Wi(a),arguments)}function Py(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Pr(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Py().domain(e).range(t).unknown(n)},zn.apply(i,arguments)}function qI(e){return new Date(e)}function WI(e){return e instanceof Date?+e:+new Date(+e)}function I0(e,t,n,r,i,o,a,s,u,l){var c=xy(),f=c.invert,h=c.domain,d=l(".%L"),p=l(":%S"),m=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),A=l("%b %d"),S=l("%B"),_=l("%Y");function k(B){return(u(B)<B?d:s(B)<B?p:a(B)<B?m:o(B)<B?y:r(B)<B?i(B)<B?w:A:n(B)<B?S:_)(B)}return c.invert=function(B){return new Date(f(B))},c.domain=function(B){return arguments.length?h(Array.from(B,WI)):h().map(qI)},c.ticks=function(B){var I=h();return e(I[0],I[I.length-1],B??10)},c.tickFormat=function(B,I){return I==null?k:l(I)},c.nice=function(B){var I=h();return(!B||typeof B.range!="function")&&(B=t(I[0],I[I.length-1],B??10)),B?h(Sy(I,B)):c},c.copy=function(){return Qs(c,I0(e,t,n,r,i,o,a,s,u,l))},c}function ZI(){return zn.apply(I0(SC,CC,Pn,_s,As,Or,yc,mc,ur,vd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function YI(){return zn.apply(I0(EC,_C,Ln,Ss,Es,Li,wc,bc,ur,xd).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function rf(){var e=0,t=1,n,r,i,o,a=Ot,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(a=f,l):a};function c(f){return function(h){var d,p;return arguments.length?([d,p]=h,a=f(d,p),l):[a(0),a(1)]}}return l.range=c(Zr),l.rangeRound=c(Ys),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),l}}function Yr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function B0(){var e=Wi(rf()(Ot));return e.copy=function(){return Yr(e,B0())},$r.apply(e,arguments)}function Ly(){var e=_0(rf()).domain([1,10]);return e.copy=function(){return Yr(e,Ly()).base(e.base())},$r.apply(e,arguments)}function Ny(){var e=C0(rf());return e.copy=function(){return Yr(e,Ny()).constant(e.constant())},$r.apply(e,arguments)}function D0(){var e=k0(rf());return e.copy=function(){return Yr(e,D0()).exponent(e.exponent())},$r.apply(e,arguments)}function QI(){return D0.apply(null,arguments).exponent(.5)}function of(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Ot,c,f=!1,h;function d(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*m<r*o?s:u),l(f?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),o=c(t=+t),a=c(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[e,t,n]},d.clamp=function(m){return arguments.length?(f=!!m,d):f},d.interpolator=function(m){return arguments.length?(l=m,d):l};function p(m){return function(y){var w,A,S;return arguments.length?([w,A,S]=y,l=x0(m,[w,A,S]),d):[l(0),l(.5),l(1)]}}return d.range=p(Zr),d.rangeRound=p(Ys),d.unknown=function(m){return arguments.length?(h=m,d):h},function(m){return c=m,i=m(e),o=m(t),a=m(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function Oy(){var e=Wi(of()(Ot));return e.copy=function(){return Yr(e,Oy())},$r.apply(e,arguments)}function zy(){var e=_0(of()).domain([.1,1,10]);return e.copy=function(){return Yr(e,zy()).base(e.base())},$r.apply(e,arguments)}function Uy(){var e=C0(of());return e.copy=function(){return Yr(e,Uy()).constant(e.constant())},$r.apply(e,arguments)}function R0(){var e=k0(of());return e.copy=function(){return Yr(e,R0()).exponent(e.exponent())},$r.apply(e,arguments)}function XI(){return R0.apply(null,arguments).exponent(.5)}function F0(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const KI="identity",ia="linear",Qr="log",Xs="pow",Ks="sqrt",af="symlog",Gy="time",Hy="utc",Hn="sequential",oa="diverging",M0="quantile",Vy="quantize",jy="threshold",P0="ordinal",L0="point",$y="band",N0="bin-ordinal",at="continuous",Js="discrete",el="discretizing",on="interpolating",qy="temporal";function JI(e){return function(t){let n=t[0],r=t[1],i;return r<n&&(i=n,n=r,r=i),[e.invert(n),e.invert(r)]}}function e9(e){return function(t){const n=e.range();let r=t[0],i=t[1],o=-1,a,s,u,l;for(i<r&&(s=r,r=i,i=s),u=0,l=n.length;u<l;++u)n[u]>=r&&n[u]<=i&&(o<0&&(o=u),a=u);if(!(o<0))return r=e.invertExtent(n[o]),i=e.invertExtent(n[a]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function O0(){const e=r0().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,o,a=!1,s=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,h=r[1]<r[0],d=r[1-h],p=F0(f,s,u);let m=r[h-0];i=(d-m)/(p||1),a&&(i=Math.floor(i)),m+=(d-m-i*(f-s))*l,o=i*(1-s),a&&(m=Math.round(m),o=Math.round(o));const y=xs(f).map(w=>m+i*w);return n(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],c()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],a=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(a=!!f,c()):a},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),s=u,c()):s},e.paddingInner=function(f){return arguments.length?(s=Math.max(0,Math.min(1,f)),c()):s},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let m=+f[0],y=+f[1],w,A,S;if(!(m!==m||y!==y)&&(y<m&&(S=m,m=y,y=S),!(y<d[0]||m>r[1-h])))return w=Math.max(0,Pr(d,m)-1),A=m===y?w:Pr(d,y)-1,m-d[w]>o+1e-10&&++w,h&&(S=w,w=p-A,A=p-S),w>A?void 0:t().slice(w,A+1)},e.invert=function(f){const h=e.invertRange([f,f]);return h&&h[0]},e.copy=function(){return O0().domain(t()).range(r).round(a).paddingInner(s).paddingOuter(u).align(l)},c()}function Wy(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return Wy(t())},e}function t9(){return Wy(O0().paddingInner(1))}var n9=Array.prototype.map;function r9(e){return n9.call(e,us)}const i9=Array.prototype.slice;function Zy(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Pr(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=r9(r),n):e.slice()},n.range=function(r){return arguments.length?(t=i9.call(r),n):t.slice()},n.tickFormat=function(r,i){return Ay(e[0],vn(e),r??10,i)},n.copy=function(){return Zy().domain(n.domain()).range(n.range())},n}const sf=new Map,o9=Symbol("vega_scale");function a9(e){return e[o9]=!0,e}function s9(e,t,n){const r=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?JI(o):o.invertExtent?e9(o):void 0),o.type=e,a9(o)};return r.metadata=oc(Kh(n)),r}function Se(e,t,n){return arguments.length>1?(sf.set(e,s9(e,t,n)),this):l9(e)?sf.get(e):void 0}Se(KI,_y),Se(ia,Ey,at),Se(Qr,S0,[at,Qr]),Se(Xs,T0,at),Se(Ks,$I,at),Se(af,Dy,at),Se(Gy,ZI,[at,qy]),Se(Hy,YI,[at,qy]),Se(Hn,B0,[at,on]),Se(`${Hn}-${ia}`,B0,[at,on]),Se(`${Hn}-${Qr}`,Ly,[at,on,Qr]),Se(`${Hn}-${Xs}`,D0,[at,on]),Se(`${Hn}-${Ks}`,QI,[at,on]),Se(`${Hn}-${af}`,Ny,[at,on]),Se(`${oa}-${ia}`,Oy,[at,on]),Se(`${oa}-${Qr}`,zy,[at,on,Qr]),Se(`${oa}-${Xs}`,R0,[at,on]),Se(`${oa}-${Ks}`,XI,[at,on]),Se(`${oa}-${af}`,Uy,[at,on]),Se(M0,Fy,[el,M0]),Se(Vy,My,el),Se(jy,Py,el),Se(N0,Zy,[Js,el]),Se(P0,r0,Js),Se($y,O0,Js),Se(L0,t9,Js);function l9(e){return sf.has(e)}function tl(e,t){const n=sf.get(e);return n&&n.metadata[t]}function bt(e){return tl(e,at)}function Xr(e){return tl(e,Js)}function Zi(e){return tl(e,el)}function Yy(e){return tl(e,Qr)}function lf(e){return tl(e,on)}function u9(e,t){const n=t[0],r=vn(t)-n;return function(i){return e(n+i*r)}}function uf(e,t,n){return x0(Qy(t||"rgb",n),e)}function c9(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function Qy(e,t){const n=FI[f9(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function f9(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const h9={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},d9={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function Xy(e){const t=e.length/6|0,n=new Array(t);for(let r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}function Ky(e,t){for(const n in e)z0(n,t(e[n]))}const Jy={};Ky(d9,Xy),Ky(h9,e=>uf(Xy(e)));function z0(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Jy[e]=t,this):Jy[e]}function Me(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=new Function("datum",`return datum[${JSON.stringify(e)}]`);return Ie(n,[e],t)}else return ec(e)}const p9="RawCode",g9="Literal",m9="Property",b9="Identifier",y9="ArrayExpression",w9="BinaryExpression",v9="CallExpression",x9="ConditionalExpression",A9="LogicalExpression",E9="MemberExpression",_9="ObjectExpression",S9="UnaryExpression";function Sn(e){this.type=e}Sn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=C9(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function C9(e){switch(e.type){case y9:return e.elements;case w9:case A9:return[e.left,e.right];case v9:return[e.callee].concat(e.arguments);case x9:return[e.test,e.consequent,e.alternate];case E9:return[e.object,e.property];case _9:return e.properties;case m9:return[e.key,e.value];case S9:return[e.argument];case b9:case g9:case p9:default:return[]}}var Vn,ee,H,_t,De,cf=1,nl=2,Yi=3,Kr=4,ff=5,Qi=6,zt=7,rl=8,k9=9;Vn={},Vn[cf]="Boolean",Vn[nl]="<end>",Vn[Yi]="Identifier",Vn[Kr]="Keyword",Vn[ff]="Null",Vn[Qi]="Numeric",Vn[zt]="Punctuator",Vn[rl]="String",Vn[k9]="RegularExpression";var T9="ArrayExpression",I9="BinaryExpression",B9="CallExpression",D9="ConditionalExpression",ew="Identifier",R9="Literal",F9="LogicalExpression",M9="MemberExpression",P9="ObjectExpression",L9="Property",N9="UnaryExpression",ht="Unexpected token %0",O9="Unexpected number",z9="Unexpected string",U9="Unexpected identifier",G9="Unexpected reserved word",H9="Unexpected end of input",U0="Invalid regular expression",G0="Invalid regular expression: missing /",tw="Octal literals are not allowed in strict mode.",V9="Duplicate data property in object literal not allowed in strict mode",yt="ILLEGAL",il="Disabled.",j9=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A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\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),$9=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09A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B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function hf(e,t){if(!e)throw new Error("ASSERT: "+t)}function dr(e){return e>=48&&e<=57}function H0(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function ol(e){return"01234567".indexOf(e)>=0}function q9(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function al(e){return e===10||e===13||e===8232||e===8233}function sl(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&j9.test(String.fromCharCode(e))}function df(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&$9.test(String.fromCharCode(e))}const W9={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function nw(){for(;H<_t;){const e=ee.charCodeAt(H);if(q9(e)||al(e))++H;else break}}function V0(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)H<_t&&H0(ee[H])?(r=ee[H++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):ve({},ht,yt);return String.fromCharCode(i)}function Z9(){var e,t,n,r;for(e=ee[H],t=0,e==="}"&&ve({},ht,yt);H<_t&&(e=ee[H++],!!H0(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&ve({},ht,yt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function rw(){var e,t;for(e=ee.charCodeAt(H++),t=String.fromCharCode(e),e===92&&(ee.charCodeAt(H)!==117&&ve({},ht,yt),++H,e=V0("u"),(!e||e==="\\"||!sl(e.charCodeAt(0)))&&ve({},ht,yt),t=e);H<_t&&(e=ee.charCodeAt(H),!!df(e));)++H,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),ee.charCodeAt(H)!==117&&ve({},ht,yt),++H,e=V0("u"),(!e||e==="\\"||!df(e.charCodeAt(0)))&&ve({},ht,yt),t+=e);return t}function Y9(){var e,t;for(e=H++;H<_t;){if(t=ee.charCodeAt(H),t===92)return H=e,rw();if(df(t))++H;else break}return ee.slice(e,H)}function Q9(){var e,t,n;return e=H,t=ee.charCodeAt(H)===92?rw():Y9(),t.length===1?n=Yi:W9.hasOwnProperty(t)?n=Kr:t==="null"?n=ff:t==="true"||t==="false"?n=cf:n=Yi,{type:n,value:t,start:e,end:H}}function j0(){var e=H,t=ee.charCodeAt(H),n,r=ee[H],i,o,a;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++H,{type:zt,value:String.fromCharCode(t),start:e,end:H};default:if(n=ee.charCodeAt(H+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return H+=2,{type:zt,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:H};case 33:case 61:return H+=2,ee.charCodeAt(H)===61&&++H,{type:zt,value:ee.slice(e,H),start:e,end:H}}}if(a=ee.substr(H,4),a===">>>=")return H+=4,{type:zt,value:a,start:e,end:H};if(o=a.substr(0,3),o===">>>"||o==="<<="||o===">>=")return H+=3,{type:zt,value:o,start:e,end:H};if(i=o.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return H+=2,{type:zt,value:i,start:e,end:H};if(i==="//"&&ve({},ht,yt),"<>=!+-*%&|^/".indexOf(r)>=0)return++H,{type:zt,value:r,start:e,end:H};ve({},ht,yt)}function X9(e){let t="";for(;H<_t&&H0(ee[H]);)t+=ee[H++];return t.length===0&&ve({},ht,yt),sl(ee.charCodeAt(H))&&ve({},ht,yt),{type:Qi,value:parseInt("0x"+t,16),start:e,end:H}}function K9(e){let t="0"+ee[H++];for(;H<_t&&ol(ee[H]);)t+=ee[H++];return(sl(ee.charCodeAt(H))||dr(ee.charCodeAt(H)))&&ve({},ht,yt),{type:Qi,value:parseInt(t,8),octal:!0,start:e,end:H}}function iw(){var e,t,n;if(n=ee[H],hf(dr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=H,e="",n!=="."){if(e=ee[H++],n=ee[H],e==="0"){if(n==="x"||n==="X")return++H,X9(t);if(ol(n))return K9(t);n&&dr(n.charCodeAt(0))&&ve({},ht,yt)}for(;dr(ee.charCodeAt(H));)e+=ee[H++];n=ee[H]}if(n==="."){for(e+=ee[H++];dr(ee.charCodeAt(H));)e+=ee[H++];n=ee[H]}if(n==="e"||n==="E")if(e+=ee[H++],n=ee[H],(n==="+"||n==="-")&&(e+=ee[H++]),dr(ee.charCodeAt(H)))for(;dr(ee.charCodeAt(H));)e+=ee[H++];else ve({},ht,yt);return sl(ee.charCodeAt(H))&&ve({},ht,yt),{type:Qi,value:parseFloat(e),start:t,end:H}}function J9(){var e="",t,n,r,i,o=!1;for(t=ee[H],hf(t==="'"||t==='"',"String literal must starts with a quote"),n=H,++H;H<_t;)if(r=ee[H++],r===t){t="";break}else if(r==="\\")if(r=ee[H++],!r||!al(r.charCodeAt(0)))switch(r){case"u":case"x":ee[H]==="{"?(++H,e+=Z9()):e+=V0(r);break;case"n":e+=`
252
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:ol(r)?(i="01234567".indexOf(r),i!==0&&(o=!0),H<_t&&ol(ee[H])&&(o=!0,i=i*8+"01234567".indexOf(ee[H++]),"0123".indexOf(r)>=0&&H<_t&&ol(ee[H])&&(i=i*8+"01234567".indexOf(ee[H++]))),e+=String.fromCharCode(i)):e+=r;break}else r==="\r"&&ee[H]===`
253
- `&&++H;else{if(al(r.charCodeAt(0)))break;e+=r}return t!==""&&ve({},ht,yt),{type:rl,value:e,octal:o,start:n,end:H}}function eB(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";ve({},U0)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{ve({},U0)}try{return new RegExp(e,t)}catch{return null}}function tB(){var e,t,n,r,i;for(e=ee[H],hf(e==="/","Regular expression literal must start with a slash"),t=ee[H++],n=!1,r=!1;H<_t;)if(e=ee[H++],t+=e,e==="\\")e=ee[H++],al(e.charCodeAt(0))&&ve({},G0),t+=e;else if(al(e.charCodeAt(0)))ve({},G0);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||ve({},G0),i=t.substr(1,t.length-2),{value:i,literal:t}}function nB(){var e,t,n;for(t="",n="";H<_t&&(e=ee[H],!!df(e.charCodeAt(0)));)++H,e==="\\"&&H<_t?ve({},ht,yt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&ve({},U0,n),{value:n,literal:t}}function rB(){var e,t,n,r;return De=null,nw(),e=H,t=tB(),n=nB(),r=eB(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:H}}function iB(e){return e.type===Yi||e.type===Kr||e.type===cf||e.type===ff}function ow(){if(nw(),H>=_t)return{type:nl,start:H,end:H};const e=ee.charCodeAt(H);return sl(e)?Q9():e===40||e===41||e===59?j0():e===39||e===34?J9():e===46?dr(ee.charCodeAt(H+1))?iw():j0():dr(e)?iw():j0()}function Ut(){const e=De;return H=e.end,De=ow(),H=e.end,e}function aw(){const e=H;De=ow(),H=e}function oB(e){const t=new Sn(T9);return t.elements=e,t}function sw(e,t,n){const r=new Sn(e==="||"||e==="&&"?F9:I9);return r.operator=e,r.left=t,r.right=n,r}function aB(e,t){const n=new Sn(B9);return n.callee=e,n.arguments=t,n}function sB(e,t,n){const r=new Sn(D9);return r.test=e,r.consequent=t,r.alternate=n,r}function $0(e){const t=new Sn(ew);return t.name=e,t}function ll(e){const t=new Sn(R9);return t.value=e.value,t.raw=ee.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function lw(e,t,n){const r=new Sn(M9);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function lB(e){const t=new Sn(P9);return t.properties=e,t}function uw(e,t,n){const r=new Sn(L9);return r.key=t,r.value=n,r.kind=e,r}function uB(e,t){const n=new Sn(N9);return n.operator=e,n.argument=t,n.prefix=!0,n}function ve(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(o,a)=>(hf(a<r.length,"Message reference must be in range"),r[a]));throw n=new Error(i),n.index=H,n.description=i,n}function pf(e){e.type===nl&&ve(e,H9),e.type===Qi&&ve(e,O9),e.type===rl&&ve(e,z9),e.type===Yi&&ve(e,U9),e.type===Kr&&ve(e,G9),ve(e,ht,e.value)}function St(e){const t=Ut();(t.type!==zt||t.value!==e)&&pf(t)}function je(e){return De.type===zt&&De.value===e}function q0(e){return De.type===Kr&&De.value===e}function cB(){const e=[];for(H=De.start,St("[");!je("]");)je(",")?(Ut(),e.push(null)):(e.push(Xi()),je("]")||St(","));return Ut(),oB(e)}function cw(){H=De.start;const e=Ut();return e.type===rl||e.type===Qi?(e.octal&&ve(e,tw),ll(e)):$0(e.value)}function fB(){var e,t,n,r;if(H=De.start,e=De,e.type===Yi)return n=cw(),St(":"),r=Xi(),uw("init",n,r);if(e.type===nl||e.type===zt)pf(e);else return t=cw(),St(":"),r=Xi(),uw("init",t,r)}function hB(){var e=[],t,n,r,i={},o=String;for(H=De.start,St("{");!je("}");)t=fB(),t.key.type===ew?n=t.key.name:n=o(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?ve({},V9):i[r]=!0,e.push(t),je("}")||St(",");return St("}"),lB(e)}function dB(){St("(");const e=W0();return St(")"),e}const pB={if:1};function gB(){var e,t,n;if(je("("))return dB();if(je("["))return cB();if(je("{"))return hB();if(e=De.type,H=De.start,e===Yi||pB[De.value])n=$0(Ut().value);else if(e===rl||e===Qi)De.octal&&ve(De,tw),n=ll(Ut());else{if(e===Kr)throw new Error(il);e===cf?(t=Ut(),t.value=t.value==="true",n=ll(t)):e===ff?(t=Ut(),t.value=null,n=ll(t)):je("/")||je("/=")?(n=ll(rB()),aw()):pf(Ut())}return n}function mB(){const e=[];if(St("("),!je(")"))for(;H<_t&&(e.push(Xi()),!je(")"));)St(",");return St(")"),e}function bB(){H=De.start;const e=Ut();return iB(e)||pf(e),$0(e.value)}function yB(){return St("."),bB()}function wB(){St("[");const e=W0();return St("]"),e}function vB(){var e,t,n;for(e=gB();;)if(je("."))n=yB(),e=lw(".",e,n);else if(je("("))t=mB(),e=aB(e,t);else if(je("["))n=wB(),e=lw("[",e,n);else break;return e}function fw(){const e=vB();if(De.type===zt&&(je("++")||je("--")))throw new Error(il);return e}function gf(){var e,t;if(De.type!==zt&&De.type!==Kr)t=fw();else{if(je("++")||je("--"))throw new Error(il);if(je("+")||je("-")||je("~")||je("!"))e=Ut(),t=gf(),t=uB(e.value,t);else{if(q0("delete")||q0("void")||q0("typeof"))throw new Error(il);t=fw()}}return t}function hw(e){let t=0;if(e.type!==zt&&e.type!==Kr)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function xB(){var e,t,n,r,i,o,a,s,u,l;if(e=De,u=gf(),r=De,i=hw(r),i===0)return u;for(r.prec=i,Ut(),t=[e,De],a=gf(),o=[u,r,a];(i=hw(De))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,u=o.pop(),t.pop(),n=sw(s,u,a),o.push(n);r=Ut(),r.prec=i,o.push(r),t.push(De),n=gf(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=sw(o[l-1].value,o[l-2],n),l-=2;return n}function Xi(){var e,t,n;return e=xB(),je("?")&&(Ut(),t=Xi(),St(":"),n=Xi(),e=sB(e,t,n)),e}function W0(){const e=Xi();if(je(","))throw new Error(il);return e}function AB(e){ee=e,H=0,_t=ee.length,De=null,aw();const t=W0();if(De.type!==nl)throw new Error("Unexpect token after expression.");return t}var EB={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function dw(e){function t(a,s,u,l){let c=e(s[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+a+(l<0?"":l===0?"()":"("+s.slice(1).map(e).join(",")+")")}function n(a,s,u){return l=>t(a,l,s,u)}const r="new Date",i="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(a){a.length<3&&it("Missing arguments to clamp function."),a.length>3&&it("Too many arguments to clamp function.");const s=a.map(e);return"Math.max("+s[1]+", Math.min("+s[2]+","+s[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",i,0),lower:n("toLowerCase",i,0),substring:n("substring",i),split:n("split",i),trim:n("trim",i,0),regexp:o,test:n("test",o),if:function(a){a.length<3&&it("Missing arguments to if function."),a.length>3&&it("Too many arguments to if function.");const s=a.map(e);return"("+s[0]+"?"+s[1]+":"+s[2]+")"}}}function _B(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function SB(e){e=e||{};const t=e.allowed?oc(e.allowed):{},n=e.forbidden?oc(e.forbidden):{},r=e.constants||EB,i=(e.functions||dw)(f),o=e.globalvar,a=e.fieldvar,s=nn(o)?o:p=>`${o}["${p}"]`;let u={},l={},c=0;function f(p){if(Be(p))return p;const m=h[p.type];return m==null&&it("Unsupported type: "+p.type),m(p)}const h={Literal:p=>p.raw,Identifier:p=>{const m=p.name;return c>0?m:Lo(n,m)?it("Illegal identifier: "+m):Lo(r,m)?r[m]:Lo(t,m)?m:(u[m]=1,s(m))},MemberExpression:p=>{const m=!p.computed,y=f(p.object);m&&(c+=1);const w=f(p.property);return y===a&&(l[_B(w)]=1),m&&(c-=1),y+(m?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&it("Illegal callee type: "+p.callee.type);const m=p.callee.name,y=p.arguments,w=Lo(i,m)&&i[m];return w||it("Unrecognized function: "+m),nn(w)?w(y):w+"("+y.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const m=f(p.key);return c-=1,m+":"+f(p.value)}};function d(p){const m={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},m}return d.functions=i,d.constants=r,d}function pw(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function aa(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function CB(e,t,n){return aa((n-e)/(t-e),0,1)}const jn=1,Jr=2,Z0=4;class et{constructor(t){Z(this,Eo);Pt(this,"paramMediatorProvider",null);this.paramMediatorProvider=t,this.children=[],this.parent=void 0,this.completed=!1}get behavior(){return 0}reset(){this.completed=!1;for(const t of this.children)t.reset()}initialize(){}setParent(t){this.parent=t}addChild(t){if(t.parent)throw new Error("Cannot add the child! It already has a parent.");return this.children.push(t),t.setParent(this),X(this,Eo,Xu).call(this),this}adopt(t){t.parent&&t.parent.removeChild(t),this.addChild(t)}adoptChildrenOf(t){for(const n of t.children)this.adopt(n)}insertAsParent(t){var n;if(this.isRoot())throw new Error("Cannot insert a new parent for a root node!");t.parent=this.parent,this.parent.children[this.parent.children.indexOf(this)]=t,X(n=this.parent,Eo,Xu).call(n),this.parent=void 0,t.addChild(this)}removeChild(t){const n=this.children.indexOf(t);if(n>-1)this.children.splice(n,1),t.parent=void 0,X(this,Eo,Xu).call(this);else throw new Error("Trying to remove an unknown child node!")}excise(){var t;if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const n=this.children[0];n.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=n,X(t=this.parent,Eo,Xu).call(t),this.setParent(void 0),this.children.length=0}else throw new Error("Cannot excise a node that has multiple children!")}isRoot(){return!this.parent}isBranching(){return this.children.length>1}isTerminal(){return this.children.length==0}visit(t){t(this);for(const n of this.children)n.visit(t);t.afterChildren&&t.afterChildren(this)}subtreeToString(t=0){const n=this.children.map(r=>r.subtreeToString(t+1)).join("");return`${" ".repeat(t*2)}* ${this.constructor.name}${("identifier"in this&&this.identifier?": "+this.identifier:"")??""}
254
- ${n}`}handle(t){this._propagate(t)}complete(){this.completed=!0;for(const t of this.children)t.complete()}beginBatch(t){for(const n of this.children)n.beginBatch(t)}get paramMediator(){if(this.paramMediatorProvider)return this.paramMediatorProvider.paramMediator;if(!this.parent)throw new Error("Cannot find paramMediator!");return this.parent.paramMediator}repropagate(){if(this.parent)this.parent.repropagate();else throw new Error("Cannot repropagate data, no FlowNode with stored data found!")}_propagate(t){}}Eo=new WeakSet,Xu=function(){this._propagate=Function("children",xs(this.children.length).map(t=>`const child${t} = children[${t}];`).join(`
255
- `)+`return function propagate(datum) {${xs(this.children.length).map(t=>`child${t}.handle(datum);`).join(`
256
- `)}}`)(this.children)};function gw(e){return e.type=="file"}function kB(e){return e.type=="facet"}const ei="_uniqueId",mw=1e4,bw=[null];class Y0 extends et{get behavior(){return Jr}constructor(t){super(),this.params=t,this.as=t.as??ei,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(t){t[this.as]=this._nextId(),this._propagate(t)}_nextId(){return++this._id%mw==0&&(this._id=this._getBlock()*mw),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=bw.length;return bw[t]=this,this._blocks.push(t),this._usedBlocks++,t}}function yw(e){return{type:"single",datum:e,uniqueId:e==null?void 0:e[ei]}}function TB(e,t,n=!0){if(!e||!t)return!1;if(vw(e))return e.uniqueId==null?n:e.uniqueId===t[ei];if(IB(e))return e.uniqueIds.size==0?n:e.uniqueIds.has(t[ei]);throw new Error("Not a selection: "+JSON.stringify(e))}function ww(e){return`selectionTest(${bf(e.param)}, datum, ${!!(e.empty??!0)})`}function vw(e){return e.type==="single"}function IB(e){return e.type==="multi"}const xw={clamp:aa,isArray:xt,isBoolean:cs,isDefined(e){return e!==void 0},isNumber:Tt,isObject:At,isRegExp:pS,isString:Be,isValid(e){return e!=null&&e===e},lerp:l1,linearstep:CB,smoothstep:pw,selectionTest:TB};function BB(e){const t=dw(e);for(const n in xw)t[n]=`this.${n}`;return t}const DB=SB({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:BB});function RB(e,t={}){try{const n=AB(e),r=DB(n),i=Function("datum","globalObject",`"use strict";
251
+ };`;function zn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function jr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const l0=Symbol("implicit");function u0(){var e=new or,t=[],n=[],r=l0;function i(o){let s=e.get(o);if(s===void 0){if(r!==l0)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new or;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return u0(t,n).unknown(r)},zn.apply(i,arguments),i}function Jo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wa(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $r(){}var Hi=.7,es=1/Hi,ts="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",WT=/^#([0-9a-f]{3,8})$/,ZT=new RegExp(`^rgb\\(${ts},${ts},${ts}\\)$`),YT=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),QT=new RegExp(`^rgba\\(${ts},${ts},${ts},${Za}\\)$`),XT=new RegExp(`^rgba\\(${Un},${Un},${Un},${Za}\\)$`),KT=new RegExp(`^hsl\\(${Za},${Un},${Un}\\)$`),JT=new RegExp(`^hsla\\(${Za},${Un},${Un},${Za}\\)$`),Rb={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Jo($r,qr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Fb,formatHex:Fb,formatHex8:e9,formatHsl:t9,formatRgb:Mb,toString:Mb});function Fb(){return this.rgb().formatHex()}function e9(){return this.rgb().formatHex8()}function t9(){return zb(this).formatHsl()}function Mb(){return this.rgb().formatRgb()}function qr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=WT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Pb(t):n===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ZT.exec(e))?new ct(t[1],t[2],t[3],1):(t=YT.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QT.exec(e))?Zc(t[1],t[2],t[3],t[4]):(t=XT.exec(e))?Zc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=KT.exec(e))?Ob(t[1],t[2]/100,t[3]/100,1):(t=JT.exec(e))?Ob(t[1],t[2]/100,t[3]/100,t[4]):Rb.hasOwnProperty(e)?Pb(Rb[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function Pb(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function Zc(e,t,n,r){return r<=0&&(e=t=n=NaN),new ct(e,t,n,r)}function c0(e){return e instanceof $r||(e=qr(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function Yc(e,t,n,r){return arguments.length===1?c0(e):new ct(e,t,n,r??1)}function ct(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Jo(ct,Yc,Wa($r,{brighter(e){return e=e==null?es:Math.pow(es,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Hi:Math.pow(Hi,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(Vi(this.r),Vi(this.g),Vi(this.b),Qc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Lb,formatHex:Lb,formatHex8:n9,formatRgb:Nb,toString:Nb}));function Lb(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}`}function n9(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}${ji((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nb(){const e=Qc(this.opacity);return`${e===1?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${e===1?")":`, ${e})`}`}function Qc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ji(e){return e=Vi(e),(e<16?"0":"")+e.toString(16)}function Ob(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _n(e,t,n,r)}function zb(e){if(e instanceof _n)return new _n(e.h,e.s,e.l,e.opacity);if(e instanceof $r||(e=qr(e)),!e)return new _n;if(e instanceof _n)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new _n(s,a,u,e.opacity)}function f0(e,t,n,r){return arguments.length===1?zb(e):new _n(e,t,n,r??1)}function _n(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Jo(_n,f0,Wa($r,{brighter(e){return e=e==null?es:Math.pow(es,e),new _n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hi:Math.pow(Hi,e),new _n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ct(h0(e>=240?e-240:e+120,i,r),h0(e,i,r),h0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new _n(Ub(this.h),Xc(this.s),Xc(this.l),Qc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qc(this.opacity);return`${e===1?"hsl(":"hsla("}${Ub(this.h)}, ${Xc(this.s)*100}%, ${Xc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Ub(e){return e=(e||0)%360,e<0?e+360:e}function Xc(e){return Math.max(0,Math.min(1,e||0))}function h0(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Gb=Math.PI/180,Hb=180/Math.PI,Kc=18,Vb=.96422,jb=1,$b=.82521,qb=4/29,ns=6/29,Wb=3*ns*ns,r9=ns*ns*ns;function Zb(e){if(e instanceof Gn)return new Gn(e.l,e.a,e.b,e.opacity);if(e instanceof hr)return Yb(e);e instanceof ct||(e=c0(e));var t=b0(e.r),n=b0(e.g),r=b0(e.b),i=p0((.2225045*t+.7168786*n+.0606169*r)/jb),o,s;return t===n&&n===r?o=s=i:(o=p0((.4360747*t+.3850649*n+.1430804*r)/Vb),s=p0((.0139322*t+.0971045*n+.7141733*r)/$b)),new Gn(116*i-16,500*(o-i),200*(i-s),e.opacity)}function d0(e,t,n,r){return arguments.length===1?Zb(e):new Gn(e,t,n,r??1)}function Gn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Jo(Gn,d0,Wa($r,{brighter(e){return new Gn(this.l+Kc*(e??1),this.a,this.b,this.opacity)},darker(e){return new Gn(this.l-Kc*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Vb*g0(t),e=jb*g0(e),n=$b*g0(n),new ct(m0(3.1338561*t-1.6168667*e-.4906146*n),m0(-.9787684*t+1.9161415*e+.033454*n),m0(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function p0(e){return e>r9?Math.pow(e,1/3):e/Wb+qb}function g0(e){return e>ns?e*e*e:Wb*(e-qb)}function m0(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function b0(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function i9(e){if(e instanceof hr)return new hr(e.h,e.c,e.l,e.opacity);if(e instanceof Gn||(e=Zb(e)),e.a===0&&e.b===0)return new hr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Hb;return new hr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function y0(e,t,n,r){return arguments.length===1?i9(e):new hr(e,t,n,r??1)}function hr(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Yb(e){if(isNaN(e.h))return new Gn(e.l,0,0,e.opacity);var t=e.h*Gb;return new Gn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Jo(hr,y0,Wa($r,{brighter(e){return new hr(this.h,this.c,this.l+Kc*(e??1),this.opacity)},darker(e){return new hr(this.h,this.c,this.l-Kc*(e??1),this.opacity)},rgb(){return Yb(this).rgb()}}));var Qb=-.14861,w0=1.78277,v0=-.29227,Jc=-.90649,Ya=1.97294,Xb=Ya*Jc,Kb=Ya*w0,Jb=w0*v0-Jc*Qb;function o9(e){if(e instanceof $i)return new $i(e.h,e.s,e.l,e.opacity);e instanceof ct||(e=c0(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Jb*r+Xb*t-Kb*n)/(Jb+Xb-Kb),o=r-i,s=(Ya*(n-i)-v0*o)/Jc,a=Math.sqrt(s*s+o*o)/(Ya*i*(1-i)),u=a?Math.atan2(s,o)*Hb-120:NaN;return new $i(u<0?u+360:u,a,i,e.opacity)}function A0(e,t,n,r){return arguments.length===1?o9(e):new $i(e,t,n,r??1)}function $i(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Jo($i,A0,Wa($r,{brighter(e){return e=e==null?es:Math.pow(es,e),new $i(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Hi:Math.pow(Hi,e),new $i(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Gb,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new ct(255*(t+n*(Qb*r+w0*i)),255*(t+n*(v0*r+Jc*i)),255*(t+n*(Ya*r)),this.opacity)}}));function ey(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}function ty(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],s=r>0?e[r-1]:2*i-o,a=r<t-1?e[r+2]:2*o-i;return ey((n-r/t)*t,s,i,o,a)}}function ny(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],s=e[(r+1)%t],a=e[(r+2)%t];return ey((n-r/t)*t,i,o,s,a)}}const ef=e=>()=>e;function ry(e,t){return function(n){return e+n*t}}function s9(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function tf(e,t){var n=t-e;return n?ry(e,n>180||n<-180?n-360*Math.round(n/360):n):ef(isNaN(e)?t:e)}function a9(e){return(e=+e)==1?ft:function(t,n){return n-t?s9(t,n,e):ef(isNaN(t)?n:t)}}function ft(e,t){var n=t-e;return n?ry(e,n):ef(isNaN(e)?t:e)}const x0=function e(t){var n=a9(t);function r(i,o){var s=n((i=Yc(i)).r,(o=Yc(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),l=ft(i.opacity,o.opacity);return function(c){return i.r=s(c),i.g=a(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function iy(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),s,a;for(s=0;s<n;++s)a=Yc(t[s]),r[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return r=e(r),i=e(i),o=e(o),a.opacity=1,function(u){return a.r=r(u),a.g=i(u),a.b=o(u),a+""}}}var l9=iy(ty),u9=iy(ny);function E0(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function oy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function c9(e,t){return(oy(t)?E0:sy)(e,t)}function sy(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Wr(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function ay(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Sn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ly(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Wr(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var _0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S0=new RegExp(_0.source,"g");function f9(e){return function(){return e}}function h9(e){return function(t){return e(t)+""}}function uy(e,t){var n=_0.lastIndex=S0.lastIndex=0,r,i,o,s=-1,a=[],u=[];for(e=e+"",t=t+"";(r=_0.exec(e))&&(i=S0.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:Sn(r,i)})),n=S0.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?u[0]?h9(u[0].x):f9(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)a[(f=u[c]).i]=f.x(l);return a.join("")})}function Wr(e,t){var n=typeof t,r;return t==null||n==="boolean"?ef(t):(n==="number"?Sn:n==="string"?(r=qr(t))?(t=r,x0):uy:t instanceof qr?x0:t instanceof Date?ay:oy(t)?E0:Array.isArray(t)?sy:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ly:Sn)(e,t)}function d9(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function p9(e,t){var n=tf(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Qa(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var cy=180/Math.PI,C0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fy(e,t,n,r,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*cy,skewX:Math.atan(u)*cy,scaleX:s,scaleY:a}}var nf;function g9(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?C0:fy(t.a,t.b,t.c,t.d,t.e,t.f)}function m9(e){return e==null||(nf||(nf=document.createElementNS("http://www.w3.org/2000/svg","g")),nf.setAttribute("transform",e),!(e=nf.transform.baseVal.consolidate()))?C0:(e=e.matrix,fy(e.a,e.b,e.c,e.d,e.e,e.f))}function hy(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push("translate(",null,t,null,n);p.push({i:m-4,x:Sn(l,f)},{i:m-2,x:Sn(c,h)})}else(f||h)&&d.push("translate("+f+t+h+n)}function s(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Sn(l,c)})):c&&f.push(i(f)+"rotate("+c+r)}function a(l,c,f,h){l!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Sn(l,c)}):c&&f.push(i(f)+"skewX("+c+r)}function u(l,c,f,h,d,p){if(l!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");p.push({i:m-4,x:Sn(l,f)},{i:m-2,x:Sn(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=e(l),c=e(c),o(l.translateX,l.translateY,c.translateX,c.translateY,f,h),s(l.rotate,c.rotate,f,h),a(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(d){for(var p=-1,m=h.length,y;++p<m;)f[(y=h[p]).i]=y.x(d);return f.join("")}}}var b9=hy(g9,"px, ","px)","deg)"),y9=hy(m9,", ",")",")"),w9=1e-12;function dy(e){return((e=Math.exp(e))+1/e)/2}function v9(e){return((e=Math.exp(e))-1/e)/2}function A9(e){return((e=Math.exp(2*e))-1)/(e+1)}const x9=function e(t,n,r){function i(o,s){var a=o[0],u=o[1],l=o[2],c=s[0],f=s[1],h=s[2],d=c-a,p=f-u,m=d*d+p*p,y,w;if(m<w9)w=Math.log(h/l)/t,y=function(I){return[a+I*d,u+I*p,l*Math.exp(t*I*w)]};else{var x=Math.sqrt(m),S=(h*h-l*l+r*m)/(2*l*n*x),_=(h*h-l*l-r*m)/(2*h*n*x),k=Math.log(Math.sqrt(S*S+1)-S),B=Math.log(Math.sqrt(_*_+1)-_);w=(B-k)/t,y=function(I){var D=I*w,M=dy(k),G=l/(n*x)*(M*A9(t*D+k)-v9(k));return[a+G*d,u+G*p,l*M/dy(t*D+k)]}}return y.duration=w*1e3*t/Math.SQRT2,y}return i.rho=function(o){var s=Math.max(.001,+o),a=s*s,u=a*a;return e(s,a,u)},i}(Math.SQRT2,2,4);function py(e){return function(t,n){var r=e((t=f0(t)).h,(n=f0(n)).h),i=ft(t.s,n.s),o=ft(t.l,n.l),s=ft(t.opacity,n.opacity);return function(a){return t.h=r(a),t.s=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const E9=py(tf);var _9=py(ft);function S9(e,t){var n=ft((e=d0(e)).l,(t=d0(t)).l),r=ft(e.a,t.a),i=ft(e.b,t.b),o=ft(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=i(s),e.opacity=o(s),e+""}}function gy(e){return function(t,n){var r=e((t=y0(t)).h,(n=y0(n)).h),i=ft(t.c,n.c),o=ft(t.l,n.l),s=ft(t.opacity,n.opacity);return function(a){return t.h=r(a),t.c=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const C9=gy(tf);var k9=gy(ft);function my(e){return function t(n){n=+n;function r(i,o){var s=e((i=A0(i)).h,(o=A0(o)).h),a=ft(i.s,o.s),u=ft(i.l,o.l),l=ft(i.opacity,o.opacity);return function(c){return i.h=s(c),i.s=a(c),i.l=u(Math.pow(c,n)),i.opacity=l(c),i+""}}return r.gamma=t,r}(1)}const T9=my(tf);var I9=my(ft);function k0(e,t){t===void 0&&(t=e,e=Wr);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function B9(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}const D9=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Wr,interpolateArray:c9,interpolateBasis:ty,interpolateBasisClosed:ny,interpolateCubehelix:T9,interpolateCubehelixLong:I9,interpolateDate:ay,interpolateDiscrete:d9,interpolateHcl:C9,interpolateHclLong:k9,interpolateHsl:E9,interpolateHslLong:_9,interpolateHue:p9,interpolateLab:S9,interpolateNumber:Sn,interpolateNumberArray:E0,interpolateObject:ly,interpolateRgb:x0,interpolateRgbBasis:l9,interpolateRgbBasisClosed:u9,interpolateRound:Qa,interpolateString:uy,interpolateTransformCss:b9,interpolateTransformSvg:y9,interpolateZoom:x9,piecewise:k0,quantize:B9},Symbol.toStringTag,{value:"Module"}));function R9(e){return function(){return e}}function T0(e){return+e}var by=[0,1];function Ot(e){return e}function I0(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:R9(isNaN(t)?NaN:.5)}function F9(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function M9(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=I0(i,r),o=n(s,o)):(r=I0(r,i),o=n(o,s)),function(a){return o(r(a))}}function P9(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=I0(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var u=Pr(e,a,1,r)-1;return o[u](i[u](a))}}function Xa(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function rf(){var e=by,t=by,n=Wr,r,i,o,s=Ot,a,u,l;function c(){var h=Math.min(e.length,t.length);return s!==Ot&&(s=F9(e[0],e[h-1])),a=h>2?P9:M9,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=a(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(i((l||(l=a(t,e.map(r),Sn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,T0),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=Qa,c()},f.clamp=function(h){return arguments.length?(s=h?!0:Ot,c()):s!==Ot},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,d){return r=h,i=d,c()}}function yy(){return rf()(Ot,Ot)}function wy(e,t,n,r){var i=Ri(e,t,n),o;switch(r=Go(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=dC(i,s))&&(r.precision=o),W1(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=pC(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=hC(i))&&(r.precision=o-(r.type==="%")*2);break}}return xt(r)}function qi(e){var t=e.domain;return e.ticks=function(n){var r=t();return dc(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return wy(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,s=r[i],a=r[o],u,l,c=10;for(a<s&&(l=s,s=a,a=l,l=i,i=o,o=l);c-- >0;){if(l=hd(s,a,n),l===u)return r[i]=s,r[o]=a,t(r);if(l>0)s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l;else if(l<0)s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l;else break;u=l}return e},e}function vy(){var e=yy();return e.copy=function(){return Xa(e,vy())},zn.apply(e,arguments),qi(e)}function Ay(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,T0),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Ay(e).unknown(t)},e=arguments.length?Array.from(e,T0):[0,1],qi(n)}function xy(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Ey(e){return Math.log(e)}function _y(e){return Math.exp(e)}function L9(e){return-Math.log(-e)}function N9(e){return-Math.exp(-e)}function O9(e){return isFinite(e)?+("1e"+e):e<0?0:e}function z9(e){return e===10?O9:e===Math.E?Math.exp:t=>Math.pow(e,t)}function U9(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Sy(e){return(t,n)=>-e(-t,n)}function B0(e){const t=e(Ey,_y),n=t.domain;let r=10,i,o;function s(){return i=U9(r),o=z9(r),n()[0]<0?(i=Sy(i),o=Sy(o),e(L9,N9)):e(Ey,_y),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=i(l),d=i(c),p,m;const y=a==null?10:+a;let w=[];if(!(r%1)&&d-h<y){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(m=h<0?p/o(-h):p*o(h),!(m<l)){if(m>c)break;w.push(m)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(m=h>0?p/o(-h):p*o(h),!(m<l)){if(m>c)break;w.push(m)}w.length*2<y&&(w=dc(l,c,y))}else w=dc(h,d,Math.min(d-h,y)).map(o);return f?w.reverse():w},t.tickFormat=(a,u)=>{if(a==null&&(a=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Go(u)).precision==null&&(u.trim=!0),u=xt(u)),a===1/0)return u;const l=Math.max(1,r*a/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},t.nice=()=>n(xy(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),t}function D0(){const e=B0(rf()).domain([1,10]);return e.copy=()=>Xa(e,D0()).base(e.base()),zn.apply(e,arguments),e}function Cy(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ky(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function R0(e){var t=1,n=e(Cy(t),ky(t));return n.constant=function(r){return arguments.length?e(Cy(t=+r),ky(t)):t},qi(n)}function Ty(){var e=R0(rf());return e.copy=function(){return Xa(e,Ty()).constant(e.constant())},zn.apply(e,arguments)}function Iy(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function G9(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function H9(e){return e<0?-e*e:e*e}function F0(e){var t=e(Ot,Ot),n=1;function r(){return n===1?e(Ot,Ot):n===.5?e(G9,H9):e(Iy(n),Iy(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},qi(t)}function M0(){var e=F0(rf());return e.copy=function(){return Xa(e,M0()).exponent(e.exponent())},zn.apply(e,arguments),e}function V9(){return M0.apply(null,arguments).exponent(.5)}function By(){var e=[],t=[],n=[],r;function i(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s<a;)n[s-1]=U1(e,s/a);return o}function o(s){return s==null||isNaN(s=+s)?r:t[Pr(n,s)]}return o.invertExtent=function(s){var a=t.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let a of s)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Aa),i()},o.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return By().domain(e).range(t).unknown(r)},zn.apply(o,arguments)}function Dy(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function s(u){return u!=null&&u<=u?i[Pr(r,u,0,n)]:o}function a(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return s}return s.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,a()):[e,t]},s.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,a()):i.slice()},s.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},s.unknown=function(u){return arguments.length&&(o=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return Dy().domain([e,t]).range(i).unknown(o)},zn.apply(qi(s),arguments)}function Ry(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Pr(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Ry().domain(e).range(t).unknown(n)},zn.apply(i,arguments)}function j9(e){return new Date(e)}function $9(e){return e instanceof Date?+e:+new Date(+e)}function P0(e,t,n,r,i,o,s,a,u,l){var c=yy(),f=c.invert,h=c.domain,d=l(".%L"),p=l(":%S"),m=l("%I:%M"),y=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),_=l("%Y");function k(B){return(u(B)<B?d:a(B)<B?p:s(B)<B?m:o(B)<B?y:r(B)<B?i(B)<B?w:x:n(B)<B?S:_)(B)}return c.invert=function(B){return new Date(f(B))},c.domain=function(B){return arguments.length?h(Array.from(B,$9)):h().map(j9)},c.ticks=function(B){var I=h();return e(I[0],I[I.length-1],B??10)},c.tickFormat=function(B,I){return I==null?k:l(I)},c.nice=function(B){var I=h();return(!B||typeof B.range!="function")&&(B=t(I[0],I[I.length-1],B??10)),B?h(xy(I,B)):c},c.copy=function(){return Xa(c,P0(e,t,n,r,i,o,s,a,u,l))},c}function q9(){return zn.apply(P0(SC,CC,Ln,Sa,Ea,Lr,wc,bc,ur,Ad).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function W9(){return zn.apply(P0(EC,_C,Nn,Ca,_a,Fi,vc,yc,ur,xd).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function of(){var e=0,t=1,n,r,i,o,s=Ot,a=!1,u;function l(f){return f==null||isNaN(f=+f)?u:s(i===0?.5:(f=(o(f)-n)*i,a?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(f){return arguments.length?(a=!!f,l):a},l.interpolator=function(f){return arguments.length?(s=f,l):s};function c(f){return function(h){var d,p;return arguments.length?([d,p]=h,s=f(d,p),l):[s(0),s(1)]}}return l.range=c(Wr),l.rangeRound=c(Qa),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return o=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),l}}function Zr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function L0(){var e=qi(of()(Ot));return e.copy=function(){return Zr(e,L0())},jr.apply(e,arguments)}function Fy(){var e=B0(of()).domain([1,10]);return e.copy=function(){return Zr(e,Fy()).base(e.base())},jr.apply(e,arguments)}function My(){var e=R0(of());return e.copy=function(){return Zr(e,My()).constant(e.constant())},jr.apply(e,arguments)}function N0(){var e=F0(of());return e.copy=function(){return Zr(e,N0()).exponent(e.exponent())},jr.apply(e,arguments)}function Z9(){return N0.apply(null,arguments).exponent(.5)}function sf(){var e=0,t=.5,n=1,r=1,i,o,s,a,u,l=Ot,c,f=!1,h;function d(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*m<r*o?a:u),l(f?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),o=c(t=+t),s=c(n=+n),a=i===o?0:.5/(o-i),u=o===s?0:.5/(s-o),r=o<i?-1:1,d):[e,t,n]},d.clamp=function(m){return arguments.length?(f=!!m,d):f},d.interpolator=function(m){return arguments.length?(l=m,d):l};function p(m){return function(y){var w,x,S;return arguments.length?([w,x,S]=y,l=k0(m,[w,x,S]),d):[l(0),l(.5),l(1)]}}return d.range=p(Wr),d.rangeRound=p(Qa),d.unknown=function(m){return arguments.length?(h=m,d):h},function(m){return c=m,i=m(e),o=m(t),s=m(n),a=i===o?0:.5/(o-i),u=o===s?0:.5/(s-o),r=o<i?-1:1,d}}function Py(){var e=qi(sf()(Ot));return e.copy=function(){return Zr(e,Py())},jr.apply(e,arguments)}function Ly(){var e=B0(sf()).domain([.1,1,10]);return e.copy=function(){return Zr(e,Ly()).base(e.base())},jr.apply(e,arguments)}function Ny(){var e=R0(sf());return e.copy=function(){return Zr(e,Ny()).constant(e.constant())},jr.apply(e,arguments)}function O0(){var e=F0(sf());return e.copy=function(){return Zr(e,O0()).exponent(e.exponent())},jr.apply(e,arguments)}function Y9(){return O0.apply(null,arguments).exponent(.5)}function z0(e,t,n){const r=e-t+n*2;return e?r>0?r:1:0}const Q9="identity",rs="linear",Yr="log",Ka="pow",Ja="sqrt",af="symlog",Oy="time",zy="utc",Hn="sequential",is="diverging",U0="quantile",Uy="quantize",Gy="threshold",G0="ordinal",H0="point",Hy="band",V0="bin-ordinal",st="continuous",el="discrete",tl="discretizing",sn="interpolating",Vy="temporal";function X9(e){return function(t){let n=t[0],r=t[1],i;return r<n&&(i=n,n=r,r=i),[e.invert(n),e.invert(r)]}}function K9(e){return function(t){const n=e.range();let r=t[0],i=t[1],o=-1,s,a,u,l;for(i<r&&(a=r,r=i,i=a),u=0,l=n.length;u<l;++u)n[u]>=r&&n[u]<=i&&(o<0&&(o=u),s=u);if(!(o<0))return r=e.invertExtent(n[o]),i=e.invertExtent(n[s]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function j0(){const e=u0().unknown(void 0),t=e.domain,n=e.range;let r=[0,1],i,o,s=!1,a=0,u=0,l=.5;delete e.unknown;function c(){const f=t().length,h=r[1]<r[0],d=r[1-h],p=z0(f,a,u);let m=r[h-0];i=(d-m)/(p||1),s&&(i=Math.floor(i)),m+=(d-m-i*(f-a))*l,o=i*(1-a),s&&(m=Math.round(m),o=Math.round(o));const y=xa(f).map(w=>m+i*w);return n(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?(r=[+f[0],+f[1]],c()):r.slice()},e.rangeRound=function(f){return r=[+f[0],+f[1]],s=!0,c()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(f){return arguments.length?(s=!!f,c()):s},e.padding=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),a=u,c()):a},e.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),c()):a},e.paddingOuter=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),c()):u},e.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),c()):l},e.invertRange=function(f){if(f[0]==null||f[1]==null)return;const h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let m=+f[0],y=+f[1],w,x,S;if(!(m!==m||y!==y)&&(y<m&&(S=m,m=y,y=S),!(y<d[0]||m>r[1-h])))return w=Math.max(0,Pr(d,m)-1),x=m===y?w:Pr(d,y)-1,m-d[w]>o+1e-10&&++w,h&&(S=w,w=p-x,x=p-S),w>x?void 0:t().slice(w,x+1)},e.invert=function(f){const h=e.invertRange([f,f]);return h&&h[0]},e.copy=function(){return j0().domain(t()).range(r).round(s).paddingInner(a).paddingOuter(u).align(l)},c()}function jy(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return jy(t())},e}function J9(){return jy(j0().paddingInner(1))}var eI=Array.prototype.map;function tI(e){return eI.call(e,ca)}const nI=Array.prototype.slice;function $y(){let e=[],t=[];function n(r){return r==null||r!==r?void 0:t[(Pr(e,r)-1)%t.length]}return n.domain=function(r){return arguments.length?(e=tI(r),n):e.slice()},n.range=function(r){return arguments.length?(t=nI.call(r),n):t.slice()},n.tickFormat=function(r,i){return wy(e[0],An(e),r??10,i)},n.copy=function(){return $y().domain(n.domain()).range(n.range())},n}const lf=new Map,rI=Symbol("vega_scale");function iI(e){return e[rI]=!0,e}function oI(e,t,n){const r=function(){const o=t();return o.invertRange||(o.invertRange=o.invert?X9(o):o.invertExtent?K9(o):void 0),o.type=e,iI(o)};return r.metadata=sc(ed(n)),r}function Se(e,t,n){return arguments.length>1?(lf.set(e,oI(e,t,n)),this):sI(e)?lf.get(e):void 0}Se(Q9,Ay),Se(rs,vy,st),Se(Yr,D0,[st,Yr]),Se(Ka,M0,st),Se(Ja,V9,st),Se(af,Ty,st),Se(Oy,q9,[st,Vy]),Se(zy,W9,[st,Vy]),Se(Hn,L0,[st,sn]),Se(`${Hn}-${rs}`,L0,[st,sn]),Se(`${Hn}-${Yr}`,Fy,[st,sn,Yr]),Se(`${Hn}-${Ka}`,N0,[st,sn]),Se(`${Hn}-${Ja}`,Z9,[st,sn]),Se(`${Hn}-${af}`,My,[st,sn]),Se(`${is}-${rs}`,Py,[st,sn]),Se(`${is}-${Yr}`,Ly,[st,sn,Yr]),Se(`${is}-${Ka}`,O0,[st,sn]),Se(`${is}-${Ja}`,Y9,[st,sn]),Se(`${is}-${af}`,Ny,[st,sn]),Se(U0,By,[tl,U0]),Se(Uy,Dy,tl),Se(Gy,Ry,tl),Se(V0,$y,[el,tl]),Se(G0,u0,el),Se(Hy,j0,el),Se(H0,J9,el);function sI(e){return lf.has(e)}function nl(e,t){const n=lf.get(e);return n&&n.metadata[t]}function mt(e){return nl(e,st)}function Qr(e){return nl(e,el)}function Wi(e){return nl(e,tl)}function qy(e){return nl(e,Yr)}function uf(e){return nl(e,sn)}function aI(e,t){const n=t[0],r=An(t)-n;return function(i){return e(n+i*r)}}function cf(e,t,n){return k0(Wy(t||"rgb",n),e)}function lI(e,t){const n=new Array(t),r=t+1;for(let i=0;i<t;)n[i]=e(++i/r);return n}function Wy(e,t){const n=D9[uI(e)];return t!=null&&n&&n.gamma?n.gamma(t):n}function uI(e){return"interpolate"+e.toLowerCase().split("-").map(t=>t[0].toUpperCase()+t.slice(1)).join("")}const cI={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},fI={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function Zy(e){const t=e.length/6|0,n=new Array(t);for(let r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}function Yy(e,t){for(const n in e)$0(n,t(e[n]))}const Qy={};Yy(fI,Zy),Yy(cI,e=>cf(Zy(e)));function $0(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Qy[e]=t,this):Qy[e]}function Me(e,t=e){if(/^[A-Za-z0-9_]+$/.test(e)){const n=new Function("datum",`return datum[${JSON.stringify(e)}]`);return Ie(n,[e],t)}else return tc(e)}const hI="RawCode",dI="Literal",pI="Property",gI="Identifier",mI="ArrayExpression",bI="BinaryExpression",yI="CallExpression",wI="ConditionalExpression",vI="LogicalExpression",AI="MemberExpression",xI="ObjectExpression",EI="UnaryExpression";function Cn(e){this.type=e}Cn.prototype.visit=function(e){let t,n,r;if(e(this))return 1;for(t=_I(this),n=0,r=t.length;n<r;++n)if(t[n].visit(e))return 1};function _I(e){switch(e.type){case mI:return e.elements;case bI:case vI:return[e.left,e.right];case yI:return[e.callee].concat(e.arguments);case wI:return[e.test,e.consequent,e.alternate];case AI:return[e.object,e.property];case xI:return e.properties;case pI:return[e.key,e.value];case EI:return[e.argument];case gI:case dI:case hI:default:return[]}}var Vn,ee,H,_t,De,ff=1,rl=2,Zi=3,Xr=4,hf=5,Yi=6,zt=7,il=8,SI=9;Vn={},Vn[ff]="Boolean",Vn[rl]="<end>",Vn[Zi]="Identifier",Vn[Xr]="Keyword",Vn[hf]="Null",Vn[Yi]="Numeric",Vn[zt]="Punctuator",Vn[il]="String",Vn[SI]="RegularExpression";var CI="ArrayExpression",kI="BinaryExpression",TI="CallExpression",II="ConditionalExpression",Xy="Identifier",BI="Literal",DI="LogicalExpression",RI="MemberExpression",FI="ObjectExpression",MI="Property",PI="UnaryExpression",ht="Unexpected token %0",LI="Unexpected number",NI="Unexpected string",OI="Unexpected identifier",zI="Unexpected reserved word",UI="Unexpected end of input",q0="Invalid regular expression",W0="Invalid regular expression: missing /",Ky="Octal literals are not allowed in strict mode.",GI="Duplicate data property in object literal not allowed in strict mode",bt="ILLEGAL",ol="Disabled.",HI=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\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\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),VI=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B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u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function df(e,t){if(!e)throw new Error("ASSERT: "+t)}function dr(e){return e>=48&&e<=57}function Z0(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function sl(e){return"01234567".indexOf(e)>=0}function jI(e){return e===32||e===9||e===11||e===12||e===160||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function al(e){return e===10||e===13||e===8232||e===8233}function ll(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e===92||e>=128&&HI.test(String.fromCharCode(e))}function pf(e){return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===92||e>=128&&VI.test(String.fromCharCode(e))}const $I={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function Jy(){for(;H<_t;){const e=ee.charCodeAt(H);if(jI(e)||al(e))++H;else break}}function Y0(e){var t,n,r,i=0;for(n=e==="u"?4:2,t=0;t<n;++t)H<_t&&Z0(ee[H])?(r=ee[H++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):we({},ht,bt);return String.fromCharCode(i)}function qI(){var e,t,n,r;for(e=ee[H],t=0,e==="}"&&we({},ht,bt);H<_t&&(e=ee[H++],!!Z0(e));)t=t*16+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||e!=="}")&&we({},ht,bt),t<=65535?String.fromCharCode(t):(n=(t-65536>>10)+55296,r=(t-65536&1023)+56320,String.fromCharCode(n,r))}function ew(){var e,t;for(e=ee.charCodeAt(H++),t=String.fromCharCode(e),e===92&&(ee.charCodeAt(H)!==117&&we({},ht,bt),++H,e=Y0("u"),(!e||e==="\\"||!ll(e.charCodeAt(0)))&&we({},ht,bt),t=e);H<_t&&(e=ee.charCodeAt(H),!!pf(e));)++H,t+=String.fromCharCode(e),e===92&&(t=t.substr(0,t.length-1),ee.charCodeAt(H)!==117&&we({},ht,bt),++H,e=Y0("u"),(!e||e==="\\"||!pf(e.charCodeAt(0)))&&we({},ht,bt),t+=e);return t}function WI(){var e,t;for(e=H++;H<_t;){if(t=ee.charCodeAt(H),t===92)return H=e,ew();if(pf(t))++H;else break}return ee.slice(e,H)}function ZI(){var e,t,n;return e=H,t=ee.charCodeAt(H)===92?ew():WI(),t.length===1?n=Zi:$I.hasOwnProperty(t)?n=Xr:t==="null"?n=hf:t==="true"||t==="false"?n=ff:n=Zi,{type:n,value:t,start:e,end:H}}function Q0(){var e=H,t=ee.charCodeAt(H),n,r=ee[H],i,o,s;switch(t){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++H,{type:zt,value:String.fromCharCode(t),start:e,end:H};default:if(n=ee.charCodeAt(H+1),n===61)switch(t){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return H+=2,{type:zt,value:String.fromCharCode(t)+String.fromCharCode(n),start:e,end:H};case 33:case 61:return H+=2,ee.charCodeAt(H)===61&&++H,{type:zt,value:ee.slice(e,H),start:e,end:H}}}if(s=ee.substr(H,4),s===">>>=")return H+=4,{type:zt,value:s,start:e,end:H};if(o=s.substr(0,3),o===">>>"||o==="<<="||o===">>=")return H+=3,{type:zt,value:o,start:e,end:H};if(i=o.substr(0,2),r===i[1]&&"+-<>&|".indexOf(r)>=0||i==="=>")return H+=2,{type:zt,value:i,start:e,end:H};if(i==="//"&&we({},ht,bt),"<>=!+-*%&|^/".indexOf(r)>=0)return++H,{type:zt,value:r,start:e,end:H};we({},ht,bt)}function YI(e){let t="";for(;H<_t&&Z0(ee[H]);)t+=ee[H++];return t.length===0&&we({},ht,bt),ll(ee.charCodeAt(H))&&we({},ht,bt),{type:Yi,value:parseInt("0x"+t,16),start:e,end:H}}function QI(e){let t="0"+ee[H++];for(;H<_t&&sl(ee[H]);)t+=ee[H++];return(ll(ee.charCodeAt(H))||dr(ee.charCodeAt(H)))&&we({},ht,bt),{type:Yi,value:parseInt(t,8),octal:!0,start:e,end:H}}function tw(){var e,t,n;if(n=ee[H],df(dr(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),t=H,e="",n!=="."){if(e=ee[H++],n=ee[H],e==="0"){if(n==="x"||n==="X")return++H,YI(t);if(sl(n))return QI(t);n&&dr(n.charCodeAt(0))&&we({},ht,bt)}for(;dr(ee.charCodeAt(H));)e+=ee[H++];n=ee[H]}if(n==="."){for(e+=ee[H++];dr(ee.charCodeAt(H));)e+=ee[H++];n=ee[H]}if(n==="e"||n==="E")if(e+=ee[H++],n=ee[H],(n==="+"||n==="-")&&(e+=ee[H++]),dr(ee.charCodeAt(H)))for(;dr(ee.charCodeAt(H));)e+=ee[H++];else we({},ht,bt);return ll(ee.charCodeAt(H))&&we({},ht,bt),{type:Yi,value:parseFloat(e),start:t,end:H}}function XI(){var e="",t,n,r,i,o=!1;for(t=ee[H],df(t==="'"||t==='"',"String literal must starts with a quote"),n=H,++H;H<_t;)if(r=ee[H++],r===t){t="";break}else if(r==="\\")if(r=ee[H++],!r||!al(r.charCodeAt(0)))switch(r){case"u":case"x":ee[H]==="{"?(++H,e+=qI()):e+=Y0(r);break;case"n":e+=`
252
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:sl(r)?(i="01234567".indexOf(r),i!==0&&(o=!0),H<_t&&sl(ee[H])&&(o=!0,i=i*8+"01234567".indexOf(ee[H++]),"0123".indexOf(r)>=0&&H<_t&&sl(ee[H])&&(i=i*8+"01234567".indexOf(ee[H++]))),e+=String.fromCharCode(i)):e+=r;break}else r==="\r"&&ee[H]===`
253
+ `&&++H;else{if(al(r.charCodeAt(0)))break;e+=r}return t!==""&&we({},ht,bt),{type:il,value:e,octal:o,start:n,end:H}}function KI(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";we({},q0)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{we({},q0)}try{return new RegExp(e,t)}catch{return null}}function JI(){var e,t,n,r,i;for(e=ee[H],df(e==="/","Regular expression literal must start with a slash"),t=ee[H++],n=!1,r=!1;H<_t;)if(e=ee[H++],t+=e,e==="\\")e=ee[H++],al(e.charCodeAt(0))&&we({},W0),t+=e;else if(al(e.charCodeAt(0)))we({},W0);else if(n)e==="]"&&(n=!1);else if(e==="/"){r=!0;break}else e==="["&&(n=!0);return r||we({},W0),i=t.substr(1,t.length-2),{value:i,literal:t}}function eB(){var e,t,n;for(t="",n="";H<_t&&(e=ee[H],!!pf(e.charCodeAt(0)));)++H,e==="\\"&&H<_t?we({},ht,bt):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&we({},q0,n),{value:n,literal:t}}function tB(){var e,t,n,r;return De=null,Jy(),e=H,t=JI(),n=eB(),r=KI(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:H}}function nB(e){return e.type===Zi||e.type===Xr||e.type===ff||e.type===hf}function nw(){if(Jy(),H>=_t)return{type:rl,start:H,end:H};const e=ee.charCodeAt(H);return ll(e)?ZI():e===40||e===41||e===59?Q0():e===39||e===34?XI():e===46?dr(ee.charCodeAt(H+1))?tw():Q0():dr(e)?tw():Q0()}function Ut(){const e=De;return H=e.end,De=nw(),H=e.end,e}function rw(){const e=H;De=nw(),H=e}function rB(e){const t=new Cn(CI);return t.elements=e,t}function iw(e,t,n){const r=new Cn(e==="||"||e==="&&"?DI:kI);return r.operator=e,r.left=t,r.right=n,r}function iB(e,t){const n=new Cn(TI);return n.callee=e,n.arguments=t,n}function oB(e,t,n){const r=new Cn(II);return r.test=e,r.consequent=t,r.alternate=n,r}function X0(e){const t=new Cn(Xy);return t.name=e,t}function ul(e){const t=new Cn(BI);return t.value=e.value,t.raw=ee.slice(e.start,e.end),e.regex&&(t.raw==="//"&&(t.raw="/(?:)/"),t.regex=e.regex),t}function ow(e,t,n){const r=new Cn(RI);return r.computed=e==="[",r.object=t,r.property=n,r.computed||(n.member=!0),r}function sB(e){const t=new Cn(FI);return t.properties=e,t}function sw(e,t,n){const r=new Cn(MI);return r.key=t,r.value=n,r.kind=e,r}function aB(e,t){const n=new Cn(PI);return n.operator=e,n.argument=t,n.prefix=!0,n}function we(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(o,s)=>(df(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(i),n.index=H,n.description=i,n}function gf(e){e.type===rl&&we(e,UI),e.type===Yi&&we(e,LI),e.type===il&&we(e,NI),e.type===Zi&&we(e,OI),e.type===Xr&&we(e,zI),we(e,ht,e.value)}function St(e){const t=Ut();(t.type!==zt||t.value!==e)&&gf(t)}function $e(e){return De.type===zt&&De.value===e}function K0(e){return De.type===Xr&&De.value===e}function lB(){const e=[];for(H=De.start,St("[");!$e("]");)$e(",")?(Ut(),e.push(null)):(e.push(Qi()),$e("]")||St(","));return Ut(),rB(e)}function aw(){H=De.start;const e=Ut();return e.type===il||e.type===Yi?(e.octal&&we(e,Ky),ul(e)):X0(e.value)}function uB(){var e,t,n,r;if(H=De.start,e=De,e.type===Zi)return n=aw(),St(":"),r=Qi(),sw("init",n,r);if(e.type===rl||e.type===zt)gf(e);else return t=aw(),St(":"),r=Qi(),sw("init",t,r)}function cB(){var e=[],t,n,r,i={},o=String;for(H=De.start,St("{");!$e("}");)t=uB(),t.key.type===Xy?n=t.key.name:n=o(t.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(i,r)?we({},GI):i[r]=!0,e.push(t),$e("}")||St(",");return St("}"),sB(e)}function fB(){St("(");const e=J0();return St(")"),e}const hB={if:1};function dB(){var e,t,n;if($e("("))return fB();if($e("["))return lB();if($e("{"))return cB();if(e=De.type,H=De.start,e===Zi||hB[De.value])n=X0(Ut().value);else if(e===il||e===Yi)De.octal&&we(De,Ky),n=ul(Ut());else{if(e===Xr)throw new Error(ol);e===ff?(t=Ut(),t.value=t.value==="true",n=ul(t)):e===hf?(t=Ut(),t.value=null,n=ul(t)):$e("/")||$e("/=")?(n=ul(tB()),rw()):gf(Ut())}return n}function pB(){const e=[];if(St("("),!$e(")"))for(;H<_t&&(e.push(Qi()),!$e(")"));)St(",");return St(")"),e}function gB(){H=De.start;const e=Ut();return nB(e)||gf(e),X0(e.value)}function mB(){return St("."),gB()}function bB(){St("[");const e=J0();return St("]"),e}function yB(){var e,t,n;for(e=dB();;)if($e("."))n=mB(),e=ow(".",e,n);else if($e("("))t=pB(),e=iB(e,t);else if($e("["))n=bB(),e=ow("[",e,n);else break;return e}function lw(){const e=yB();if(De.type===zt&&($e("++")||$e("--")))throw new Error(ol);return e}function mf(){var e,t;if(De.type!==zt&&De.type!==Xr)t=lw();else{if($e("++")||$e("--"))throw new Error(ol);if($e("+")||$e("-")||$e("~")||$e("!"))e=Ut(),t=mf(),t=aB(e.value,t);else{if(K0("delete")||K0("void")||K0("typeof"))throw new Error(ol);t=lw()}}return t}function uw(e){let t=0;if(e.type!==zt&&e.type!==Xr)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function wB(){var e,t,n,r,i,o,s,a,u,l;if(e=De,u=mf(),r=De,i=uw(r),i===0)return u;for(r.prec=i,Ut(),t=[e,De],s=mf(),o=[u,r,s];(i=uw(De))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,u=o.pop(),t.pop(),n=iw(a,u,s),o.push(n);r=Ut(),r.prec=i,o.push(r),t.push(De),n=mf(),o.push(n)}for(l=o.length-1,n=o[l],t.pop();l>1;)t.pop(),n=iw(o[l-1].value,o[l-2],n),l-=2;return n}function Qi(){var e,t,n;return e=wB(),$e("?")&&(Ut(),t=Qi(),St(":"),n=Qi(),e=oB(e,t,n)),e}function J0(){const e=Qi();if($e(","))throw new Error(ol);return e}function vB(e){ee=e,H=0,_t=ee.length,De=null,rw();const t=J0();if(De.type!==rl)throw new Error("Unexpect token after expression.");return t}var AB={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function cw(e){function t(s,a,u,l){let c=e(a[0]);return u&&(c=u+"("+c+")",u.lastIndexOf("new ",0)===0&&(c="("+c+")")),c+"."+s+(l<0?"":l===0?"()":"("+a.slice(1).map(e).join(",")+")")}function n(s,a,u){return l=>t(s,l,a,u)}const r="new Date",i="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(s){s.length<3&&it("Missing arguments to clamp function."),s.length>3&&it("Too many arguments to clamp function.");const a=s.map(e);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",i,0),lower:n("toLowerCase",i,0),substring:n("substring",i),split:n("split",i),trim:n("trim",i,0),regexp:o,test:n("test",o),if:function(s){s.length<3&&it("Missing arguments to if function."),s.length>3&&it("Too many arguments to if function.");const a=s.map(e);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function xB(e){const t=e&&e.length-1;return t&&(e[0]==='"'&&e[t]==='"'||e[0]==="'"&&e[t]==="'")?e.slice(1,-1):e}function EB(e){e=e||{};const t=e.allowed?sc(e.allowed):{},n=e.forbidden?sc(e.forbidden):{},r=e.constants||AB,i=(e.functions||cw)(f),o=e.globalvar,s=e.fieldvar,a=nn(o)?o:p=>`${o}["${p}"]`;let u={},l={},c=0;function f(p){if(Be(p))return p;const m=h[p.type];return m==null&&it("Unsupported type: "+p.type),m(p)}const h={Literal:p=>p.raw,Identifier:p=>{const m=p.name;return c>0?m:Lo(n,m)?it("Illegal identifier: "+m):Lo(r,m)?r[m]:Lo(t,m)?m:(u[m]=1,a(m))},MemberExpression:p=>{const m=!p.computed,y=f(p.object);m&&(c+=1);const w=f(p.property);return y===s&&(l[xB(w)]=1),m&&(c-=1),y+(m?"."+w:"["+w+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&it("Illegal callee type: "+p.callee.type);const m=p.callee.name,y=p.arguments,w=Lo(i,m)&&i[m];return w||it("Unrecognized function: "+m),nn(w)?w(y):w+"("+y.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{c+=1;const m=f(p.key);return c-=1,m+":"+f(p.value)}};function d(p){const m={code:f(p),globals:Object.keys(u),fields:Object.keys(l)};return u={},l={},m}return d.functions=i,d.constants=r,d}function fw(e,t,n){return n=(n-e)/(t-e),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function os(e,t=0,n=1){return Math.max(t,Math.min(n,e))}function _B(e,t,n){return os((n-e)/(t-e),0,1)}const jn=1,Kr=2,ep=4;class et{constructor(t){Z(this,Eo);Pt(this,"paramMediatorProvider",null);this.paramMediatorProvider=t,this.children=[],this.parent=void 0,this.completed=!1}get behavior(){return 0}reset(){this.completed=!1;for(const t of this.children)t.reset()}initialize(){}setParent(t){this.parent=t}addChild(t){if(t.parent)throw new Error("Cannot add the child! It already has a parent.");return this.children.push(t),t.setParent(this),X(this,Eo,Ku).call(this),this}adopt(t){t.parent&&t.parent.removeChild(t),this.addChild(t)}adoptChildrenOf(t){for(const n of t.children)this.adopt(n)}insertAsParent(t){var n;if(this.isRoot())throw new Error("Cannot insert a new parent for a root node!");t.parent=this.parent,this.parent.children[this.parent.children.indexOf(this)]=t,X(n=this.parent,Eo,Ku).call(n),this.parent=void 0,t.addChild(this)}removeChild(t){const n=this.children.indexOf(t);if(n>-1)this.children.splice(n,1),t.parent=void 0,X(this,Eo,Ku).call(this);else throw new Error("Trying to remove an unknown child node!")}excise(){var t;if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const n=this.children[0];n.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=n,X(t=this.parent,Eo,Ku).call(t),this.setParent(void 0),this.children.length=0}else throw new Error("Cannot excise a node that has multiple children!")}isRoot(){return!this.parent}isBranching(){return this.children.length>1}isTerminal(){return this.children.length==0}visit(t){t(this);for(const n of this.children)n.visit(t);t.afterChildren&&t.afterChildren(this)}subtreeToString(t=0){const n=this.children.map(r=>r.subtreeToString(t+1)).join("");return`${" ".repeat(t*2)}* ${this.constructor.name}${("identifier"in this&&this.identifier?": "+this.identifier:"")??""}
254
+ ${n}`}handle(t){this._propagate(t)}complete(){this.completed=!0;for(const t of this.children)t.complete()}beginBatch(t){for(const n of this.children)n.beginBatch(t)}get paramMediator(){if(this.paramMediatorProvider)return this.paramMediatorProvider.paramMediator;if(!this.parent)throw new Error("Cannot find paramMediator!");return this.parent.paramMediator}repropagate(){if(this.parent)this.parent.repropagate();else throw new Error("Cannot repropagate data, no FlowNode with stored data found!")}_propagate(t){}}Eo=new WeakSet,Ku=function(){this._propagate=Function("children",xa(this.children.length).map(t=>`const child${t} = children[${t}];`).join(`
255
+ `)+`return function propagate(datum) {${xa(this.children.length).map(t=>`child${t}.handle(datum);`).join(`
256
+ `)}}`)(this.children)};function hw(e){return e.type=="file"}function SB(e){return e.type=="facet"}const Jr="_uniqueId",dw=1e4,pw=[null];class tp extends et{get behavior(){return Kr}constructor(t){super(),this.params=t,this.as=t.as??Jr,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(t){t[this.as]=this._nextId(),this._propagate(t)}_nextId(){return++this._id%dw==0&&(this._id=this._getBlock()*dw),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const t=pw.length;return pw[t]=this,this._blocks.push(t),this._usedBlocks++,t}}function gw(e){return{type:"single",datum:e,uniqueId:e==null?void 0:e[Jr]}}function CB(e,t,n=!0){if(!e||!t)return!1;if(bw(e))return e.uniqueId==null?n:e.uniqueId===t[Jr];if(kB(e))return e.uniqueIds.size==0?n:e.uniqueIds.has(t[Jr]);throw new Error("Not a selection: "+JSON.stringify(e))}function mw(e){return`selectionTest(${yf(e.param)}, datum, ${!!(e.empty??!0)})`}function bw(e){return e.type==="single"}function kB(e){return e.type==="multi"}const yw={clamp:os,isArray:vt,isBoolean:fa,isDefined(e){return e!==void 0},isNumber:Tt,isObject:At,isRegExp:fS,isString:Be,isValid(e){return e!=null&&e===e},lerp:h1,linearstep:_B,smoothstep:fw,selectionTest:CB};function TB(e){const t=cw(e);for(const n in yw)t[n]=`this.${n}`;return t}const IB=EB({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:TB});function BB(e,t={}){try{const n=vB(e),r=IB(n),i=Function("datum","globalObject",`"use strict";
257
257
  try {
258
258
  return (${r.code});
259
259
  } catch (e) {
260
260
  throw new Error("Error evaluating expression: " + ${JSON.stringify(e)} + ", " + e.message, e);
261
- }`).bind(xw),o=a=>i(a,t);return o.fields=r.fields,o.globals=r.globals,o.code=r.code,o}catch(n){throw new Error(`Invalid expression: ${e}, ${n.message}`)}}class FB{constructor(t){Z(this,xi,void 0);Pt(this,"paramListeners");Z(this,_o,new Map);Z(this,$a,new Map);Z(this,qa,new Map);Z(this,bu,void 0);le(this,bu,t??(()=>{})),le(this,xi,new Map),this.paramListeners=new Map}registerParam(t){const n=t.name;if("value"in t&&"expr"in t)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let r;if(t.push=="outer"){const i=this.findMediatorForParam(n);if(!i)throw new Error(`Parameter "${n}" not found in outer scope!`);const o=i.paramConfigs.get(n);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);r=i.getSetter(n),z(this,_o).set(n,r)}else if("value"in t)r=this.allocateSetter(n,t.value);else if("expr"in t){const i=this.createExpression(t.expr),o=this.allocateSetter(n,i(null));i.addListener(()=>o(i(null))),r=a=>{}}else r=this.allocateSetter(n,null);return"select"in t&&(Be(t.select)?t.select:t.select.type)=="point"&&r(yw(null)),z(this,qa).set(n,t),r}allocateSetter(t,n,r=!1){if(bf(t),z(this,_o).has(t))throw new Error("Setter already allocated for parameter: "+t);const i=o=>{const a=z(this,xi).get(t);if(o!==a){z(this,xi).set(t,o);const s=this.paramListeners.get(t);if(s&&!r)for(const u of s)u()}};return i(n),z(this,_o).set(t,i),i}getSetter(t){const n=z(this,_o).get(t);if(!n)throw new Error("Setter not found for parameter: "+t);return n}getValue(t){return z(this,xi).get(t)}findValue(t){const n=this.findMediatorForParam(t);return n==null?void 0:n.getValue(t)}get paramConfigs(){return z(this,qa)}findMediatorForParam(t){var n;return z(this,xi).has(t)?this:(n=z(this,bu).call(this))==null?void 0:n.findMediatorForParam(t)}createExpression(t){if(z(this,$a).has(t))return z(this,$a).get(t);const n={},r=RB(t,n),i=new Map;for(const a of r.globals){const s=this.findMediatorForParam(a);if(!s)throw new Error(`Unknown variable "${a}" in expression: ${t}`);i.set(a,s),Object.defineProperty(n,a,{enumerable:!0,get(){return s.getValue(a)}})}const o=new Set;return r.addListener=a=>{for(const[s,u]of i){const l=u.paramListeners.get(s)??new Set;u.paramListeners.set(s,l),l.add(a),o.add(a)}},r.invalidate=()=>{var a;for(const[s,u]of i)for(const l of o)(a=u.paramListeners.get(s))==null||a.delete(l)},r.identifier=()=>r.code,z(this,$a).set(t,r),r}evaluateAndGet(t){return this.createExpression(t)()}hasPointSelections(){for(const t of z(this,qa).values())if(PB(t)){const n=t.select;if(Be(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}xi=new WeakMap,_o=new WeakMap,$a=new WeakMap,qa=new WeakMap,bu=new WeakMap;function Dt(e){return typeof e=="object"&&e!=null&&"expr"in e&&Be(e.expr)}function Zt(e){if(Dt(e))throw new Error(`ExprRef ${JSON.stringify(e)} not allowed here. Expected a scalar value.`);return e}function MB(e){return("expr"in e||"bind"in e)&&!("select"in e)}function PB(e){return!("expr"in e||"bind"in e)&&"select"in e}function mf(e,t,n){const r={...t},i=[],o=a=>{i.push(a),i.length===1&&queueMicrotask(()=>{n(i.slice()),i.length=0})};for(const[a,s]of Object.entries(t))if(Dt(s)){const u=e.createExpression(s.expr);n&&u.addListener(()=>o(a)),Object.defineProperty(r,a,{enumerable:!0,get(){return u()}})}else r[a]=s;return r}function bf(e){if(!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e))throw new Error(`Invalid parameter name: ${e}. Must be a valid JavaScript identifier.`);return e}function LB(e){return Object.assign(()=>e,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(e)})}function Aw(e,t,n){if(!e)return;function r(o){const a=o;return a.fields??(a.fields=[]),a.constant=a.fields.length===0,a.channelDef=t,a.channel=e,a.scaleChannel=((Yt(t)&&t.resolutionChannel)??(hl(e)&&e))||void 0,"param"in t?(a.predicate=n.createExpression(ww(t)),a.predicate.param=t.param,a.predicate.empty=t.empty??!0):(a.predicate=LB(!0),a.predicate.empty=!1),a.asNumberAccessor=()=>a,a}function i(o){if(Dt(o)){const a=r(n.createExpression(o.expr));if(a.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+o.expr);return a}else{const a=o;return r(()=>a)}}if(ti(t))try{return r(Me(t.field))}catch(o){throw new Error(`Invalid field definition: ${o.message}`)}else{if(cl(t))return r(n.createExpression(t.expr));if(ul(t))return i(t.datum);if(an(t))return i(t.value);throw new Error(`Invalid channel definition: ${JSON.stringify(t)}. Cannot create an accessor for channel ${e}!`)}}function NB(e,t,n){const r=[];if(GB(t)||HB(t)){const i=Array.isArray(t.condition)?t.condition:[t.condition];for(const o of i)r.push(Aw(e,o,n))}if(r.push(Aw(e,t,n)),r.filter(i=>!i.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+e);return r}function OB(e,t){const n={},r=i=>{var o;return(o=e.getScaleResolution(i))==null?void 0:o.scale};for(const[i,o]of Object.entries(t))o&&(n[i]=zB(NB(i,o,e.paramMediator),r));return n}function zB(e,t){if(e.length===1)return Ew(e[0],t);const n=e.map(o=>o.predicate),r=e.map(o=>Ew(o,t));return Object.assign(o=>{for(let a=0;a<r.length;a++)if(n[a](o))return r[a](o)},{constant:!1,accessors:r.map(o=>o.accessors[0]),dataAccessor:r.map(o=>o.dataAccessor).find(o=>o),scale:r.map(o=>o.scale).find(o=>o),channelDef:e.at(-1).channelDef})}function Ew(e,t){const{channel:n,scaleChannel:r,channelDef:i}=e,o=e.scaleChannel?t(r):void 0;if(r&&!o)throw new Error(`Missing scale! "${n}": ${JSON.stringify(i)}`);return Object.assign(o?a=>o(e(a)):a=>e(a),{scale:o,constant:e.constant,accessors:[e],dataAccessor:e.constant?void 0:e,channelDef:i})}function an(e){return e&&"value"in e}function ti(e){return e&&"field"in e}function ul(e){return e&&"datum"in e}function Yt(e){return ti(e)||ul(e)||cl(e)||_w(e)}function UB(e,t){const n=e.mark.encoding[t];if(Yt(n))return n;throw new Error("Not a channel def with scale!")}function _w(e){return e&&"chrom"in e}function cl(e){return e&&"expr"in e}function GB(e){return(ti(e)||ul(e))&&"condition"in e}function HB(e){return an(e)&&"condition"in e}const sa=["x","y"],VB=["x2","y2"],jB=[...sa,...VB];function Sw(e){return sa.includes(e)}function fl(e){return jB.includes(e)}const Cw={x:"x2",y:"y2"},kw=Object.fromEntries(Object.entries(Cw).map(e=>[e[1],e[0]]));function Tw(e){return e in kw}function $B(e){const t=Cw[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Ki(e){return kw[e]??e}function ni(e){return["color","fill","stroke"].includes(Ki(e))}function yf(e){return["shape"].includes(e)}function hl(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy"].includes(e)}function qB(e){switch(e){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function Iw(e){if(!yf(e))throw new Error("Not a discrete channel: "+e);const t=new Map(qB(e).map((n,r)=>[n,r]));return n=>{const r=t.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${e}" channel: ${n}`)}}function Q0(){const e=t=>t;return e.invert=t=>t,e.copy=Q0,e.invertRange=()=>{},e.type="null",e}const dl="attr_",WB="uDomain_",ZB="range_",YB="accessor_",Bw="scale_",QB="getScaled_",X0="uRangeTexture_",K0="uParam_",Dw=3402823466e29;function XB(e){const t=e.match(/^(?:(\w+)-)?(\w+)$/);if(!t)throw new Error("Not a scale type: "+e);return{family:t[1]||"continuous",transform:t[2]}}function pl(e,t){return`${YB}${e}_${t}`}function KB(e,t,n){let r;if(yf(e))r=Ji(Iw(e)(n));else if(Be(n))if(ni(e))r=rD(n);else throw new Error(`String values are not supported on the "${e}" channel: ${n}`);else if(cs(n))r=Ji(n?1:0);else if(n===null)if(ni(e))r=Ji([0,0,0]);else throw new Error(`null value is not supported on the "${e}" chanel.`);else r=Ji(n);const i=pl(e,t),o=`
261
+ }`).bind(yw),o=s=>i(s,t);return o.fields=r.fields,o.globals=r.globals,o.code=r.code,o}catch(n){throw new Error(`Invalid expression: ${e}, ${n.message}`)}}class DB{constructor(t){Z(this,bi,void 0);Pt(this,"paramListeners");Z(this,_o,new Map);Z(this,$s,new Map);Z(this,qs,new Map);Z(this,bu,void 0);ae(this,bu,t??(()=>{})),ae(this,bi,new Map),this.paramListeners=new Map}registerParam(t){const n=t.name;if("value"in t&&"expr"in t)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let r;if(t.push=="outer"){const i=this.findMediatorForParam(n);if(!i)throw new Error(`Parameter "${n}" not found in outer scope!`);const o=i.paramConfigs.get(n);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);r=i.getSetter(n),z(this,_o).set(n,r)}else if("value"in t)r=this.allocateSetter(n,t.value);else if("expr"in t){const i=this.createExpression(t.expr),o=this.allocateSetter(n,i(null));i.addListener(()=>o(i(null))),r=s=>{}}else r=this.allocateSetter(n,null);return"select"in t&&(Be(t.select)?t.select:t.select.type)=="point"&&r(gw(null)),z(this,qs).set(n,t),r}allocateSetter(t,n,r=!1){if(yf(t),z(this,_o).has(t))throw new Error("Setter already allocated for parameter: "+t);const i=o=>{const s=z(this,bi).get(t);if(o!==s){z(this,bi).set(t,o);const a=this.paramListeners.get(t);if(a&&!r)for(const u of a)u()}};return i(n),z(this,_o).set(t,i),i}getSetter(t){const n=z(this,_o).get(t);if(!n)throw new Error("Setter not found for parameter: "+t);return n}getValue(t){return z(this,bi).get(t)}findValue(t){const n=this.findMediatorForParam(t);return n==null?void 0:n.getValue(t)}get paramConfigs(){return z(this,qs)}findMediatorForParam(t){var n;return z(this,bi).has(t)?this:(n=z(this,bu).call(this))==null?void 0:n.findMediatorForParam(t)}createExpression(t){if(z(this,$s).has(t))return z(this,$s).get(t);const n={},r=BB(t,n),i=new Map;for(const s of r.globals){const a=this.findMediatorForParam(s);if(!a)throw new Error(`Unknown variable "${s}" in expression: ${t}`);i.set(s,a),Object.defineProperty(n,s,{enumerable:!0,get(){return a.getValue(s)}})}const o=new Set;return r.addListener=s=>{for(const[a,u]of i){const l=u.paramListeners.get(a)??new Set;u.paramListeners.set(a,l),l.add(s),o.add(s)}},r.invalidate=()=>{var s;for(const[a,u]of i)for(const l of o)(s=u.paramListeners.get(a))==null||s.delete(l)},r.identifier=()=>r.code,z(this,$s).set(t,r),r}evaluateAndGet(t){return this.createExpression(t)()}hasPointSelections(){for(const t of z(this,qs).values())if(FB(t)){const n=t.select;if(Be(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}bi=new WeakMap,_o=new WeakMap,$s=new WeakMap,qs=new WeakMap,bu=new WeakMap;function Dt(e){return typeof e=="object"&&e!=null&&"expr"in e&&Be(e.expr)}function Zt(e){if(Dt(e))throw new Error(`ExprRef ${JSON.stringify(e)} not allowed here. Expected a scalar value.`);return e}function RB(e){return("expr"in e||"bind"in e)&&!("select"in e)}function FB(e){return!("expr"in e||"bind"in e)&&"select"in e}function bf(e,t,n){const r={...t},i=[],o=s=>{i.push(s),i.length===1&&queueMicrotask(()=>{n(i.slice()),i.length=0})};for(const[s,a]of Object.entries(t))if(Dt(a)){const u=e.createExpression(a.expr);n&&u.addListener(()=>o(s)),Object.defineProperty(r,s,{enumerable:!0,get(){return u()}})}else r[s]=a;return r}function yf(e){if(!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e))throw new Error(`Invalid parameter name: ${e}. Must be a valid JavaScript identifier.`);return e}function MB(e){return Object.assign(()=>e,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(e)})}function ww(e,t,n){if(!e)return;function r(o){const s=o;return s.fields??(s.fields=[]),s.constant=s.fields.length===0,s.channelDef=t,s.channel=e,s.scaleChannel=((Yt(t)&&t.resolutionChannel)??(dl(e)&&e))||void 0,"param"in t?(s.predicate=n.createExpression(mw(t)),s.predicate.param=t.param,s.predicate.empty=t.empty??!0):(s.predicate=MB(!0),s.predicate.empty=!1),s.asNumberAccessor=()=>s,s}function i(o){if(Dt(o)){const s=r(n.createExpression(o.expr));if(s.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+o.expr);return s}else{const s=o;return r(()=>s)}}if(ei(t))try{return r(Me(t.field))}catch(o){throw new Error(`Invalid field definition: ${o.message}`)}else{if(fl(t))return r(n.createExpression(t.expr));if(cl(t))return i(t.datum);if(an(t))return i(t.value);throw new Error(`Invalid channel definition: ${JSON.stringify(t)}. Cannot create an accessor for channel ${e}!`)}}function PB(e,t,n){const r=[];if(zB(t)||UB(t)){const i=Array.isArray(t.condition)?t.condition:[t.condition];for(const o of i)r.push(ww(e,o,n))}if(r.push(ww(e,t,n)),r.filter(i=>!i.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+e);return r}function LB(e,t){const n={},r=i=>{var o;return(o=e.getScaleResolution(i))==null?void 0:o.scale};for(const[i,o]of Object.entries(t))o&&(n[i]=NB(PB(i,o,e.paramMediator),r));return n}function NB(e,t){if(e.length===1)return vw(e[0],t);const n=e.map(o=>o.predicate),r=e.map(o=>vw(o,t));return Object.assign(o=>{for(let s=0;s<r.length;s++)if(n[s](o))return r[s](o)},{constant:!1,accessors:r.map(o=>o.accessors[0]),dataAccessor:r.map(o=>o.dataAccessor).find(o=>o),scale:r.map(o=>o.scale).find(o=>o),channelDef:e.at(-1).channelDef})}function vw(e,t){const{channel:n,scaleChannel:r,channelDef:i}=e,o=e.scaleChannel?t(r):void 0;if(r&&!o)throw new Error(`Missing scale! "${n}": ${JSON.stringify(i)}`);return Object.assign(o?s=>o(e(s)):s=>e(s),{scale:o,constant:e.constant,accessors:[e],dataAccessor:e.constant?void 0:e,channelDef:i})}function an(e){return e&&"value"in e}function ei(e){return e&&"field"in e}function cl(e){return e&&"datum"in e}function Yt(e){return ei(e)||cl(e)||fl(e)||Aw(e)}function OB(e,t){const n=e.mark.encoding[t];if(Yt(n))return n;throw new Error("Not a channel def with scale!")}function Aw(e){return e&&"chrom"in e}function fl(e){return e&&"expr"in e}function zB(e){return(ei(e)||cl(e))&&"condition"in e}function UB(e){return an(e)&&"condition"in e}const ss=["x","y"],GB=["x2","y2"],HB=[...ss,...GB];function xw(e){return ss.includes(e)}function hl(e){return HB.includes(e)}const Ew={x:"x2",y:"y2"},_w=Object.fromEntries(Object.entries(Ew).map(e=>[e[1],e[0]]));function Sw(e){return e in _w}function VB(e){const t=Ew[e];if(t)return t;throw new Error(`${e} has no secondary channel!`)}function Xi(e){return _w[e]??e}function ti(e){return["color","fill","stroke"].includes(Xi(e))}function wf(e){return["shape"].includes(e)}function dl(e){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy"].includes(e)}function jB(e){switch(e){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function Cw(e){if(!wf(e))throw new Error("Not a discrete channel: "+e);const t=new Map(jB(e).map((n,r)=>[n,r]));return n=>{const r=t.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${e}" channel: ${n}`)}}function np(){const e=t=>t;return e.invert=t=>t,e.copy=np,e.invertRange=()=>{},e.type="null",e}const pl="attr_",$B="uDomain_",qB="range_",WB="accessor_",kw="scale_",ZB="getScaled_",rp="uRangeTexture_",ip="uParam_",Tw=3402823466e29;function YB(e){const t=e.match(/^(?:(\w+)-)?(\w+)$/);if(!t)throw new Error("Not a scale type: "+e);return{family:t[1]||"continuous",transform:t[2]}}function gl(e,t){return`${WB}${e}_${t}`}function QB(e,t,n){let r;if(wf(e))r=Ki(Cw(e)(n));else if(Be(n))if(ti(e))r=t7(n);else throw new Error(`String values are not supported on the "${e}" channel: ${n}`);else if(fa(n))r=Ki(n?1:0);else if(n===null)if(ti(e))r=Ki([0,0,0]);else throw new Error(`null value is not supported on the "${e}" chanel.`);else r=Ki(n);const i=gl(e,t),o=`
262
262
  ${r.type} ${i}() {
263
263
  // Constant value
264
264
  return ${r};
265
- }`;return{channel:e,accessorGlsl:o,accessorFunctionName:i}}function JB(e,t){let n="float",r=u=>u;ni(e)&&(n="vec3",r=u=>Lw(u));const i=`u${lD(e)}_${t}`,o=` // Dynamic value
266
- uniform ${n} ${i};`,a=pl(e,t);let s=`
267
- ${n} ${a}() {
265
+ }`;return{channel:e,accessorGlsl:o,accessorFunctionName:i}}function XB(e,t){let n="float",r=u=>u;ti(e)&&(n="vec3",r=u=>Fw(u));const i=`u${s7(e)}_${t}`,o=` // Dynamic value
266
+ uniform ${n} ${i};`,s=gl(e,t);let a=`
267
+ ${n} ${s}() {
268
268
  // Dynamic value
269
269
  return ${i};
270
- }`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:s,accessorFunctionName:a,adjuster:r}}function Rw(e,t,n,r=[e]){const{attributeType:i}=gl(t,e),o=dl+ep(r),a=`in highp ${i} ${o};`,s=pl(e,n),u=`
271
- ${i} ${s}() {
270
+ }`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function Iw(e,t,n,r=[e]){const{attributeType:i}=ml(t,e),o=pl+sp(r),s=`in highp ${i} ${o};`,a=gl(e,n),u=`
271
+ ${i} ${a}() {
272
272
  return ${o};
273
- }`;return{channel:e,attributeName:o,attributeGlsl:a,accessorGlsl:u,accessorFunctionName:s}}function eD(e,t,n){const{attributeType:r}=gl(t,e),i=dl+ep(e),o=` uniform highp ${r} ${i};`,a=pl(e,n),s=`
274
- ${r} ${a}() {
273
+ }`;return{channel:e,attributeName:o,attributeGlsl:s,accessorGlsl:u,accessorFunctionName:a}}function KB(e,t,n){const{attributeType:r}=ml(t,e),i=pl+sp(e),o=` uniform highp ${r} ${i};`,s=gl(e,n),a=`
274
+ ${r} ${s}() {
275
275
  return ${i};
276
- }`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:s,accessorFunctionName:a}}function tD(e,t,n){t??(t=Q0());const r=Ki(e),i=WB+r,o=ZB+r,{hp:a,attributeType:s}=gl(t,e),u=t.domain?t.domain().length:void 0;let l;const c=[];c.push(""),c.push("/".repeat(70)),c.push(`// Channel: ${e}`),c.push("");const{transform:f}=XB(t.type),h=(I,...D)=>iD.apply(null,[I,"value",...D]);let d;switch(f){case"linear":d=h("scaleLinear","domain",o);break;case"log":d=h("scaleLog","domain",o,t.base());break;case"symlog":d=h("scaleSymlog","domain",o,t.constant());break;case"pow":case"sqrt":d=h("scalePow","domain",o,t.exponent());break;case"index":case"locus":d=h("scaleBandHp","domain",o,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"point":case"band":d=h("scaleBand","domain",o,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"ordinal":case"null":case"identity":d=h("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${t.type}! ${e}: ${JSON.stringify(n)}`)}const p=Gw(t,e);let m;if(p&&e==r){const I=t.props.range??[];if(Dt(I)||I.some(Dt)){if(p.length<1||p.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${p.length}! Range: ${JSON.stringify(p)}`);m=` uniform ${Mw(p.length)} ${o};`}else if(p.length&&p.every(Tt)){const D=Nw(p);c.push(`const ${D.type} ${o} = ${D};`)}}const y=Pw(e);let w;if(ni(e)){const I=X0+r;if(e==r&&c.push(`uniform sampler2D ${I};`),bt(t.type))w=`getInterpolatedColor(${I}, transformed)`;else if(Xr(t.type)||Zi(t.type))w=`getDiscreteColor(${I}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(t.type==="ordinal"||Zi(t.type)){const I=X0+r;e==r&&c.push(`uniform sampler2D ${I};`),w=`getDiscreteColor(${I}, int(transformed)).r`}const A=[],S=bt(t.type)&&u>2,_=Zi(t.type)||S;if(A.push("int slot = 0;"),_){const I=i;A.push(S?`while (slot < ${I}.length() - 2 && value >= ${I}[slot + 1]) { slot++; }`:`while (slot < ${I}.length() && value >= ${I}[slot]) { slot++; }`)}const k=bt(t.type)||Zi(t.type)||["band","point"].includes(t.type);if(d){const I=i;k&&(a?A.push(`vec3 domain = ${I};`):A.push(`vec2 domain = vec2(${I}[slot], ${I}[slot + 1]);`)),A.push(`float transformed = ${d};`),S&&A.push(`transformed = (float(slot) + transformed) / (float(${I}.length() - 1));`)}else A.push("float transformed = float(slot);");"clamp"in t&&t.clamp()&&A.push(`transformed = clampToRange(transformed, ${Nw(p)});`),A.push(`return ${w??"transformed"};`),c.push(`
277
- ${y} ${Bw}${e}(${s} value) {
278
- ${A.map(I=>` ${I}
276
+ }`;return{channel:e,uniformName:i,uniformGlsl:o,accessorGlsl:a,accessorFunctionName:s}}function JB(e,t,n){t??(t=np());const r=Xi(e),i=$B+r,o=qB+r,{hp:s,attributeType:a}=ml(t,e),u=t.domain?t.domain().length:void 0;let l;const c=[];c.push(""),c.push("/".repeat(70)),c.push(`// Channel: ${e}`),c.push("");const{transform:f}=YB(t.type),h=(I,...D)=>n7.apply(null,[I,"value",...D]);let d;switch(f){case"linear":d=h("scaleLinear","domain",o);break;case"log":d=h("scaleLog","domain",o,t.base());break;case"symlog":d=h("scaleSymlog","domain",o,t.constant());break;case"pow":case"sqrt":d=h("scalePow","domain",o,t.exponent());break;case"index":case"locus":d=h("scaleBandHp","domain",o,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"point":case"band":d=h("scaleBand","domain",o,t.paddingInner(),t.paddingOuter(),t.align(),n.band??.5);break;case"ordinal":case"null":case"identity":d=h("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${t.type}! ${e}: ${JSON.stringify(n)}`)}const p=Ow(t,e);let m;if(p&&e==r){const I=t.props.range??[];if(Dt(I)||I.some(Dt)){if(p.length<1||p.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${p.length}! Range: ${JSON.stringify(p)}`);m=` uniform ${Dw(p.length)} ${o};`}else if(p.length&&p.every(Tt)){const D=Mw(p);c.push(`const ${D.type} ${o} = ${D};`)}}const y=Rw(e);let w;if(ti(e)){const I=rp+r;if(e==r&&c.push(`uniform sampler2D ${I};`),mt(t.type))w=`getInterpolatedColor(${I}, transformed)`;else if(Qr(t.type)||Wi(t.type))w=`getDiscreteColor(${I}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(t.type==="ordinal"||Wi(t.type)){const I=rp+r;e==r&&c.push(`uniform sampler2D ${I};`),w=`getDiscreteColor(${I}, int(transformed)).r`}const x=[],S=mt(t.type)&&u>2,_=Wi(t.type)||S;if(x.push("int slot = 0;"),_){const I=i;x.push(S?`while (slot < ${I}.length() - 2 && value >= ${I}[slot + 1]) { slot++; }`:`while (slot < ${I}.length() && value >= ${I}[slot]) { slot++; }`)}const k=mt(t.type)||Wi(t.type)||["band","point"].includes(t.type);if(d){const I=i;k&&(s?x.push(`vec3 domain = ${I};`):x.push(`vec2 domain = vec2(${I}[slot], ${I}[slot + 1]);`)),x.push(`float transformed = ${d};`),S&&x.push(`transformed = (float(slot) + transformed) / (float(${I}.length() - 1));`)}else x.push("float transformed = float(slot);");"clamp"in t&&t.clamp()&&x.push(`transformed = clampToRange(transformed, ${Mw(p)});`),x.push(`return ${w??"transformed"};`),c.push(`
277
+ ${y} ${kw}${e}(${a} value) {
278
+ ${x.map(I=>` ${I}
279
279
  `).join("")}
280
280
  }`);const B=c.join(`
281
- `);if(k&&e==r){const I=bt(t.type)||Zi(t.type)?u:2;l=a?` highp vec3 ${i};`:` mediump float ${i}[${I}];`}return{glsl:B,domainUniformName:i,domainUniform:l,rangeUniformName:o,rangeUniform:m}}function nD(e,t){const n=Pw(e),r=[],i=[];for(let o=0;o<t.length;o++){const a=t[o],s=pl(e,o),{param:u,empty:l}=a.predicate,c=K0+bf(u),f=dl+"uniqueId";r.push(u?`${f} == ${c}${l?` || ${c} == uint(0)`:""}`:null),i.push(a.scaleChannel?`return ${Bw}${e}(${s}());`:`return ${s}();`)}return`${n} ${QB}${e}() {
282
- ${uD(r,i)}
281
+ `);if(k&&e==r){const I=mt(t.type)||Wi(t.type)?u:2;l=s?` highp vec3 ${i};`:` mediump float ${i}[${I}];`}return{glsl:B,domainUniformName:i,domainUniform:l,rangeUniformName:o,rangeUniform:m}}function e7(e,t){const n=Rw(e),r=[],i=[];for(let o=0;o<t.length;o++){const s=t[o],a=gl(e,o),{param:u,empty:l}=s.predicate,c=ip+yf(u),f=pl+"uniqueId";r.push(u?`${f} == ${c}${l?` || ${c} == uint(0)`:""}`:null),i.push(s.scaleChannel?`return ${kw}${e}(${a}());`:`return ${a}();`)}return`${n} ${ZB}${e}() {
282
+ ${a7(r,i)}
283
283
  }
284
284
 
285
- #define ${e}_DEFINED`}function Fw(e){if(!Tt(e))throw new Error(`Not a number: ${e}`);if(e==1/0)return""+Dw;if(e==-1/0)return""+-Dw;{let t=`${e}`;return/^(-)?\d+$/.test(t)&&(t+=".0"),t}}function Ji(e){typeof e=="number"&&(e=[e]);const t=e.length;if(t<1||t>4)throw new Error("Invalid number of components: "+t);const n=Mw(t),r=`${n}(${e.map(Fw).join(", ")})`;return Object.assign(r,{type:n,numComponents:t})}function Mw(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+e)}}function Pw(e){return ni(e)?"vec3":e=="uniqueId"?"uint":"float"}function Lw(e){const t=Wr(e).rgb();return[t.r,t.g,t.b].map(n=>n/255)}function rD(e){return Ji(Lw(e))}function Nw(e){return Ji([e[0],Os(e)])}function iD(e,...t){const n=[];for(const r of t)Tt(r)?n.push(Fw(r)):xt(r)?n.push(Ji(r)):n.push(r);return`${e}(${n.join(", ")})`}function gl(e,t){var a;const n=e&&Xr(e.type),r=e&&Ow(e.type),i=r&&oD(e.domain()),o=i?{attributeType:"uvec2",arrayConstructor:Uint32Array}:r?{attributeType:"uint",arrayConstructor:Uint32Array}:n?{attributeType:"uint",arrayConstructor:Uint16Array}:t=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(o,{numComponents:+(((a=o.attributeType.match(/^vec([234])$/))==null?void 0:a[1])??1),discrete:n,hp:r,largeHp:i})}function Ow(e){return e=="index"||e=="locus"}function oD(e){return e[1]>2**32}const J0=2**12;function zw(e,t=[]){const n=e%J0,r=(e-n)/J0;return t[0]=r,t[1]=n,t}function aD(e){const t=e%J0;return[e-t,t]}function sD(e){return[...aD(e[0]),e[1]-e[0]]}function Uw(e){const t=new or([],JSON.stringify);for(const[n,r]of Object.entries(e)){const i=r.channelDef;if(ti(i)){const a=[i.field,r.scale?(bt(r.scale.type)||Zi(r.scale.type))??!1:!1];t.set(a,[...t.get(a)??[],n])}}return t}function ep(e){return Nt(e).join("_")}function lD(e){return e[0].toUpperCase()+e.slice(1)}const Gw=(e,t)=>lf(e.type)||bt(e.type)&&ni(t)?[0,1]:e.range?e.range():void 0;function uD(e,t){if(e.length!=t.length)throw new Error("Unequal array lengths");const n=e.length;if(n==0)return"";if(n==1&&e[0]==null)return t[0];const r=[];for(let i=0;i<n;i++){const o=e[i],a=i==0?`if (${o})`:o==null&&i==n-1?"else":`else if (${o})`;r.push(` ${a} {
285
+ #define ${e}_DEFINED`}function Bw(e){if(!Tt(e))throw new Error(`Not a number: ${e}`);if(e==1/0)return""+Tw;if(e==-1/0)return""+-Tw;{let t=`${e}`;return/^(-)?\d+$/.test(t)&&(t+=".0"),t}}function Ki(e){typeof e=="number"&&(e=[e]);const t=e.length;if(t<1||t>4)throw new Error("Invalid number of components: "+t);const n=Dw(t),r=`${n}(${e.map(Bw).join(", ")})`;return Object.assign(r,{type:n,numComponents:t})}function Dw(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+e)}}function Rw(e){return ti(e)?"vec3":e=="uniqueId"?"uint":"float"}function Fw(e){const t=qr(e).rgb();return[t.r,t.g,t.b].map(n=>n/255)}function t7(e){return Ki(Fw(e))}function Mw(e){return Ki([e[0],Oa(e)])}function n7(e,...t){const n=[];for(const r of t)Tt(r)?n.push(Bw(r)):vt(r)?n.push(Ki(r)):n.push(r);return`${e}(${n.join(", ")})`}function ml(e,t){var s;const n=e&&Qr(e.type),r=e&&Pw(e.type),i=r&&r7(e.domain()),o=i?{attributeType:"uvec2",arrayConstructor:Uint32Array}:r?{attributeType:"uint",arrayConstructor:Uint32Array}:n?{attributeType:"uint",arrayConstructor:Uint16Array}:t=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(o,{numComponents:+(((s=o.attributeType.match(/^vec([234])$/))==null?void 0:s[1])??1),discrete:n,hp:r,largeHp:i})}function Pw(e){return e=="index"||e=="locus"}function r7(e){return e[1]>2**32}const op=2**12;function Lw(e,t=[]){const n=e%op,r=(e-n)/op;return t[0]=r,t[1]=n,t}function i7(e){const t=e%op;return[e-t,t]}function o7(e){return[...i7(e[0]),e[1]-e[0]]}function Nw(e){const t=new or([],JSON.stringify);for(const[n,r]of Object.entries(e)){const i=r.channelDef;if(ei(i)){const s=[i.field,r.scale?(mt(r.scale.type)||Wi(r.scale.type))??!1:!1];t.set(s,[...t.get(s)??[],n])}}return t}function sp(e){return Nt(e).join("_")}function s7(e){return e[0].toUpperCase()+e.slice(1)}const Ow=(e,t)=>uf(e.type)||mt(e.type)&&ti(t)?[0,1]:e.range?e.range():void 0;function a7(e,t){if(e.length!=t.length)throw new Error("Unequal array lengths");const n=e.length;if(n==0)return"";if(n==1&&e[0]==null)return t[0];const r=[];for(let i=0;i<n;i++){const o=e[i],s=i==0?`if (${o})`:o==null&&i==n-1?"else":`else if (${o})`;r.push(` ${s} {
286
286
  ${t[i]}
287
287
  }`)}return r.join(`
288
- `)}const Hw=1e4;class cD{constructor(t){Z(this,Ih);Z(this,Bh);Z(this,yu,!1);this.size=t,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(z(this,yu))throw new Error("Already configured!");X(this,Ih,P_).call(this),X(this,Bh,L_).call(this),le(this,yu,!0)}addConverter(t,n){const r=this.createUpdater(dl+t,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),i=n.f;this.dataUpdaters.push(n.arrayReference?o=>r(i(o)):o=>r(i(o)))}createUpdater(t,n,r=Float32Array,i=void 0){if(!Tt(this.size))throw new Error("The number of vertices must be defined!");let o,a,s=0;const u=new r(this.size*n);if(this.arrays[t]={data:u,numComponents:n},n==1){let l=0;const c=f=>{l=+f};o=()=>{u[s++]=l},a=c}else{let l=i??[0];const c=i?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:o=()=>{u[s++]=l[0],u[s++]=l[1]},a=c;break;case 3:o=()=>{u[s++]=l[0],u[s++]=l[1],u[s++]=l[2]},a=c;break;case 4:o=()=>{u[s++]=l[0],u[s++]=l[1],u[s++]=l[2],u[s++]=l[3]},a=c;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(o),a}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(t){throw new Error("Call configure() first!")}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}yu=new WeakMap,Ih=new WeakSet,P_=function(){if(this.size>Hw){const t=this.pushers.map((r,i)=>`const p${i} = that.pushers[${i}];`).join(`
288
+ `)}const zw=1e4;class l7{constructor(t){Z(this,Dh);Z(this,Rh);Z(this,yu,!1);this.size=t,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(z(this,yu))throw new Error("Already configured!");X(this,Dh,R_).call(this),X(this,Rh,F_).call(this),ae(this,yu,!0)}addConverter(t,n){const r=this.createUpdater(pl+t,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),i=n.f;this.dataUpdaters.push(n.arrayReference?o=>r(i(o)):o=>r(i(o)))}createUpdater(t,n,r=Float32Array,i=void 0){if(!Tt(this.size))throw new Error("The number of vertices must be defined!");let o,s,a=0;const u=new r(this.size*n);if(this.arrays[t]={data:u,numComponents:n},n==1){let l=0;const c=f=>{l=+f};o=()=>{u[a++]=l},s=c}else{let l=i??[0];const c=i?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:o=()=>{u[a++]=l[0],u[a++]=l[1]},s=c;break;case 3:o=()=>{u[a++]=l[0],u[a++]=l[1],u[a++]=l[2]},s=c;break;case 4:o=()=>{u[a++]=l[0],u[a++]=l[1],u[a++]=l[2],u[a++]=l[3]},s=c;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(o),s}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(t){throw new Error("Call configure() first!")}pushFromDatum(t){this.updateFromDatum(t),this.pushAll()}}yu=new WeakMap,Dh=new WeakSet,R_=function(){if(this.size>zw){const t=this.pushers.map((r,i)=>`const p${i} = that.pushers[${i}];`).join(`
289
289
  `),n=this.pushers.map((r,i)=>` p${i}();`).join(`
290
290
  `);this.pushAll=new Function("that",`${t}
291
291
  return function unrolledPushAll() {
292
292
  ${n}
293
293
  that.vertexCount++;
294
- };`)(this)}else this.pushAll=()=>{for(let t=0;t<this.pushers.length;t++)this.pushers[t]();this.vertexCount++}},Bh=new WeakSet,L_=function(){if(this.size>Hw){const t=this.dataUpdaters.map((r,i)=>`const u${i} = that.dataUpdaters[${i}];`).join(`
294
+ };`)(this)}else this.pushAll=()=>{for(let t=0;t<this.pushers.length;t++)this.pushers[t]();this.vertexCount++}},Rh=new WeakSet,F_=function(){if(this.size>zw){const t=this.dataUpdaters.map((r,i)=>`const u${i} = that.dataUpdaters[${i}];`).join(`
295
295
  `),n=this.dataUpdaters.map((r,i)=>` u${i}(datum);`).join(`
296
296
  `);this.updateFromDatum=new Function("that","datum",`${t}
297
297
  return function unrolledUpdateFromDatum(datum) {
298
298
  ${n}
299
- };`)(this)}else this.updateFromDatum=t=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}};const la=5,tp=127;function np(e){const t=[];for(let p=0;p<=tp;p++)t.push(void 0);const n=new Map;for(const p of e.chars)p.id<=tp?t[p.id]=p:n.set(p.id,p);const r=8722;n.has(r)||n.set(r,t["-".charCodeAt(0)]);function i(p){return(p<=tp?t[p]:n.get(p))||t[63]}function o(p){return i(p.charCodeAt(0))}const a=e.common.base,s=o("x"),u=o("X"),l=o("q"),c=s.height-la*2,f=u.height-la*2,h=l.height-s.height+l.yoffset-s.yoffset;function d(p,m=1){let y=0;for(let w=0;w<p.length;w++)y+=i(p.charCodeAt(w)).xadvance;return y/a*m}return{measureWidth:d,getCharByCode:i,getChar:o,xHeight:c,capHeight:f,descent:h,common:e.common}}const Vw=2**31-1,fD=-(2**31);function hD(e,t,n,r=n){const i=new Array(e);i.fill(Vw);let o=fD,a=-1/0,s=!1;const u=new Array(e);u.fill(0);const l=t[0],f=(t[1]-t[0])/e,h=(w,A)=>{const S=(w-l)/f,_=Math.floor(S);return aa(A&&_==S?_-1:_,0,e-1)};function d(w,A,S){if(s)return;if(A>o)o=A;else{s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const _=n(w);if(_<a){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}a=_;const k=h(_,!1);i[k]>A&&(i[k]=A),u[k]<S&&(u[k]=S)}function p(w,A,S){if(s)return;if(A>o)o=A;else{s=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const _=n(w),k=r(w);if(_<a){s=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(k<_){s=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",w);return}a=_;const B=h(_,!1),I=h(k,!0);for(let D=B;D<=I;D++)i[D]>A&&(i[D]=A),u[D]<S&&(u[D]=S)}const m=(w,A,S=[0,0])=>{const _=h(w,!1),k=h(A,!0),B=i[_],I=Math.max(u[k],B);return S[0]=B,S[1]=I,S},y=()=>{if(s)return;for(let A=1;A<u.length;A++)u[A]<u[A-1]&&(u[A]=u[A-1]);let w=!0;for(let A=i.length-1;A>0;A--)w&&i[A]==Vw?(i[A]=u[A],w=!1):i[A-1]>i[A]&&(i[A-1]=i[A]);return m};return d.getIndex=y,p.getIndex=y,n==r?d:p}function dD(){let e=0,t,n=0;const r=new Map,i=o=>(o===t||(n=r.get(o),n===void 0&&(n=e++,r.set(o,n)),t=o),n);return i.addAll=o=>{for(const a of o)i(a)},i.invert=o=>{for(const a of r.entries())if(a[1]==o)return a[0]},i.domain=()=>[...r.keys()],i}class ml{constructor({encoders:t,numVertices:n=void 0,attributes:r=[]}){this.encoders=t,this.variableEncoders=Object.fromEntries(Object.entries(t).filter(([o,a])=>r.includes(o)&&a&&!a.constant));const i=[...Uw(t).entries()].filter(([o,a])=>o[1]&&a.length>1).map(([o,a])=>a);this.allocatedVertices=n,this.variableBuilder=new cD(n);for(const[o,a]of Object.entries(this.variableEncoders)){const s=a.dataAccessor;if(!s)continue;const u=i.find(S=>S.find(_=>_==o));if(u&&o!=u[0])continue;const l=s.asNumberAccessor(),c=a.scale,{largeHp:f,arrayConstructor:h,discrete:d,numComponents:p}=gl(c,o),m=[0,0];let y;c&&d&&"domain"in c&&(y=dD(),y.addAll(c.domain()));const w=y?S=>y(s(S)):f?S=>zw(l(S),m):l,A=u?ep(u):o;this.variableBuilder.addConverter(A,{f:w,numComponents:p,arrayReference:f?m:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new or([],JSON.stringify)}registerBatch(t){var o;const n=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-n;i&&this.rangeMap.set(t,{offset:n,count:i,xIndex:(o=this.xIndexer)==null?void 0:o.getIndex()}),this.lastOffset=r}addBatches(t){for(const[n,r]of t)this.addBatch(n,r)}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.pushFromDatum(a),this.addToXIndex(a)}this.registerBatch(t)}prepareXIndexer(t,n=0,r=n+t.length){var l;const i=()=>{this.addToXIndex=c=>{},this.xIndexer=void 0},o=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in o)||!o.buildIndex||!t.length||r-n<0){i();return}const a=c=>{var f;return c&&bt((f=c.scale)==null?void 0:f.type)&&c},s=a(this.variableEncoders.x),u=a(this.variableEncoders.x2);if(s&&!s.constant&&(!u||!u.constant)){const c=s.dataAccessor.asNumberAccessor(),f=u?u.dataAccessor.asNumberAccessor():c,h=[c(t[n]),f(t[r-1])];if(h[1]>h[0]){this.xIndexer=hD(50,h,c,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let m=this.variableBuilder.vertexCount;this.xIndexer(p,d,m),d=m}}else i()}else i()}addToXIndex(t){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class pD extends ml{constructor({encoders:t,attributes:n,numItems:r}){super({encoders:t,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const i=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
299
+ };`)(this)}else this.updateFromDatum=t=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](t)}};const as=5,ap=127;function lp(e){const t=[];for(let p=0;p<=ap;p++)t.push(void 0);const n=new Map;for(const p of e.chars)p.id<=ap?t[p.id]=p:n.set(p.id,p);const r=8722;n.has(r)||n.set(r,t[45]);function i(p){return(p<=ap?t[p]:n.get(p))||t[63]}function o(p){return i(p.charCodeAt(0))}const s=e.common.base,a=o("x"),u=o("X"),l=o("q"),c=a.height-as*2,f=u.height-as*2,h=l.height-a.height+l.yoffset-a.yoffset;function d(p,m=1){let y=0;for(let w=0;w<p.length;w++)y+=i(p.charCodeAt(w)).xadvance;return y/s*m}return{measureWidth:d,getCharByCode:i,getChar:o,xHeight:c,capHeight:f,descent:h,common:e.common}}const Uw=2**31-1,u7=-(2**31);function c7(e,t,n,r=n){const i=new Array(e);i.fill(Uw);let o=u7,s=-1/0,a=!1;const u=new Array(e);u.fill(0);const l=t[0],f=(t[1]-t[0])/e,h=(w,x)=>{const S=(w-l)/f,_=Math.floor(S);return os(x&&_==S?_-1:_,0,e-1)};function d(w,x,S){if(a)return;if(x>o)o=x;else{a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const _=n(w);if(_<s){a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}s=_;const k=h(_,!1);i[k]>x&&(i[k]=x),u[k]<S&&(u[k]=S)}function p(w,x,S){if(a)return;if(x>o)o=x;else{a=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const _=n(w),k=r(w);if(_<s){a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(k<_){a=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",w);return}s=_;const B=h(_,!1),I=h(k,!0);for(let D=B;D<=I;D++)i[D]>x&&(i[D]=x),u[D]<S&&(u[D]=S)}const m=(w,x,S=[0,0])=>{const _=h(w,!1),k=h(x,!0),B=i[_],I=Math.max(u[k],B);return S[0]=B,S[1]=I,S},y=()=>{if(a)return;for(let x=1;x<u.length;x++)u[x]<u[x-1]&&(u[x]=u[x-1]);let w=!0;for(let x=i.length-1;x>0;x--)w&&i[x]==Uw?(i[x]=u[x],w=!1):i[x-1]>i[x]&&(i[x-1]=i[x]);return m};return d.getIndex=y,p.getIndex=y,n==r?d:p}function f7(){let e=0,t,n=0;const r=new Map,i=o=>(o===t||(n=r.get(o),n===void 0&&(n=e++,r.set(o,n)),t=o),n);return i.addAll=o=>{for(const s of o)i(s)},i.invert=o=>{for(const s of r.entries())if(s[1]==o)return s[0]},i.domain=()=>[...r.keys()],i}class bl{constructor({encoders:t,numVertices:n=void 0,attributes:r=[]}){this.encoders=t,this.variableEncoders=Object.fromEntries(Object.entries(t).filter(([o,s])=>r.includes(o)&&s&&!s.constant));const i=[...Nw(t).entries()].filter(([o,s])=>o[1]&&s.length>1).map(([o,s])=>s);this.allocatedVertices=n,this.variableBuilder=new l7(n);for(const[o,s]of Object.entries(this.variableEncoders)){const a=s.dataAccessor;if(!a)continue;const u=i.find(S=>S.find(_=>_==o));if(u&&o!=u[0])continue;const l=a.asNumberAccessor(),c=s.scale,{largeHp:f,arrayConstructor:h,discrete:d,numComponents:p}=ml(c,o),m=[0,0];let y;c&&d&&"domain"in c&&(y=f7(),y.addAll(c.domain()));const w=y?S=>y(a(S)):f?S=>Lw(l(S),m):l,x=u?sp(u):o;this.variableBuilder.addConverter(x,{f:w,numComponents:p,arrayReference:f?m:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new or([],JSON.stringify)}registerBatch(t){var o;const n=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-n;i&&this.rangeMap.set(t,{offset:n,count:i,xIndex:(o=this.xIndexer)==null?void 0:o.getIndex()}),this.lastOffset=r}addBatches(t){for(const[n,r]of t)this.addBatch(n,r)}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const s=n[o];this.variableBuilder.pushFromDatum(s),this.addToXIndex(s)}this.registerBatch(t)}prepareXIndexer(t,n=0,r=n+t.length){var l;const i=()=>{this.addToXIndex=c=>{},this.xIndexer=void 0},o=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in o)||!o.buildIndex||!t.length||r-n<0){i();return}const s=c=>{var f;return c&&mt((f=c.scale)==null?void 0:f.type)&&c},a=s(this.variableEncoders.x),u=s(this.variableEncoders.x2);if(a&&!a.constant&&(!u||!u.constant)){const c=a.dataAccessor.asNumberAccessor(),f=u?u.dataAccessor.asNumberAccessor():c,h=[c(t[n]),f(t[r-1])];if(h[1]>h[0]){this.xIndexer=c7(50,h,c,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let m=this.variableBuilder.vertexCount;this.xIndexer(p,d,m),d=m}}else i()}else i()}addToXIndex(t){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class h7 extends bl{constructor({encoders:t,attributes:n,numItems:r}){super({encoders:t,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const i=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
300
300
  pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
301
- };`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(t,n,r=0,i=n.length){if(!(i<=r)){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.updateFromDatum(a),this.pushAllSixTimes(),this.addToXIndex(a)}this.registerBatch(t)}}}class gD extends ml{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:o}){super({encoders:t,attributes:n,numVertices:r==1/0?o*6:void 0}),this.visibleRange=i,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const a=n[o];this.variableBuilder.updateFromDatum(a),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const s=1;for(let u=0;u<=s;u++)this.updatePos(u/s),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(a)}this.registerBatch(t)}}class mD extends ml{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class bD extends ml{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const t=this.variableBuilder.arrays;for(let n of Object.values(t))n.divisor=1;return super.toArrays()}}class yD extends ml{constructor({encoders:t,attributes:n,fontMetrics:r,properties:i,numCharacters:o=void 0}){super({encoders:t,attributes:n,numVertices:o*6}),this.metadata=r,this.metrics=r,this.properties=i;const s=t.text.channelDef;this.numberFormat=!an(s)&&"format"in s&&s.format?mt(s.format):u=>u,this.updateVertexCoord=this.variableBuilder.createUpdater("vertexCoord",2),this.updateTextureCoord=this.variableBuilder.createUpdater("textureCoord",2),this.updateWidth=this.variableBuilder.createUpdater("width",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){const o=this.properties.align||"left",a=this.properties.logoLetters??!1,s=this.metadata.common.base,u=this.metadata.common.scaleH;let l=-la;switch(this.properties.baseline){case"top":l+=this.metrics.capHeight;break;case"middle":l+=this.metrics.capHeight/2;break;case"bottom":l-=this.metrics.descent;break}const c=this.encoders.text,f=[0,0];this.updateVertexCoord(f);const h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,i);for(let d=r;d<i;d++){const p=n[d],m=this.numberFormat(c(p)),y=Be(m)?m:m===null?"":""+m;if(y.length==0)continue;this.variableBuilder.updateFromDatum(p);const w=a?y.length:this.metrics.measureWidth(y);this.updateWidth(w);let A=o=="right"?-w:o=="center"?-w/2:0;if(!a){const B=this.metrics.getCharByCode(y.charCodeAt(0));A-=(B.width-B.xadvance)/s/2}let S=-.5,_=1,k=1;for(let B=0;B<y.length;B++){const I=this.metrics.getCharByCode(y.charCodeAt(B)),D=a?1:I.xadvance/s;if(I.id==32){A+=D;continue}a?(k=(I.width+la*2)/I.width,A=-k/2,_=(I.height+la*2)/I.height,S=-.5-la/I.height):(_=I.height/s,S=-(I.height+I.yoffset+l)/s,k=I.width/s);const M=I.x,G=I.y;f[0]=A,f[1]=S+_,h[0]=M/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A+k,f[1]=S+_,h[0]=(M+I.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=M/u,h[1]=(G+I.height)/u,this.variableBuilder.pushAll(),f[0]=A+k,f[1]=S+_,h[0]=(M+I.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=M/u,h[1]=(G+I.height)/u,this.variableBuilder.pushAll(),f[0]=A+k,f[1]=S,h[0]=(M+I.width)/u,h[1]=(G+I.height)/u,this.variableBuilder.pushAll(),A+=D}this.addToXIndex(p)}this.registerBatch(t)}}const jw=`#define PI 3.141593
302
- uniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : vec4(0.0),distanceToRatio(sd));}else{return fill*distanceToRatio(-d);}}`,wD="uniform highp float uZero;vec3 getDiscreteColor(sampler2D s,int index){return texelFetch(s,ivec2(index % textureSize(s,0).x,0),0).rgb;}vec3 getInterpolatedColor(sampler2D s,float unitValue){return texture(s,vec2(unitValue,0.0)).rgb;}float clampToRange(float value,vec2 range){return clamp(value,min(range[0],range[1]),max(range[0],range[1]));}float scaleIdentity(float value){return value;}float scaleIdentity(uint value){return float(value);}float scaleLinear(float value,vec2 domain,vec2 range){float domainSpan=domain[1]-domain[0];float rangeSpan=range[1]-range[0];return(value-domain[0])/domainSpan*rangeSpan+range[0];}float scaleLog(float value,vec2 domain,vec2 range,float base){return scaleLinear(log(value)/log(base),log(domain)/log(base),range);}float symlog(float value,float constant){return sign(value)*log(abs(value/constant)+1.0);}float scaleSymlog(float value,vec2 domain,vec2 range,float constant){return scaleLinear(symlog(value,constant),vec2(symlog(domain[0],constant),symlog(domain[1],constant)),range);}float scalePow(float value,vec2 domain,vec2 range,float exponent){return scaleLinear(pow(abs(value),exponent)*sign(value),pow(abs(domain),vec2(exponent))*sign(domain),range);}float scaleBand(uint value,vec2 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;float n=domainExtent[1]-domainExtent[0];paddingInner=int(n)>1 ? paddingInner : 0.0;float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);return start+(float(value)-domainExtent[0])*step+bandwidth*band;}const int lowBits=12;const float lowDivisor=pow(2.0,float(lowBits));const uint lowMask=uint(lowDivisor-1.0);vec2 splitUint(uint value){uint valueLo=value&lowMask;uint valueHi=value-valueLo;return vec2(float(valueHi),float(valueLo));}/***High precision variant of scaleBand for index/locus scales*/float scaleBandHp(uint value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);vec2 splitValue=splitUint(value);float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}/***High precision variant of scaleBand for index/locus scales for large*domains where 32bit uints are not sufficient to represent the domain.*/float scaleBandHp(uvec2 value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);vec2 splitValue=vec2(float(value[0])*lowDivisor,float(value[1]));float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}",vD=`/***Describes where a sample facet should be shown. Interpolating between the*current and target positions/heights allows for transitioning between facet*configurations.*/struct SampleFacetPosition{float pos;float height;float targetPos;float targetHeight;};/***Trasition fraction[0,1]between the current and target configurations.*/uniform float uTransitionOffset;
301
+ };`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(t,n,r=0,i=n.length){if(!(i<=r)){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const s=n[o];this.variableBuilder.updateFromDatum(s),this.pushAllSixTimes(),this.addToXIndex(s)}this.registerBatch(t)}}}class d7 extends bl{constructor({encoders:t,attributes:n,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:o}){super({encoders:t,attributes:n,numVertices:r==1/0?o*6:void 0}),this.visibleRange=i,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){this.prepareXIndexer(n,r,i);for(let o=r;o<i;o++){const s=n[o];this.variableBuilder.updateFromDatum(s),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const a=1;for(let u=0;u<=a;u++)this.updatePos(u/a),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(s)}this.registerBatch(t)}}class p7 extends bl{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class g7 extends bl{constructor({encoders:t,attributes:n,numItems:r=void 0}){super({encoders:t,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const t=this.variableBuilder.arrays;for(let n of Object.values(t))n.divisor=1;return super.toArrays()}}class m7 extends bl{constructor({encoders:t,attributes:n,fontMetrics:r,properties:i,numCharacters:o=void 0}){super({encoders:t,attributes:n,numVertices:o*6}),this.metadata=r,this.metrics=r,this.properties=i;const a=t.text.channelDef;this.numberFormat=!an(a)&&"format"in a&&a.format?xt(a.format):u=>u,this.updateVertexCoord=this.variableBuilder.createUpdater("vertexCoord",2),this.updateTextureCoord=this.variableBuilder.createUpdater("textureCoord",2),this.updateWidth=this.variableBuilder.createUpdater("width",1),this.variableBuilder.configure()}addBatch(t,n,r=0,i=n.length){const o=this.properties.align||"left",s=this.properties.logoLetters??!1,a=this.metadata.common.base,u=this.metadata.common.scaleH;let l=-as;switch(this.properties.baseline){case"top":l+=this.metrics.capHeight;break;case"middle":l+=this.metrics.capHeight/2;break;case"bottom":l-=this.metrics.descent;break}const c=this.encoders.text,f=[0,0];this.updateVertexCoord(f);const h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,i);for(let d=r;d<i;d++){const p=n[d],m=this.numberFormat(c(p)),y=Be(m)?m:m===null?"":""+m;if(y.length==0)continue;this.variableBuilder.updateFromDatum(p);const w=s?y.length:this.metrics.measureWidth(y);this.updateWidth(w);let x=o=="right"?-w:o=="center"?-w/2:0;if(!s){const B=this.metrics.getCharByCode(y.charCodeAt(0));x-=(B.width-B.xadvance)/a/2}let S=-.5,_=1,k=1;for(let B=0;B<y.length;B++){const I=this.metrics.getCharByCode(y.charCodeAt(B)),D=s?1:I.xadvance/a;if(I.id==32){x+=D;continue}s?(k=(I.width+as*2)/I.width,x=-k/2,_=(I.height+as*2)/I.height,S=-.5-as/I.height):(_=I.height/a,S=-(I.height+I.yoffset+l)/a,k=I.width/a);const M=I.x,G=I.y;f[0]=x,f[1]=S+_,h[0]=M/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=x+k,f[1]=S+_,h[0]=(M+I.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=x,f[1]=S,h[0]=M/u,h[1]=(G+I.height)/u,this.variableBuilder.pushAll(),f[0]=x+k,f[1]=S+_,h[0]=(M+I.width)/u,h[1]=G/u,this.variableBuilder.pushAll(),f[0]=x,f[1]=S,h[0]=M/u,h[1]=(G+I.height)/u,this.variableBuilder.pushAll(),f[0]=x+k,f[1]=S,h[0]=(M+I.width)/u,h[1]=(G+I.height)/u,this.variableBuilder.pushAll(),x+=D}this.addToXIndex(p)}this.registerBatch(t)}}const Gw=`#define PI 3.141593
302
+ uniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : vec4(0.0),distanceToRatio(sd));}else{return fill*distanceToRatio(-d);}}`,b7="uniform highp float uZero;vec3 getDiscreteColor(sampler2D s,int index){return texelFetch(s,ivec2(index % textureSize(s,0).x,0),0).rgb;}vec3 getInterpolatedColor(sampler2D s,float unitValue){return texture(s,vec2(unitValue,0.0)).rgb;}float clampToRange(float value,vec2 range){return clamp(value,min(range[0],range[1]),max(range[0],range[1]));}float scaleIdentity(float value){return value;}float scaleIdentity(uint value){return float(value);}float scaleLinear(float value,vec2 domain,vec2 range){float domainSpan=domain[1]-domain[0];float rangeSpan=range[1]-range[0];return(value-domain[0])/domainSpan*rangeSpan+range[0];}float scaleLog(float value,vec2 domain,vec2 range,float base){return scaleLinear(log(value)/log(base),log(domain)/log(base),range);}float symlog(float value,float constant){return sign(value)*log(abs(value/constant)+1.0);}float scaleSymlog(float value,vec2 domain,vec2 range,float constant){return scaleLinear(symlog(value,constant),vec2(symlog(domain[0],constant),symlog(domain[1],constant)),range);}float scalePow(float value,vec2 domain,vec2 range,float exponent){return scaleLinear(pow(abs(value),exponent)*sign(value),pow(abs(domain),vec2(exponent))*sign(domain),range);}float scaleBand(uint value,vec2 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;float n=domainExtent[1]-domainExtent[0];paddingInner=int(n)>1 ? paddingInner : 0.0;float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);return start+(float(value)-domainExtent[0])*step+bandwidth*band;}const int lowBits=12;const float lowDivisor=pow(2.0,float(lowBits));const uint lowMask=uint(lowDivisor-1.0);vec2 splitUint(uint value){uint valueLo=value&lowMask;uint valueHi=value-valueLo;return vec2(float(valueHi),float(valueLo));}/***High precision variant of scaleBand for index/locus scales*/float scaleBandHp(uint value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);vec2 splitValue=splitUint(value);float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}/***High precision variant of scaleBand for index/locus scales for large*domains where 32bit uints are not sufficient to represent the domain.*/float scaleBandHp(uvec2 value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);vec2 splitValue=vec2(float(value[0])*lowDivisor,float(value[1]));float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}",y7=`/***Describes where a sample facet should be shown. Interpolating between the*current and target positions/heights allows for transitioning between facet*configurations.*/struct SampleFacetPosition{float pos;float height;float targetPos;float targetHeight;};/***Trasition fraction[0,1]between the current and target configurations.*/uniform float uTransitionOffset;
303
303
  #if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
304
304
  SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
305
305
  #elif defined(SAMPLE_FACET_UNIFORM)
@@ -307,37 +307,37 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
307
307
  #elif defined(SAMPLE_FACET_TEXTURE)
308
308
  uniform sampler2D uSampleFacetTexture;SampleFacetPosition getSampleFacetPos(){vec4 texel=texelFetch(uSampleFacetTexture,ivec2(int(attr_facetIndex),0),0);return SampleFacetPosition(1.0-texel.r-texel.g,texel.g,1.0-texel.r-texel.g,texel.g);}
309
309
  #endif
310
- bool isFacetedSamples(SampleFacetPosition facetPos){return facetPos!=SampleFacetPosition(0.0,1.0,0.0,1.0);}bool isFacetedSamples(){return isFacetedSamples(getSampleFacetPos());}bool isInTransit(){return uTransitionOffset>0.0;}float getTransitionFraction(float xPos){return smoothstep(0.0,0.7+uTransitionOffset,(xPos-uTransitionOffset)*2.0);}vec2 applySampleFacet(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return pos;}else if(isInTransit()){vec2 interpolated=mix(vec2(facetPos.pos,facetPos.height),vec2(facetPos.targetPos,facetPos.targetHeight),getTransitionFraction(pos.x));return vec2(pos.x,interpolated[0]+pos.y*interpolated[1]);}else{return vec2(pos.x,facetPos.pos+pos.y*facetPos.height);}}float getSampleFacetHeight(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return 1.0;}else if(isInTransit()){return mix(facetPos.height,facetPos.targetHeight,getTransitionFraction(pos.x));}else{return facetPos.height;}}`,xD=`/**Based on concepts presented at:*https:*https:*/out highp vec4 vPickingColor;/***Passes the unique id to the fragment shader as a color if picking is enabled.*Returns true if picking is enabled.*/bool setupPicking(){if(uPickingEnabled){
310
+ bool isFacetedSamples(SampleFacetPosition facetPos){return facetPos!=SampleFacetPosition(0.0,1.0,0.0,1.0);}bool isFacetedSamples(){return isFacetedSamples(getSampleFacetPos());}bool isInTransit(){return uTransitionOffset>0.0;}float getTransitionFraction(float xPos){return smoothstep(0.0,0.7+uTransitionOffset,(xPos-uTransitionOffset)*2.0);}vec2 applySampleFacet(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return pos;}else if(isInTransit()){vec2 interpolated=mix(vec2(facetPos.pos,facetPos.height),vec2(facetPos.targetPos,facetPos.targetHeight),getTransitionFraction(pos.x));return vec2(pos.x,interpolated[0]+pos.y*interpolated[1]);}else{return vec2(pos.x,facetPos.pos+pos.y*facetPos.height);}}float getSampleFacetHeight(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return 1.0;}else if(isInTransit()){return mix(facetPos.height,facetPos.targetHeight,getTransitionFraction(pos.x));}else{return facetPos.height;}}`,w7=`/**Based on concepts presented at:*https:*https:*/out highp vec4 vPickingColor;/***Passes the unique id to the fragment shader as a color if picking is enabled.*Returns true if picking is enabled.*/bool setupPicking(){if(uPickingEnabled){
311
311
  #ifdef uniqueId_DEFINED
312
312
  uint id=attr_uniqueId;vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,id>>24)&0xFF)/float(0xFF);
313
313
  #else
314
314
  vPickingColor=vec4(1.0);
315
315
  #endif
316
- return true;}return false;}`,AD="in highp vec4 vPickingColor;",wf=Symbol("cacheMap");function vf(e,t,n){let r=bl(e).get(t);return r===void 0&&(r=n(t),bl(e).set(t,r)),r}function ED(e,t){bl(e).delete(t)}function xf(e,t){const n=bl(e);for(const r of n.keys())r.startsWith(t)&&n.delete(r);bl(e).delete(t)}function $w(e){e[wf]=new Map}function bl(e){return e[wf]||$w(e),e[wf]}function _D(e,t,n,r){const i=Be(e)?e:e.name,o=!Be(e)&&e.extent||[0,1];if(n===void 0&&!Be(e)&&(n=e.count),i){const a=z0(i);if(nn(a)){const s=qw(a,{extent:o,count:n});return Af(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},s,r)}else{if(xt(a))return rp(a,t);throw new Error("Unknown scheme: "+i)}}}function SD(e,t="rgb",n,r){const i=uf(e,Be(t)?t:t.type,Be(t)?void 0:t.gamma),o=qw(i);return Af(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},o,r)}function CD(e,t,n,r){const i=Math.max(e.length,n||0),o=new Float32Array(i);for(let a=0;a<i;a++)o[a]=e[a%e.length];return Af(t,{minMag:t.NEAREST,format:t.RED,internalFormat:t.R32F,height:1},o,r)}function rp(e,t,n,r){const i=Ww(e,n);return Af(t,{minMag:t.NEAREST,format:t.RGB,height:1},i,r)}function qw(e,{extent:t=[0,1],reverse:n=!1,count:r=256}={}){const i=t[0],o=Os(t)-i,a=xs(r).map(s=>s/(r-1)).map(s=>i+s/o).map(e);return n&&a.reverse(),Ww(a)}function Ww(e,t){const n=Math.max(e.length,t||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const o=Wr(e[i%e.length]).rgb();r[i*3+0]=o.r,r[i*3+1]=o.g,r[i*3+2]=o.b}return r}class kD{constructor(t,n,r,i={}){this._container=t,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap;const o=document.createElement("canvas");t.appendChild(o);const a=$T(o,{antialias:!0,depth:!1,premultipliedAlpha:!0,...i});if(!a)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!$o(a))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(M2(a),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),this.canvas=o,this.gl=a,this._pickingAttachmentOptions=[{format:a.RGBA,type:a.UNSIGNED_BYTE,minMag:a.LINEAR,wrap:a.CLAMP_TO_EDGE}],this._pickingBufferInfo=zT(a,this._pickingAttachmentOptions),a.bindFramebuffer(a.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const s=Wr(r).rgb();this._clearColor=[s.r/255,s.g/255,s.b/255,s.opacity]}}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(t,n){const r="#version 300 es",i="precision mediump float;";xt(n)&&(n=n.join(`
316
+ return true;}return false;}`,v7="in highp vec4 vPickingColor;",vf=Symbol("cacheMap");function Af(e,t,n){let r=yl(e).get(t);return r===void 0&&(r=n(t),yl(e).set(t,r)),r}function A7(e,t){yl(e).delete(t)}function xf(e,t){const n=yl(e);for(const r of n.keys())r.startsWith(t)&&n.delete(r);yl(e).delete(t)}function Hw(e){e[vf]=new Map}function yl(e){return e[vf]||Hw(e),e[vf]}function x7(e,t,n,r){const i=Be(e)?e:e.name,o=!Be(e)&&e.extent||[0,1];if(n===void 0&&!Be(e)&&(n=e.count),i){const s=$0(i);if(nn(s)){const a=Vw(s,{extent:o,count:n});return Ef(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},a,r)}else{if(vt(s))return up(s,t);throw new Error("Unknown scheme: "+i)}}}function E7(e,t="rgb",n,r){const i=cf(e,Be(t)?t:t.type,Be(t)?void 0:t.gamma),o=Vw(i);return Ef(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},o,r)}function _7(e,t,n,r){const i=Math.max(e.length,n||0),o=new Float32Array(i);for(let s=0;s<i;s++)o[s]=e[s%e.length];return Ef(t,{minMag:t.NEAREST,format:t.RED,internalFormat:t.R32F,height:1},o,r)}function up(e,t,n,r){const i=jw(e,n);return Ef(t,{minMag:t.NEAREST,format:t.RGB,height:1},i,r)}function Vw(e,{extent:t=[0,1],reverse:n=!1,count:r=256}={}){const i=t[0],o=Oa(t)-i,s=xa(r).map(a=>a/(r-1)).map(a=>i+a/o).map(e);return n&&s.reverse(),jw(s)}function jw(e,t){const n=Math.max(e.length,t||0),r=new Uint8Array(n*3);for(let i=0;i<n;i++){const o=qr(e[i%e.length]).rgb();r[i*3+0]=o.r,r[i*3+1]=o.g,r[i*3+2]=o.b}return r}class S7{constructor(t,n,r,i={}){this._container=t,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap;const o=document.createElement("canvas");t.appendChild(o);const s=VT(o,{antialias:!0,depth:!1,premultipliedAlpha:!0,...i});if(!s)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!qo(s))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(Db(s),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),this.canvas=o,this.gl=s,this._pickingAttachmentOptions=[{format:s.RGBA,type:s.UNSIGNED_BYTE,minMag:s.LINEAR,wrap:s.CLAMP_TO_EDGE}],this._pickingBufferInfo=NT(s,this._pickingAttachmentOptions),s.bindFramebuffer(s.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const a=qr(r).rgb();this._clearColor=[a.r/255,a.g/255,a.b/255,a.opacity]}}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(t,n){const r="#version 300 es",i="precision mediump float;";vt(n)&&(n=n.join(`
317
317
 
318
- `));const o=this.gl,a=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let s=this._shaderCache.get(a);if(!s){const u=[r,i,n].join(`
318
+ `));const o=this.gl,s=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let a=this._shaderCache.get(s);if(!a){const u=[r,i,n].join(`
319
319
 
320
- `);s=o.createShader(t),o.shaderSource(s,u),o.compileShader(s),this._shaderCache.set(a,s)}return s}adjustGl(){const t=this.getLogicalCanvasSize();this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`;const n=this.getPhysicalCanvasSize(t);this.canvas.width=n.width,this.canvas.height=n.height,UT(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(t){return t=t||this.getLogicalCanvasSize(),{width:t.width*this.dpr,height:t.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const t=this._sizeSource(),n=window.getComputedStyle(this._container,null),r=t.width??this._container.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),i=t.height??this._container.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return this._logicalCanvasSize={width:r,height:i},this._logicalCanvasSize}readPickingPixel(t,n){const r=this.gl;t*=this.dpr,n*=this.dpr;const i=this.getPhysicalCanvasSize().height,o=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(t,i-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,o),r.bindFramebuffer(r.FRAMEBUFFER,null),o}clearAll(){const t=this.gl,{width:n,height:r}=this.getPhysicalCanvasSize();t.viewport(0,0,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(...this._clearColor),t.clear(t.COLOR_BUFFER_BIT)}createRangeTexture(t,n=!1){const r=this.rangeTextures.get(t);if(!n&&r)return;function i(a,s){return Xr(s.type)?s.domain().length:s.type=="threshold"?s.domain().length+1:s.type=="quantize"||s.type=="quantile"?a??4:a}const o=t.channel;if(ni(o)){const a=t.scale,s=a.props,u=a.range();let l;if(s.scheme)if(a.type=="threshold"&&u)l=rp(u,this.gl,a.domain().length,r);else{let c=Be(s.scheme)?void 0:s.scheme.count;c=i(c,a),l=_D(s.scheme,this.gl,c,r)}else lf(a.type)||bt(a.type)&&u.length>1?l=SD(u,s.interpolate,this.gl,r):l=rp(u,this.gl,a.domain().length,r);this.rangeTextures.set(t,l)}else{const a=t.scale;if(a.type==="ordinal"||Zi(a.type)){const s=yf(o)?Iw(o):l=>l,u=a.range();this.rangeTextures.set(t,CD(u.map(s),this.gl,a.domain().length,r))}}}}function TD(e,t="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...t.matchAll(r)],o=new Map(i.map((a,s)=>{const u=parseInt(a[1]),l=i[s+1],c=l?l.index:t.length,f=t.substring(a.index,c);return[u-1,f]}));return e.split(`
321
- `).map((a,s)=>{const u=o.get(s);return`${s+1+n}: ${a}${u?`
320
+ `);a=o.createShader(t),o.shaderSource(a,u),o.compileShader(a),this._shaderCache.set(s,a)}return a}adjustGl(){const t=this.getLogicalCanvasSize();this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`;const n=this.getPhysicalCanvasSize(t);this.canvas.width=n.width,this.canvas.height=n.height,OT(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(t){return t=t||this.getLogicalCanvasSize(),{width:t.width*this.dpr,height:t.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const t=this._sizeSource(),n=window.getComputedStyle(this._container,null),r=t.width??this._container.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),i=t.height??this._container.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return this._logicalCanvasSize={width:r,height:i},this._logicalCanvasSize}readPickingPixel(t,n){const r=this.gl;t*=this.dpr,n*=this.dpr;const i=this.getPhysicalCanvasSize().height,o=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(t,i-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,o),r.bindFramebuffer(r.FRAMEBUFFER,null),o}clearAll(){const t=this.gl,{width:n,height:r}=this.getPhysicalCanvasSize();t.viewport(0,0,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(...this._clearColor),t.clear(t.COLOR_BUFFER_BIT)}createRangeTexture(t,n=!1){const r=this.rangeTextures.get(t);if(!n&&r)return;function i(s,a){return Qr(a.type)?a.domain().length:a.type=="threshold"?a.domain().length+1:a.type=="quantize"||a.type=="quantile"?s??4:s}const o=t.channel;if(ti(o)){const s=t.scale,a=s.props,u=s.range();let l;if(a.scheme)if(s.type=="threshold"&&u)l=up(u,this.gl,s.domain().length,r);else{let c=Be(a.scheme)?void 0:a.scheme.count;c=i(c,s),l=x7(a.scheme,this.gl,c,r)}else uf(s.type)||mt(s.type)&&u.length>1?l=E7(u,a.interpolate,this.gl,r):l=up(u,this.gl,s.domain().length,r);this.rangeTextures.set(t,l)}else{const s=t.scale;if(s.type==="ordinal"||Wi(s.type)){const a=wf(o)?Cw(o):l=>l,u=s.range();this.rangeTextures.set(t,_7(u.map(a),this.gl,s.domain().length,r))}}}}function C7(e,t="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...t.matchAll(r)],o=new Map(i.map((s,a)=>{const u=parseInt(s[1]),l=i[a+1],c=l?l.index:t.length,f=t.substring(s.index,c);return[u-1,f]}));return e.split(`
321
+ `).map((s,a)=>{const u=o.get(a);return`${a+1+n}: ${s}${u?`
322
322
 
323
323
  ^^^ ${u}`:""}`}).join(`
324
- `)}function ID(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let o,a;if(!e.getProgramParameter(r,e.LINK_STATUS)){o=e.getProgramInfoLog(r);for(const u of[t,n])e.getShaderParameter(u,e.COMPILE_STATUS)||(o=e.getShaderInfoLog(u),a=TD(e.getShaderSource(u),o,0)+`
325
- Error compiling: ${o}`,e.deleteShader(u));e.deleteProgram(r)}if(o)return{message:o,detail:a}}return{program:r,getProgramErrors:i}}function Af(e,t,n,r){return r?Qb(e,r,n,t):r=js(e,{...t,src:n}),r}function Zw(...e){const t={get(n,r,i){for(const o of e){const s=o()[r];if(s!==void 0)return s}},has(n,r,i){for(const o of e){const a=o();if(r in a)return!0}return!1}};return new Proxy({},t)}function BD(e){return Be(e)||Tt(e)||cs(e)}class eo extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const DD="SAMPLE_FACET_UNIFORM",Yw="SAMPLE_FACET_TEXTURE";class yl{constructor(t){Z(this,nr,[]);this.unitView=t,this.encoders=void 0,this.bufferInfo=void 0,this.bytesPerElement=new Map,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.rangeMap=new RD,this.defaultProperties={get clip(){return["x","y"].map(n=>t.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=Zw(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}augmentDefaultProperties(t){Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors(t))}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:ei}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const o of t){const a=this.properties[o];if(a&&Dt(a)){const s=this.unitView.paramMediator.createExpression(a.expr);s.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(o)||Object.defineProperty(r,o,{get(){return s()}})}}const i=this.properties;this.properties=Zw(()=>r,()=>i)}get encoding(){return vf(this,"encoding",()=>{var a;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=s=>{const u=this.properties[s];return BD(u)||Dt(u)?{value:u}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(s=>[s,r(s)]).filter(s=>an(s[1]))),o=this.fixEncoding({...t,...i,...n});for(const s of Object.keys(o))this.getSupportedChannels().includes(s)||delete o[s];return o.x&&((a=o.x).buildIndex??(a.buildIndex=!0)),o})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=OB(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return Yw;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return DD}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),o=this.encoders,a=this.getSampleFacetMode();a&&r.push(`#define ${a}`);const s="// view: "+this.unitView.getPathString();let u=[];const l=new Set,c=Uw(o),f=[],h=Object.values(o).flatMap(k=>k.accessors).map(k=>k.predicate).filter(k=>k.param),d=new Map;for(const k of h){const B=k.param,I=this.unitView.paramMediator.getValue(B);if(!I)throw new Error(`Cannot infer selection type as the parameter "${B}" has no value. Please ensure that the parameter is properly defined!`);if(vw(I)){if(!d.has(B)){const D=K0+bf(B);d.set(B,"single"),f.push(" // Selection parameter"),f.push(` uniform highp uint ${D};`),z(this,nr).push(()=>{this.registerMarkUniformValue(D,{expr:B},M=>M.uniqueId??0)})}}else throw new Error(`Unsupported selection (${B}) in condition: ${JSON.stringify(I)}`)}const p=(k,B,I,D)=>{const M=B.channelDef;if(an(M))if(Dt(M.value)){const{uniformName:G,uniformGlsl:N,accessorGlsl:ne,adjuster:ie}=JB(k,I);u.push(ne),f.push(N),z(this,nr).push(()=>{this.registerMarkUniformValue(G,M.value,ie)})}else u.push(KB(k,I,M.value).accessorGlsl);else if(ul(M)){const{uniformName:G,uniformGlsl:N,accessorGlsl:ne}=eD(k,D,I);f.push(N),u.push(ne);const{largeHp:ie,discrete:he}=gl(D,k),me=he&&"domain"in D?Fe=>D.domain().indexOf(Fe):ie?zw:Fe=>+Fe;z(this,nr).push(()=>{this.registerMarkUniformValue(G,M.datum,me)})}else if(ti(M)){const G=c.get([M.field,!0]),{attributeGlsl:N,accessorGlsl:ne}=Rw(k,D,I,G!=null&&G.includes(k)?G:void 0);l.add(N),u.push(ne)}else if(cl(M)){const{attributeGlsl:G,accessorGlsl:N}=Rw(k,D,I);l.add(G),u.push(N)}else throw new eo(`Unsupported channel definition: ${JSON.stringify(M)}`,this.unitView)};for(const[k,B]of Object.entries(o)){if(!i.includes(k))continue;const{channelDef:I,accessors:D,scale:M}=B;for(let G=0;G<D.length;G++)p(k,D[G],G,M);if(M){const G=Yt(I)&&I.resolutionChannel||k,N=hl(G)?this.unitView.getScaleResolution(G):null,{glsl:ne,domainUniform:ie,domainUniformName:he,rangeUniform:me,rangeUniformName:Fe}=tD(k,M,I);u.push(ne),f.push(ie),f.push(me),me&&z(this,nr).push(()=>{const Ae=this.createMarkUniformSetter(Fe),Le=()=>Ae(Gw(M,k));N.addEventListener("range",Le),Le()}),ie&&z(this,nr).push(()=>{const Ae=this.createMarkUniformSetter(he),Le=()=>{const Oe=Xr(M.type)?[0,M.domain().length]:M.domain();Ae(Ow(M.type)?sD(Oe):Oe)};N.addEventListener("domain",Le),Le()})}u.push(nD(k,D))}const m=[...d.entries()].filter(([,k])=>k=="single").map(([k])=>`${K0}${k} == ${dl}uniqueId`);u.push("bool isPointSelected() {",this.encoders.uniqueId&&m.length>0?` return ${m.join(" || ")};`:" return false;","}");const y=`precision highp float;
324
+ `)}function k7(e,t,n){const r=e.createProgram();e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r);function i(){let o,s;if(!e.getProgramParameter(r,e.LINK_STATUS)){o=e.getProgramInfoLog(r);for(const u of[t,n])e.getShaderParameter(u,e.COMPILE_STATUS)||(o=e.getShaderInfoLog(u),s=C7(e.getShaderSource(u),o,0)+`
325
+ Error compiling: ${o}`,e.deleteShader(u));e.deleteProgram(r)}if(o)return{message:o,detail:s}}return{program:r,getProgramErrors:i}}function Ef(e,t,n,r){return r?W2(e,r,n,t):r=$a(e,{...t,src:n}),r}function $w(...e){const t={get(n,r,i){for(const o of e){const a=o()[r];if(a!==void 0)return a}},has(n,r,i){for(const o of e){const s=o();if(r in s)return!0}return!1}};return new Proxy({},t)}function T7(e){return Be(e)||Tt(e)||fa(e)}class Ji extends Error{constructor(t,n){super(t),this.name="ViewError",this.view=n}}const I7="SAMPLE_FACET_UNIFORM",qw="SAMPLE_FACET_TEXTURE";class wl{constructor(t){Z(this,nr,[]);this.unitView=t,this.encoders=void 0,this.bufferInfo=void 0,this.bytesPerElement=new Map,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.rangeMap=new B7,this.defaultProperties={get clip(){return["x","y"].map(n=>t.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=$w(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}augmentDefaultProperties(t){Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors(t))}get opaque(){return!1}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const t={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(t.uniqueId={field:Jr}),t}fixEncoding(t){return t}setupExprRefsNeedingGraphicsUpdate(t){const n=this.getSupportedChannels(),r={};for(const o of t){const s=this.properties[o];if(s&&Dt(s)){const a=this.unitView.paramMediator.createExpression(s.expr);a.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(o)||Object.defineProperty(r,o,{get(){return a()}})}}const i=this.properties;this.properties=$w(()=>r,()=>i)}get encoding(){return Af(this,"encoding",()=>{var s;const t=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const u=this.properties[a];return T7(u)||Dt(u)?{value:u}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>an(a[1]))),o=this.fixEncoding({...t,...i,...n});for(const a of Object.keys(o))this.getSupportedChannels().includes(a)||delete o[a];return o.x&&((s=o.x).buildIndex??(s.buildIndex=!0)),o})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=LB(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return qw;if(this.unitView.getLayoutAncestors().find(t=>"samples"in t.spec))return I7}createAndLinkShaders(t,n,r=[]){const i=this.getAttributes(),o=this.encoders,s=this.getSampleFacetMode();s&&r.push(`#define ${s}`);const a="// view: "+this.unitView.getPathString();let u=[];const l=new Set,c=Nw(o),f=[],h=Object.values(o).flatMap(k=>k.accessors).map(k=>k.predicate).filter(k=>k.param),d=new Map;for(const k of h){const B=k.param,I=this.unitView.paramMediator.getValue(B);if(!I)throw new Error(`Cannot infer selection type as the parameter "${B}" has no value. Please ensure that the parameter is properly defined!`);if(bw(I)){if(!d.has(B)){const D=ip+yf(B);d.set(B,"single"),f.push(" // Selection parameter"),f.push(` uniform highp uint ${D};`),z(this,nr).push(()=>{this.registerMarkUniformValue(D,{expr:B},M=>M.uniqueId??0)})}}else throw new Error(`Unsupported selection (${B}) in condition: ${JSON.stringify(I)}`)}const p=(k,B,I,D)=>{const M=B.channelDef;if(an(M))if(Dt(M.value)){const{uniformName:G,uniformGlsl:N,accessorGlsl:ne,adjuster:ie}=XB(k,I);u.push(ne),f.push(N),z(this,nr).push(()=>{this.registerMarkUniformValue(G,M.value,ie)})}else u.push(QB(k,I,M.value).accessorGlsl);else if(cl(M)){const{uniformName:G,uniformGlsl:N,accessorGlsl:ne}=KB(k,D,I);f.push(N),u.push(ne);const{largeHp:ie,discrete:he}=ml(D,k),me=he&&"domain"in D?Fe=>D.domain().indexOf(Fe):ie?Lw:Fe=>+Fe;z(this,nr).push(()=>{this.registerMarkUniformValue(G,M.datum,me)})}else if(ei(M)){const G=c.get([M.field,!0]),{attributeGlsl:N,accessorGlsl:ne}=Iw(k,D,I,G!=null&&G.includes(k)?G:void 0);l.add(N),u.push(ne)}else if(fl(M)){const{attributeGlsl:G,accessorGlsl:N}=Iw(k,D,I);l.add(G),u.push(N)}else throw new Ji(`Unsupported channel definition: ${JSON.stringify(M)}`,this.unitView)};for(const[k,B]of Object.entries(o)){if(!i.includes(k))continue;const{channelDef:I,accessors:D,scale:M}=B;for(let G=0;G<D.length;G++)p(k,D[G],G,M);if(M){const G=Yt(I)&&I.resolutionChannel||k,N=dl(G)?this.unitView.getScaleResolution(G):null,{glsl:ne,domainUniform:ie,domainUniformName:he,rangeUniform:me,rangeUniformName:Fe}=JB(k,M,I);u.push(ne),f.push(ie),f.push(me),me&&z(this,nr).push(()=>{const xe=this.createMarkUniformSetter(Fe),Le=()=>xe(Ow(M,k));N.addEventListener("range",Le),Le()}),ie&&z(this,nr).push(()=>{const xe=this.createMarkUniformSetter(he),Le=()=>{const Oe=Qr(M.type)?[0,M.domain().length]:M.domain();xe(Pw(M.type)?o7(Oe):Oe)};N.addEventListener("domain",Le),Le()})}u.push(e7(k,D))}const m=[...d.entries()].filter(([,k])=>k=="single").map(([k])=>`${ip}${k} == ${pl}uniqueId`);u.push("bool isPointSelected() {",this.encoders.uniqueId&&m.length>0?` return ${m.join(" || ")};`:" return false;","}");const y=`precision highp float;
326
326
  precision highp int;`,w=k=>k.replace("#pragma markUniforms",f.join(`
327
- `));r=r.map(w),t=w(t),n=w(n);const A=[y,s,...r,jw,wD,[...l].join(`
328
- `),...u,vD,xD,t],S=[y,s,...r,jw,AD,n],_=this.gl;this.programStatus=ID(_,this.glHelper.compileShader(_.VERTEX_SHADER,A),this.glHelper.compileShader(_.FRAGMENT_SHADER,S))}finalizeGraphicsInitialization(){const t=this.programStatus.getProgramErrors();if(t){t.detail&&console.warn(t.detail);const n=new Error("Cannot create shader program: "+t.message);throw n.view=this.unitView,n}this.programInfo=AT(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=E2(this.gl,this.programInfo,"View"),this.markUniformInfo=E2(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Jo(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of z(this,nr))n();le(this,nr,void 0)}createMarkUniformSetter(t){const n=this.markUniformInfo.setters[t];if(!n)throw new Error(`Uniform "${t}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(t,n,r=i=>i){const i=this.createMarkUniformSetter(t),o=a=>{if(a==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${Dt(n)?`Expr: ${n.expr}`:""}`);i(a)};if(Dt(n)){const a=this.unitView.paramMediator.createExpression(n.expr),s=()=>o(r(a(null)));a.addListener(s),s()}else o(r(n))}deleteGraphicsData(){const t=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),t.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)t.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(t){if(this.gl.bindVertexArray(null),this.bufferInfo&&t.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(t.arrays))r.data&&P8(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=O8(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices;for(const[n,r]of Object.entries(t.arrays))this.bytesPerElement.set(n,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramMediator.hasPointSelections())return!1;for(const t of this.unitView.getLayoutAncestors())if(!t.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(S2(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):_2(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=GT(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[a,s]of Object.entries(this.encoding))if(Yt(s)){const u=Yt(s)&&s.resolutionChannel||a;if(hl(u)){const l=this.unitView.getScaleResolution(u),c=n.rangeTextures.get(l);c&&i.push(()=>Jo(this.programInfo,{[X0+a]:c}))}}this.getSampleFacetMode()==Yw&&i.push(()=>{let a;for(const s of this.unitView.getLayoutAncestors())if(a=s.getSampleFacetTexture(),a)break;if(!a)throw new Error("No facet texture available. This is bug.");Jo(this.programInfo,{uSampleFacetTexture:a})});const o=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>$s(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:o})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,o=n.locSize?n.locSize.size:1;if(i>1||i+o<0)return!1;const a=n.targetLocSize?n.targetLocSize.location:i,s=n.targetLocSize?n.targetLocSize.size:o;this.gl.uniform4f(r.location,i,o,a,s)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let i;const o=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,a=o&&bt(o.type),s=["index","locus"].includes(o==null?void 0:o.type)?-1:0,u=[0,0];i=h=>{if(a&&h.xIndex){const d=o.domain(),p=h.xIndex(d[0]+s,d[1],u),m=p[0],y=p[1]-m;y>0&&t(m,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,c=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){c.count&&r.prepareSampleFacetRendering(n)&&i(c)}:function(){c.count&&i(c)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,o=this.properties,a=this.glHelper.getLogicalCanvasSize(),s=.5,u=(o.xOffset??0)+s,l=(o.yOffset??0)+s;let c,f=t;if(o.clip!=="never"&&(o.clip||n)){let h=0,d=0,p;if(n){if(f=t.intersect(n).flatten(),!f.isDefined())return!1;p=[t.width/f.width,t.height/f.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const m=[f.x,a.height-f.y2,f.width,f.height].map(S=>S*r),y=m.map(S=>Math.floor(S)),w=m[0]-y[0],A=m[1]-y[1];i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),c={uViewOffset:[(u+h+w/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,a.width*r,a.height*r),i.disable(i.SCISSOR_TEST),c={uViewOffset:[(t.x+u)/a.width,(a.height-t.y-l-t.height)/a.height],uViewScale:[t.width/a.width,t.height/a.height]}}return $s(this.viewUniformInfo,{...c,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),S2(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}nr=new WeakMap;class RD extends or{constructor(){super([],JSON.stringify)}get(t){let n=super.get(t);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(t,n)),n}migrateEntries(t){for(const[n,r]of this.entries())t.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of t.entries())Object.assign(this.get(n),r)}}function ip(e,t){const n=$B(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(an(r)||an(i))){if(r){if(!Yt(e[t]))return;if(i){if(r.type!="quantitative"){const o=(1-(r.band||1))/2;r.band=o,i.band=-o}}else if(r.type=="quantitative")i={datum:0,contributesToScaleDomain:!1};else{i={...r};const o=(1-(r.band??1))/2;r.band=0+o,i.band=1-o}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function Qw(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),an(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function Xw(e,t){an(e.fill)&&e.fill.value===null?e.fillOpacity={value:0}:e.fill||(e.fill={resolutionChannel:"color",...e.color},!t&&!e.fillOpacity&&(e.fillOpacity={value:0})),e.fillOpacity||(t?e.fillOpacity={resolutionChannel:"opacity",...e.opacity}:e.fillOpacity={value:0})}class FD extends yl{constructor(n){super(n);Z(this,wu);Z(this,vu);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return vf(this,"opaque",()=>!X(this,wu,Nm).call(this)&&!X(this,vu,Om).call(this)&&an(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return ip(n,"x"),ip(n,"y"),Qw(n,this.properties.filled),Xw(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];X(this,wu,Nm).call(this)&&n.push("ROUNDED_CORNERS"),X(this,vu,Om).call(this)&&n.push("STROKED"),this.createAndLinkShaders(qT,WT,[ZT,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),i=new pD({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>Gi(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{$c(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,o,i)},n)}findDatumAt(n,r){n=Nt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const o=this.encoders,a=o.x.scale.type;if(Xr(a)){const s=o.x.dataAccessor;return i.find(u=>r==s(u))}else{const s=o.x.dataAccessor,u=o.x2.dataAccessor;return i.find(l=>r>=s(l)&&r<u(l))}}}wu=new WeakSet,Nm=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},vu=new WeakSet,Om=function(){const n=this.encoding.strokeWidth;return!(an(n)&&!n.value)||"condition"in n};const MD=`out float vRadius;out float vRadiusWithPadding;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out lowp float vShape;out lowp float vHalfStrokeWidth;out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}vec2 getDxDy(){
327
+ `));r=r.map(w),t=w(t),n=w(n);const x=[y,a,...r,Gw,b7,[...l].join(`
328
+ `),...u,y7,w7,t],S=[y,a,...r,Gw,v7,n],_=this.gl;this.programStatus=k7(_,this.glHelper.compileShader(_.VERTEX_SHADER,x),this.glHelper.compileShader(_.FRAGMENT_SHADER,S))}finalizeGraphicsInitialization(){const t=this.programStatus.getProgramErrors();if(t){t.detail&&console.warn(t.detail);const n=new Error("Cannot create shader program: "+t.message);throw n.view=this.unitView,n}this.programInfo=wT(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=vb(this.gl,this.programInfo,"View"),this.markUniformInfo=vb(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Ko(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of z(this,nr))n();ae(this,nr,void 0)}createMarkUniformSetter(t){const n=this.markUniformInfo.setters[t];if(!n)throw new Error(`Uniform "${t}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(t,n,r=i=>i){const i=this.createMarkUniformSetter(t),o=s=>{if(s==null)throw new Error(`Trying to set null/undefined value for uniform: ${t}${Dt(n)?`Expr: ${n.expr}`:""}`);i(s)};if(Dt(n)){const s=this.unitView.paramMediator.createExpression(n.expr),a=()=>o(r(s(null)));s.addListener(a),a()}else o(r(n))}deleteGraphicsData(){const t=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),t.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)t.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(t){if(this.gl.bindVertexArray(null),this.bufferInfo&&t.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(t.arrays))r.data&&D8(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=M8(this.gl,t.arrays,{numElements:t.vertexCount}),this.bufferInfo.allocatedVertices=t.allocatedVertices;for(const[n,r]of Object.entries(t.arrays))this.bytesPerElement.set(n,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramMediator.hasPointSelections())return!1;for(const t of this.unitView.getLayoutAncestors())if(!t.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(xb(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Ab(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(t){const n=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=zT(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoding))if(Yt(a)){const u=Yt(a)&&a.resolutionChannel||s;if(dl(u)){const l=this.unitView.getScaleResolution(u),c=n.rangeTextures.get(l);c&&i.push(()=>Ko(this.programInfo,{[rp+s]:c}))}}this.getSampleFacetMode()==qw&&i.push(()=>{let s;for(const a of this.unitView.getLayoutAncestors())if(s=a.getSampleFacetTexture(),s)break;if(!s)throw new Error("No facet texture available. This is bug.");Ko(this.programInfo,{uSampleFacetTexture:s})});const o=(t.picking??!1)&&this.isPickingParticipant();return i.push(()=>qa(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:o})),this.opaque||t.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(t){const n=t.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const i=n.locSize?n.locSize.location:0,o=n.locSize?n.locSize.size:1;if(i>1||i+o<0)return!1;const s=n.targetLocSize?n.targetLocSize.location:i,a=n.targetLocSize?n.targetLocSize.size:o;this.gl.uniform4f(r.location,i,o,s,a)}return!0}render(t){}createRenderCallback(t,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let i;const o=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,s=o&&mt(o.type),a=["index","locus"].includes(o==null?void 0:o.type)?-1:0,u=[0,0];i=h=>{if(s&&h.xIndex){const d=o.domain(),p=h.xIndex(d[0]+a,d[1],u),m=p[0],y=p[1]-m;y>0&&t(m,y)}else t(h.offset,h.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,c=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){c.count&&r.prepareSampleFacetRendering(n)&&i(c)}:function(){c.count&&i(c)}}setViewport(t,n){t=t.flatten();const r=this.unitView.context.devicePixelRatio,i=this.gl,o=this.properties,s=this.glHelper.getLogicalCanvasSize(),a=.5,u=(o.xOffset??0)+a,l=(o.yOffset??0)+a;let c,f=t;if(o.clip!=="never"&&(o.clip||n)){let h=0,d=0,p;if(n){if(f=t.intersect(n).flatten(),!f.isDefined())return!1;p=[t.width/f.width,t.height/f.height],d=Math.max(0,t.y2-n.y2),h=Math.min(0,t.x-n.x)}else p=[1,1];const m=[f.x,s.height-f.y2,f.width,f.height].map(S=>S*r),y=m.map(S=>Math.floor(S)),w=m[0]-y[0],x=m[1]-y[1];i.viewport(...y),i.scissor(...y),i.enable(i.SCISSOR_TEST),c={uViewOffset:[(u+h+w/r)/f.width,-(l+d-x/r)/f.height],uViewScale:p}}else{if(!t.isDefined())return!1;i.viewport(0,0,s.width*r,s.height*r),i.disable(i.SCISSOR_TEST),c={uViewOffset:[(t.x+u)/s.width,(s.height-t.y-l-t.height)/s.height],uViewScale:[t.width/s.width,t.height/s.height]}}return qa(this.viewUniformInfo,{...c,uViewportSize:[t.width,t.height],uDevicePixelRatio:r}),xb(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(t,n){}}nr=new WeakMap;class B7 extends or{constructor(){super([],JSON.stringify)}get(t){let n=super.get(t);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(t,n)),n}migrateEntries(t){for(const[n,r]of this.entries())t.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of t.entries())Object.assign(this.get(n),r)}}function cp(e,t){const n=VB(t);let r=e[t]&&{...e[t]},i=e[n]&&{...e[n]};if(!(an(r)||an(i))){if(r){if(!Yt(e[t]))return;if(i){if(r.type!="quantitative"){const o=(1-(r.band||1))/2;r.band=o,i.band=-o}}else if(r.type=="quantitative")i={datum:0,contributesToScaleDomain:!1};else{i={...r};const o=(1-(r.band??1))/2;r.band=0+o,i.band=1-o}}else r={value:0},i={value:1};e[t]=r,e[n]=i}}function Ww(e,t){e.stroke||(t?e.stroke={value:null}:e.stroke={resolutionChannel:"color",...e.color}),an(e.stroke)&&e.stroke.value===null&&(e.strokeWidth={value:0}),e.strokeOpacity||(e.strokeOpacity={resolutionChannel:"opacity",...e.opacity})}function Zw(e,t){an(e.fill)&&e.fill.value===null?e.fillOpacity={value:0}:e.fill||(e.fill={resolutionChannel:"color",...e.color},!t&&!e.fillOpacity&&(e.fillOpacity={value:0})),e.fillOpacity||(t?e.fillOpacity={resolutionChannel:"opacity",...e.opacity}:e.fillOpacity={value:0})}class D7 extends wl{constructor(n){super(n);Z(this,wu);Z(this,vu);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return Af(this,"opaque",()=>!X(this,wu,Gm).call(this)&&!X(this,vu,Hm).call(this)&&an(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return cp(n,"x"),cp(n,"y"),Ww(n,this.properties.filled),Zw(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];X(this,wu,Gm).call(this)&&n.push("ROUNDED_CORNERS"),X(this,vu,Hm).call(this)&&n.push("STROKED"),this.createAndLinkShaders(jT,$T,[qT,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),i=new h7({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>Ui(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{qc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,o,i)},n)}findDatumAt(n,r){n=Nt(n);const i=this.unitView.getCollector().facetBatches.get(n);if(!i)return;const o=this.encoders,s=o.x.scale.type;if(Qr(s)){const a=o.x.dataAccessor;return i.find(u=>r==a(u))}else{const a=o.x.dataAccessor,u=o.x2.dataAccessor;return i.find(l=>r>=a(l)&&r<u(l))}}}wu=new WeakSet,Gm=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},vu=new WeakSet,Hm=function(){const n=this.encoding.strokeWidth;return!(an(n)&&!n.value)||"condition"in n};const R7=`out float vRadius;out float vRadiusWithPadding;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out lowp float vShape;out lowp float vHalfStrokeWidth;out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}vec2 getDxDy(){
329
329
  #if defined(dx_DEFINED) || defined(dy_DEFINED)
330
330
  return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
331
331
  #else
332
332
  return vec2(0.0,0.0);
333
333
  #endif
334
- }void main(void){float shapeAngle=0.0;float semanticThresholdFactor=computeSemanticThresholdFactor();if(semanticThresholdFactor<=0.0){gl_PointSize=0.0;gl_Position=vec4(100.0,0.0,0.0,0.0);return;}float size=getScaled_size();vec2 pos=vec2(getScaled_x(),getScaled_y())+getDxDy();gl_Position=unitToNdc(applySampleFacet(pos));float strokeWidth=getScaled_strokeWidth();float diameter=sqrt(size)*uScaleFactor*semanticThresholdFactor;float opacity=uViewOpacity;if(strokeWidth<=0.0||uInwardStroke){float minDiameter=1.0/uDevicePixelRatio;if(diameter<minDiameter){opacity*=pow(diameter/minDiameter,2.5);diameter=minDiameter;}}float fillOpa=getScaled_fillOpacity()*opacity;float strokeOpa=getScaled_strokeOpacity()*opacity;vShape=getScaled_shape();bool circle=vShape==0.0;if(vShape>TICK_UP&&vShape<=TICK_LEFT){shapeAngle=(vShape-TICK_UP)*90.0;vShape=TICK_UP;}else if(vShape>TRIANGLE_UP&&vShape<=TRIANGLE_LEFT){shapeAngle=(vShape-TRIANGLE_UP)*90.0;vShape=TRIANGLE_UP;}float angleInDegrees=getScaled_angle();float angle=-(shapeAngle+angleInDegrees)*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);vRotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);float roomForRotation=circle ? 1.0 : sin(mod(angle,PI/2.0)+PI/4.0)/sin(PI/4.0);float aaPadding=1.0/uDevicePixelRatio;float rotationPadding=(diameter*roomForRotation)-diameter;float strokePadding=uInwardStroke ? 0.0 : strokeWidth*(circle ? 1.0 : sqrt(3.0));float padding=rotationPadding+strokePadding+aaPadding;gl_PointSize=max((diameter+padding),uPickingEnabled ? uMinPickingSize : 0.0)*uDevicePixelRatio;vRadius=diameter/2.0;vRadiusWithPadding=vRadius+padding/2.0;vHalfStrokeWidth=strokeWidth/2.0;vFillColor=vec4(getScaled_fill()*fillOpa,fillOpa);vStrokeColor=vec4(getScaled_stroke()*strokeOpa,strokeOpa);setupPicking();}`,PD="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);in float vRadius;in float vRadiusWithPadding;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in lowp float vShape;in lowp float vHalfStrokeWidth;in mat2 vRotationMatrix;out lowp vec4 fragColor;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TICK_UP=8.0;float circle(vec2 p,float r){return length(p)-r;}float square(vec2 p,float r){p=abs(p);return max(p.x,p.y)-r;}float tickUp(vec2 p,float r){float halfR=r*0.5;p.y+=halfR;p=abs(p);return max(p.x-r*0.15,p.y-halfR);}float equilateralTriangle(vec2 p,float r){p.y=-p.y;float k=sqrt(3.0);float kr=k*r;p.y-=kr/2.0;return max((abs(p.x)*k+p.y)/2.0,-p.y-kr);}float crossShape(vec2 p,float r){p=abs(p);vec2 b=vec2(0.4,1.0)*r;vec2 v=abs(p)-b.xy;vec2 h=abs(p)-b.yx;return min(max(v.x,v.y),max(h.x,h.y));}float diamond(vec2 p,float r){p=abs(p);return(max(abs(p.x-p.y),abs(p.x+p.y))-r)/sqrt(2.0);}void main(){float d;vec2 p=vRotationMatrix*(2.0*gl_PointCoord-1.0)*vRadiusWithPadding;float r=vRadius;if(vShape==CIRCLE){d=circle(p,r);}else if(vShape==SQUARE){d=square(p,r);}else if(vShape==CROSS){d=crossShape(p,r);}else if(vShape==DIAMOND){d=diamond(p,r);}else if(vShape==TRIANGLE_UP){d=equilateralTriangle(p,r);}else if(vShape==TICK_UP){d=tickUp(p,r);}else{d=0.0;}if(!uPickingEnabled){lowp vec4 fillColor=mix(vFillColor,white,-d*uGradientStrength/vRadius);fragColor=distanceToColor(d+(uInwardStroke ? vHalfStrokeWidth : 0.0),fillColor,vStrokeColor,vHalfStrokeWidth);}else if(d-vHalfStrokeWidth<=0.0){fragColor=vPickingColor;}else{discard;}}",LD=`layout(std140)uniform Mark{/***The stroke should only grow inwards,e.g,the diameter/outline is not affected by the stroke width.*Thus,a point that has a zero size has no visible stroke. This allows strokes to be used with*geometric zoom,etc.*/uniform bool uInwardStroke;uniform float uMinPickingSize;uniform mediump float uScaleFactor;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;
334
+ }void main(void){float shapeAngle=0.0;float semanticThresholdFactor=computeSemanticThresholdFactor();if(semanticThresholdFactor<=0.0){gl_PointSize=0.0;gl_Position=vec4(100.0,0.0,0.0,0.0);return;}float size=getScaled_size();vec2 pos=vec2(getScaled_x(),getScaled_y())+getDxDy();gl_Position=unitToNdc(applySampleFacet(pos));float strokeWidth=getScaled_strokeWidth();float diameter=sqrt(size)*uScaleFactor*semanticThresholdFactor;float opacity=uViewOpacity;if(strokeWidth<=0.0||uInwardStroke){float minDiameter=1.0/uDevicePixelRatio;if(diameter<minDiameter){opacity*=pow(diameter/minDiameter,2.5);diameter=minDiameter;}}float fillOpa=getScaled_fillOpacity()*opacity;float strokeOpa=getScaled_strokeOpacity()*opacity;vShape=getScaled_shape();bool circle=vShape==0.0;if(vShape>TICK_UP&&vShape<=TICK_LEFT){shapeAngle=(vShape-TICK_UP)*90.0;vShape=TICK_UP;}else if(vShape>TRIANGLE_UP&&vShape<=TRIANGLE_LEFT){shapeAngle=(vShape-TRIANGLE_UP)*90.0;vShape=TRIANGLE_UP;}float angleInDegrees=getScaled_angle();float angle=-(shapeAngle+angleInDegrees)*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);vRotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);float roomForRotation=circle ? 1.0 : sin(mod(angle,PI/2.0)+PI/4.0)/sin(PI/4.0);float aaPadding=1.0/uDevicePixelRatio;float rotationPadding=(diameter*roomForRotation)-diameter;float strokePadding=uInwardStroke ? 0.0 : strokeWidth*(circle ? 1.0 : sqrt(3.0));float padding=rotationPadding+strokePadding+aaPadding;gl_PointSize=max((diameter+padding),uPickingEnabled ? uMinPickingSize : 0.0)*uDevicePixelRatio;vRadius=diameter/2.0;vRadiusWithPadding=vRadius+padding/2.0;vHalfStrokeWidth=strokeWidth/2.0;vFillColor=vec4(getScaled_fill()*fillOpa,fillOpa);vStrokeColor=vec4(getScaled_stroke()*strokeOpa,strokeOpa);setupPicking();}`,F7="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);in float vRadius;in float vRadiusWithPadding;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in lowp float vShape;in lowp float vHalfStrokeWidth;in mat2 vRotationMatrix;out lowp vec4 fragColor;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TICK_UP=8.0;float circle(vec2 p,float r){return length(p)-r;}float square(vec2 p,float r){p=abs(p);return max(p.x,p.y)-r;}float tickUp(vec2 p,float r){float halfR=r*0.5;p.y+=halfR;p=abs(p);return max(p.x-r*0.15,p.y-halfR);}float equilateralTriangle(vec2 p,float r){p.y=-p.y;float k=sqrt(3.0);float kr=k*r;p.y-=kr/2.0;return max((abs(p.x)*k+p.y)/2.0,-p.y-kr);}float crossShape(vec2 p,float r){p=abs(p);vec2 b=vec2(0.4,1.0)*r;vec2 v=abs(p)-b.xy;vec2 h=abs(p)-b.yx;return min(max(v.x,v.y),max(h.x,h.y));}float diamond(vec2 p,float r){p=abs(p);return(max(abs(p.x-p.y),abs(p.x+p.y))-r)/sqrt(2.0);}void main(){float d;vec2 p=vRotationMatrix*(2.0*gl_PointCoord-1.0)*vRadiusWithPadding;float r=vRadius;if(vShape==CIRCLE){d=circle(p,r);}else if(vShape==SQUARE){d=square(p,r);}else if(vShape==CROSS){d=crossShape(p,r);}else if(vShape==DIAMOND){d=diamond(p,r);}else if(vShape==TRIANGLE_UP){d=equilateralTriangle(p,r);}else if(vShape==TICK_UP){d=tickUp(p,r);}else{d=0.0;}if(!uPickingEnabled){lowp vec4 fillColor=mix(vFillColor,white,-d*uGradientStrength/vRadius);fragColor=distanceToColor(d+(uInwardStroke ? vHalfStrokeWidth : 0.0),fillColor,vStrokeColor,vHalfStrokeWidth);}else if(d-vHalfStrokeWidth<=0.0){fragColor=vPickingColor;}else{discard;}}",M7=`layout(std140)uniform Mark{/***The stroke should only grow inwards,e.g,the diameter/outline is not affected by the stroke width.*Thus,a point that has a zero size has no visible stroke. This allows strokes to be used with*geometric zoom,etc.*/uniform bool uInwardStroke;uniform float uMinPickingSize;uniform mediump float uScaleFactor;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;
335
335
  #pragma markUniforms
336
- };`;class Kw extends et{constructor(t){super(),this.k=t.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(t){this.reservoir.push(t),this.reservoir.length==this.k&&(this.W=Math.exp(Math.log(Math.random())/this.k),this.i=this.k,this.next=this.i,this.ingester=this._finalIngester,this._setNextStop())}_finalIngester(t){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=t,this.W*=Math.exp(Math.log(Math.random())/this.k),this._setNextStop())}_setNextStop(){this.next+=Math.floor(Math.log(Math.random())/Math.log(1-this.W))+1}handle(t){this.ingester(t)}complete(){for(const t of this.reservoir)this._propagate(t);super.complete()}}function ND(e,t,n){const r=new Kw({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const OD={};class zD extends yl{constructor(n){super(n);Z(this,Dh);Z(this,Wa,()=>0);this.augmentDefaultProperties({x:.5,y:.5,color:"#4c78a8",filled:!0,opacity:1,size:100,semanticScore:0,shape:"circle",strokeWidth:2,fillGradientStrength:0,dx:0,dy:0,angle:0,sampleFacetPadding:.1,semanticZoomFraction:.02,minPickingSize:2});const r=this.properties.semanticZoomFraction;if(r!=null)if(Dt(r)){const i=this.unitView.paramMediator.createExpression(r.expr);i.addListener(()=>this.getContext().animator.requestRender()),le(this,Wa,i)}else le(this,Wa,()=>r)}getAttributes(){return["uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...OD}}fixEncoding(n){return Qw(n,this.properties.filled),Xw(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){var r,i;super.initializeData();const n=(i=(r=this.encoders.semanticScore)==null?void 0:r.dataAccessor)==null?void 0:i.asNumberAccessor();n&&(this.sampledSemanticScores=Float32Array.from(ND(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((o,a)=>o-a))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(MD,PD,[LD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uInwardStroke",n.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",n.fillGradientStrength),this.registerMarkUniformValue("uMinPickingSize",n.minPickingSize)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),i=new mD({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-z(this,Wa).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return L1(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{$s(this.markUniformInfo,{uScaleFactor:X(this,Dh,N_).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>Gi(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{o&&$c(r,this.vertexArrayInfo,r.POINTS,o,i)},n)}}Wa=new WeakMap,Dh=new WeakSet,N_=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const UD="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out highp vec2 vPosInPixels;void main(void){float pixelSize=1.0/uDevicePixelRatio;float size=getScaled_size();float opacity=getScaled_opacity()*uViewOpacity;if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()));vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()));vec2 tangent=b-a;float offset=0.0;float relativeDiff=0.0;if(uMinLength>0.0||uStrokeCap!=BUTT){float len=length(tangent*uViewportSize);float diff=max(0.0,uMinLength-len);if(uStrokeCap!=BUTT){diff+=size;}relativeDiff=diff/len;offset=relativeDiff*(pos-0.5);}vec2 p=pos<1.0? a+tangent*(pos+offset): b+tangent*offset;float aaPadding=pixelSize;vec2 normal=normalize(vec2(-tangent.y,tangent.x)/uViewportSize);p+=normal*side*(size+aaPadding)/uViewportSize;gl_Position=unitToNdc(p);vColor=vec4(getScaled_color()*opacity,opacity);vSize=size;vNormalLengthInPixels=side*(size+aaPadding);vPosInPixels=vec2(pos,(1.0-pos))*(1.0+relativeDiff)*length(tangent*uViewportSize)-vec2(uStrokeCap!=BUTT ? size/2.0 : 0.0);setupPicking();}",GD="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;in vec4 vColor;in float vSize;in vec2 vPosInPixels;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distanceFromEnd=-min(vPosInPixels[0],vPosInPixels[1]);float distance;if(distanceFromEnd>0.0&&uStrokeCap==ROUND){distance=length(vec2(distanceFromEnd,vNormalLengthInPixels));}else{distance=abs(vNormalLengthInPixels);}float opacity=clamp(((vSize/2.0-distance)*dpr),-0.5,0.5)+0.5;if(uDashTextureSize>0.0){float pos=(vPosInPixels[0]+uStrokeDashOffset)*dpr;float floored=floor(pos);vec2 texelPositions=(floored+vec2(0.5,1.5))/dpr/uDashTextureSize;opacity*=mix(texture(uDashTexture,vec2(texelPositions[0],0)).r,texture(uDashTexture,vec2(texelPositions[1],0)).r,clamp((pos-floored),0.0,1.0));}fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",HD=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
336
+ };`;class Yw extends et{constructor(t){super(),this.k=t.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(t){this.reservoir.push(t),this.reservoir.length==this.k&&(this.W=Math.exp(Math.log(Math.random())/this.k),this.i=this.k,this.next=this.i,this.ingester=this._finalIngester,this._setNextStop())}_finalIngester(t){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=t,this.W*=Math.exp(Math.log(Math.random())/this.k),this._setNextStop())}_setNextStop(){this.next+=Math.floor(Math.log(Math.random())/Math.log(1-this.W))+1}handle(t){this.ingester(t)}complete(){for(const t of this.reservoir)this._propagate(t);super.complete()}}function P7(e,t,n){const r=new Yw({type:"sample",size:e});for(const i of t)r.handle(n(i));return r.complete(),r.reservoir}const L7={};class N7 extends wl{constructor(n){super(n);Z(this,Fh);Z(this,Ws,()=>0);this.augmentDefaultProperties({x:.5,y:.5,color:"#4c78a8",filled:!0,opacity:1,size:100,semanticScore:0,shape:"circle",strokeWidth:2,fillGradientStrength:0,dx:0,dy:0,angle:0,sampleFacetPadding:.1,semanticZoomFraction:.02,minPickingSize:2});const r=this.properties.semanticZoomFraction;if(r!=null)if(Dt(r)){const i=this.unitView.paramMediator.createExpression(r.expr);i.addListener(()=>this.getContext().animator.requestRender()),ae(this,Ws,i)}else ae(this,Ws,()=>r)}getAttributes(){return["uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...L7}}fixEncoding(n){return Ww(n,this.properties.filled),Zw(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){var r,i;super.initializeData();const n=(i=(r=this.encoders.semanticScore)==null?void 0:r.dataAccessor)==null?void 0:i.asNumberAccessor();n&&(this.sampledSemanticScores=Float32Array.from(P7(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((o,s)=>o-s))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(R7,F7,[M7])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uInwardStroke",n.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",n.fillGradientStrength),this.registerMarkUniformValue("uMinPickingSize",n.minPickingSize)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),i=new p7({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});i.addBatches(n.facetBatches);const o=i.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-z(this,Ws).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return U1(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{qa(this.markUniformInfo,{uScaleFactor:X(this,Fh,M_).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>Ui(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((i,o)=>{o&&qc(r,this.vertexArrayInfo,r.POINTS,o,i)},n)}}Ws=new WeakMap,Fh=new WeakSet,M_=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const O7="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out highp vec2 vPosInPixels;void main(void){float pixelSize=1.0/uDevicePixelRatio;float size=getScaled_size();float opacity=getScaled_opacity()*uViewOpacity;if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()));vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()));vec2 tangent=b-a;float offset=0.0;float relativeDiff=0.0;if(uMinLength>0.0||uStrokeCap!=BUTT){float len=length(tangent*uViewportSize);float diff=max(0.0,uMinLength-len);if(uStrokeCap!=BUTT){diff+=size;}relativeDiff=diff/len;offset=relativeDiff*(pos-0.5);}vec2 p=pos<1.0? a+tangent*(pos+offset): b+tangent*offset;float aaPadding=pixelSize;vec2 normal=normalize(vec2(-tangent.y,tangent.x)/uViewportSize);p+=normal*side*(size+aaPadding)/uViewportSize;gl_Position=unitToNdc(p);vColor=vec4(getScaled_color()*opacity,opacity);vSize=size;vNormalLengthInPixels=side*(size+aaPadding);vPosInPixels=vec2(pos,(1.0-pos))*(1.0+relativeDiff)*length(tangent*uViewportSize)-vec2(uStrokeCap!=BUTT ? size/2.0 : 0.0);setupPicking();}",z7="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;in vec4 vColor;in float vSize;in vec2 vPosInPixels;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distanceFromEnd=-min(vPosInPixels[0],vPosInPixels[1]);float distance;if(distanceFromEnd>0.0&&uStrokeCap==ROUND){distance=length(vec2(distanceFromEnd,vNormalLengthInPixels));}else{distance=abs(vNormalLengthInPixels);}float opacity=clamp(((vSize/2.0-distance)*dpr),-0.5,0.5)+0.5;if(uDashTextureSize>0.0){float pos=(vPosInPixels[0]+uStrokeDashOffset)*dpr;float floored=floor(pos);vec2 texelPositions=(floored+vec2(0.5,1.5))/dpr/uDashTextureSize;opacity*=mix(texture(uDashTexture,vec2(texelPositions[0],0)).r,texture(uDashTexture,vec2(texelPositions[1],0)).r,clamp((pos-floored),0.0,1.0));}fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",U7=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
337
337
  #pragma markUniforms
338
- };`;class VD extends yl{constructor(t){super(t),this.dashTextureSize=0,this.augmentDefaultProperties({x2:void 0,y2:void 0,size:1,color:"black",opacity:1,minLength:0,strokeDash:null,strokeDashOffset:0,strokeCap:"butt"})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){if(!(t.x&&t.y&&t.x2&&t.y2))if(t.x&&t.x2&&!t.y)t.y={value:.5},t.y2=t.y;else if(t.y&&t.y2&&!t.x)t.x={value:.5},t.x2=t.x;else if(t.x&&!t.y)t.y={value:0},t.y2={value:1},t.x2=t.x;else if(t.y&&!t.x)t.x={value:0},t.x2={value:1},t.y2=t.y;else if(t.x&&t.y&&t.y2)t.x2=t.x;else if(t.y&&t.x&&t.x2)t.y2=t.y;else if(t.y&&t.x)if(!t.x2&&Yt(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&Yt(t.x)&&t.x.type=="quantitative")t.y2=t.y,t.x2={datum:0};else throw new Error("A bug!");else throw new Error("Invalid x and y encodings for rule mark: "+JSON.stringify(t));return t}async initializeGraphics(){if(await super.initializeGraphics(),this.properties.strokeDash){const t=this.gl,n=jD(this.properties.strokeDash);this.dashTexture=js(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(UD,GD,[HD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),$s(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getItemCount(),r=new gD({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this.dashTexture&&n.push(()=>Jo(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>Gi(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>$c(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function jD(e){if(e.length==0||e.length%2||e.findIndex(o=>Math.round(o)!=o||o<1||o>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((o,a)=>o+a),n=new Uint8Array(t);let r=!0,i=0;for(let o of e){for(;o;)n[i++]=r&&255||0,o--;r=!r}return n}const $D="out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out float vGamma;const int SHAPE_ARC=0;const int SHAPE_DOME=1;const int SHAPE_DIAGONAL=2;const int SHAPE_LINE=3;const int ORIENT_VERTICAL=0;const int ORIENT_HORIZONTAL=1;float distanceFromLine(vec2 pointOnLine1,vec2 pointOnLine2,vec2 point){vec2 a=point-pointOnLine1;vec2 b=pointOnLine2-pointOnLine1;vec2 proj=dot(a,b)/dot(b,b)*b;return length(a-proj);}bool isInsideViewport(vec2 point,float marginFactor){vec2 margin=uViewportSize*vec2(marginFactor);return point.x>=-margin.x&&point.x<=uViewportSize.x+margin.x&&point.y>=-margin.y&&point.y<=uViewportSize.y+margin.y;}void main(void){float pixelSize=1.0/uDevicePixelRatio;float opacity=getScaled_opacity()*uViewOpacity;vec2 p1,p2,p3,p4;vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()))*uViewportSize;vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()))*uViewportSize;if(uShape<=SHAPE_DOME){if(uShape==SHAPE_DOME){vec2 height=vec2(0.0);if(uOrient==ORIENT_VERTICAL){p1=vec2(min(a.x,b.x),b.y);p4=vec2(max(a.x,b.x),b.y);height=vec2(0.0,a.y-b.y);if(uClampApex){if(p4.x>0.0){p1.x=max(p1.x,-p4.x);}if(p1.x<uViewportSize.x){p4.x=min(p4.x,2.0*uViewportSize.x-p1.x);}}}else{p1=vec2(b.x,min(a.y,b.y));p4=vec2(b.x,max(a.y,b.y));height=vec2(a.x-b.x,0.0);if(uClampApex){if(p4.y>0.0){p1.y=max(p1.y,-p4.y);}if(p1.y<uViewportSize.y){p4.y=min(p4.y,2.0*uViewportSize.y-p1.y);}}}vec2 controlOffset=height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}if(uShape==SHAPE_ARC){p1=a;p4=b;vec2 chordVector=p4-p1;vec2 unitChordVector=normalize(chordVector);vec2 chordNormal=vec2(-unitChordVector.y,unitChordVector.x);float chordLength=length(chordVector);if(chordLength>uMaxChordLength){if(isInsideViewport(p1,2.0)){chordLength=uMaxChordLength;p4=p1+unitChordVector*uMaxChordLength;}else if(isInsideViewport(p4,2.0)){chordLength=uMaxChordLength;p1=p4-unitChordVector*uMaxChordLength;}}float height=max(chordLength/2.0*uArcHeightFactor,uMinArcHeight);vec2 controlOffset=chordNormal*height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}}else if(uShape==SHAPE_DIAGONAL){if(uOrient==ORIENT_VERTICAL){p1=a;p2=vec2(a.x,(a.y+b.y)/2.0);p3=vec2(b.x,(a.y+b.y)/2.0);p4=b;}else{p1=a;p2=vec2((a.x+b.x)/2.0,a.y);p3=vec2((a.x+b.x)/2.0,b.y);p4=b;}}else if(uShape==SHAPE_LINE){p1=a;p2=(a+b)/2.0;p3=p2;p4=b;}vec2 strip=vec2(float(gl_VertexID/2)/float(uSegmentBreaks),float(gl_VertexID % 2)-0.5);float t=smoothstep(0.0,1.0,strip.x);vec2 C1=p4-3.0*p3+3.0*p2-p1;vec2 C2=3.0*p3-6.0*p2+3.0*p1;vec2 C3=3.0*p2-3.0*p1;vec2 C4=p1;vec2 p;if(t==0.0){p=p1;}else if(t==1.0){p=p4;}else{p=C1*t*t*t+C2*t*t+C3*t+C4;}vec2 tangent=normalize(3.0*C1*t*t+2.0*C2*t+C3);vec2 normal=vec2(-tangent.y,tangent.x);float size=getScaled_size();if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}float paddedSize=uPickingEnabled? max(size,uMinPickingSize): size+pixelSize;vNormalLengthInPixels=strip.y*paddedSize;if(uShape==SHAPE_ARC&&uArcFadingDistance[0]>0.0&&uArcFadingDistance[1]>0.0&&(!uNoFadingOnPointSelection||!isPointSelected())){float d=distanceFromLine(p1,p4,p);float distanceOpacity=smoothstep(uArcFadingDistance[1],uArcFadingDistance[0],d);opacity*=distanceOpacity;if(distanceOpacity<=0.0){vNormalLengthInPixels=0.0;}}p+=normal*vNormalLengthInPixels;gl_Position=pixelsToNdc(p);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vSize=paddedSize;setupPicking();}",qD="in vec4 vColor;in float vSize;in float vNormalLengthInPixels;in float vGamma;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distance=abs(vNormalLengthInPixels);float opacity=clamp(((vSize/2.0-distance)*dpr),0.0,1.0);opacity=pow(opacity,vGamma);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",WD=`layout(std140)uniform Mark{uniform float uArcHeightFactor;uniform float uMinArcHeight;uniform float uMinPickingSize;uniform int uShape;uniform int uOrient;uniform bool uClampApex;uniform float uMaxChordLength;uniform vec2 uArcFadingDistance;uniform bool uNoFadingOnPointSelection;uniform int uSegmentBreaks;
338
+ };`;class G7 extends wl{constructor(t){super(t),this.dashTextureSize=0,this.augmentDefaultProperties({x2:void 0,y2:void 0,size:1,color:"black",opacity:1,minLength:0,strokeDash:null,strokeDashOffset:0,strokeCap:"butt"})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){if(!(t.x&&t.y&&t.x2&&t.y2))if(t.x&&t.x2&&!t.y)t.y={value:.5},t.y2=t.y;else if(t.y&&t.y2&&!t.x)t.x={value:.5},t.x2=t.x;else if(t.x&&!t.y)t.y={value:0},t.y2={value:1},t.x2=t.x;else if(t.y&&!t.x)t.x={value:0},t.x2={value:1},t.y2=t.y;else if(t.x&&t.y&&t.y2)t.x2=t.x;else if(t.y&&t.x&&t.x2)t.y2=t.y;else if(t.y&&t.x)if(!t.x2&&Yt(t.y)&&t.y.type=="quantitative")t.x2=t.x,t.y2={datum:0};else if(!t.y2&&Yt(t.x)&&t.x.type=="quantitative")t.y2=t.y,t.x2={datum:0};else throw new Error("A bug!");else throw new Error("Invalid x and y encodings for rule mark: "+JSON.stringify(t));return t}async initializeGraphics(){if(await super.initializeGraphics(),this.properties.strokeDash){const t=this.gl,n=H7(this.properties.strokeDash);this.dashTexture=$a(t,{mag:t.NEAREST,min:t.NEAREST,internalFormat:t.R8,format:t.RED,src:n,height:1}),this.dashTextureSize=n.length}this.createAndLinkShaders(O7,z7,[U7])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinLength",t.minLength),this.registerMarkUniformValue("uStrokeCap",t.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),qa(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getItemCount(),r=new d7({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this.dashTexture&&n.push(()=>Ko(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>Ui(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>qc(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,i,r),t)}}function H7(e){if(e.length==0||e.length%2||e.findIndex(o=>Math.round(o)!=o||o<1||o>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(e));const t=e.reduce((o,s)=>o+s),n=new Uint8Array(t);let r=!0,i=0;for(let o of e){for(;o;)n[i++]=r&&255||0,o--;r=!r}return n}const V7="out vec4 vColor;out float vSize;out float vNormalLengthInPixels;out float vGamma;const int SHAPE_ARC=0;const int SHAPE_DOME=1;const int SHAPE_DIAGONAL=2;const int SHAPE_LINE=3;const int ORIENT_VERTICAL=0;const int ORIENT_HORIZONTAL=1;float distanceFromLine(vec2 pointOnLine1,vec2 pointOnLine2,vec2 point){vec2 a=point-pointOnLine1;vec2 b=pointOnLine2-pointOnLine1;vec2 proj=dot(a,b)/dot(b,b)*b;return length(a-proj);}bool isInsideViewport(vec2 point,float marginFactor){vec2 margin=uViewportSize*vec2(marginFactor);return point.x>=-margin.x&&point.x<=uViewportSize.x+margin.x&&point.y>=-margin.y&&point.y<=uViewportSize.y+margin.y;}void main(void){float pixelSize=1.0/uDevicePixelRatio;float opacity=getScaled_opacity()*uViewOpacity;vec2 p1,p2,p3,p4;vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()))*uViewportSize;vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()))*uViewportSize;if(uShape<=SHAPE_DOME){if(uShape==SHAPE_DOME){vec2 height=vec2(0.0);if(uOrient==ORIENT_VERTICAL){p1=vec2(min(a.x,b.x),b.y);p4=vec2(max(a.x,b.x),b.y);height=vec2(0.0,a.y-b.y);if(uClampApex){if(p4.x>0.0){p1.x=max(p1.x,-p4.x);}if(p1.x<uViewportSize.x){p4.x=min(p4.x,2.0*uViewportSize.x-p1.x);}}}else{p1=vec2(b.x,min(a.y,b.y));p4=vec2(b.x,max(a.y,b.y));height=vec2(a.x-b.x,0.0);if(uClampApex){if(p4.y>0.0){p1.y=max(p1.y,-p4.y);}if(p1.y<uViewportSize.y){p4.y=min(p4.y,2.0*uViewportSize.y-p1.y);}}}vec2 controlOffset=height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}if(uShape==SHAPE_ARC){p1=a;p4=b;vec2 chordVector=p4-p1;vec2 unitChordVector=normalize(chordVector);vec2 chordNormal=vec2(-unitChordVector.y,unitChordVector.x);float chordLength=length(chordVector);if(chordLength>uMaxChordLength){if(isInsideViewport(p1,2.0)){chordLength=uMaxChordLength;p4=p1+unitChordVector*uMaxChordLength;}else if(isInsideViewport(p4,2.0)){chordLength=uMaxChordLength;p1=p4-unitChordVector*uMaxChordLength;}}float height=max(chordLength/2.0*uArcHeightFactor,uMinArcHeight);vec2 controlOffset=chordNormal*height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}}else if(uShape==SHAPE_DIAGONAL){if(uOrient==ORIENT_VERTICAL){p1=a;p2=vec2(a.x,(a.y+b.y)/2.0);p3=vec2(b.x,(a.y+b.y)/2.0);p4=b;}else{p1=a;p2=vec2((a.x+b.x)/2.0,a.y);p3=vec2((a.x+b.x)/2.0,b.y);p4=b;}}else if(uShape==SHAPE_LINE){p1=a;p2=(a+b)/2.0;p3=p2;p4=b;}vec2 strip=vec2(float(gl_VertexID/2)/float(uSegmentBreaks),float(gl_VertexID % 2)-0.5);float t=smoothstep(0.0,1.0,strip.x);vec2 C1=p4-3.0*p3+3.0*p2-p1;vec2 C2=3.0*p3-6.0*p2+3.0*p1;vec2 C3=3.0*p2-3.0*p1;vec2 C4=p1;vec2 p;if(t==0.0){p=p1;}else if(t==1.0){p=p4;}else{p=C1*t*t*t+C2*t*t+C3*t+C4;}vec2 tangent=normalize(3.0*C1*t*t+2.0*C2*t+C3);vec2 normal=vec2(-tangent.y,tangent.x);float size=getScaled_size();if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}float paddedSize=uPickingEnabled? max(size,uMinPickingSize): size+pixelSize;vNormalLengthInPixels=strip.y*paddedSize;if(uShape==SHAPE_ARC&&uArcFadingDistance[0]>0.0&&uArcFadingDistance[1]>0.0&&(!uNoFadingOnPointSelection||!isPointSelected())){float d=distanceFromLine(p1,p4,p);float distanceOpacity=smoothstep(uArcFadingDistance[1],uArcFadingDistance[0],d);opacity*=distanceOpacity;if(distanceOpacity<=0.0){vNormalLengthInPixels=0.0;}}p+=normal*vNormalLengthInPixels;gl_Position=pixelsToNdc(p);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vSize=paddedSize;setupPicking();}",j7="in vec4 vColor;in float vSize;in float vNormalLengthInPixels;in float vGamma;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distance=abs(vNormalLengthInPixels);float opacity=clamp(((vSize/2.0-distance)*dpr),0.0,1.0);opacity=pow(opacity,vGamma);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",$7=`layout(std140)uniform Mark{uniform float uArcHeightFactor;uniform float uMinArcHeight;uniform float uMinPickingSize;uniform int uShape;uniform int uOrient;uniform bool uClampApex;uniform float uMaxChordLength;uniform vec2 uArcFadingDistance;uniform bool uNoFadingOnPointSelection;uniform int uSegmentBreaks;
339
339
  #pragma markUniforms
340
- };`,ZD=["arc","dome","diagonal","line"],YD=["vertical","horizontal"];class QD extends yl{constructor(t){super(t),this.augmentDefaultProperties({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,noFadingOnPointSelection:!0,linkShape:"arc",orient:"vertical"}),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(Yt(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(Yt(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders($D,qD,[WD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>ZD.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>YD.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",t.segments,n=>n),this.registerMarkUniformValue("uNoFadingOnPointSelection",t.noFadingOnPointSelection,n=>!!n)}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getItemCount(),r=new bD({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([o,a])=>[o,{...a,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>Gi(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl,r=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,o)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r(),o,i)},t):this.createRenderCallback((i,o)=>{for(const a of Object.entries(this.bufferInfo.attribs)){const[s,u]=a;u.buffer&&u.numComponents&&u.divisor&&(u.offset=i*this.arrays[s].numComponents*this.bytesPerElement.get(s))}Gi(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),o)},t)}}const XD=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out vec4 vColor;out float vSlope;out float vEdgeFadeOpacity;out float vGamma;struct RangeResult{float pos;float scale;};float minValue(vec4 v){return min(min(v.x,v.y),min(v.z,v.w));}float maxValue(vec4 v){return max(max(v.x,v.y),max(v.z,v.w));}/***All measures are in[0,1]*/RangeResult positionInsideRange(float a,float b,float width,float padding,int align,bool flush){float span=b-a;float paddedWidth=width+2.0*padding;if(a>1.0||b<0.0){return RangeResult(0.0,0.0);}float extra=max(0.0,span-paddedWidth);float pos;if(align==0){float centre=a+b;if(flush){float leftOver=max(0.0,paddedWidth-centre);centre+=min(leftOver,extra);float rightOver=max(0.0,paddedWidth+centre-2.0);centre-=min(rightOver,extra);}pos=centre/2.0;}else if(align<0){float edge=a;if(flush){float over=max(0.0,-edge);edge+=min(over,extra);}pos=edge+padding;}else{float edge=b;if(flush){float over=max(0.0,edge-1.0);edge-=min(over,extra);}pos=edge-padding;}float scale=clamp((span-padding)/paddedWidth,0.0,1.0);return RangeResult(pos,scale);}vec2 calculateRotatedDimensions(float width,mat2 rotationMatrix){vec2 a=abs(rotationMatrix*vec2(width/2.0,0.5));vec2 b=abs(rotationMatrix*vec2(width/2.0,-0.5));return vec2(max(a.x,b.x),max(a.y,b.y))*2.0;}ivec2 fixAlignForAngle(ivec2 align,float angleInDegrees){float a=mod(angleInDegrees+45.0,360.0);int x=align.x;int y=-align.y;if(a<90.0){return ivec2(x,y);}else if(a<180.0){return ivec2(y,-x);}else if(a<270.0){return ivec2(-x,y);}else{return ivec2(-y,x);}}void main(void){float opacity=getScaled_opacity()*uViewOpacity;vec2 size=vec2(getScaled_size());float x=getScaled_x();float y=getScaled_y();float scale=1.0;float angleInDegrees=getScaled_angle();float angle=-angleInDegrees*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);mat2 rotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);vec2 flushSize=calculateRotatedDimensions(width,rotationMatrix);
340
+ };`,q7=["arc","dome","diagonal","line"],W7=["vertical","horizontal"];class Z7 extends wl{constructor(t){super(t),this.augmentDefaultProperties({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,noFadingOnPointSelection:!0,linkShape:"arc",orient:"vertical"}),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(t){return t.x2||(Yt(t.x)?t.x2={datum:0}:t.x2=t.x),t.y2||(Yt(t.y)?t.y2={datum:0}:t.y2=t.y),t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(V7,j7,[$7])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uArcFadingDistance",t.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",t.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",t.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize),this.registerMarkUniformValue("uShape",t.linkShape,n=>q7.indexOf(n)),this.registerMarkUniformValue("uOrient",t.orient,n=>W7.indexOf(n)),this.registerMarkUniformValue("uClampApex",t.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",t.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",t.segments,n=>n),this.registerMarkUniformValue("uNoFadingOnPointSelection",t.noFadingOnPointSelection,n=>!!n)}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getItemCount(),r=new g7({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(t.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([o,s])=>[o,{...s,data:void 0}])),this.updateBufferInfo(i)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>Ui(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(t){const n=this.gl,r=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,o)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r(),o,i)},t):this.createRenderCallback((i,o)=>{for(const s of Object.entries(this.bufferInfo.attribs)){const[a,u]=s;u.buffer&&u.numComponents&&u.divisor&&(u.offset=i*this.arrays[a].numComponents*this.bytesPerElement.get(a))}Ui(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),o)},t)}}const Y7=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out vec4 vColor;out float vSlope;out float vEdgeFadeOpacity;out float vGamma;struct RangeResult{float pos;float scale;};float minValue(vec4 v){return min(min(v.x,v.y),min(v.z,v.w));}float maxValue(vec4 v){return max(max(v.x,v.y),max(v.z,v.w));}/***All measures are in[0,1]*/RangeResult positionInsideRange(float a,float b,float width,float padding,int align,bool flush){float span=b-a;float paddedWidth=width+2.0*padding;if(a>1.0||b<0.0){return RangeResult(0.0,0.0);}float extra=max(0.0,span-paddedWidth);float pos;if(align==0){float centre=a+b;if(flush){float leftOver=max(0.0,paddedWidth-centre);centre+=min(leftOver,extra);float rightOver=max(0.0,paddedWidth+centre-2.0);centre-=min(rightOver,extra);}pos=centre/2.0;}else if(align<0){float edge=a;if(flush){float over=max(0.0,-edge);edge+=min(over,extra);}pos=edge+padding;}else{float edge=b;if(flush){float over=max(0.0,edge-1.0);edge-=min(over,extra);}pos=edge-padding;}float scale=clamp((span-padding)/paddedWidth,0.0,1.0);return RangeResult(pos,scale);}vec2 calculateRotatedDimensions(float width,mat2 rotationMatrix){vec2 a=abs(rotationMatrix*vec2(width/2.0,0.5));vec2 b=abs(rotationMatrix*vec2(width/2.0,-0.5));return vec2(max(a.x,b.x),max(a.y,b.y))*2.0;}ivec2 fixAlignForAngle(ivec2 align,float angleInDegrees){float a=mod(angleInDegrees+45.0,360.0);int x=align.x;int y=-align.y;if(a<90.0){return ivec2(x,y);}else if(a<180.0){return ivec2(y,-x);}else if(a<270.0){return ivec2(-x,y);}else{return ivec2(-y,x);}}void main(void){float opacity=getScaled_opacity()*uViewOpacity;vec2 size=vec2(getScaled_size());float x=getScaled_x();float y=getScaled_y();float scale=1.0;float angleInDegrees=getScaled_angle();float angle=-angleInDegrees*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);mat2 rotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);vec2 flushSize=calculateRotatedDimensions(width,rotationMatrix);
341
341
  #if defined(x2_DEFINED) || defined(y2_DEFINED)
342
342
  ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
343
343
  #else
@@ -350,9 +350,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
350
350
  #ifdef y2_DEFINED
351
351
  float y2=getScaled_y2();vec2 pos2=applySampleFacet(vec2(x,y2));if(uLogoLetter){size.y=(pos2.y-pos.y)*uViewportSize.y;pos.y+=(pos2.y-pos.y)/2.0;}else{RangeResult result=positionInsideRange(min(pos.y,pos2.y),max(pos.y,pos2.y),size.y*scale*flushSize.y/uViewportSize.y,uPaddingY/uViewportSize.y,align.y,uFlushY);pos.y=result.pos;scale*=result.scale;}
352
352
  #endif
353
- if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scaleFadeExtent[0]){gl_Position=vec4(0.0);return;}size*=scale;opacity*=linearstep(scaleFadeExtent[0],scaleFadeExtent[1],scale);}else if(scale<1.0){gl_Position=vec4(0.0);return;}}vec2 charPos=rotationMatrix*(vertexCoord*size+uD);vec2 unitPos=pos+charPos/uViewportSize;gl_Position=unitToNdc(unitPos);vSlope=max(1.0,min(size.x,size.y)/uSdfNumerator);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,KD="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;in vec4 vColor;in float vSlope;in float vGamma;out lowp vec4 fragColor;float median(float r,float g,float b){return max(min(r,g),min(max(r,g),b));}void main(){vec3 c=texture(uTexture,vTexCoord).rgb;float sigDist=1.0-median(c.r,c.g,c.b);float slope=uLogoLetter? 0.7/length(vec2(dFdy(sigDist),dFdx(sigDist))): vSlope;float opa=clamp((sigDist-0.5)*slope+0.5,0.0,1.0);opa*=clamp(vEdgeFadeOpacity,0.0,1.0);opa=pow(opa,vGamma);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",JD=`layout(std140)uniform Mark{uniform mediump float uSdfNumerator;uniform mediump vec2 uD;uniform mediump vec4 uViewportEdgeFadeWidth;uniform mediump vec4 uViewportEdgeFadeDistance;uniform bool uSqueeze;uniform bool uLogoLetter;uniform lowp ivec2 uAlign;uniform mediump float uPaddingX;uniform bool uFlushX;uniform mediump float uPaddingY;uniform bool uFlushY;
353
+ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scaleFadeExtent[0]){gl_Position=vec4(0.0);return;}size*=scale;opacity*=linearstep(scaleFadeExtent[0],scaleFadeExtent[1],scale);}else if(scale<1.0){gl_Position=vec4(0.0);return;}}vec2 charPos=rotationMatrix*(vertexCoord*size+uD);vec2 unitPos=pos+charPos/uViewportSize;gl_Position=unitToNdc(unitPos);vSlope=max(1.0,min(size.x,size.y)/uSdfNumerator);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,Q7="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;in vec4 vColor;in float vSlope;in float vGamma;out lowp vec4 fragColor;float median(float r,float g,float b){return max(min(r,g),min(max(r,g),b));}void main(){vec3 c=texture(uTexture,vTexCoord).rgb;float sigDist=1.0-median(c.r,c.g,c.b);float slope=uLogoLetter? 0.7/length(vec2(dFdy(sigDist),dFdx(sigDist))): vSlope;float opa=clamp((sigDist-0.5)*slope+0.5,0.0,1.0);opa*=clamp(vEdgeFadeOpacity,0.0,1.0);opa=pow(opa,vGamma);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",X7=`layout(std140)uniform Mark{uniform mediump float uSdfNumerator;uniform mediump vec2 uD;uniform mediump vec4 uViewportEdgeFadeWidth;uniform mediump vec4 uViewportEdgeFadeDistance;uniform bool uSqueeze;uniform bool uLogoLetter;uniform lowp ivec2 uAlign;uniform mediump float uPaddingX;uniform bool uFlushX;uniform mediump float uPaddingY;uniform bool uFlushY;
354
354
  #pragma markUniforms
355
- };`,eR={left:-1,center:0,right:1},tR={top:-1,middle:0,bottom:1,alphabetic:1};class nR extends yl{constructor(t){super(t),this.augmentDefaultProperties({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0}),this.font=this.properties.font?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of sa)this.properties.fitToBand&&ip(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(XD,KD,[JD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),$s(this.markUniformInfo,{uAlign:[eR[t.align],tR[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getData(),r=this.encoding,i=this.encoders.text;let o=0;const a="format"in r.text?mt(r.text.format):l=>l;for(const l of n){const c=a(i(l)),f=Be(c)?c:c===null?"":""+c;o+=f&&f.length||0}const s=new yD({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(o,this.properties.minBufferSize||1024)});s.addBatches(t.facetBatches);const u=s.toArrays();this.rangeMap.migrateEntries(u.rangeMap),this.updateBufferInfo(u)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Jo(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Gi(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>$c(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}const Jw=1;function op(){let e=[0,1],t=[0,1],n=1,r=1,i=0,o=0,a=.5,s=0;const l=c=>(c+a-e[0])/n*r+t[0];return l.invert=c=>(c-t[0])/r*n+e[0]-a,l.domain=function(c){if(arguments.length){e=JS(c),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<Jw&&!f){n=Jw;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return l}else return e.slice()},l.range=function(c){return arguments.length?(t=[...c],r=t[1]-t[0],l):t},l.numberingOffset=function(c){return arguments.length?(s=c,l):s},l.padding=function(c){return arguments.length?(o=c,i=Math.min(1,c),l):i},l.paddingInner=function(c){return arguments.length?(i=Math.min(1,c),l):i},l.paddingOuter=function(c){return arguments.length?(o=c,l):o},l.align=function(c){return arguments.length?(a=Math.max(0,Math.min(1,c)),l):a},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=c=>{const f=l.align(),h=l.numberingOffset();return hc(e[0]-f+h,e[1]-f+h,Math.min(c,Math.ceil(n))).filter(Number.isInteger).map(d=>d-s)},l.tickFormat=(c,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Lr(e[0],e[1],Math.min(c,Math.ceil(n)))<1e5?mt(","):mt(".3s");return p=>d(p+s)},l.copy=()=>op().domain(e).range(t).paddingInner(i).paddingOuter(o).numberingOffset(s),l}function rR(){const e=op().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),o=e.numberingOffset(),[a,s]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(c=>t.toChromosome(c)),u=Math.max(1,Lr(i[0],i[1],r)),l=[];for(let c=a.index;c<=s.index;c++){const f=t.chromosomes[c],h=Math.max(f.continuousStart+u,i[0]-(i[0]-f.continuousStart)%u),d=Math.min(f.continuousEnd-u/4,i[1]+1);for(let p=h;p<=d;p+=u){const m=p-o;m>=i[0]&&m<i[1]&&l.push(m)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const o=e.domain(),a=o[1]-o[0],s=e.numberingOffset(),l=Lr(o[0],o[1],Math.min(r,Math.ceil(a)))<1e6?mt(","):mt(".3s"),c=f=>f-t.toChromosome(f).continuousStart;return f=>l(c(f)+s)};const n=e.copy;return e.copy=()=>n().genome(t),e}function iR(e){return e.type=="locus"}function Ef(e,t,n){if(n=n||[],e.some(a=>a===null)){if(e.every(a=>a===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(a,s)=>a===s||ua(a)&&ua(s)||ua(a)&&s===!0||a===!0&&At(s),o=a=>{for(let s in a){const u=a[s];if(!n.includes(s)&&u!==void 0)if(r[s]!==void 0&&!i(r[s],u))console.warn(`Conflicting property ${s} of ${t}: (${JSON.stringify(r[s])} and ${JSON.stringify(a[s])}). Using ${JSON.stringify(r[s])}.`);else{const l=r[s];if(ua(l))ua(u)&&(r[s]=Ef([l,u],s));else if(ua(u)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[s]=Ef([{},u],s)}else r[s]=u}}};for(const a of e)o(a);return r}function ua(e){return At(e)&&!Array.isArray(e)}/*!
355
+ };`,K7={left:-1,center:0,right:1},J7={top:-1,middle:0,bottom:1,alphabetic:1};class eD extends wl{constructor(t){super(t),this.augmentDefaultProperties({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0}),this.font=this.properties.font?t.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):t.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(t){for(const n of ss)this.properties.fitToBand&&cp(t,n);return t}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(Y7,Q7,[X7])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",t.paddingX),this.registerMarkUniformValue("uPaddingY",t.paddingY),this.registerMarkUniformValue("uFlushX",t.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",t.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",t.squeeze,n=>!!n),qa(this.markUniformInfo,{uAlign:[K7[t.align],J7[t.baseline]],uD:[t.dx,-t.dy],uLogoLetter:!!t.logoLetters,uViewportEdgeFadeWidth:[t.viewportEdgeFadeWidthTop,t.viewportEdgeFadeWidthRight,t.viewportEdgeFadeWidthBottom,t.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[t.viewportEdgeFadeDistanceTop,t.viewportEdgeFadeDistanceRight,t.viewportEdgeFadeDistanceBottom,t.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const n=t.getData(),r=this.encoding,i=this.encoders.text;let o=0;const s="format"in r.text?xt(r.text.format):l=>l;for(const l of n){const c=s(i(l)),f=Be(c)?c:c===null?"":""+c;o+=f&&f.length||0}const a=new m7({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(o,this.properties.minBufferSize||1024)});a.addBatches(t.facetBatches);const u=a.toArrays();this.rangeMap.migrateEntries(u.rangeMap),this.updateBufferInfo(u)}prepareRender(t){const n=super.prepareRender(t);return n.push(()=>{Ko(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Ui(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(t){const n=this.gl;return this.createRenderCallback((r,i)=>qc(n,this.vertexArrayInfo,n.TRIANGLES,i,r),t)}}const Qw=1;function fp(){let e=[0,1],t=[0,1],n=1,r=1,i=0,o=0,s=.5,a=0;const l=c=>(c+s-e[0])/n*r+t[0];return l.invert=c=>(c-t[0])/r*n+e[0]-s,l.domain=function(c){if(arguments.length){e=QS(c),n=e[1]-e[0];const f=e[0]===0&&e[0]===0;if(n<Qw&&!f){n=Qw;const h=(e[0]+e[1])/2;e[0]=h-n/2,e[1]=h+n/2}return l}else return e.slice()},l.range=function(c){return arguments.length?(t=[...c],r=t[1]-t[0],l):t},l.numberingOffset=function(c){return arguments.length?(a=c,l):a},l.padding=function(c){return arguments.length?(o=c,i=Math.min(1,c),l):i},l.paddingInner=function(c){return arguments.length?(i=Math.min(1,c),l):i},l.paddingOuter=function(c){return arguments.length?(o=c,l):o},l.align=function(c){return arguments.length?(s=Math.max(0,Math.min(1,c)),l):s},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=c=>{const f=l.align(),h=l.numberingOffset();return dc(e[0]-f+h,e[1]-f+h,Math.min(c,Math.ceil(n))).filter(Number.isInteger).map(d=>d-a)},l.tickFormat=(c,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=Ri(e[0],e[1],Math.min(c,Math.ceil(n)))<1e5?xt(","):xt(".3s");return p=>d(p+a)},l.copy=()=>fp().domain(e).range(t).paddingInner(i).paddingOuter(o).numberingOffset(a),l}function tD(){const e=fp().numberingOffset(1);let t;e.genome=function(r){return arguments.length?(t=r,e):t},e.ticks=r=>{if(!t)return[];const i=e.domain(),o=e.numberingOffset(),[s,a]=[Math.max(i[0],0),Math.min(i[1],t.totalSize-1)].map(c=>t.toChromosome(c)),u=Math.max(1,Ri(i[0],i[1],r)),l=[];for(let c=s.index;c<=a.index;c++){const f=t.chromosomes[c],h=Math.max(f.continuousStart+u,i[0]-(i[0]-f.continuousStart)%u),d=Math.min(f.continuousEnd-u/4,i[1]+1);for(let p=h;p<=d;p+=u){const m=p-o;m>=i[0]&&m<i[1]&&l.push(m)}}return l},e.tickFormat=(r,i)=>{if(!t)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const o=e.domain(),s=o[1]-o[0],a=e.numberingOffset(),l=Ri(o[0],o[1],Math.min(r,Math.ceil(s)))<1e6?xt(","):xt(".3s"),c=f=>f-t.toChromosome(f).continuousStart;return f=>l(c(f)+a)};const n=e.copy;return e.copy=()=>n().genome(t),e}function nD(e){return e.type=="locus"}function _f(e,t,n){if(n=n||[],e.some(s=>s===null)){if(e.every(s=>s===null))return null;throw console.warn(e),new Error("Cannot merge objects with nulls!")}const r={},i=(s,a)=>s===a||ls(s)&&ls(a)||ls(s)&&a===!0||s===!0&&At(a),o=s=>{for(let a in s){const u=s[a];if(!n.includes(a)&&u!==void 0)if(r[a]!==void 0&&!i(r[a],u))console.warn(`Conflicting property ${a} of ${t}: (${JSON.stringify(r[a])} and ${JSON.stringify(s[a])}). Using ${JSON.stringify(r[a])}.`);else{const l=r[a];if(ls(l))ls(u)&&(r[a]=_f([l,u],a));else if(ls(u)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[a]=_f([{},u],a)}else r[a]=u}}};for(const s of e)o(s);return r}function ls(e){return At(e)&&!Array.isArray(e)}/*!
356
356
  * Adapted from vega-encode:
357
357
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
358
358
  *
@@ -360,7 +360,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
360
360
  * All rights reserved.
361
361
  *
362
362
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
363
- */function ev(e,t,n){return Tt(t)&&n!=null&&(t=Math.min(t,~~(ic(e.domain())/n)||1)),At(t)&&(t.step,t=t.interval),t}function tv(e,t,n){var r=e.range(),i=Math.floor(r[0]),o=Math.ceil(vn(r));if(i>o&&(r=o,o=i,i=r),t=t.filter(function(s){return s=e(s),i<=s&&s<=o}),n>0&&t.length>1){for(var a=[t[0],vn(t)];t.length>n&&t.length>=3;)t=t.filter(function(s,u){return!(u%2)});t.length<3&&(t=a)}return t}function oR(e,t){return e.bins?tv(e,aR(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function aR(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,o){return!(o%r)})}function sR(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?mt(n):String;if(Yy(e.type)){var i=uR(n);r=e.bins?i:lR(r,i)}return r}function lR(e,t){return function(n){return e(n)?t(n):""}}function uR(e){var t=Nr(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return cR(mt(t),mt(".1f")(1)[1])}else return mt(t)}function cR(e,t){return function(n){var r=e(n),i=r.indexOf(t),o,a;if(i<0)return r;for(o=fR(r,i),a=o<r.length?r.slice(o):"";--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+a}}function fR(e,t){var n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
363
+ */function Xw(e,t,n){return Tt(t)&&n!=null&&(t=Math.min(t,~~(oc(e.domain())/n)||1)),At(t)&&(t.step,t=t.interval),t}function Kw(e,t,n){var r=e.range(),i=Math.floor(r[0]),o=Math.ceil(An(r));if(i>o&&(r=o,o=i,i=r),t=t.filter(function(a){return a=e(a),i<=a&&a<=o}),n>0&&t.length>1){for(var s=[t[0],An(t)];t.length>n&&t.length>=3;)t=t.filter(function(a,u){return!(u%2)});t.length<3&&(t=s)}return t}function rD(e,t){return e.bins?Kw(e,iD(e.bins,t)):e.ticks?e.ticks(t):e.domain()}function iD(e,t){var n=e.length,r=~~(n/(t||n));return r<2?e.slice():e.filter(function(i,o){return!(o%r)})}function oD(e,t,n){var r=e.tickFormat?e.tickFormat(t,n):n?xt(n):String;if(qy(e.type)){var i=aD(n);r=e.bins?i:sD(r,i)}return r}function sD(e,t){return function(n){return e(n)?t(n):""}}function aD(e){var t=Go(e||",");if(t.precision==null){switch(t.precision=12,t.type){case"%":t.precision-=2;break;case"e":t.precision-=1;break}return lD(xt(t),xt(".1f")(1)[1])}else return xt(t)}function lD(e,t){return function(n){var r=e(n),i=r.indexOf(t),o,s;if(i<0)return r;for(o=uD(r,i),s=o<r.length?r.slice(o):"";--o>i;)if(r[o]!=="0"){++o;break}return r.slice(0,o)+s}}function uD(e,t){var n=e.lastIndexOf("e"),r;if(n>0)return n;for(n=e.length;--n>t;)if(r=e.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
364
364
  * Adapted from vega-encode:
365
365
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
366
366
  *
@@ -368,7 +368,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
368
368
  * All rights reserved.
369
369
  *
370
370
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
371
- */const hR="locus",dR="index";var pR=5;function gR(e){const t=e.type;return!e.bins&&(t===ia||t===Xs||t===Ks)}function nv(e){return bt(e)&&![Hn,dR,hR].includes(e)}function rv(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var mR=oc(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma","zoom","fp64","name"]);function iv(e,t,n){n=rv(n);for(const r in e)if(!mR[r]){if(r==="padding"&&nv(t.type))continue;nn(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}_R(t,e,ER(t,e,vR(t,e,n)))}function bR(e,t){const n=yR(e),r=Se(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&bt(i.type)&&(e.domain=[0,0]),iv(e,i,t),i}function yR(e){var t=e.type,n="",r;return t===Hn?Hn+"-"+ia:(wR(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?Hn+"-":r===3?oa+"-":""),(n+t||ia).toLowerCase())}function wR(e){const t=e.type;return bt(t)&&t!==Gy&&t!==Hy&&(e.scheme||e.range&&e.range.length&&e.range.every(Be))}function vR(e,t,n){if(!e.domain)return 0;n=rv(n);var r=xR(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,o=e.type,a=t.zero||t.zero===void 0&&gR(e),s,u;return i?(nv(o)&&t.padding&&i[0]!==vn(i)&&(i=AR(o,i,t.range,t.padding,t.exponent,t.constant)),(a||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(s=(i=i.slice()).length-1||1,a&&(i[0]>0&&(i[0]=0),i[s]<0&&(i[s]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[s]=t.domainMax),t.domainMid!=null&&(u=t.domainMid,(u<i[0]||u>i[s])&&n.warn("Scale domainMid exceeds domain min or max.",u),i.splice(s,0,u))),e.domain(ov(o,i,n)),o===P0&&e.unknown(t.domainImplicit?n0:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&ev(e,t.nice)||null),i.length):0}function xR(e,t,n){return t?(e.domain(ov(e.type,t,n)),t.length):-1}function AR(e,t,n,r,i,o){n??(n=[0,1]);var a=Math.abs(vn(n)-n[0]),s=a/(a-2*r),u=e===Qr?o1(t,null,s):e===Ks?Xh(t,null,s,.5):e===Xs?Xh(t,null,s,i||1):e===af?iS(t,null,s,o||1):i1(t,null,s);return t=t.slice(),t[0]=u[0],t[t.length-1]=u[1],t}function ov(e,t,n){if(Yy(e)){var r=Math.abs(t.reduce(function(i,o){return i+(o<0?-1:o>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+Jh(t))}return t}function ER(e,t,n){let r=t.bins;if(r&&!xt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),o=r.start==null?i[0]:r.start,a=r.stop==null?vn(i):r.stop,s=r.step;s||it("Scale bins parameter missing step property."),r=xs(o,a+s,s)}return r?e.bins=r:e.bins&&delete e.bins,e.type===N0&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function _R(e,t,n){var r=e.type,i=t.round||!1,o=t.range;if(t.rangeStep!=null)o=SR(r,t,n);else if(t.scheme&&(o=CR(r,t,n),nn(o))){if(e.interpolator)return e.interpolator(o);it(`Scale type ${r} does not support interpolating color schemes.`)}if(o&&lf(r))return e.interpolator(uf(ap(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(Qy(t.interpolate,t.interpolateGamma)):nn(e.round)?e.round(i):nn(e.rangeRound)&&e.interpolate(i?Ys:Zr),o&&e.range(ap(o,t.reverse))}function SR(e,t,n){e!==$y&&e!==L0&&it("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===L0?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*F0(n,i,r)]}function CR(e,t,n){var r=t.schemeExtent,i,o;return xt(t.scheme)?o=uf(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),o=z0(i),o||it(`Unrecognized scheme name: ${t.scheme}`)),n=e===jy?n+1:e===N0?n-1:e===M0||e===Vy?+t.schemeCount||pR:n,lf(e)?av(o,r,t.reverse):nn(o)?c9(av(o,r),n):e===P0?o:o.slice(0,n)}function av(e,t,n){return nn(e)&&(t||n)?u9(e,ap(t||[0,1],n)):e}function ap(e,t){return t?e.slice().reverse():e}const sv=mt(",d");function kR(e,t){return e.chrom+":"+sv(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+sv(Math.ceil(t.pos))}const lv={dm6:`chr3R 32079331
371
+ */const cD="locus",fD="index";var hD=5;function dD(e){const t=e.type;return!e.bins&&(t===rs||t===Ka||t===Ja)}function Jw(e){return mt(e)&&![Hn,fD,cD].includes(e)}function ev(e){return e||{warn:(t,...n)=>console.warn(t,...n)}}var pD=sc(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma","zoom","fp64","name"]);function tv(e,t,n){n=ev(n);for(const r in e)if(!pD[r]){if(r==="padding"&&Jw(t.type))continue;nn(t[r])?t[r](e[r]):n.warn("Unsupported scale property: "+r)}xD(t,e,AD(t,e,yD(t,e,n)))}function gD(e,t){const n=mD(e),r=Se(n);if(!r)throw new Error("Unknown scale type: "+n);const i=r();return!e.domain&&mt(i.type)&&(e.domain=[0,0]),tv(e,i,t),i}function mD(e){var t=e.type,n="",r;return t===Hn?Hn+"-"+rs:(bD(e)&&(r=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(e.domainMid!=null):0,n=r===2?Hn+"-":r===3?is+"-":""),(n+t||rs).toLowerCase())}function bD(e){const t=e.type;return mt(t)&&t!==Oy&&t!==zy&&(e.scheme||e.range&&e.range.length&&e.range.every(Be))}function yD(e,t,n){if(!e.domain)return 0;n=ev(n);var r=wD(e,t.domainRaw,n);if(r>-1)return r;var i=t.domain,o=e.type,s=t.zero||t.zero===void 0&&dD(e),a,u;return i?(Jw(o)&&t.padding&&i[0]!==An(i)&&(i=vD(o,i,t.range,t.padding,t.exponent,t.constant)),(s||t.domainMin!=null||t.domainMax!=null||t.domainMid!=null)&&(a=(i=i.slice()).length-1||1,s&&(i[0]>0&&(i[0]=0),i[a]<0&&(i[a]=0)),t.domainMin!=null&&(i[0]=t.domainMin),t.domainMax!=null&&(i[a]=t.domainMax),t.domainMid!=null&&(u=t.domainMid,(u<i[0]||u>i[a])&&n.warn("Scale domainMid exceeds domain min or max.",u),i.splice(a,0,u))),e.domain(nv(o,i,n)),o===G0&&e.unknown(t.domainImplicit?l0:void 0),t.nice&&e.nice&&e.nice(t.nice!==!0&&Xw(e,t.nice)||null),i.length):0}function wD(e,t,n){return t?(e.domain(nv(e.type,t,n)),t.length):-1}function vD(e,t,n,r,i,o){n??(n=[0,1]);var s=Math.abs(An(n)-n[0]),a=s/(s-2*r),u=e===Yr?u1(t,null,a):e===Ja?Jh(t,null,a,.5):e===Ka?Jh(t,null,a,i||1):e===af?tS(t,null,a,o||1):l1(t,null,a);return t=t.slice(),t[0]=u[0],t[t.length-1]=u[1],t}function nv(e,t,n){if(qy(e)){var r=Math.abs(t.reduce(function(i,o){return i+(o<0?-1:o>0?1:0)},0));r!==t.length&&n.warn("Log scale domain includes zero: "+td(t))}return t}function AD(e,t,n){let r=t.bins;if(r&&!vt(r)){const i=(r.start==null||r.stop==null)&&e.domain(),o=r.start==null?i[0]:r.start,s=r.stop==null?An(i):r.stop,a=r.step;a||it("Scale bins parameter missing step property."),r=xa(o,s+a,a)}return r?e.bins=r:e.bins&&delete e.bins,e.type===V0&&(r?!t.domain&&!t.domainRaw&&(e.domain(r),n=r.length):e.bins=e.domain()),n}function xD(e,t,n){var r=e.type,i=t.round||!1,o=t.range;if(t.rangeStep!=null)o=ED(r,t,n);else if(t.scheme&&(o=_D(r,t,n),nn(o))){if(e.interpolator)return e.interpolator(o);it(`Scale type ${r} does not support interpolating color schemes.`)}if(o&&uf(r))return e.interpolator(cf(hp(o,t.reverse),t.interpolate,t.interpolateGamma));o&&t.interpolate&&e.interpolate?e.interpolate(Wy(t.interpolate,t.interpolateGamma)):nn(e.round)?e.round(i):nn(e.rangeRound)&&e.interpolate(i?Qa:Wr),o&&e.range(hp(o,t.reverse))}function ED(e,t,n){e!==Hy&&e!==H0&&it("Only band and point scales support rangeStep.");var r=(t.paddingOuter!=null?t.paddingOuter:t.padding)||0,i=e===H0?1:(t.paddingInner!=null?t.paddingInner:t.padding)||0;return[0,t.rangeStep*z0(n,i,r)]}function _D(e,t,n){var r=t.schemeExtent,i,o;return vt(t.scheme)?o=cf(t.scheme,t.interpolate,t.interpolateGamma):(i=t.scheme.toLowerCase(),o=$0(i),o||it(`Unrecognized scheme name: ${t.scheme}`)),n=e===Gy?n+1:e===V0?n-1:e===U0||e===Uy?+t.schemeCount||hD:n,uf(e)?rv(o,r,t.reverse):nn(o)?lI(rv(o,r),n):e===G0?o:o.slice(0,n)}function rv(e,t,n){return nn(e)&&(t||n)?aI(e,hp(t||[0,1],n)):e}function hp(e,t){return t?e.slice().reverse():e}const iv=xt(",d");function SD(e,t){return e.chrom+":"+iv(Math.floor(e.pos+1))+"-"+(e.chrom!=t.chrom?t.chrom+":":"")+iv(Math.ceil(t.pos))}const ov={dm6:`chr3R 32079331
372
372
  chr3L 28110227
373
373
  chr2R 25286936
374
374
  chrX 23542271
@@ -489,12 +489,12 @@ chr18 90702639
489
489
  chr19 61431566
490
490
  chrX 171031299
491
491
  chrY 91744698
492
- chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e}`);return lv[e].split(`
493
- `).map(t=>{const n=t.split(" ");return{name:n[0],size:parseInt(n[1])}})}const IR=/^([A-Za-z]+:)?\/\//;function wl(e,t){if(t&&IR.test(t))return t;const n=typeof e=="function"?e():e;if(!n)return t;if(!t)return n;if(/[#?]/.test(n))throw new Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);return uv(n)+t}function uv(e){const t=e.replace(/[^/]*$/,"");return t===""?void 0:t.endsWith("://")?e+"/":t}class BR{constructor(t){if(this.config={name:"custom",...t},"baseUrl"in t)throw new Error("The `baseUrl` property in genome config has been removed in GenomeSpy v0.52.0. Use `url` instead. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.");if(!sp(t))throw new Error("Not a genome configuration: "+JSON.stringify(t));if(this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,fv(this.config))this.setChromSizes(this.config.contigs);else if(!lp(this.config)){const n=TR(this.config.name);if(n)this.setChromSizes(n);else throw new Error(`Unknown genome: ${this.config.name}. Please provide contigs or a URL. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.`)}}get name(){return this.config.name}async load(t){if(lp(this.config))try{const n=wl(t,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(DR(await r.text()))}catch(n){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${n.message}`)}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,o={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(o);const a=o.name.replace(/^chr/i,"");for(const s of["chr"+a,"CHR"+a,"Chr"+a,o.number,""+o.number,a,o.name])this.cumulativeChromPositions.set(s,n),this.chromosomesByName.set(s,o);n+=o.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Pr(this.startByIndex,t)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(t){const n=this.toChromosome(t);if(n)return{chrom:n.name,pos:Math.floor(t)-n.continuousStart}}getChromosome(t){return this.chromosomesByName.get(t)}formatInterval(t){return kR(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const o=this.chromosomes.findIndex(s=>s.name===n.chrom),a=this.chromosomes.findIndex(s=>s.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[o].size});for(let s=o+1;s<a;s++)i.push({chrom:this.chromosomes[s].name,startPos:0,endPos:this.chromosomes[s].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(s=>s===void 0)){const s=this.getChromosome(r);return s?[s.continuousStart,s.continuousEnd]:void 0}const i=n[3]||r,o=parseInt(n[2].replace(/,/g,"")),a=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):o;return[this.toContinuous(r,o-1),this.toContinuous(i,a)]}}}function DR(e){return HS(e).map(([t,n])=>({name:t,size:parseInt(n)}))}function cv(e){return At(e)&&"chrom"in e}function RR(e){return e.every(cv)}function sp(e){return At(e)&&("name"in e||lp(e)||fv(e))}function lp(e){return sp(e)&&"url"in e}function fv(e){return sp(e)&&"contigs"in e}class vl extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof vl&&t.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${t.type}`);for(const n of t)this.extend(n);return this}extendAllWithAccessor(t,n){for(const r of t)this.extend(n(r));return this}}class up extends vl{constructor(){super(),this.type="quantitative"}extend(t){return t==null||Number.isNaN(t)?this:(t=+t,this.length?t<this[0]?this[0]=t:t>this[1]&&(this[1]=t):(this.push(t),this.push(t)),this)}}class hv extends vl{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(t){return t==null||Number.isNaN(t)?this:(this.uniqueValues.has(t)||(this.uniqueValues.add(t),this.push(t)),this)}}class dv extends hv{constructor(){super(),this.type="nominal"}}class FR extends vl{constructor(t){super();let n=0;for(let r=1;r<t.length;r++)n+=Math.sign(t[r]-t[r-1]);if(Math.abs(n)!=t.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(t));t.forEach(r=>this.push(r))}extend(t){if(this.includes(t))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const pv={quantitative:up,index:up,locus:up,nominal:dv,ordinal:hv};function gv(e,t){if(e=="quantitative"&&MR(t)){const n=new FR(t);return n.type=e,n}else if(pv[e]){const n=new pv[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function MR(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function PR(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function LR(e,t,n){return e*Math.pow(t/e,n)}Se("index",op,["continuous"]),Se("locus",rR,["continuous"]),Se("null",Q0,[]);const mv="quantitative",bv="ordinal",yv="nominal",wv="locus",NR="index";class OR{constructor(t){Z(this,Au);Z(this,Eu);Z(this,Dn);Z(this,_u);Z(this,Rh);Z(this,Fh);Z(this,Su);Z(this,Cu);Z(this,Ya);Z(this,ku);Z(this,_r);Z(this,Tu);Z(this,Mh);Z(this,Er,void 0);Z(this,Za,{domain:new Set,range:new Set});Z(this,en,void 0);Z(this,xu,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){z(this,Za)[t].add(n)}removeEventListener(t,n){z(this,Za)[t].delete(n)}addMember(t){var a;const{channel:n,channelDef:r}=t,i=r.type,o=(a=r==null?void 0:r.scale)==null?void 0:a.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!this.type)this.type=i;else if(i!==this.type&&!Tw(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push(t)}getDataDomain(){return this.members.map(t=>{var n;return(n=t.dataDomainSource)==null?void 0:n.call(t,t.channel,this.type)}).filter(t=>!!t).reduce((t,n)=>t.extendAll(n))}reconfigure(){const t=z(this,en);if(!t||t.type=="null")return;const n=X(this,Rh,O_).call(this),r=t.domain(),i=X(this,Su,Hm).call(this,!0);if(iv({...i,range:void 0},t),t.props=i,X(this,Cu,Vm).call(this),bt(t.type)&&le(this,Er,X(this,Tu,$m).call(this)),!n){X(this,Dn,Rr).call(this,"domain");return}const o=t.domain();Cd(o,r)||(this.isZoomable()?t.domain(r):X(this,_r,Fo).call(this)?(t.domain(r),this.zoomTo(o,500)):X(this,Dn,Rr).call(this,"domain"))}get scale(){if(z(this,en))return z(this,en);const t=X(this,Su,Hm).call(this),n=bR({...t,range:void 0});n.props=t,"unknown"in n&&n.unknown(null),le(this,en,n),X(this,Cu,Vm).call(this),iR(n)&&n.genome(this.getGenome()),bt(n.type)&&le(this,Er,X(this,Tu,$m).call(this));const r=n.range;if(r){const i=()=>X(this,Dn,Rr).call(this,"range");n.range=function(o){if(arguments.length)r(o),i();else return r()},i()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return X(this,_r,Fo).call(this)&&Cd(X(this,Ya,qh).call(this),this.getDomain())}isZoomable(){return X(this,_r,Fo).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!X(this,_r,Fo).call(this))return!1;const i=this.scale,o=i.domain();let a=[...o],s=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(s+=i.align()),i.type){case"linear":case"index":case"locus":a=tS(a,r||0),a=i1(a,s,t);break;case"log":a=nS(a,r||0),a=o1(a,s,t);break;case"pow":case"sqrt":{const u=i;a=rS(a,r||0,u.exponent()),a=Xh(a,s,t,u.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return z(this,Er)&&(a=oS(a,z(this,Er)[0],z(this,Er)[1])),[0,1].some(u=>a[u]!=o[u])?(i.domain(a),X(this,Dn,Rr).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){if(cs(n)&&(n=n?700:0),!X(this,_r,Fo).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=z(this,Eu,Um).animator,o=this.scale,a=o.domain();if(n>0&&a.length==2){const s=a[1]-a[0],u=r[1]-r[0],l=a[0]+s/2,c=r[0]+u/2,f=a[0]==r[0],h=a[1]==r[1];await i.transition({duration:n,easingFunction:PR,onUpdate:d=>{const p=LR(s,u,d),m=s==u?d:(s-p)/(s-u),y=m*c+(1-m)*l,w=[f?a[0]:y-p/2,h?a[1]:y+p/2];o.domain(w),X(this,Dn,Rr).call(this,"domain")}}),o.domain(r),X(this,Dn,Rr).call(this,"domain")}else o.domain(r),i==null||i.requestRender(),X(this,Dn,Rr).call(this,"domain")}resetZoom(){if(!X(this,_r,Fo).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=X(this,Ya,qh).call(this);return[0,1].some(r=>n[r]!=t[r])?(z(this,en).domain(n),X(this,Dn,Rr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?ic(z(this,Er))/ic(this.scale.domain()):1}getGenome(){var n;if(this.type!=="locus")return;const t=(n=z(this,Eu,Um).genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.scale;if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return cv(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&RR(t)?this.getGenome().toContinuousInterval(t):t}}Er=new WeakMap,Za=new WeakMap,en=new WeakMap,xu=new WeakMap,Au=new WeakSet,zm=function(){return this.members[0].view},Eu=new WeakSet,Um=function(){return z(this,Au,zm).context},Dn=new WeakSet,Rr=function(t){for(const n of z(this,Za)[t].values())n({type:t,scaleResolution:this})},_u=new WeakSet,Gm=function(){return!!X(this,ku,jm).call(this)},Rh=new WeakSet,O_=function(){const t=z(this,en);if(!t)return!1;const n=t.domain();return bt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Fh=new WeakSet,z_=function(){const t=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return Ef(t,"scale",["domain"])},Su=new WeakSet,Hm=function(t=!1){const n=X(this,Fh,z_).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...X(this,Mh,U_).call(this,this.type),...n};r.type||(r.type=zR(this.channel,this.type));const i=X(this,Ya,qh).call(this,t);return i&&i.length>0?r.domain=i:Xr(r.type)&&(r.domain=new dv),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Xr(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),UR(r,this.channel),r},Cu=new WeakSet,Vm=function(){const t=z(this,en).props,n=t.range;if(z(this,xu).forEach(i=>i.invalidate()),!n||!xt(n))return;const r=(i,o)=>o?i.slice().reverse():i;if(n.some(Dt)){let i;const o=()=>{z(this,en).range(r(i.map(a=>a()),t.reverse))};i=n.map(a=>{if(Dt(a)){const s=z(this,Au,zm).paramMediator.createExpression(a.expr);return s.addListener(o),z(this,xu).add(s),()=>s(null)}else return()=>a}),o()}else z(this,en).range(r(n,t.reverse))},Ya=new WeakSet,qh=function(t=!1){return X(this,ku,jm).call(this)??(this.type==wv?this.getGenome().getExtent():t?this.getDataDomain():[])},ku=new WeakSet,jm=function(){const t=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>gv(n.type,this.fromComplexInterval(n.scale.domain)));if(t.length>0)return t.reduce((n,r)=>n.extendAll(r))},_r=new WeakSet,Fo=function(){const t=this.scale.type;return bt(t)},Tu=new WeakSet,$m=function(){const t=this.scale.props,n=t.zoom;if(GR(n)&&xt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():z(this,en).domain()},Mh=new WeakSet,U_=function(t){const n=this.channel,r={};return X(this,_u,Gm).call(this)&&(r.zero=!1),fl(n)?r.nice=!X(this,_u,Gm).call(this):ni(n)?r.scheme=t==yv?"tableau10":t==bv?"blues":"viridis":yf(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r};function zR(e,t){if(t==NR||t==wv){if(Sw(e))return t;throw new Error(`${e} does not support ${t} data type. Only positional channels do.`)}const n={x:["band","band","linear"],y:["band","band","linear"],size:[void 0,"point","linear"],opacity:[void 0,"point","linear"],fillOpacity:[void 0,"point","linear"],strokeOpacity:[void 0,"point","linear"],color:["ordinal","ordinal","linear"],fill:["ordinal","ordinal","linear"],stroke:["ordinal","ordinal","linear"],strokeWidth:[void 0,void 0,"linear"],shape:["ordinal","ordinal",void 0],dx:[void 0,void 0,"null"],dy:[void 0,void 0,"null"],angle:[void 0,void 0,"linear"]},i=["sample"].includes(e)?"null":n[e]?n[e][[yv,bv,mv].indexOf(t)]:t==mv?"linear":"ordinal";if(i===void 0)throw new Error(`Channel "${e}" is not compatible with "${t}" data type. Use of a proper scale may be needed.`);return i}function UR(e,t){fl(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&bt(e.type)&&(e.clamp=!0)}function GR(e){return At(e)}function cp(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Nt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function fp(...e){for(const t of e)if(t!==void 0)return t}class HR{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=Os(this.members))==null?void 0:t.view.getScaleResolution(this.channel)}addMember(t){const{view:n}=t,r=n.getScaleResolution(this.channel);if(!r)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&r!==this.scaleResolution)throw new Error(`Shared axes must have a shared scale! Channel: ${this.channel}, existing views: [${this.members.map(i=>i.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.members.push(t)}getAxisProps(){return vf(this,"axisProps",()=>{const t=this.members.map(n=>{const r=n.view.mark.encoding[n.channel];return"axis"in r&&r.axis});return t.length>0&&t.some(n=>n===null)?null:Ef(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=o=>{var s;const a=UB(o.view,o.channel);if(!an(a))return{member:o,explicitTitle:fp("axis"in a?(s=a.axis)==null?void 0:s.title:void 0,a.title),implicitTitle:fp(ti(a)?a.field:void 0,cl(a)?a.expr:void 0)}},n=this.members.map(t),r=n.filter(o=>{var a;if(Tw(o.member.channel)&&!o.explicitTitle){const s=Ki(o.member.channel);return((a=n.find(u=>u.member.view==o.member.view&&u.member.channel==s))==null?void 0:a.explicitTitle)===void 0}return!0}),i=new Set(r.map(o=>fp(o.explicitTitle,o.implicitTitle)).filter(Be));return i.size?[...i].join(", "):null}}function vv(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:o}={}){n=n||0,i=i||0;let a=0,s=0;for(const p of e)a+=_f(p.px)+(hp(p)?0:n),s+=_f(p.grow);a-=n;const u=Math.max(0,t-a),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,c=[],f=[],h=p=>{const m=c.length;if(!m)return;const y=(p?n:0)*(o?-1:1);d-=y;for(let w=0;w<m;w++)f.push({location:d+(w+1)/(m+1)*y,size:0});d+=y,c.length=0};let d=o?Math.max(t,a):0+i;if(e.length==1&&hp(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const m=e[p];if(hp(m))c.push(m);else{h(f.length>0);const y=_f(m.px)+(s?_f(m.grow)/s*u:0);o&&(d-=y),f.push({location:l(d),size:l(y)}),o?d-=n:d+=y+n}}return d+=o?n:-n,h(!1),f}function VR(e){let t=0,n=0;for(const r of e)t=Math.max(t,r.px??0),n=Math.max(n,r.grow??0);return{px:t,grow:n}}const Rm=class Rm{constructor(t,n){Z(this,Iu);this.width=t,this.height=n}addPadding(t){return X(this,Iu,qm).call(this,t.width,t.height)}subtractPadding(t){return X(this,Iu,qm).call(this,-t.width,-t.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};Iu=new WeakSet,qm=function(t,n){return new Rm({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let ri=Rm;const xl=Object.freeze({px:0,grow:0}),xv=new ri(xl,xl);function hp(e){return!e.px&&!e.grow}function _f(e){return e||0}function jR(e){return e&&(Tt(e.px)||Tt(e.grow))}function Av(e){if(Sv(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(jR(e))return e;if(Tt(e))return{px:e,grow:0};if(e==="container")return{px:0,grow:1};if(!e)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${e}`)}class Ct{constructor(t,n,r,i){this.top=t||0,this.right=n||0,this.bottom=r||0,this.left=i||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(t){return t<=0?this:new Ct(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Ct(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Ct(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Ct(Math.max(this.top,t.top),Math.max(this.right,t.right),Math.max(this.bottom,t.bottom),Math.max(this.left,t.left))}getHorizontal(){return new Ct(0,this.right,0,this.left)}getVertical(){return new Ct(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(t){return typeof t=="number"?this.createUniformPadding(t):t?this.createFromRecord(t):dp}static createFromRecord(t){return new Ct(t.top,t.right,t.bottom,t.left)}static zero(){return dp}static createUniformPadding(t){return new Ct(t,t,t,t)}}const dp=Ct.createUniformPadding(0);Object.freeze(dp);function Al(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function $R(e){if(!e)return e;if(/[?#]/.test(e))throw new Error(`Invalid base URL: ${e} - cannot contain query or hash.`);return e.endsWith("/")?e:e+"/"}const qR="VISIT_SKIP",El="VISIT_STOP",Ev=e=>e;class _v{constructor(t,n,r,i,o,a={}){Z(this,So);Z(this,Mu);Z(this,Qa,{});Z(this,Bu,{});Z(this,Du,{});Z(this,Ru,void 0);Z(this,Fu,void 0);Pt(this,"opacityFunction",Ev);Pt(this,"facetCoords",new or([],JSON.stringify));var s;if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||o,this.spec=t,this.resolutions={scale:{},axis:{}},$w(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...a},this.needsAxes={x:!1,y:!1},this.paramMediator=new FB(()=>{var u;return(u=this.dataParent)==null?void 0:u.paramMediator}),t.params)for(const u of t.params)this.paramMediator.registerParam(u);if(!((s=this.layoutParent)!=null&&s.options.layeredChildren)){const u=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);le(this,Fu,u("height")),le(this,Ru,u("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Ct.createFromConfig(this.spec.padding))}getOverhang(){return Ct.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new ri(X(this,So,Ku).call(this,"width"),X(this,So,Ku).call(this,"height")):xv)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return xv;const t=this.getSize();return new ri(X(this,So,Ku).call(this,"viewportWidth")??t.width,X(this,So,Ku).call(this,"viewportHeight")??t.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(t=>t.isConfiguredVisible())}getEffectiveOpacity(){var t;return this.opacityFunction(((t=this.layoutParent)==null?void 0:t.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(t=>t.name).reverse().join("/")}getLayoutAncestors(){return X(this,Mu,Wm).call(this,"layoutParent")}getDataAncestors(){return X(this,Mu,Wm).call(this,"dataParent")}handleBroadcast(t){for(const n of z(this,Qa)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=z(this,Qa)[t];r||(r=[],z(this,Qa)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?z(this,Bu):z(this,Du);for(const o of i[n.type]||[])o(t,n)}addInteractionEventListener(t,n,r){const i=r?z(this,Bu):z(this,Du);let o=i[t];o||(o=[],i[t]=o),o.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==El)return n}catch(n){throw n.view=this,n}}getDescendants(){const t=[];return this.visit(n=>{t.push(n)}),t}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===Ev)&&(this.opacityFunction=ZR(this))}onBeforeRender(){}render(t,n,r={}){var i,o;r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n),(i=z(this,Ru))==null||i.call(this,n.width),(o=z(this,Fu))==null||o.call(this,n.height)}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,o]of Object.entries(r))o===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return ti(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Ki(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Ki(t);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(t,n){var r,i;return(i=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:i[t]}getConfiguredOrDefaultResolution(t,n){return this.getConfiguredResolution(t,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(t,n)}getDefaultResolution(t,n){return"independent"}getBaseUrl(){return wl(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},$R(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Be(t)?t:Dt(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return vf(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":xf(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())xf(r,t);break;case"progeny":this.visit(r=>xf(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Qa=new WeakMap,Bu=new WeakMap,Du=new WeakMap,Ru=new WeakMap,Fu=new WeakMap,So=new WeakSet,Ku=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(Sv(n)){if(r)throw new eo(`Cannot use step-based size with "${t}"!`,this);const o=n.step,a=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(a){let s=0;if(Xr(a.type))s=a.domain().length;else if(["locus","index"].includes(a.type)){const l=a.domain();s=Os(l)-l[0]}else throw new eo(`Cannot use step-based size with "${a.type}" scale!`,this);const u=a;return s=F0(s,u.paddingInner(),u.paddingOuter()),{px:s*o,grow:0}}else throw new eo("Cannot use 'step' size with missing scale!",this)}else return(n&&Av(n))??(r?void 0:{px:0,grow:1})},Mu=new WeakSet,Wm=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function WR(e){return"unitsPerPixel"in e}function ZR(e){const t="opacity"in e.spec?e.spec.opacity:void 0;if(t!==void 0){if(Tt(t))return n=>n*t;if(WR(t)){const n=o=>{var s;const a=(s=e.getScaleResolution(o))==null?void 0:s.scale;if(["linear","index","locus"].includes(a==null?void 0:a.type))return a},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new eo("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=S0().domain(t.unitsPerPixel).range(t.values).clamp(!0);return o=>{const s=ic(r.domain())/1e3;return i(s)*o}}else if(Dt(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const Sv=e=>!!(e!=null&&e.step),YR={point:zD,rect:FD,rule:VD,link:QD,text:nR};class Qt extends _v{constructor(n,r,i,o,a,s){super(n,r,i,o,a,s);Z(this,Ph);Z(this,Pu,void 0);this.spec=n;const u=YR[this.getMarkType()];if(u)this.mark=new u(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),le(this,Pu,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var c;return(c=this.getScaleResolution(l))==null?void 0:c.addEventListener("domain",()=>z(this,Pu).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},X(this,Ph,G_).call(this)}render(n,r,i={}){super.render(n,r,i),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,i),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(n){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[i,o]of Object.entries(r)){if(!Yt(o))continue;const a=Ki(o.resolutionChannel??i);if(!hl(a)||n=="axis"&&!fl(a))continue;let s=this;for(;(s.getConfiguredOrDefaultResolution(a,n)=="forced"||s.dataParent&&["shared","excluded","forced"].includes(s.dataParent.getConfiguredOrDefaultResolution(a,n)))&&s.getConfiguredOrDefaultResolution(a,n)!="excluded";)s=s.dataParent;if(n=="axis"&&fl(i)&&Sw(a))s.resolutions[n][a]||(s.resolutions[n][a]=new HR(a)),s.resolutions[n][a].addMember({view:this,channel:i,channelDef:o});else if(n=="scale"&&hl(i)){if(!s.resolutions[n][a]){const l=new OR(a);s.resolutions[n][a]=l,l.addEventListener("range",c=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(c.scaleResolution,!0)})}const u=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||Yt(o)&&o.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);s.resolutions[n][a].addMember({view:this,channel:i,channelDef:o,dataDomainSource:u})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var o;let i=gv(r);return(((o=this.mark.encoders[n])==null?void 0:o.accessors)??[]).filter(a=>a.scaleChannel).forEach(a=>{if(a.constant)i.extend(a({}));else{const s=this.getCollector();s!=null&&s.completed&&s.visitData(u=>i.extend(a(u)))}}),i}getZoomLevel(){const n=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return sa.map(n).reduce((r,i)=>r*i,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}Pu=new WeakMap,Ph=new WeakSet,G_=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const i=r.select;if((Be(i)?i:i.type)==="point"){let s=-1;const u=this.paramMediator.getSetter(n),l=()=>{var h;const f=this.context.getCurrentHover();return((h=f==null?void 0:f.mark)==null?void 0:h.unitView)===this?f.datum:null},c=!Be(i)&&"on"in i?i.on:"click";this.addInteractionEventListener(["mouseover","pointerover"].includes(c)?"mousemove":"click",(f,h)=>{const d=l(),p=d?d[ei]:-1;if(p!=s){s=p;const m=yw(l());u(m)}})}}};function*pp(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of pp(r,[...t,n]))yield i;else yield[[...t,n],r]}const Cv=2147483647,QR=kv([Cv]);function kv(e){let t=0;for(let n=0,r=e.length;n<r;n++)t=Math.max(t,e[n]);return Math.floor(Math.log2(t)/4)+1}function XR(e){const t=kv(e);let n=Array.from({length:e.length},(o,a)=>a),r=new Array(e.length);const i=new Array(16);for(let o=0;o<t;o++){i.fill(0);const a=o*4,s=Math.pow(16,o),u=l=>{const c=e[n[l]];return o>=QR?c>Cv?Math.floor(c/s)%16:0:c>>a&15};for(let l=0;l<e.length;l++)i[u(l)]++;for(let l=1;l<16;l++)i[l]+=i[l-1];for(let l=e.length-1;l>=0;l--)r[--i[u(l)]]=n[l];[n,r]=[r,n]}return n}class Tv extends et{constructor(n){super();Z(this,Nu);Z(this,Ou);Z(this,zu);Z(this,Lh);Z(this,Sr,[]);Z(this,Lu,Me(ei));Z(this,Co,[]);Z(this,ko,void 0);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new or([],JSON.stringify),X(this,Nu,Zm).call(this)}get behavior(){return Z0}reset(){super.reset(),X(this,Nu,Zm).call(this)}handle(n){z(this,Sr).push(n)}beginBatch(n){kB(n)&&(le(this,Sr,[]),this.facetBatches.set(Nt(n.facetId),z(this,Sr)))}complete(){var o,a;le(this,Sr,[]);const n=(o=this.params)==null?void 0:o.sort,r=n?a1(n.field,n.order):void 0,i=s=>{r&&s.sort(r)};if((a=this.params.groupby)!=null&&a.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const s=this.facetBatches.get(void 0),u=this.params.groupby.map(c=>Me(c)),l=u.length>1?cc(s,...u):KR(s,u[0]);this.facetBatches.clear();for(const[c,f]of pp(l))this.facetBatches.set(c,f)}for(const s of this.facetBatches.values())i(s);X(this,Lh,H_).call(this),X(this,Ou,Ym).call(this),super.complete();for(const s of this.observers)s(this)}repropagate(){for(const n of this.children)n.reset();X(this,Ou,Ym).call(this);for(const n of this.children)n.complete()}getData(){switch(X(this,zu,Qm).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of n.values())yield*i}}}}}visitData(n){X(this,zu,Qm).call(this);for(const r of this.facetBatches.values())for(let i=0;i<r.length;i++)n(r[i])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}findDatumByUniqueId(n){if(!z(this,Co).length)return;const r=zo(u=>u.start).right,i=z(this,Lu),o=zo(u=>i(a(u))).left,a=u=>{const l=r(z(this,ko),u),c=z(this,ko)[l-1];return!c||u>=c.stop?void 0:this.facetBatches.get(c.facetId)[u-c.start]},s=o(z(this,Co),n);if(s>=0){const u=a(z(this,Co)[s]);if(u&&i(u)===n)return u}}}Sr=new WeakMap,Lu=new WeakMap,Co=new WeakMap,ko=new WeakMap,Nu=new WeakSet,Zm=function(){le(this,Sr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,z(this,Sr))},Ou=new WeakSet,Ym=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const i={type:"facet",facetId:n};for(const o of this.children)o.beginBatch(i)}for(let i=0,o=r.length;i<o;i++)this._propagate(r[i])}},zu=new WeakSet,Qm=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Lh=new WeakSet,H_=function(){var a;le(this,ko,[]);const n=(a=this.facetBatches.values().next().value)==null?void 0:a[0];if(n==null||!(ei in n))return;let r=0;const i=[],o=z(this,Lu);for(const[s,u]of this.facetBatches){z(this,ko).push({start:r,stop:r+u.length,facetId:s}),r+=u.length;for(let l=0,c=u.length;l<c;l++)i.push(o(u[l]))}le(this,Co,XR(i))};function KR(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const o=e[r],a=t(o);let s=n.get(a);s||(s=[],n.set(a,s)),s.push(o)}return n}class Sf{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,o=this.values[i];if(n>=o)break;this.ids[r]=this.ids[i],this.values[r]=o,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let o=0;for(;o<i;){let a=(o<<1)+1;const s=a+1;let u=this.ids[a],l=this.values[a];const c=this.values[s];if(s<this.length&&c<l&&(a=s,u=this.ids[s],l=c),l>=r)break;this.ids[o]=u,this.values[o]=l,o=a}this.ids[o]=n,this.values[o]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class JR extends et{get behavior(){return jn}constructor(t){super(),this.params=t,this.startAccessor=Me(t.start),this.endAccessor=Me(t.end),this.chromAccessor=t.chrom?Me(t.chrom):n=>{},this.weightAccessor=t.weight?Me(t.weight):n=>1,this.as={coverage:t.as??"coverage",start:t.asStart??t.start,end:t.asEnd??t.end,chrom:t.asChrom??t.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new Sf}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,o=this.endAccessor,a=this.chromAccessor,s=this.weightAccessor;let u,l,c,f=0,h=NaN;const d=this.ends;d.clear();const p=w=>{this._propagate(w),u=null},m=(w,A,S)=>{if(w==A)return;let _=!1;u&&(u[t]===S?(u[n]=A,_=!0):u[t]!=0&&p(u)),_||(u=this.createSegment(w,A,S,c))},y=()=>{let w=0;for(;(w=d.peekValue())!==void 0;)m(h,w,f),h=w,f-=d.pop();h=NaN,u&&p(u)};this.handle=w=>{const A=i(w);let S=0;for(;(S=d.peekValue())!==void 0&&S<A;)m(h,S,f),h=S,f-=d.pop();if(r){let k=a(w);k!==l&&(y(),c=k,l=c)}isNaN(h)||m(h,A,f),h=A;const _=s(w);f+=_,d.push(_,o(w))},this.complete=()=>{y(),super.complete()},this.beginBatch=w=>{y(),l=null,super.beginBatch(w)}}}function eF(e,t,n=0,r=e.length){const i=new Sf,o=r-n;let a;for(a=0;a<t&&a<o;a++)i.push(a,e[n+a]);for(;a<o;a++){const l=e[n+a];l>=i.peekValue()&&(i.push(a,l),i.pop())}const s=[];let u;for(;(u=i.pop())!==void 0;)s.push(n+u);return s.reverse()}class tF{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const o=this._findSlot(t,n,i);return o>=0?o:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,o=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[o]=n,this.upperLimits[o]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=o,!0}}class nF extends et{get behavior(){return Z0}constructor(t,n){if(super(),this.params=t,this._data=[],this.channel=t.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.posAccessor=Me(this.params.pos),this.posBisector=zo(this.posAccessor),this.scoreAccessor=Me(this.params.score),this.widthAccessor=Me(this.params.width),this.laneAccessor=this.params.lane?Me(this.params.lane):i=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",i=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const t=this.posAccessor;this._data.sort((n,r)=>t(n)-t(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new tF(200));this.schedule(),super.complete()}_filterAndPropagate(){var a;super.reset();const t=this.resolution.scale,n=(a=this.resolution.members[0].view.coords)==null?void 0:a[this.channel=="x"?"width":"height"];if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),i=70,o=eF(this._scores,i,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of o){const u=this._data[s],l=t(this.posAccessor(u))*n,c=this.widthAccessor(u)/2+this.padding;this.reservationMaps.get(this.laneAccessor(u)).reserve(l-c,l+c)&&this._propagate(u)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class rF extends et{constructor(t,n){super(n),this.params=t,this.predicate=void 0}initialize(){let t="";if(iF(this.params))t=this.params.expr;else if(oF(this.params))t=ww(this.params);else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(t),this.predicate.addListener(()=>this.repropagate())}handle(t){this.predicate(t)&&this._propagate(t)}}function iF(e){return"expr"in e}function oF(e){return"param"in e}class aF extends et{get behavior(){return jn}constructor(t){super();const n=t.index;if(t.fields){const r=Nt(t.fields).map(o=>Me(o)),i=Nt(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=o=>{const a=r.map((u,l)=>u(o)??[]),s=a[0].length;for(let u=0;u<s;u++){const l=Object.assign({},o);for(let c=0;c<r.length;c++)l[i[c]]=u<a[c].length?a[c][u]:null;n&&(l[n]=u),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const o=Object.assign({},r[i]);n&&(o[n]=i),this._propagate(o)}}}}const sF="0".charCodeAt(0);function*lF(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);o==n?(yield r,r=0):r=r*10+o-sF}yield r}class uF extends et{get behavior(){return jn}constructor(t){super();const n=Me(t.exons??"exons"),r=Me(t.start??"start"),[i,o]=t.as||["exonStart","exonEnd"];this.handle=a=>{let s=r(a),u=s,l=!0;const c=n(a);for(const f of lF(c)){if(l)u=s+f;else{s=u+f;const h=Object.assign({},a);h[i]=u,h[o]=s,this._propagate(h)}l=!l}}}}class cF extends et{get behavior(){return jn}constructor(t){super();const n=Nt(t.field).map(o=>Me(o)),r=Nt(t.separator),i=Nt(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=o=>{if(n.some(u=>!u(o)))return;const a=n.map((u,l)=>u(o).split(r[l]));fF(a,o);const s=a[0].length;for(let u=0;u<s;u++){const l=Object.assign({},o);for(let c=0;c<n.length;c++)l[i[c]]=a[c][u];this._propagate(l)}}}}function fF(e,t){const n=e.map(r=>r.length);if(!n.every(r=>r==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(t))}class hF extends et{get behavior(){return Jr}constructor(t,n){super(n),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class Iv extends et{get behavior(){return Jr}constructor(t,n){super();const r=t.channel??"x";if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=Me(t.chrom),a=Nt(t.pos).map(p=>Me(p)),s=Nt(t.as);if(a.length!=s.length)throw new Error('The number of "pos" and "as" elements must be equal!');const u=Nt(t.offset);let l;if(u.length==0)l=new Array(a.length).fill(0);else if(u.length==1)l=new Array(a.length).fill(u[0]);else if(u.length==a.length)l=u;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const c=new Function("datum","chromOffset","posAccessors",s.map((p,m)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${m}](datum) - ${l[m]};`).join(`
494
- `));let f,h=0;const d=p=>{if(p!==f){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);f=p}return h};this.handle=p=>{c(p,d(o(p)),a),this._propagate(p)}}}const Bv={pages:["Lato-Regular.png"],chars:[{id:87,width:53,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:43.491,chnl:15,x:0,y:0,page:0},{id:124,width:17,height:50,xoffset:0,yoffset:-32.193000000000005,xadvance:10.521,chnl:15,x:0,y:42,page:0},{id:40,width:20,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:94,page:0},{id:41,width:19,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:145,page:0},{id:36,width:32,height:49,xoffset:0,yoffset:-34.419000000000004,xadvance:24.360000000000003,chnl:15,x:0,y:196,page:0},{id:125,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:247,page:0},{id:91,width:22,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:297,page:0},{id:93,width:19,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:347,page:0},{id:123,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:397,page:0},{id:106,width:19,height:48,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:0,y:447,page:0},{id:81,width:43,height:47,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:21,y:447,page:0},{id:77,width:45,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:38.997,chnl:15,x:66,y:447,page:0},{id:64,width:43,height:44,xoffset:0,yoffset:-28.539,xadvance:35.133,chnl:15,x:23,y:397,page:0},{id:92,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:68,y:397,page:0},{id:47,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:98,y:397,page:0},{id:109,width:42,height:32,xoffset:0,yoffset:-21.609,xadvance:34.545,chnl:15,x:113,y:447,page:0},{id:119,width:42,height:31,xoffset:0,yoffset:-21.315,xadvance:32.991,chnl:15,x:157,y:447,page:0},{id:42,width:25,height:42,xoffset:0,yoffset:-31.626,xadvance:17.85,chnl:15,x:128,y:397,page:0},{id:37,width:42,height:41,xoffset:0,yoffset:-30.387,xadvance:33.663000000000004,chnl:15,x:155,y:397,page:0},{id:79,width:42,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:199,y:397,page:0},{id:102,width:24,height:41,xoffset:0,yoffset:-30.534000000000002,xadvance:14.721,chnl:15,x:243,y:397,page:0},{id:100,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:269,y:397,page:0},{id:98,width:32,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:302,y:397,page:0},{id:56,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:336,y:397,page:0},{id:38,width:40,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:29.904000000000003,chnl:15,x:370,y:397,page:0},{id:108,width:17,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:9.912,chnl:15,x:412,y:397,page:0},{id:107,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:21.336000000000002,chnl:15,x:431,y:397,page:0},{id:48,width:33,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:464,y:397,page:0},{id:71,width:38,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:30.681,chnl:15,x:21,y:347,page:0},{id:83,width:31,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:22.785,chnl:15,x:61,y:347,page:0},{id:63,width:27,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:18.795,chnl:15,x:94,y:347,page:0},{id:105,width:18,height:41,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:123,y:347,page:0},{id:51,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:143,y:347,page:0},{id:104,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.436,chnl:15,x:177,y:347,page:0},{id:67,width:37,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:28.056,chnl:15,x:210,y:347,page:0},{id:88,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.258000000000003,chnl:15,x:249,y:347,page:0},{id:68,width:40,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:31.941000000000003,chnl:15,x:288,y:347,page:0},{id:70,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:23.751,chnl:15,x:330,y:347,page:0},{id:34,width:23,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:15.561000000000002,chnl:15,x:364,y:347,page:0},{id:72,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:389,y:347,page:0},{id:73,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.760000000000002,chnl:15,x:429,y:347,page:0},{id:74,width:24,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:17.745,chnl:15,x:449,y:347,page:0},{id:75,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.825000000000003,chnl:15,x:24,y:297,page:0},{id:76,width:31,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:21.567,chnl:15,x:475,y:347,page:0},{id:66,width:35,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.153000000000002,chnl:15,x:64,y:297,page:0},{id:78,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:101,y:297,page:0},{id:33,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.298,chnl:15,x:141,y:297,page:0},{id:80,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.221,chnl:15,x:161,y:297,page:0},{id:65,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:197,y:297,page:0},{id:82,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.313000000000002,chnl:15,x:237,y:297,page:0},{id:35,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:275,y:297,page:0},{id:84,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.801000000000002,chnl:15,x:310,y:297,page:0},{id:85,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:30.891000000000002,chnl:15,x:346,y:297,page:0},{id:86,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:385,y:297,page:0},{id:39,width:16,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:8.568000000000001,chnl:15,x:425,y:297,page:0},{id:69,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.255000000000003,chnl:15,x:443,y:297,page:0},{id:89,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.208000000000002,chnl:15,x:23,y:247,page:0},{id:90,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.284000000000002,chnl:15,x:477,y:297,page:0},{id:49,width:31,height:40,xoffset:0,yoffset:-30.156000000000002,xadvance:24.360000000000003,chnl:15,x:61,y:247,page:0},{id:50,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:94,y:247,page:0},{id:57,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:128,y:247,page:0},{id:94,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:162,y:247,page:0},{id:96,width:21,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:16.8,chnl:15,x:196,y:247,page:0},{id:55,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:219,y:247,page:0},{id:54,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:254,y:247,page:0},{id:53,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:289,y:247,page:0},{id:52,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:323,y:247,page:0},{id:103,width:31,height:39,xoffset:0,yoffset:-21.630000000000003,xadvance:21.84,chnl:15,x:358,y:247,page:0},{id:112,width:32,height:39,xoffset:0,yoffset:-21.651,xadvance:23.541,chnl:15,x:391,y:247,page:0},{id:113,width:31,height:39,xoffset:0,yoffset:-21.651,xadvance:23.520000000000003,chnl:15,x:425,y:247,page:0},{id:116,width:25,height:39,xoffset:0,yoffset:-28.182000000000002,xadvance:15.057,chnl:15,x:458,y:247,page:0},{id:121,width:31,height:38,xoffset:0,yoffset:-21.273,xadvance:21.651,chnl:15,x:34,y:196,page:0},{id:59,width:18,height:36,xoffset:0,yoffset:-20.706,xadvance:10.983,chnl:15,x:485,y:247,page:0},{id:43,width:32,height:34,xoffset:0,yoffset:-24.486,xadvance:24.360000000000003,chnl:15,x:67,y:196,page:0},{id:60,width:30,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:101,y:196,page:0},{id:62,width:31,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:133,y:196,page:0},{id:117,width:30,height:32,xoffset:0,yoffset:-21.273,xadvance:23.415000000000003,chnl:15,x:166,y:196,page:0},{id:99,width:29,height:32,xoffset:0,yoffset:-21.609,xadvance:20.055,chnl:15,x:198,y:196,page:0},{id:110,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:23.436,chnl:15,x:229,y:196,page:0},{id:111,width:32,height:32,xoffset:0,yoffset:-21.609,xadvance:23.814,chnl:15,x:262,y:196,page:0},{id:126,width:32,height:26,xoffset:0,yoffset:-16.128,xadvance:24.360000000000003,chnl:15,x:201,y:447,page:0},{id:101,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:22.176000000000002,chnl:15,x:296,y:196,page:0},{id:114,width:25,height:32,xoffset:0,yoffset:-21.651,xadvance:15.288,chnl:15,x:329,y:196,page:0},{id:115,width:27,height:32,xoffset:0,yoffset:-21.609,xadvance:18.186,chnl:15,x:356,y:196,page:0},{id:97,width:28,height:32,xoffset:0,yoffset:-21.651,xadvance:20.874000000000002,chnl:15,x:385,y:196,page:0},{id:118,width:31,height:31,xoffset:0,yoffset:-21.273,xadvance:21.672,chnl:15,x:415,y:196,page:0},{id:61,width:31,height:29,xoffset:0,yoffset:-19.089000000000002,xadvance:24.360000000000003,chnl:15,x:448,y:196,page:0},{id:120,width:30,height:31,xoffset:0,yoffset:-21.273,xadvance:20.916,chnl:15,x:21,y:145,page:0},{id:58,width:18,height:31,xoffset:0,yoffset:-20.706,xadvance:10.5,chnl:15,x:53,y:145,page:0},{id:122,width:28,height:31,xoffset:0,yoffset:-21.273,xadvance:18.984,chnl:15,x:73,y:145,page:0},{id:95,width:28,height:16,xoffset:0,yoffset:0,xadvance:19.278000000000002,chnl:15,x:235,y:447,page:0},{id:45,width:23,height:24,xoffset:0,yoffset:-14.175,xadvance:15.603000000000002,chnl:15,x:481,y:196,page:0},{id:44,width:17,height:21,xoffset:0,yoffset:-4.956,xadvance:9.534,chnl:15,x:103,y:145,page:0},{id:46,width:18,height:15,xoffset:0,yoffset:-4.956,xadvance:9.912,chnl:15,x:0,y:497,page:0},{id:32,width:0,height:0,xoffset:0,yoffset:0,xadvance:10.752,chnl:15,x:20,y:497,page:0}],info:{face:"Lato Regular",size:42,bold:0,italic:0,charset:[" ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~"],unicode:1,stretchH:100,smooth:1,aa:1,padding:[0,0,0,0],spacing:[2,2]},common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0},kernings:[]};class dF extends et{get behavior(){return Jr}constructor(t){super();const n=np(Bv),r=Me(t.field),i=t.as,o=t.fontSize;this.handle=a=>{const s=r(a);s!==void 0?a[i]=n.measureWidth(s,o):a[i]=0,this._propagate(a)}}}const pF=65536;class gF extends et{get behavior(){return Jr}constructor(t){super(),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=Tt(t.spacing)?t.spacing:1,i=Me(t.start),o=Me(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const a=new Float64Array(pF),s=Me(t.preference),u=t.preferredOrder;let l=1/0;this.handle=c=>{const f=i(c);f<l&&a.fill(-1/0),l=f;const h=u.indexOf(s(c));let d=-1;if(h>=0&&a[h]<f)d=h;else{const p=i(c);for(d=0;d<a.length&&!(a[d]<p);d++);if(d>=a.length)throw new Error("Out of lanes!")}a[d]=o(c)+r,c[n]=d,this._propagate(c)}}else{const a=new Sf,s=new Sf;let u=-1/0,l=0;this.handle=c=>{const f=i(c);for(;a.length&&(a.peekValue()<=f||f<u);){const d=a.pop();s.push(d,d)}u=f;let h=s.pop();h===void 0&&(h=l++),c[n]=h,this._propagate(c),a.push(h,o(c)+r)}}}}class mF extends et{get behavior(){return jn}constructor(t){if(super(),t.as&&t.as.length!=t.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=t.fields.map(i=>Me(i)),r=t.as?t.as:n.map(Po);this.handle=i=>{const o={};for(let a=0;a<n.length;a++)o[r[a]]=n[a](i);this._propagate(o)}}}class bF extends et{get behavior(){return Jr}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Me(t.field);this.handle=o=>{const a=i(o);if(Be(a)){const s=a.match(n);if(s){if(s.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let u=0;u<r.length;u++)o[r[u]]=s[u+1]}else if(t.skipInvalidInput)for(let u=0;u<r.length;u++)o[r[u]]=void 0;else throw new Error(`"${a}" does not match the given regex: ${n.toString()}`)}else if(!t.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof a}, field content: "${a}".`);this._propagate(o)}}}class yF extends et{get behavior(){return jn}constructor(t){super();const n=Nt(t.columnRegex).map(h=>new RegExp(h)),r=Nt(t.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=t.skipRegex?new RegExp(t.skipRegex):void 0,o=t.asKey||"sample";let a,s,u;const l=h=>{var y;const d=Object.keys(h);for(const w of n)if(!d.some(A=>w.test(A)))throw new Error(`No columns matching the regex ${w.toString()} found in the data!`);const p=new Map;for(const[w,A]of n.entries())for(const S of d){const _=(y=A.exec(S))==null?void 0:y[1];if(_!==void 0){let k=p.get(_);k||(k=[],p.set(_,k)),k[w]=S}}a=[...p.entries()],s=d.filter(w=>!n.some(A=>A.test(w))&&!(i&&i.test(w)));const m=[...s.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(o)+": sampleId",...r.map((w,A)=>JSON.stringify(w)+`: datum[attrs[${A}]]`)];u=new Function("datum","sampleId","attrs",`return {
492
+ chrM 16299`};function CD(e){if(!(e in ov))throw new Error(`Unknown assembly: ${e}`);return ov[e].split(`
493
+ `).map(t=>{const n=t.split(" ");return{name:n[0],size:parseInt(n[1])}})}const kD=/^([A-Za-z]+:)?\/\//;function vl(e,t){if(t&&kD.test(t))return t;const n=typeof e=="function"?e():e;if(!n)return t;if(!t)return n;if(/[#?]/.test(n))throw new Error(`Cannot append to a url with query or hash. Append: ${t}, base: ${n}`);return sv(n)+t}function sv(e){const t=e.replace(/[^/]*$/,"");return t===""?void 0:t.endsWith("://")?e+"/":t}class TD{constructor(t){if(this.config={name:"custom",...t},"baseUrl"in t)throw new Error("The `baseUrl` property in genome config has been removed in GenomeSpy v0.52.0. Use `url` instead. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.");if(!dp(t))throw new Error("Not a genome configuration: "+JSON.stringify(t));if(this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,lv(this.config))this.setChromSizes(this.config.contigs);else if(!pp(this.config)){const n=CD(this.config.name);if(n)this.setChromSizes(n);else throw new Error(`Unknown genome: ${this.config.name}. Please provide contigs or a URL. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.`)}}get name(){return this.config.name}async load(t){if(pp(this.config))try{const n=vl(t,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(ID(await r.text()))}catch(n){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${n.message}`)}}hasChrPrefix(){return this.chromosomes.some(t=>t.name.startsWith("chr"))}setChromSizes(t){let n=0;this.startByIndex=[0];for(let r=0;r<t.length;r++){this.startByIndex.push(n);const i=t[r].size,o={...t[r],continuousStart:n,continuousEnd:n+i,continuousInterval:[n,n+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(o);const s=o.name.replace(/^chr/i,"");for(const a of["chr"+s,"CHR"+s,"Chr"+s,o.number,""+o.number,s,o.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,o);n+=o.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(t,n){let r=this.cumulativeChromPositions.get(t);if(r===void 0)throw new Error("Unknown chromosome/contig: "+t);return r+ +n}toChromosome(t){if(t>this.totalSize)return;t=Math.floor(t);const n=Pr(this.startByIndex,t)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(t){const n=this.toChromosome(t);if(n)return{chrom:n.name,pos:Math.floor(t)-n.continuousStart}}getChromosome(t){return this.chromosomesByName.get(t)}formatInterval(t){return SD(...this.toChromosomalInterval(t))}toChromosomalInterval(t){const n=this.toChromosomal(t[0]+.5),r=this.toChromosomal(t[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(t){var i;let[n,r]=t;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(t){const n=t[0],r=t[1],i=[];if(n.chrom===r.chrom)i.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const o=this.chromosomes.findIndex(a=>a.name===n.chrom),s=this.chromosomes.findIndex(a=>a.name===r.chrom);i.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[o].size});for(let a=o+1;a<s;a++)i.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(t){return this.toDiscreteChromosomeIntervals([this.toChromosomal(t[0]),this.toChromosomal(t[1])])}parseInterval(t){const n=t.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(a=>a===void 0)){const a=this.getChromosome(r);return a?[a.continuousStart,a.continuousEnd]:void 0}const i=n[3]||r,o=parseInt(n[2].replace(/,/g,"")),s=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):o;return[this.toContinuous(r,o-1),this.toContinuous(i,s)]}}}function ID(e){return zS(e).map(([t,n])=>({name:t,size:parseInt(n)}))}function av(e){return At(e)&&"chrom"in e}function BD(e){return e.every(av)}function dp(e){return At(e)&&("name"in e||pp(e)||lv(e))}function pp(e){return dp(e)&&"url"in e}function lv(e){return dp(e)&&"contigs"in e}class Al extends Array{constructor(){super(),this.type=void 0}extend(t){return this}extendAll(t){if(t instanceof Al&&t.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${t.type}`);for(const n of t)this.extend(n);return this}extendAllWithAccessor(t,n){for(const r of t)this.extend(n(r));return this}}class gp extends Al{constructor(){super(),this.type="quantitative"}extend(t){return t==null||Number.isNaN(t)?this:(t=+t,this.length?t<this[0]?this[0]=t:t>this[1]&&(this[1]=t):(this.push(t),this.push(t)),this)}}class uv extends Al{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(t){return t==null||Number.isNaN(t)?this:(this.uniqueValues.has(t)||(this.uniqueValues.add(t),this.push(t)),this)}}class cv extends uv{constructor(){super(),this.type="nominal"}}class DD extends Al{constructor(t){super();let n=0;for(let r=1;r<t.length;r++)n+=Math.sign(t[r]-t[r-1]);if(Math.abs(n)!=t.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(t));t.forEach(r=>this.push(r))}extend(t){if(this.includes(t))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const fv={quantitative:gp,index:gp,locus:gp,nominal:cv,ordinal:uv};function hv(e,t){if(e=="quantitative"&&RD(t)){const n=new DD(t);return n.type=e,n}else if(fv[e]){const n=new fv[e];return n.type=e,t&&n.extendAll(t),n}throw new Error("Unknown type: "+e)}function RD(e){return e&&e.length>0&&e.length!=2&&e.every(t=>typeof t=="number")}function FD(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function MD(e,t,n){return e*Math.pow(t/e,n)}Se("index",fp,["continuous"]),Se("locus",tD,["continuous"]),Se("null",np,[]);const dv="quantitative",pv="ordinal",gv="nominal",mv="locus",PD="index";class LD{constructor(t){Z(this,xu);Z(this,Eu);Z(this,Rn);Z(this,_u);Z(this,Mh);Z(this,Ph);Z(this,Su);Z(this,Cu);Z(this,Ys);Z(this,ku);Z(this,_r);Z(this,Tu);Z(this,Lh);Z(this,Er,void 0);Z(this,Zs,{domain:new Set,range:new Set});Z(this,en,void 0);Z(this,Au,new Set);this.channel=t,this.members=[],this.type=null,this.name=void 0}addEventListener(t,n){z(this,Zs)[t].add(n)}removeEventListener(t,n){z(this,Zs)[t].delete(n)}addMember(t){var s;const{channel:n,channelDef:r}=t,i=r.type,o=(s=r==null?void 0:r.scale)==null?void 0:s.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!this.type)this.type=i;else if(i!==this.type&&!Sw(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`);this.members.push(t)}getDataDomain(){return this.members.map(t=>{var n;return(n=t.dataDomainSource)==null?void 0:n.call(t,t.channel,this.type)}).filter(t=>!!t).reduce((t,n)=>t.extendAll(n))}reconfigure(){const t=z(this,en);if(!t||t.type=="null")return;const n=X(this,Mh,P_).call(this),r=t.domain(),i=X(this,Su,qm).call(this,!0);if(tv({...i,range:void 0},t),t.props=i,X(this,Cu,Wm).call(this),mt(t.type)&&ae(this,Er,X(this,Tu,Ym).call(this)),!n){X(this,Rn,Rr).call(this,"domain");return}const o=t.domain();kc(o,r)||(this.isZoomable()?t.domain(r):X(this,_r,Fo).call(this)?(t.domain(r),this.zoomTo(o,500)):X(this,Rn,Rr).call(this,"domain"))}get scale(){if(z(this,en))return z(this,en);const t=X(this,Su,qm).call(this),n=gD({...t,range:void 0});n.props=t,"unknown"in n&&n.unknown(null),ae(this,en,n),X(this,Cu,Wm).call(this),nD(n)&&n.genome(this.getGenome()),mt(n.type)&&ae(this,Er,X(this,Tu,Ym).call(this));const r=n.range;if(r){const i=()=>X(this,Rn,Rr).call(this,"range");n.range=function(o){if(arguments.length)r(o),i();else return r()},i()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var t;return((t=this.getGenome())==null?void 0:t.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return X(this,_r,Fo).call(this)&&kc(X(this,Ys,Zh).call(this),this.getDomain())}isZoomable(){return X(this,_r,Fo).call(this)&&!!this.scale.props.zoom}zoom(t,n,r){if(!X(this,_r,Fo).call(this))return!1;const i=this.scale,o=i.domain();let s=[...o],a=i.invert(n);switch(i.props.reverse&&(r=-r),"align"in i&&(a+=i.align()),i.type){case"linear":case"index":case"locus":s=K_(s,r||0),s=l1(s,a,t);break;case"log":s=J_(s,r||0),s=u1(s,a,t);break;case"pow":case"sqrt":{const u=i;s=eS(s,r||0,u.exponent()),s=Jh(s,a,t,u.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}return z(this,Er)&&(s=nS(s,z(this,Er)[0],z(this,Er)[1])),[0,1].some(u=>s[u]!=o[u])?(i.domain(s),X(this,Rn,Rr).call(this,"domain"),!0):!1}async zoomTo(t,n=!1){if(fa(n)&&(n=n?700:0),!X(this,_r,Fo).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(t),i=z(this,Eu,jm).animator,o=this.scale,s=o.domain();if(n>0&&s.length==2){const a=s[1]-s[0],u=r[1]-r[0],l=s[0]+a/2,c=r[0]+u/2,f=s[0]==r[0],h=s[1]==r[1];await i.transition({duration:n,easingFunction:FD,onUpdate:d=>{const p=MD(a,u,d),m=a==u?d:(a-p)/(a-u),y=m*c+(1-m)*l,w=[f?s[0]:y-p/2,h?s[1]:y+p/2];o.domain(w),X(this,Rn,Rr).call(this,"domain")}}),o.domain(r),X(this,Rn,Rr).call(this,"domain")}else o.domain(r),i==null||i.requestRender(),X(this,Rn,Rr).call(this,"domain")}resetZoom(){if(!X(this,_r,Fo).call(this))throw new Error("Not a zoomable scale!");const t=this.getDomain(),n=X(this,Ys,Zh).call(this);return[0,1].some(r=>n[r]!=t[r])?(z(this,en).domain(n),X(this,Rn,Rr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?oc(z(this,Er))/oc(this.scale.domain()):1}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const t=this.members.map(n=>{var r;return(r=n.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(n=>n>0);return t.length?t.reduce((n,r)=>Math.min(n,r),1e4):0}getGenome(){var n;if(this.type!=="locus")return;const t=(n=z(this,Eu,jm).genomeStore)==null?void 0:n.getGenome();if(!t)throw new Error("No genome has been defined!");return t}invertToComplex(t){const n=this.scale;if("invert"in n){const r=n.invert(t);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(t){const n=this.getGenome();return n?n.toChromosomal(t):t}fromComplex(t){return av(t)?this.getGenome().toContinuous(t.chrom,t.pos):t}fromComplexInterval(t){return this.type==="locus"&&BD(t)?this.getGenome().toContinuousInterval(t):t}}Er=new WeakMap,Zs=new WeakMap,en=new WeakMap,Au=new WeakMap,xu=new WeakSet,Vm=function(){return this.members[0].view},Eu=new WeakSet,jm=function(){return z(this,xu,Vm).context},Rn=new WeakSet,Rr=function(t){for(const n of z(this,Zs)[t].values())n({type:t,scaleResolution:this})},_u=new WeakSet,$m=function(){return!!X(this,ku,Zm).call(this)},Mh=new WeakSet,P_=function(){const t=z(this,en);if(!t)return!1;const n=t.domain();return mt(t.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Ph=new WeakSet,L_=function(){const t=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return _f(t,"scale",["domain"])},Su=new WeakSet,qm=function(t=!1){const n=X(this,Ph,L_).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...X(this,Lh,N_).call(this,this.type),...n};r.type||(r.type=ND(this.channel,this.type));const i=X(this,Ys,Zh).call(this,t);return i&&i.length>0?r.domain=i:Qr(r.type)&&(r.domain=new cv),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Qr(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),OD(r,this.channel),r},Cu=new WeakSet,Wm=function(){const t=z(this,en).props,n=t.range;if(z(this,Au).forEach(i=>i.invalidate()),!n||!vt(n))return;const r=(i,o)=>o?i.slice().reverse():i;if(n.some(Dt)){let i;const o=()=>{z(this,en).range(r(i.map(s=>s()),t.reverse))};i=n.map(s=>{if(Dt(s)){const a=z(this,xu,Vm).paramMediator.createExpression(s.expr);return a.addListener(o),z(this,Au).add(a),()=>a(null)}else return()=>s}),o()}else z(this,en).range(r(n,t.reverse))},Ys=new WeakSet,Zh=function(t=!1){return X(this,ku,Zm).call(this)??(this.type==mv?this.getGenome().getExtent():t?this.getDataDomain():[])},ku=new WeakSet,Zm=function(){const t=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>hv(n.type,this.fromComplexInterval(n.scale.domain)));if(t.length>0)return t.reduce((n,r)=>n.extendAll(r))},_r=new WeakSet,Fo=function(){const t=this.scale.type;return mt(t)},Tu=new WeakSet,Ym=function(){const t=this.scale.props,n=t.zoom;if(zD(n)&&vt(n.extent))return this.fromComplexInterval(n.extent);if(n)return t.type=="locus"?this.getGenome().getExtent():z(this,en).domain()},Lh=new WeakSet,N_=function(t){const n=this.channel,r={};return X(this,_u,$m).call(this)&&(r.zero=!1),hl(n)?r.nice=!X(this,_u,$m).call(this):ti(n)?r.scheme=t==gv?"tableau10":t==pv?"blues":"viridis":wf(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r};function ND(e,t){if(t==PD||t==mv){if(xw(e))return t;throw new Error(`${e} does not support ${t} data type. Only positional channels do.`)}const n={x:["band","band","linear"],y:["band","band","linear"],size:[void 0,"point","linear"],opacity:[void 0,"point","linear"],fillOpacity:[void 0,"point","linear"],strokeOpacity:[void 0,"point","linear"],color:["ordinal","ordinal","linear"],fill:["ordinal","ordinal","linear"],stroke:["ordinal","ordinal","linear"],strokeWidth:[void 0,void 0,"linear"],shape:["ordinal","ordinal",void 0],dx:[void 0,void 0,"null"],dy:[void 0,void 0,"null"],angle:[void 0,void 0,"linear"]},i=["sample"].includes(e)?"null":n[e]?n[e][[gv,pv,dv].indexOf(t)]:t==dv?"linear":"ordinal";if(i===void 0)throw new Error(`Channel "${e}" is not compatible with "${t}" data type. Use of a proper scale may be needed.`);return i}function OD(e,t){hl(t)&&e.type!=="ordinal"&&(e.range=[0,1]),t=="opacity"&&mt(e.type)&&(e.clamp=!0)}function zD(e){return At(e)}function mp(e){const t=new Set;function n(r){for(const i of Object.values(r.resolutions.scale))t.add(i)}for(const r of Nt(e)){r.visit(n);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;n(i)}}t.forEach(r=>r.reconfigure())}function bp(...e){for(const t of e)if(t!==void 0)return t}class UD{constructor(t){this.channel=t,this.members=[]}get scaleResolution(){var t;return(t=Oa(this.members))==null?void 0:t.view.getScaleResolution(this.channel)}addMember(t){const{view:n}=t,r=n.getScaleResolution(this.channel);if(!r)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&r!==this.scaleResolution)throw new Error(`Shared axes must have a shared scale! Channel: ${this.channel}, existing views: [${this.members.map(i=>i.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.members.push(t)}getAxisProps(){return Af(this,"axisProps",()=>{const t=this.members.map(n=>{const r=n.view.mark.encoding[n.channel];return"axis"in r&&r.axis});return t.length>0&&t.some(n=>n===null)?null:_f(t.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const t=o=>{var a;const s=OB(o.view,o.channel);if(!an(s))return{member:o,explicitTitle:bp("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:bp(ei(s)?s.field:void 0,fl(s)?s.expr:void 0)}},n=this.members.map(t),r=n.filter(o=>{var s;if(Sw(o.member.channel)&&!o.explicitTitle){const a=Xi(o.member.channel);return((s=n.find(u=>u.member.view==o.member.view&&u.member.channel==a))==null?void 0:s.explicitTitle)===void 0}return!0}),i=new Set(r.map(o=>bp(o.explicitTitle,o.implicitTitle)).filter(Be));return i.size?[...i].join(", "):null}}function bv(e,t,{spacing:n,devicePixelRatio:r,offset:i,reverse:o}={}){n=n||0,i=i||0;let s=0,a=0;for(const p of e)s+=Sf(p.px)+(yp(p)?0:n),a+=Sf(p.grow);s-=n;const u=Math.max(0,t-s),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,c=[],f=[],h=p=>{const m=c.length;if(!m)return;const y=(p?n:0)*(o?-1:1);d-=y;for(let w=0;w<m;w++)f.push({location:d+(w+1)/(m+1)*y,size:0});d+=y,c.length=0};let d=o?Math.max(t,s):0+i;if(e.length==1&&yp(e[0]))return[{location:d,size:0}];for(let p=0;p<e.length;p++){const m=e[p];if(yp(m))c.push(m);else{h(f.length>0);const y=Sf(m.px)+(a?Sf(m.grow)/a*u:0);o&&(d-=y),f.push({location:l(d),size:l(y)}),o?d-=n:d+=y+n}}return d+=o?n:-n,h(!1),f}function GD(e){let t=0,n=0;for(const r of e)t=Math.max(t,r.px??0),n=Math.max(n,r.grow??0);return{px:t,grow:n}}const Lm=class Lm{constructor(t,n){Z(this,Iu);this.width=t,this.height=n}addPadding(t){return X(this,Iu,Qm).call(this,t.width,t.height)}subtractPadding(t){return X(this,Iu,Qm).call(this,-t.width,-t.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};Iu=new WeakSet,Qm=function(t,n){return new Lm({px:(this.width.px??0)+t,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let ni=Lm;const xl=Object.freeze({px:0,grow:0}),yv=new ni(xl,xl);function yp(e){return!e.px&&!e.grow}function Sf(e){return e||0}function HD(e){return e&&(Tt(e.px)||Tt(e.grow))}function wv(e){if(xv(e))throw new Error("parseSizeDef does not accept step-based sizes.");if(HD(e))return e;if(Tt(e))return{px:e,grow:0};if(e==="container")return{px:0,grow:1};if(!e)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${e}`)}class Ct{constructor(t,n,r,i){this.top=t||0,this.right=n||0,this.bottom=r||0,this.left=i||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(t){return t<=0?this:new Ct(this.top+t,this.right+t,this.bottom+t,this.left+t)}add(t){return new Ct(this.top+t.top,this.right+t.right,this.bottom+t.bottom,this.left+t.left)}subtract(t){return new Ct(this.top-t.top,this.right-t.right,this.bottom-t.bottom,this.left-t.left)}union(t){return new Ct(Math.max(this.top,t.top),Math.max(this.right,t.right),Math.max(this.bottom,t.bottom),Math.max(this.left,t.left))}getHorizontal(){return new Ct(0,this.right,0,this.left)}getVertical(){return new Ct(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(t){return typeof t=="number"?this.createUniformPadding(t):t?this.createFromRecord(t):wp}static createFromRecord(t){return new Ct(t.top,t.right,t.bottom,t.left)}static zero(){return wp}static createUniformPadding(t){return new Ct(t,t,t,t)}}const wp=Ct.createUniformPadding(0);Object.freeze(wp);function El(e,t){return!t||/^(data:|([A-Za-z]+:)?\/\/)/.test(e)||e.startsWith("/")?e:(t.endsWith("/")||(t+="/"),t+e)}function VD(e){if(!e)return e;if(/[?#]/.test(e))throw new Error(`Invalid base URL: ${e} - cannot contain query or hash.`);return e.endsWith("/")?e:e+"/"}const jD="VISIT_SKIP",_l="VISIT_STOP",vv=e=>e;class Av{constructor(t,n,r,i,o,s={}){Z(this,So);Z(this,Mu);Z(this,Qs,{});Z(this,Bu,{});Z(this,Du,{});Z(this,Ru,void 0);Z(this,Fu,void 0);Pt(this,"opacityFunction",vv);Pt(this,"facetCoords",new or([],JSON.stringify));var a;if(!t)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=i,this.name=t.name||o,this.spec=t,this.resolutions={scale:{},axis:{}},Hw(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new DB(()=>{var u;return(u=this.dataParent)==null?void 0:u.paramMediator}),t.params)for(const u of t.params)this.paramMediator.registerParam(u);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const u=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);ae(this,Fu,u("height")),ae(this,Ru,u("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Ct.createFromConfig(this.spec.padding))}getOverhang(){return Ct.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new ni(X(this,So,Ju).call(this,"width"),X(this,So,Ju).call(this,"height")):yv)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return yv;const t=this.getSize();return new ni(X(this,So,Ju).call(this,"viewportWidth")??t.width,X(this,So,Ju).call(this,"viewportHeight")??t.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(t=>t.isConfiguredVisible())}getEffectiveOpacity(){var t;return this.opacityFunction(((t=this.layoutParent)==null?void 0:t.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(t=>t.name).reverse().join("/")}getLayoutAncestors(){return X(this,Mu,Xm).call(this,"layoutParent")}getDataAncestors(){return X(this,Mu,Xm).call(this,"dataParent")}handleBroadcast(t){for(const n of z(this,Qs)[t.type]||[])n(t)}_addBroadcastHandler(t,n){let r=z(this,Qs)[t];r||(r=[],z(this,Qs)[t]=r),r.push(n)}handleInteractionEvent(t,n,r){const i=r?z(this,Bu):z(this,Du);for(const o of i[n.type]||[])o(t,n)}addInteractionEventListener(t,n,r){const i=r?z(this,Bu):z(this,Du);let o=i[t];o||(o=[],i[t]=o),o.push(n)}visit(t){try{const n=t(this);if(t.postOrder&&t.postOrder(this),n!==_l)return n}catch(n){throw n.view=this,n}}getDescendants(){const t=[];return this.visit(n=>{t.push(n)}),t}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===vv)&&(this.opacityFunction=qD(this))}onBeforeRender(){}render(t,n,r={}){var i,o;r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n),(i=z(this,Ru))==null||i.call(this,n.width),(o=z(this,Fu))==null||o.call(this,n.height)}getEncoding(){const t=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...t,...n};for(const[i,o]of Object.entries(r))o===null&&delete r[i];return r}getFacetAccessor(t){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(t){var r;const n=this.getEncoding().sample;return ei(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(t){const n=Xi(t);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(t){const n=Xi(t);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(t,n){var r,i;return(i=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:i[t]}getConfiguredOrDefaultResolution(t,n){return this.getConfiguredResolution(t,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(t,n)}getDefaultResolution(t,n){return"independent"}getBaseUrl(){return vl(()=>{var t;return(t=this.dataParent)==null?void 0:t.getBaseUrl()},VD(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const t=this.spec.title;if(t)return Be(t)?t:Dt(t.text)?this.paramMediator.evaluateAndGet(t.text.expr):t.text}_cache(t,n){return Af(this,t,n)}_invalidateCacheByPrefix(t,n="self"){switch(n){case"self":xf(this,t);break;case"ancestors":for(const r of this.getLayoutAncestors())xf(r,t);break;case"progeny":this.visit(r=>xf(r,t));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(t){}}Qs=new WeakMap,Bu=new WeakMap,Du=new WeakMap,Ru=new WeakMap,Fu=new WeakMap,So=new WeakSet,Ju=function(t){var i;let n=this.spec[t];const r=t=="viewportWidth"||t=="viewportHeight";if(xv(n)){if(r)throw new Ji(`Cannot use step-based size with "${t}"!`,this);const o=n.step,s=(i=this.getScaleResolution(t=="width"?"x":"y"))==null?void 0:i.scale;if(s){let a=0;if(Qr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=Oa(l)-l[0]}else throw new Ji(`Cannot use step-based size with "${s.type}" scale!`,this);const u=s;return a=z0(a,u.paddingInner(),u.paddingOuter()),{px:a*o,grow:0}}else throw new Ji("Cannot use 'step' size with missing scale!",this)}else return(n&&wv(n))??(r?void 0:{px:0,grow:1})},Mu=new WeakSet,Xm=function(t){const n=[];let r=this;do n.push(r),r=r[t];while(r);return n};function $D(e){return"unitsPerPixel"in e}function qD(e){const t="opacity"in e.spec?e.spec.opacity:void 0;if(t!==void 0){if(Tt(t))return n=>n*t;if($D(t)){const n=o=>{var a;const s=(a=e.getScaleResolution(o))==null?void 0:a.scale;if(["linear","index","locus"].includes(s==null?void 0:s.type))return s},r=t.channel?n(t.channel):n("x")??n("y");if(!r)throw new Ji("Cannot find a resolved quantitative scale for dynamic opacity!",e);const i=D0().domain(t.unitsPerPixel).range(t.values).clamp(!0);return o=>{const a=oc(r.domain())/1e3;return i(a)*o}}else if(Dt(t)){const n=e.paramMediator.createExpression(t.expr);return n.addListener(()=>e.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const xv=e=>!!(e!=null&&e.step),WD={point:N7,rect:D7,rule:G7,link:Z7,text:eD};class Qt extends Av{constructor(n,r,i,o,s,a){super(n,r,i,o,s,a);Z(this,Nh);Z(this,Pu,void 0);this.spec=n;const u=WD[this.getMarkType()];if(u)this.mark=new u(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),ae(this,Pu,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var c;return(c=this.getScaleResolution(l))==null?void 0:c.addEventListener("domain",()=>z(this,Pu).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},X(this,Nh,O_).call(this)}render(n,r,i={}){super.render(n,r,i),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,i),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}resolve(n){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[i,o]of Object.entries(r)){if(!Yt(o))continue;const s=Xi(o.resolutionChannel??i);if(!dl(s)||n=="axis"&&!hl(s))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(s,n)=="forced"||a.dataParent&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(s,n)))&&a.getConfiguredOrDefaultResolution(s,n)!="excluded";)a=a.dataParent;if(n=="axis"&&hl(i)&&xw(s))a.resolutions[n][s]||(a.resolutions[n][s]=new UD(s)),a.resolutions[n][s].addMember({view:this,channel:i,channelDef:o});else if(n=="scale"&&dl(i)){if(!a.resolutions[n][s]){const l=new LD(s);a.resolutions[n][s]=l,l.addEventListener("range",c=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(c.scaleResolution,!0)})}const u=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||Yt(o)&&o.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);a.resolutions[n][s].addMember({view:this,channel:i,channelDef:o,dataDomainSource:u})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var o;let i=hv(r);return(((o=this.mark.encoders[n])==null?void 0:o.accessors)??[]).filter(s=>s.scaleChannel).forEach(s=>{if(s.constant)i.extend(s({}));else{const a=this.getCollector();a!=null&&a.completed&&a.visitData(u=>i.extend(s(u)))}}),i}getZoomLevel(){const n=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return ss.map(n).reduce((r,i)=>r*i,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}Pu=new WeakMap,Nh=new WeakSet,O_=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const i=r.select;if((Be(i)?i:i.type)==="point"){let a=-1;const u=this.paramMediator.getSetter(n),l=()=>{var h;const f=this.context.getCurrentHover();return((h=f==null?void 0:f.mark)==null?void 0:h.unitView)===this?f.datum:null},c=!Be(i)&&"on"in i?i.on:"click";this.addInteractionEventListener(["mouseover","pointerover"].includes(c)?"mousemove":"click",(f,h)=>{const d=l(),p=d?d[Jr]:-1;if(p!=a){a=p;const m=gw(l());u(m)}})}}};function*vp(e,t=[]){for(const[n,r]of e.entries())if(r instanceof Map)for(const i of vp(r,[...t,n]))yield i;else yield[[...t,n],r]}const Ev=2147483647,ZD=_v([Ev]);function _v(e){let t=0;for(let n=0,r=e.length;n<r;n++)t=Math.max(t,e[n]);return Math.floor(Math.log2(t)/4)+1}function YD(e){const t=_v(e);let n=Array.from({length:e.length},(o,s)=>s),r=new Array(e.length);const i=new Array(16);for(let o=0;o<t;o++){i.fill(0);const s=o*4,a=Math.pow(16,o),u=l=>{const c=e[n[l]];return o>=ZD?c>Ev?Math.floor(c/a)%16:0:c>>s&15};for(let l=0;l<e.length;l++)i[u(l)]++;for(let l=1;l<16;l++)i[l]+=i[l-1];for(let l=e.length-1;l>=0;l--)r[--i[u(l)]]=n[l];[n,r]=[r,n]}return n}class Sv extends et{constructor(n){super();Z(this,Nu);Z(this,Ou);Z(this,zu);Z(this,Oh);Z(this,Sr,[]);Z(this,Lu,Me(Jr));Z(this,Co,[]);Z(this,ko,void 0);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new or([],JSON.stringify),X(this,Nu,Km).call(this)}get behavior(){return ep}reset(){super.reset(),X(this,Nu,Km).call(this)}handle(n){z(this,Sr).push(n)}beginBatch(n){SB(n)&&(ae(this,Sr,[]),this.facetBatches.set(Nt(n.facetId),z(this,Sr)))}complete(){var o,s;ae(this,Sr,[]);const n=(o=this.params)==null?void 0:o.sort,r=n?c1(n.field,n.order):void 0,i=a=>{r&&a.sort(r)};if((s=this.params.groupby)!=null&&s.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const a=this.facetBatches.get(void 0),u=this.params.groupby.map(c=>Me(c)),l=u.length>1?fc(a,...u):QD(a,u[0]);this.facetBatches.clear();for(const[c,f]of vp(l))this.facetBatches.set(c,f)}for(const a of this.facetBatches.values())i(a);X(this,Oh,z_).call(this),X(this,Ou,Jm).call(this),super.complete();for(const a of this.observers)a(this)}repropagate(){for(const n of this.children)n.reset();X(this,Ou,Jm).call(this);for(const n of this.children)n.complete()}getData(){switch(X(this,zu,e1).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of n.values())yield*i}}}}}visitData(n){X(this,zu,e1).call(this);for(const r of this.facetBatches.values())for(let i=0;i<r.length;i++)n(r[i])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}findDatumByUniqueId(n){if(!z(this,Co).length)return;const r=zo(u=>u.start).right,i=z(this,Lu),o=zo(u=>i(s(u))).left,s=u=>{const l=r(z(this,ko),u),c=z(this,ko)[l-1];return!c||u>=c.stop?void 0:this.facetBatches.get(c.facetId)[u-c.start]},a=o(z(this,Co),n);if(a>=0){const u=s(z(this,Co)[a]);if(u&&i(u)===n)return u}}}Sr=new WeakMap,Lu=new WeakMap,Co=new WeakMap,ko=new WeakMap,Nu=new WeakSet,Km=function(){ae(this,Sr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,z(this,Sr))},Ou=new WeakSet,Jm=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const i={type:"facet",facetId:n};for(const o of this.children)o.beginBatch(i)}for(let i=0,o=r.length;i<o;i++)this._propagate(r[i])}},zu=new WeakSet,e1=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Oh=new WeakSet,z_=function(){var s;ae(this,ko,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(Jr in n))return;let r=0;const i=[],o=z(this,Lu);for(const[a,u]of this.facetBatches){z(this,ko).push({start:r,stop:r+u.length,facetId:a}),r+=u.length;for(let l=0,c=u.length;l<c;l++)i.push(o(u[l]))}ae(this,Co,YD(i))};function QD(e,t){const n=new Map;for(let r=0,i=e.length;r<i;r++){const o=e[r],s=t(o);let a=n.get(s);a||(a=[],n.set(s,a)),a.push(o)}return n}class Cf{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const i=r-1>>1,o=this.values[i];if(n>=o)break;this.ids[r]=this.ids[i],this.values[r]=o,r=i}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let o=0;for(;o<i;){let s=(o<<1)+1;const a=s+1;let u=this.ids[s],l=this.values[s];const c=this.values[a];if(a<this.length&&c<l&&(s=a,u=this.ids[a],l=c),l>=r)break;this.ids[o]=u,this.values[o]=l,o=s}this.ids[o]=n,this.values[o]=r}return t}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class XD extends et{get behavior(){return jn}constructor(t){super(),this.params=t,this.startAccessor=Me(t.start),this.endAccessor=Me(t.end),this.chromAccessor=t.chrom?Me(t.chrom):n=>{},this.weightAccessor=t.weight?Me(t.weight):n=>1,this.as={coverage:t.as??"coverage",start:t.asStart??t.start,end:t.asEnd??t.end,chrom:t.asChrom??t.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new Cf}reset(){super.reset(),this.initialize()}initialize(){const t=this.as.coverage,n=this.as.end,r=this.as.chrom,i=this.startAccessor,o=this.endAccessor,s=this.chromAccessor,a=this.weightAccessor;let u,l,c,f=0,h=NaN;const d=this.ends;d.clear();const p=w=>{this._propagate(w),u=null},m=(w,x,S)=>{if(w==x)return;let _=!1;u&&(u[t]===S?(u[n]=x,_=!0):u[t]!=0&&p(u)),_||(u=this.createSegment(w,x,S,c))},y=()=>{let w=0;for(;(w=d.peekValue())!==void 0;)m(h,w,f),h=w,f-=d.pop();h=NaN,u&&p(u)};this.handle=w=>{const x=i(w);let S=0;for(;(S=d.peekValue())!==void 0&&S<x;)m(h,S,f),h=S,f-=d.pop();if(r){let k=s(w);k!==l&&(y(),c=k,l=c)}isNaN(h)||m(h,x,f),h=x;const _=a(w);f+=_,d.push(_,o(w))},this.complete=()=>{y(),super.complete()},this.beginBatch=w=>{y(),l=null,super.beginBatch(w)}}}function KD(e,t,n=0,r=e.length){const i=new Cf,o=r-n;let s;for(s=0;s<t&&s<o;s++)i.push(s,e[n+s]);for(;s<o;s++){const l=e[n+s];l>=i.peekValue()&&(i.push(s,l),i.pop())}const a=[];let u;for(;(u=i.pop())!==void 0;)a.push(n+u);return a.reverse()}class JD{constructor(t,n=-1/0,r=1/0){this.maxSize=t,this.lowerLimit=n,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(t,n,r=0){if(t>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const o=this._findSlot(t,n,i);return o>=0?o:this._findSlot(t,n,this.upperChildren[r])}else return r}else return-1}reserve(t,n){if(n-t<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(t,n);if(r<0)return!1;const i=this.n++,o=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=t,this.lowerLimits[o]=n,this.upperLimits[o]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=o,!0}}class eR extends et{get behavior(){return ep}constructor(t,n){if(super(),this.params=t,this._data=[],this.channel=t.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.posAccessor=Me(this.params.pos),this.posBisector=zo(this.posAccessor),this.scoreAccessor=Me(this.params.score),this.widthAccessor=Me(this.params.width),this.laneAccessor=this.params.lane?Me(this.params.lane):i=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",i=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const t=this.posAccessor;this._data.sort((n,r)=>t(n)-t(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new JD(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const t=this.resolution.scale,n=this.resolution.getAxisLength();if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=t.domain(),o=KD(this._scores,70,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of o){const a=this._data[s],u=t(this.posAccessor(a))*n,l=this.widthAccessor(a)/2+this.padding;this.reservationMaps.get(this.laneAccessor(a)).reserve(u-l,u+l)&&this._propagate(a)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(t){this._data.push(t)}}class tR extends et{constructor(t,n){super(n),this.params=t,this.predicate=void 0}initialize(){let t="";if(nR(this.params))t=this.params.expr;else if(rR(this.params))t=mw(this.params);else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(t),this.predicate.addListener(()=>this.repropagate())}handle(t){this.predicate(t)&&this._propagate(t)}}function nR(e){return"expr"in e}function rR(e){return"param"in e}class iR extends et{get behavior(){return jn}constructor(t){super();const n=t.index;if(t.fields){const r=Nt(t.fields).map(o=>Me(o)),i=Nt(t.as||t.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=o=>{const s=r.map((u,l)=>u(o)??[]),a=s[0].length;for(let u=0;u<a;u++){const l=Object.assign({},o);for(let c=0;c<r.length;c++)l[i[c]]=u<s[c].length?s[c][u]:null;n&&(l[n]=u),this._propagate(l)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const o=Object.assign({},r[i]);n&&(o[n]=i),this._propagate(o)}}}}const oR=48;function*sR(e,t=","){const n=t.charCodeAt(0);let r=0;for(let i=0;i<e.length;i++){const o=e.charCodeAt(i);o==n?(yield r,r=0):r=r*10+o-oR}yield r}class aR extends et{get behavior(){return jn}constructor(t){super();const n=Me(t.exons??"exons"),r=Me(t.start??"start"),[i,o]=t.as||["exonStart","exonEnd"];this.handle=s=>{let a=r(s),u=a,l=!0;const c=n(s);for(const f of sR(c)){if(l)u=a+f;else{a=u+f;const h=Object.assign({},s);h[i]=u,h[o]=a,this._propagate(h)}l=!l}}}}class lR extends et{get behavior(){return jn}constructor(t){super();const n=Nt(t.field).map(o=>Me(o)),r=Nt(t.separator),i=Nt(t.as||t.field);if(n.length!==r.length||n.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${i.length}) do not match!`);this.handle=o=>{if(n.some(u=>!u(o)))return;const s=n.map((u,l)=>u(o).split(r[l]));uR(s,o);const a=s[0].length;for(let u=0;u<a;u++){const l=Object.assign({},o);for(let c=0;c<n.length;c++)l[i[c]]=s[c][u];this._propagate(l)}}}}function uR(e,t){const n=e.map(r=>r.length);if(!n.every(r=>r==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(t))}class cR extends et{get behavior(){return Kr}constructor(t,n){super(n),this.params=t,this.as=t.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(t){t[this.as]=this.fn(t),this._propagate(t)}}class Cv extends et{get behavior(){return Kr}constructor(t,n){super();const r=t.channel??"x";if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=n.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=Me(t.chrom),s=Nt(t.pos).map(p=>Me(p)),a=Nt(t.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const u=Nt(t.offset);let l;if(u.length==0)l=new Array(s.length).fill(0);else if(u.length==1)l=new Array(s.length).fill(u[0]);else if(u.length==s.length)l=u;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(t.offset)}!`);const c=new Function("datum","chromOffset","posAccessors",a.map((p,m)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${m}](datum) - ${l[m]};`).join(`
494
+ `));let f,h=0;const d=p=>{if(p!==f){if(h=i.cumulativeChromPositions.get(p),h===void 0)throw new Error("Unknown chromosome/contig: "+p);f=p}return h};this.handle=p=>{c(p,d(o(p)),s),this._propagate(p)}}}const kv={pages:["Lato-Regular.png"],chars:[{id:87,width:53,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:43.491,chnl:15,x:0,y:0,page:0},{id:124,width:17,height:50,xoffset:0,yoffset:-32.193000000000005,xadvance:10.521,chnl:15,x:0,y:42,page:0},{id:40,width:20,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:94,page:0},{id:41,width:19,height:49,xoffset:0,yoffset:-32.571000000000005,xadvance:11.214,chnl:15,x:0,y:145,page:0},{id:36,width:32,height:49,xoffset:0,yoffset:-34.419000000000004,xadvance:24.360000000000003,chnl:15,x:0,y:196,page:0},{id:125,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:247,page:0},{id:91,width:22,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:297,page:0},{id:93,width:19,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.852,chnl:15,x:0,y:347,page:0},{id:123,width:21,height:48,xoffset:0,yoffset:-32.193000000000005,xadvance:12.642000000000001,chnl:15,x:0,y:397,page:0},{id:106,width:19,height:48,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:0,y:447,page:0},{id:81,width:43,height:47,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:21,y:447,page:0},{id:77,width:45,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:38.997,chnl:15,x:66,y:447,page:0},{id:64,width:43,height:44,xoffset:0,yoffset:-28.539,xadvance:35.133,chnl:15,x:23,y:397,page:0},{id:92,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:68,y:397,page:0},{id:47,width:28,height:43,xoffset:0,yoffset:-30.933000000000003,xadvance:18.984,chnl:15,x:98,y:397,page:0},{id:109,width:42,height:32,xoffset:0,yoffset:-21.609,xadvance:34.545,chnl:15,x:113,y:447,page:0},{id:119,width:42,height:31,xoffset:0,yoffset:-21.315,xadvance:32.991,chnl:15,x:157,y:447,page:0},{id:42,width:25,height:42,xoffset:0,yoffset:-31.626,xadvance:17.85,chnl:15,x:128,y:397,page:0},{id:37,width:42,height:41,xoffset:0,yoffset:-30.387,xadvance:33.663000000000004,chnl:15,x:155,y:397,page:0},{id:79,width:42,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:33.621,chnl:15,x:199,y:397,page:0},{id:102,width:24,height:41,xoffset:0,yoffset:-30.534000000000002,xadvance:14.721,chnl:15,x:243,y:397,page:0},{id:100,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:269,y:397,page:0},{id:98,width:32,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.520000000000003,chnl:15,x:302,y:397,page:0},{id:56,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:336,y:397,page:0},{id:38,width:40,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:29.904000000000003,chnl:15,x:370,y:397,page:0},{id:108,width:17,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:9.912,chnl:15,x:412,y:397,page:0},{id:107,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:21.336000000000002,chnl:15,x:431,y:397,page:0},{id:48,width:33,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:464,y:397,page:0},{id:71,width:38,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:30.681,chnl:15,x:21,y:347,page:0},{id:83,width:31,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:22.785,chnl:15,x:61,y:347,page:0},{id:63,width:27,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:18.795,chnl:15,x:94,y:347,page:0},{id:105,width:18,height:41,xoffset:0,yoffset:-30.639000000000003,xadvance:10.08,chnl:15,x:123,y:347,page:0},{id:51,width:32,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:143,y:347,page:0},{id:104,width:31,height:41,xoffset:0,yoffset:-30.933000000000003,xadvance:23.436,chnl:15,x:177,y:347,page:0},{id:67,width:37,height:41,xoffset:0,yoffset:-30.429000000000002,xadvance:28.056,chnl:15,x:210,y:347,page:0},{id:88,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.258000000000003,chnl:15,x:249,y:347,page:0},{id:68,width:40,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:31.941000000000003,chnl:15,x:288,y:347,page:0},{id:70,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:23.751,chnl:15,x:330,y:347,page:0},{id:34,width:23,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:15.561000000000002,chnl:15,x:364,y:347,page:0},{id:72,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:389,y:347,page:0},{id:73,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.760000000000002,chnl:15,x:429,y:347,page:0},{id:74,width:24,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:17.745,chnl:15,x:449,y:347,page:0},{id:75,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.825000000000003,chnl:15,x:24,y:297,page:0},{id:76,width:31,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:21.567,chnl:15,x:475,y:347,page:0},{id:66,width:35,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:27.153000000000002,chnl:15,x:64,y:297,page:0},{id:78,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:32.067,chnl:15,x:101,y:297,page:0},{id:33,width:18,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:11.298,chnl:15,x:141,y:297,page:0},{id:80,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.221,chnl:15,x:161,y:297,page:0},{id:65,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:197,y:297,page:0},{id:82,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.313000000000002,chnl:15,x:237,y:297,page:0},{id:35,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:275,y:297,page:0},{id:84,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.801000000000002,chnl:15,x:310,y:297,page:0},{id:85,width:37,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:30.891000000000002,chnl:15,x:346,y:297,page:0},{id:86,width:38,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:28.434,chnl:15,x:385,y:297,page:0},{id:39,width:16,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:8.568000000000001,chnl:15,x:425,y:297,page:0},{id:69,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.255000000000003,chnl:15,x:443,y:297,page:0},{id:89,width:36,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:26.208000000000002,chnl:15,x:23,y:247,page:0},{id:90,width:34,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:25.284000000000002,chnl:15,x:477,y:297,page:0},{id:49,width:31,height:40,xoffset:0,yoffset:-30.156000000000002,xadvance:24.360000000000003,chnl:15,x:61,y:247,page:0},{id:50,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:94,y:247,page:0},{id:57,width:32,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:24.360000000000003,chnl:15,x:128,y:247,page:0},{id:94,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:162,y:247,page:0},{id:96,width:21,height:40,xoffset:0,yoffset:-30.429000000000002,xadvance:16.8,chnl:15,x:196,y:247,page:0},{id:55,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:219,y:247,page:0},{id:54,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:254,y:247,page:0},{id:53,width:32,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:289,y:247,page:0},{id:52,width:33,height:40,xoffset:0,yoffset:-30.093000000000004,xadvance:24.360000000000003,chnl:15,x:323,y:247,page:0},{id:103,width:31,height:39,xoffset:0,yoffset:-21.630000000000003,xadvance:21.84,chnl:15,x:358,y:247,page:0},{id:112,width:32,height:39,xoffset:0,yoffset:-21.651,xadvance:23.541,chnl:15,x:391,y:247,page:0},{id:113,width:31,height:39,xoffset:0,yoffset:-21.651,xadvance:23.520000000000003,chnl:15,x:425,y:247,page:0},{id:116,width:25,height:39,xoffset:0,yoffset:-28.182000000000002,xadvance:15.057,chnl:15,x:458,y:247,page:0},{id:121,width:31,height:38,xoffset:0,yoffset:-21.273,xadvance:21.651,chnl:15,x:34,y:196,page:0},{id:59,width:18,height:36,xoffset:0,yoffset:-20.706,xadvance:10.983,chnl:15,x:485,y:247,page:0},{id:43,width:32,height:34,xoffset:0,yoffset:-24.486,xadvance:24.360000000000003,chnl:15,x:67,y:196,page:0},{id:60,width:30,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:101,y:196,page:0},{id:62,width:31,height:33,xoffset:0,yoffset:-23.331000000000003,xadvance:24.360000000000003,chnl:15,x:133,y:196,page:0},{id:117,width:30,height:32,xoffset:0,yoffset:-21.273,xadvance:23.415000000000003,chnl:15,x:166,y:196,page:0},{id:99,width:29,height:32,xoffset:0,yoffset:-21.609,xadvance:20.055,chnl:15,x:198,y:196,page:0},{id:110,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:23.436,chnl:15,x:229,y:196,page:0},{id:111,width:32,height:32,xoffset:0,yoffset:-21.609,xadvance:23.814,chnl:15,x:262,y:196,page:0},{id:126,width:32,height:26,xoffset:0,yoffset:-16.128,xadvance:24.360000000000003,chnl:15,x:201,y:447,page:0},{id:101,width:31,height:32,xoffset:0,yoffset:-21.609,xadvance:22.176000000000002,chnl:15,x:296,y:196,page:0},{id:114,width:25,height:32,xoffset:0,yoffset:-21.651,xadvance:15.288,chnl:15,x:329,y:196,page:0},{id:115,width:27,height:32,xoffset:0,yoffset:-21.609,xadvance:18.186,chnl:15,x:356,y:196,page:0},{id:97,width:28,height:32,xoffset:0,yoffset:-21.651,xadvance:20.874000000000002,chnl:15,x:385,y:196,page:0},{id:118,width:31,height:31,xoffset:0,yoffset:-21.273,xadvance:21.672,chnl:15,x:415,y:196,page:0},{id:61,width:31,height:29,xoffset:0,yoffset:-19.089000000000002,xadvance:24.360000000000003,chnl:15,x:448,y:196,page:0},{id:120,width:30,height:31,xoffset:0,yoffset:-21.273,xadvance:20.916,chnl:15,x:21,y:145,page:0},{id:58,width:18,height:31,xoffset:0,yoffset:-20.706,xadvance:10.5,chnl:15,x:53,y:145,page:0},{id:122,width:28,height:31,xoffset:0,yoffset:-21.273,xadvance:18.984,chnl:15,x:73,y:145,page:0},{id:95,width:28,height:16,xoffset:0,yoffset:0,xadvance:19.278000000000002,chnl:15,x:235,y:447,page:0},{id:45,width:23,height:24,xoffset:0,yoffset:-14.175,xadvance:15.603000000000002,chnl:15,x:481,y:196,page:0},{id:44,width:17,height:21,xoffset:0,yoffset:-4.956,xadvance:9.534,chnl:15,x:103,y:145,page:0},{id:46,width:18,height:15,xoffset:0,yoffset:-4.956,xadvance:9.912,chnl:15,x:0,y:497,page:0},{id:32,width:0,height:0,xoffset:0,yoffset:0,xadvance:10.752,chnl:15,x:20,y:497,page:0}],info:{face:"Lato Regular",size:42,bold:0,italic:0,charset:[" ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~"],unicode:1,stretchH:100,smooth:1,aa:1,padding:[0,0,0,0],spacing:[2,2]},common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0},kernings:[]};class fR extends et{get behavior(){return Kr}constructor(t){super();const n=lp(kv),r=Me(t.field),i=t.as,o=t.fontSize;this.handle=s=>{const a=r(s);a!==void 0?s[i]=n.measureWidth(a,o):s[i]=0,this._propagate(s)}}}const hR=65536;class dR extends et{get behavior(){return Kr}constructor(t){super(),this.params=t}reset(){super.reset(),this.initialize()}initialize(){const t=this.params,n=t.as||"lane",r=Tt(t.spacing)?t.spacing:1,i=Me(t.start),o=Me(t.end);if(!t.preference!=!t.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(t.preference){const s=new Float64Array(hR),a=Me(t.preference),u=t.preferredOrder;let l=1/0;this.handle=c=>{const f=i(c);f<l&&s.fill(-1/0),l=f;const h=u.indexOf(a(c));let d=-1;if(h>=0&&s[h]<f)d=h;else{const p=i(c);for(d=0;d<s.length&&!(s[d]<p);d++);if(d>=s.length)throw new Error("Out of lanes!")}s[d]=o(c)+r,c[n]=d,this._propagate(c)}}else{const s=new Cf,a=new Cf;let u=-1/0,l=0;this.handle=c=>{const f=i(c);for(;s.length&&(s.peekValue()<=f||f<u);){const d=s.pop();a.push(d,d)}u=f;let h=a.pop();h===void 0&&(h=l++),c[n]=h,this._propagate(c),s.push(h,o(c)+r)}}}}class pR extends et{get behavior(){return jn}constructor(t){if(super(),t.as&&t.as.length!=t.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=t.fields.map(i=>Me(i)),r=t.as?t.as:n.map(Po);this.handle=i=>{const o={};for(let s=0;s<n.length;s++)o[r[s]]=n[s](i);this._propagate(o)}}}class gR extends et{get behavior(){return Kr}constructor(t){super();const n=new RegExp(t.regex),r=typeof t.as=="string"?[t.as]:t.as,i=Me(t.field);this.handle=o=>{const s=i(o);if(Be(s)){const a=s.match(n);if(a){if(a.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let u=0;u<r.length;u++)o[r[u]]=a[u+1]}else if(t.skipInvalidInput)for(let u=0;u<r.length;u++)o[r[u]]=void 0;else throw new Error(`"${s}" does not match the given regex: ${n.toString()}`)}else if(!t.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof s}, field content: "${s}".`);this._propagate(o)}}}class mR extends et{get behavior(){return jn}constructor(t){super();const n=Nt(t.columnRegex).map(h=>new RegExp(h)),r=Nt(t.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=t.skipRegex?new RegExp(t.skipRegex):void 0,o=t.asKey||"sample";let s,a,u;const l=h=>{var y;const d=Object.keys(h);for(const w of n)if(!d.some(x=>w.test(x)))throw new Error(`No columns matching the regex ${w.toString()} found in the data!`);const p=new Map;for(const[w,x]of n.entries())for(const S of d){const _=(y=x.exec(S))==null?void 0:y[1];if(_!==void 0){let k=p.get(_);k||(k=[],p.set(_,k)),k[w]=S}}s=[...p.entries()],a=d.filter(w=>!n.some(x=>x.test(w))&&!(i&&i.test(w)));const m=[...a.map(w=>JSON.stringify(w)+": datum["+JSON.stringify(w)+"]"),JSON.stringify(o)+": sampleId",...r.map((w,x)=>JSON.stringify(w)+`: datum[attrs[${x}]]`)];u=new Function("datum","sampleId","attrs",`return {
495
495
  `+m.join(`,
496
496
  `)+`
497
- };`)},c=h=>{a||l(h);for(let d=0;d<a.length;d++){const[p,m]=a[d],y=u(h,p,m);this._propagate(y)}},f=h=>{l(h),c(h),this.handle=c};this.handle=f,this.beginBatch=h=>{gw(h)&&(this.handle=f),super.beginBatch(h)}}}class wF extends et{get behavior(){return Jr}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const t=this.params,n=t.as||["y0","y1"],r=t.sort?a1(t.sort.field,t.sort.order):void 0,i=t.field?Me(t.field):()=>1,o=t.groupby.map(c=>Me(c)),a=rC(this.buffer,c=>o.map(f=>f(c)).join()).map(c=>c[1]);let s=c=>!0;if(t.baseField){const c=Me(t.baseField);s=f=>c(f)!==null}let u,l;switch(t.offset){case"normalize":u=(c,f)=>c/f,l=(c,f)=>dc(c,f);break;case"center":u=(c,f)=>c-f/2,l=(c,f)=>dc(c,f);break;case"information":{const c=Math.log2(t.cardinality??4);u=(f,h)=>f/h,l=(f,h)=>{const p=dc(f,A=>+!s(A)),m=dc(f,h),y=m-p;let w=0;for(let A=0;A<f.length;A++){const S=f[A];if(s(S)){const _=h(S)/y;w-=_*Math.log2(_)}}return y/(c-(w+0))*(y/m)}}break;default:u=(c,f)=>c,l=(c,f)=>1}for(const c of a){r&&c.sort(r);const f=l(c,i);let h=0;for(const d of c){const p=h+i(d);s(d)&&(d[n[0]]=u(h,f),d[n[1]]=u(p,f),this._propagate(d),h=p)}}super.complete()}}class vF extends et{get behavior(){return jn}constructor(t){super();const n=Me(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=o=>{const a=Object.assign({},o,{[i]:"",[r]:0}),s=n(o);for(let u=0;u<s.length;u++){const l=Object.assign({},a);l[r]=u,l[i]=s.charAt(u),this._propagate(l)}}}}class xF extends et{get behavior(){return jn}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const n=this.params.groupby,r=n.map(o=>Me(o)),i=cc(this.buffer,...r);for(const[o,a]of pp(i)){const s={count:a.length};for(let u=0;u<n.length;u++)s[n[u]]=o[u];this._propagate(s)}super.complete()}}const AF={aggregate:xF,collect:Tv,coverage:JR,filterScoredLabels:nF,filter:rF,flatten:aF,flattenCompressedExons:uF,flattenDelimited:cF,flattenSequence:vF,formula:hF,identifier:Y0,linearizeGenomicCoordinate:Iv,measureText:dF,pileup:gF,project:mF,regexExtract:bF,regexFold:yF,sample:Kw,stack:wF};function EF(e,t){const n=AF[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function Dv(e){if(!Mv(e)&&!Fv(e))return;const t={...e.format};if(t.type??(t.type=Fv(e)&&_F(Zt(e.url))),t.parse??(t.parse="auto"),!t.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(e));return t}function _F(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const Rv=e=>typeof e!="object"?SF:CF,SF=e=>({data:e}),CF=e=>e;function Fv(e){return"url"in e}class ca extends et{constructor(n){super();Pt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function Mv(e){return"values"in e}class kF extends ca{constructor(t,n){var r;if(super(n),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=Rv(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=wb(t,Dv(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}function TF(e){return"url"in e}class IF extends ca{constructor(t,n){super(n),this.params=mf(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=Zt(this.params.url),n=Array.isArray(t)?t:[t];if(n.length===0||!n[0]){this.reset(),this.complete();return}const r=async o=>{try{const a=wl(this.baseUrl,o),s=await fetch(a);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}catch(a){throw new Error(`Could not load data: ${o}. Reason: ${a.message}`)}},i=(o,a)=>{try{const s=wb(o,Dv(this.params));this.beginBatch({type:"file",url:a});for(const u of s)this._propagate(u)}catch(s){throw new Error(`Cannot parse: ${a}: ${s.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(o=>r(o).then(i))),this.setLoadingStatus("complete")}catch(o){this.setLoadingStatus("error",o.message)}this.complete()}}function BF(e){return"sequence"in e}class DF extends ca{constructor(t,n){if(super(n),this.sequence=mf(n.paramMediator,t.sequence,()=>this.loadSynchronously()),!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=Zt(this.sequence.as)??"data",n=Zt(this.sequence.start)??0,r=Zt(this.sequence.step)??1,i=Zt(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let o=n;o<i;o+=r)this._propagate({[t]:o});this.complete()}async load(){this.loadSynchronously()}}class gp extends ca{constructor(n,r){super(n);Pt(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const o=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof Qt||o.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(o.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}getAxisLength(){const n=this.scaleResolution.members.map(r=>{var i;return(i=r.view.coords)==null?void 0:i[this.channel==="x"?"width":"height"]}).filter(r=>r>0);return n.length?n.reduce((r,i)=>Math.min(r,i),1e4):0}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const i of r)this._propagate(i);this.complete(),cp(this.view)}}class RF extends gp{constructor(n,r){const i={axis:{},...n};super(r,i.channel);Pt(this,"ticks",[]);this.params=n}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.params.axis,i=this.getAxisLength(),o=l=>25+60*pw(100,700,l),a=Tt(r.tickCount)?r.tickCount:Math.round(i/o(i)),s=ev(n,a,r.tickMinStep),u=r.values?tv(n,r.values,s):oR(n,s);if(this.ticks==null||!Cd(u,this.ticks)){this.ticks=u;const l=sR(n,a,r.format);this.publishData([u.map(c=>({value:c,label:l(c)}))])}}}class FF extends gp{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function Cf(e,t,n=!0){let r,i=a=>{};return function(...s){return new Promise((u,l)=>{const c=()=>{clearTimeout(r),i=f=>{},u(e(...s))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(c,typeof t=="function"?t():t)})}}class _l extends gp{constructor(){super(...arguments);Z(this,Xa,new AbortController);Z(this,Ka,[0,0]);Z(this,Ja,[0,0]);Z(this,Uu,0);Pt(this,"params")}setupDebouncing(n){const r=()=>Zt(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=Cf(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=Cf(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;le(this,Ja,n);const r=Zt((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async o=>{await this.initializedPromise,this.loadInterval(o)})}reloadLastDomain(){const n=z(this,Ja);le(this,Ja,[0,0]),le(this,Ka,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){z(this,Xa).abort(),this.setLoadingStatus("loading"),le(this,Xa,new AbortController);const i=z(this,Xa).signal,o=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const a=await Promise.all(o.map(async s=>r(s,i)));if(!i.aborted)return this.setLoadingStatus("complete"),a}catch(a){if(!i.aborted)throw this.setLoadingStatus("error",a.message),a}}callIfWindowsChanged(n,r,i){const o=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],a=z(this,Ka);(r!==z(this,Uu)||o[0]<a[0]||o[1]>a[1])&&(le(this,Ka,o),le(this,Uu,r),i(o))}}Xa=new WeakMap,Ka=new WeakMap,Ja=new WeakMap,Uu=new WeakMap;class MF extends _l{constructor(t,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>sx),Promise.resolve().then(()=>SL),Promise.resolve().then(()=>Tl)]).then(([{Buffer:o},{IndexedFasta:a},{RemoteFile:s}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const u=l=>new s(Al(l,this.view.getBaseUrl()));this.fasta=new a({fasta:u(this.params.url),fai:u(this.params.indexUrl??this.params.url+".fai")}),i()})})}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(o=>({chrom:r.chrom,start:r.startPos,sequence:o})));n&&this.publishData([n])}}class PF extends _l{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},o=mf(r.paramMediator,i,a=>{a.includes("url")?X(this,Gu,Xm).call(this).then(()=>this.reloadLastDomain()):a.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,o.channel);Z(this,Gu);Z(this,es,[]);Z(this,ts,void 0);if(this.params=o,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),X(this,Gu,Xm).call(this)}async onDomainChanged(n){await this.initializedPromise;const r=this.getAxisLength()||700,i=LF(n,r,z(this,es)),o=Math.max(i*r,5e3);this.callIfWindowsChanged(n,o,a=>this.loadInterval(a,i))}async loadInterval(n,r){const i=.5/r/Zt(this.params.pixelsPerBin),o=await this.discretizeAndLoad(n,(a,s)=>z(this,ts).getFeatures(a.chrom,a.startPos,a.endPos,{scale:i,signal:s}).then(u=>u.map(l=>({chrom:a.chrom,start:l.start,end:l.end,score:l.score}))));o&&this.publishData(o)}}es=new WeakMap,ts=new WeakMap,Gu=new WeakSet,Xm=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>o4),Promise.resolve().then(()=>Tl)]).then(([{BigWig:i},{RemoteFile:o}])=>{le(this,ts,new i({filehandle:new o(Al(Zt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),z(this,ts).getHeader().then(a=>{le(this,es,a.zoomLevels.map(s=>s.reductionLevel).reverse()),z(this,es).push(1),this.setLoadingStatus("complete"),n()}).catch(a=>{this.load(),this.setLoadingStatus("error",`${Zt(this.params.url)}: ${a.message}`),r(a)})})}),this.initializedPromise};function LF(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class NF extends _l{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},o=mf(r.paramMediator,i,a=>{a.includes("url")?X(this,Hu,Km).call(this).then(()=>this.reloadLastDomain()):a.includes("windowSize")&&this.reloadLastDomain()});super(r,o.channel);Z(this,Hu);Pt(this,"parser");Pt(this,"bbi");Pt(this,"parseLine");if(this.params=o,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),X(this,Hu,Km).call(this)}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:o}).then(a=>a.map(s=>this.parseLine(i.chrom,s))));r&&this.publishData(r)}}Hu=new WeakSet,Km=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>vU),Promise.resolve().then(()=>o4),Promise.resolve().then(()=>Tl)]).then(([i,{BigBed:o},{RemoteFile:a}])=>{const s=i.default;this.bbi=new o({filehandle:new a(Al(Zt(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async u=>{this.parser=new s({autoSql:u.autoSql});try{const l=OF(this.parser);this.parseLine=(c,f)=>l(c,f.start,f.end,f.rest)}catch{this.parseLine=(c,f)=>this.parser.parseLine(`${c} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(u=>{this.load(),this.setLoadingStatus("error",`${Zt(this.params.url)}: ${u.message}`),r(u)})})}),this.initializedPromise};function OF(e){const t=e.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",i=0,o={};const a=" ",s=a.charCodeAt(0),u="0".charCodeAt(0),l="-".charCodeAt(0);function c(){let A=r.indexOf(a,n);A<0&&(A=i);const S=r.substring(n,A);return n=A+1,S}function f(){let A=0,S=r.charCodeAt(n),_=1;S===l&&(_=-1,n++,S=r.charCodeAt(n));do{if(S===s){n++;break}A=A*10+S-u,S=r.charCodeAt(++n)}while(n<i);return A*_}const h=t.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
497
+ };`)},c=h=>{s||l(h);for(let d=0;d<s.length;d++){const[p,m]=s[d],y=u(h,p,m);this._propagate(y)}},f=h=>{l(h),c(h),this.handle=c};this.handle=f,this.beginBatch=h=>{hw(h)&&(this.handle=f),super.beginBatch(h)}}}class bR extends et{get behavior(){return Kr}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const t=this.params,n=t.as||["y0","y1"],r=t.sort?c1(t.sort.field,t.sort.order):void 0,i=t.field?Me(t.field):()=>1,o=t.groupby.map(c=>Me(c)),s=eC(this.buffer,c=>o.map(f=>f(c)).join()).map(c=>c[1]);let a=c=>!0;if(t.baseField){const c=Me(t.baseField);a=f=>c(f)!==null}let u,l;switch(t.offset){case"normalize":u=(c,f)=>c/f,l=(c,f)=>pc(c,f);break;case"center":u=(c,f)=>c-f/2,l=(c,f)=>pc(c,f);break;case"information":{const c=Math.log2(t.cardinality??4);u=(f,h)=>f/h,l=(f,h)=>{const p=pc(f,x=>+!a(x)),m=pc(f,h),y=m-p;let w=0;for(let x=0;x<f.length;x++){const S=f[x];if(a(S)){const _=h(S)/y;w-=_*Math.log2(_)}}return y/(c-(w+0))*(y/m)}}break;default:u=(c,f)=>c,l=(c,f)=>1}for(const c of s){r&&c.sort(r);const f=l(c,i);let h=0;for(const d of c){const p=h+i(d);a(d)&&(d[n[0]]=u(h,f),d[n[1]]=u(p,f),this._propagate(d),h=p)}}super.complete()}}class yR extends et{get behavior(){return jn}constructor(t){super();const n=Me(t.field??"sequence"),[r,i]=t.as??["pos","sequence"];this.handle=o=>{const s=Object.assign({},o,{[i]:"",[r]:0}),a=n(o);for(let u=0;u<a.length;u++){const l=Object.assign({},s);l[r]=u,l[i]=a.charAt(u),this._propagate(l)}}}}class wR extends et{get behavior(){return jn}constructor(t){super(),this.params=t,this.buffer=[]}reset(){this.buffer=[]}handle(t){this.buffer.push(t)}complete(){const n=this.params.groupby,r=n.map(o=>Me(o)),i=fc(this.buffer,...r);for(const[o,s]of vp(i)){const a={count:s.length};for(let u=0;u<n.length;u++)a[n[u]]=o[u];this._propagate(a)}super.complete()}}const vR={aggregate:wR,collect:Sv,coverage:XD,filterScoredLabels:eR,filter:tR,flatten:iR,flattenCompressedExons:aR,flattenDelimited:lR,flattenSequence:yR,formula:cR,identifier:tp,linearizeGenomicCoordinate:Cv,measureText:fR,pileup:dR,project:pR,regexExtract:gR,regexFold:mR,sample:Yw,stack:bR};function AR(e,t){const n=vR[e.type];if(n)return new n(e,t);throw new Error("Unknown transform: "+e.type)}function Tv(e){if(!Dv(e)&&!Bv(e))return;const t={...e.format};if(t.type??(t.type=Bv(e)&&ER(Zt(e.url))),t.parse??(t.parse="auto"),!t.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(e));return t}function xR(e){var t;return((t=kd(e))==null?void 0:t.responseType)??"text"}function ER(e){var t;if(Array.isArray(e)&&(e=e[0]),e)return(t=e.match(/\.(csv|tsv|json)/))==null?void 0:t[1]}const Iv=e=>typeof e!="object"?_R:SR,_R=e=>({data:e}),SR=e=>e;function Bv(e){return"url"in e}class us extends et{constructor(n){super();Pt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function Dv(e){return"values"in e}class CR extends us{constructor(t,n){var r;if(super(n),this.params=t,typeof t.values=="string"&&!((r=t==null?void 0:t.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}loadSynchronously(){const t=this.params.values;let n=[],r=i=>i;if(Array.isArray(t))t.length>0&&(n=t,r=Iv(t[0]));else if(typeof t=="object")n=[t];else if(typeof t=="string")n=v2(t,Tv(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}function kR(e){return"url"in e}class TR extends us{constructor(t,n){super(n),this.params=bf(n.paramMediator,t,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}async load(){const t=Zt(this.params.url),n=Array.isArray(t)?t:[t],r=Tv(this.params),i=xR(r.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const o=async a=>{try{const u=vl(this.baseUrl,a),l=await fetch(u);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[i]=="function"?l[i]():l.text()}catch(u){throw new Error(`Could not load data: ${a}. Reason: ${u.message}`)}},s=(a,u)=>{try{const l=v2(a,r);this.beginBatch({type:"file",url:u});for(const c of l)this._propagate(c)}catch(l){throw new Error(`Cannot parse: ${u}: ${l.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>o(a).then(s))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function IR(e){return"sequence"in e}class BR extends us{constructor(t,n){if(super(n),this.sequence=bf(n.paramMediator,t.sequence,()=>this.loadSynchronously()),!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}loadSynchronously(){const t=Zt(this.sequence.as)??"data",n=Zt(this.sequence.start)??0,r=Zt(this.sequence.step)??1,i=Zt(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let o=n;o<i;o+=r)this._propagate({[t]:o});this.complete()}async load(){this.loadSynchronously()}}class Ap extends us{constructor(n,r){super(n);Pt(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const o=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof Qt||o.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(o.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const i of r)this._propagate(i);this.complete(),mp(this.view)}}class DR extends Ap{constructor(n,r){const i={axis:{},...n};super(r,i.channel);Pt(this,"ticks",[]);this.params=n}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),i=this.params.axis,o=l=>25+60*fw(100,700,l),s=Tt(i.tickCount)?i.tickCount:Math.round(r/o(r)),a=Xw(n,s,i.tickMinStep),u=i.values?Kw(n,i.values,a):rD(n,a);if(this.ticks==null||!kc(u,this.ticks)){this.ticks=u;const l=oD(n,s,i.format);this.publishData([u.map(c=>({value:c,label:l(c)}))])}}}class RR extends Ap{constructor(t,n){super(n,t.channel)}async load(){this.publishData([this.genome.chromosomes])}}function kf(e,t,n=!0){let r,i=s=>{};return function(...a){return new Promise((u,l)=>{const c=()=>{clearTimeout(r),i=f=>{},u(e(...a))};n&&i("debounced"),clearTimeout(r),i=l,r=window.setTimeout(c,typeof t=="function"?t():t)})}}class Sl extends Ap{constructor(){super(...arguments);Z(this,Xs,new AbortController);Z(this,Ks,[0,0]);Z(this,Js,[0,0]);Z(this,Uu,0);Pt(this,"params")}setupDebouncing(n){const r=()=>Zt(n.debounce),i=n.debounceMode;if(i=="domain")this.onDomainChanged=kf(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=kf(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(n){var i;ae(this,Js,n);const r=Zt((i=this.params)==null?void 0:i.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async o=>{await this.initializedPromise,this.loadInterval(o)})}reloadLastDomain(){const n=z(this,Js);ae(this,Js,[0,0]),ae(this,Ks,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){z(this,Xs).abort(),this.setLoadingStatus("loading"),ae(this,Xs,new AbortController);const i=z(this,Xs).signal,o=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const s=await Promise.all(o.map(async a=>r(a,i)));if(!i.aborted)return this.setLoadingStatus("complete"),s}catch(s){if(!i.aborted)throw this.setLoadingStatus("error",s.message),s}}callIfWindowsChanged(n,r,i){const o=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],s=z(this,Ks);(r!==z(this,Uu)||o[0]<s[0]||o[1]>s[1])&&(ae(this,Ks,o),ae(this,Uu,r),i(o))}}Xs=new WeakMap,Ks=new WeakMap,Js=new WeakMap,Uu=new WeakMap;class FR extends Sl{constructor(t,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...t};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>oA),Promise.resolve().then(()=>_L),Promise.resolve().then(()=>Tl)]).then(([{Buffer:o},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=o));const u=l=>new a(El(l,this.view.getBaseUrl()));this.fasta=new s({fasta:u(this.params.url),fai:u(this.params.indexUrl??this.params.url+".fai")}),i()})})}async loadInterval(t){const n=await this.discretizeAndLoad(t,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(o=>({chrom:r.chrom,start:r.startPos,sequence:o})));n&&this.publishData([n])}}class MR extends Sl{constructor(n,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},o=bf(r.paramMediator,i,s=>{s.includes("url")?X(this,Gu,t1).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,o.channel);Z(this,Gu);Z(this,ea,[]);Z(this,ta,void 0);if(this.params=o,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),X(this,Gu,t1).call(this)}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,i=PR(n,r,z(this,ea)),o=Math.max(i*r,5e3);this.callIfWindowsChanged(n,o,s=>this.loadInterval(s,i))}async loadInterval(n,r){const i=.5/r/Zt(this.params.pixelsPerBin),o=await this.discretizeAndLoad(n,(s,a)=>z(this,ta).getFeatures(s.chrom,s.startPos,s.endPos,{scale:i,signal:a}).then(u=>u.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));o&&this.publishData(o)}}ea=new WeakMap,ta=new WeakMap,Gu=new WeakSet,t1=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>n4),Promise.resolve().then(()=>Tl)]).then(([{BigWig:i},{RemoteFile:o}])=>{ae(this,ta,new i({filehandle:new o(El(Zt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),z(this,ta).getHeader().then(s=>{ae(this,ea,s.zoomLevels.map(a=>a.reductionLevel).reverse()),z(this,ea).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${Zt(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function PR(e,t,n){const r=(e[1]-e[0])/t;return n.find(i=>i<r)??n.at(-1)}class LR extends Sl{constructor(n,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},o=bf(r.paramMediator,i,s=>{s.includes("url")?X(this,Hu,n1).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,o.channel);Z(this,Hu);Pt(this,"parser");Pt(this,"bbi");Pt(this,"parseLine");if(this.params=o,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),X(this,Hu,n1).call(this)}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:o}).then(s=>s.map(a=>this.parseLine(i.chrom,a))));r&&this.publishData(r)}}Hu=new WeakSet,n1=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>wU),Promise.resolve().then(()=>n4),Promise.resolve().then(()=>Tl)]).then(([i,{BigBed:o},{RemoteFile:s}])=>{const a=i.default;this.bbi=new o({filehandle:new s(El(Zt(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async u=>{this.parser=new a({autoSql:u.autoSql});try{const l=NR(this.parser);this.parseLine=(c,f)=>l(c,f.start,f.end,f.rest)}catch{this.parseLine=(c,f)=>this.parser.parseLine(`${c} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(u=>{this.load(),this.setLoadingStatus("error",`${Zt(this.params.url)}: ${u.message}`),r(u)})})}),this.initializedPromise};function NR(e){const t=e.autoSql.fields.filter(x=>x.type).slice(3);let n=0,r="",i=0,o={};const s=" ",a=s.charCodeAt(0),u=48,l=45;function c(){let x=r.indexOf(s,n);x<0&&(x=i);const S=r.substring(n,x);return n=x+1,S}function f(){let x=0,S=r.charCodeAt(n),_=1;S===l&&(_=-1,n++,S=r.charCodeAt(n));do{if(S===a){n++;break}x=x*10+S-u,S=r.charCodeAt(++n)}while(n<i);return x*_}const h=t.map(x=>`${JSON.stringify(x.name)}: ${x.isNumeric?"0":"emptyString"}`),d=new Function(`
498
498
  const emptyString = "";
499
499
  return function makeTemplate(chrom, chromStart, chromEnd) {
500
500
  return {
@@ -504,21 +504,21 @@ chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e
504
504
  ${h.join(`,
505
505
  `)}
506
506
  }
507
- };`)(),p=t.map(A=>{const S=A.type,_=JSON.stringify(A.name);if(["ubyte","int","uint"].includes(S))return`d[${_}] = parseInt();`;if(A.isNumeric)return`d[${_}] = Number(parseString());`;if(["char","string","lstring"].includes(S))return`d[${_}] = parseString();`;throw new Error("Unsupported type: "+S)}),m=zF(p,50).map((A,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
508
- ${A.join(`
507
+ };`)(),p=t.map(x=>{const S=x.type,_=JSON.stringify(x.name);if(["ubyte","int","uint"].includes(S))return`d[${_}] = parseInt();`;if(x.isNumeric)return`d[${_}] = Number(parseString());`;if(["char","string","lstring"].includes(S))return`d[${_}] = parseString();`;throw new Error("Unsupported type: "+S)}),m=OR(p,50).map((x,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
508
+ ${x.join(`
509
509
  `)}
510
- }`)(f,c));function y(A){r=A,i=A.length,n=0}function w(A,S,_,k){y(k),o=d(A,S,_);for(const B of m)B(o);return o}return w}function zF(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class UF extends _l{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,To,void 0);Pt(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>UU),Promise.resolve().then(()=>Tl)]).then(([{BamFile:a},{RemoteFile:s}])=>{const u=l=>new s(Al(l,this.view.getBaseUrl()));le(this,To,new a({bamFilehandle:u(this.params.url),baiFilehandle:u(this.params.indexUrl??this.params.url+".bai")})),z(this,To).getHeader().then(l=>{var h,d;const c=this.genome.hasChrPrefix(),f=(d=(h=z(this,To).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");c&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!c&&f&&(this.chrPrefixFixer=p=>"chr"+p),o()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>z(this,To).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:o}).then(a=>a.map(s=>({chrom:i.chrom,start:s.get("start"),end:s.get("end"),name:s.get("name"),MD:s.get("MD"),cigar:s.get("cigar"),mapq:s.get("mq"),strand:s.get("strand")===1?"+":"-"}))));r&&this.publishData(r)}}To=new WeakMap;class GF extends _l{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,Vu,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>sx),Promise.resolve().then(()=>QU),Promise.resolve().then(()=>Tl)]).then(([{Buffer:a},{TabixIndexedFile:s},{RemoteFile:u}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=a));const l=c=>new u(Al(c,this.view.getBaseUrl()));le(this,Vu,new s({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")})),o()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>{const a=[];return await z(this,Vu).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:s=>{a.push(s)},signal:o}),this._parseFeatures(a)});r&&this.publishData(r)}_parseFeatures(n){return[]}}Vu=new WeakMap;class HF extends GF{constructor(n,r){super(n,r);Z(this,ju,void 0);Promise.resolve().then(()=>MG).then(i=>{le(this,ju,i.default)})}_parseFeatures(n){var i;return(i=z(this,ju))==null?void 0:i.parseStringSync(n.join(`
511
- `),{parseSequences:!1})}}ju=new WeakMap;function VF(e,t){if(Mv(e))return new kF(e,t);if(TF(e))return new IF(e,t);if(BF(e))return new DF(e,t);if(jF(e))return KF(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function jF(e){return"lazy"in e}function $F(e){return(e==null?void 0:e.type)=="axisTicks"}function qF(e){return(e==null?void 0:e.type)=="axisGenome"}function WF(e){return(e==null?void 0:e.type)=="indexedFasta"}function ZF(e){return(e==null?void 0:e.type)=="bigwig"}function YF(e){return(e==null?void 0:e.type)=="bigbed"}function QF(e){return(e==null?void 0:e.type)=="bam"}function XF(e){return(e==null?void 0:e.type)=="gff3"}function KF(e,t){if($F(e))return new RF(e,t);if(qF(e))return new FF(e,t);if(WF(e))return new MF(e,t);if(ZF(e))return new PF(e,t);if(YF(e))return new NF(e,t);if(QF(e))return new UF(e,t);if(XF(e))return new HF(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function JF(e){const t=Object.keys(e).filter(r=>typeof r=="string"),n=new Function("source","return { "+t.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
512
- `)+" };");return n.properties=t,n}class kf extends et{get behavior(){return jn}constructor(){super();const t=n=>{const r=JF(n);this.handle=i=>this._propagate(r(i)),this.handle(n)};this.handle=t,this.beginBatch=n=>{gw(n)&&(this.handle=t),super.beginBatch(n)}}}function e7(e){return"name"in e}class Pv extends ca{constructor(n,r,i){super(r);Z(this,$u,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){le(this,$u,n),this.loadSynchronously()}loadSynchronously(){const n=z(this,$u)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=Rv(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}$u=new WeakMap;class Lv{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,o]of this._dataSourcesByHost.entries())if(o instanceof Pv&&t==o.identifier){if(n&&n!==o)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=o,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function t7(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const o=n.get(t(i.ref));o?o.children.push(i):r.push(i)}return r}function Nv(e,t,n){var i,o;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const a of n(e)){const s=Nv(a,t,n);if(s==="stop")return s}return(o=t.postOrder)==null?void 0:o.call(t,e)}function n7(e,t){return Nv(e,t,n=>n.children)}function r7(e,t){const n=[],r=[];let i;const o=t??new Lv,a=[];function s(d,p=()=>{}){if(!i)throw p()||new Error("Cannot append data flow node, no parent exist!");return i.addChild(d),i=d,n.push(d),d}function u(d,p){return s(d,()=>new Error(`Cannot append a transform because no (inherited) data are available! ${p?JSON.stringify(p):""}`))}function l(d,p){for(const m of d){let y;try{y=EF(m,p)}catch(w){throw console.warn(w),new Error(`Cannot initialize "${m.type}" transform: ${w}`)}y.behavior&Jr&&u(new kf),u(y)}}function c(){return n.findLastIndex(d=>d instanceof Y0)>n.findLastIndex(d=>d instanceof ca)}const f=d=>{if(d.spec.data){const p=e7(d.spec.data)?new Pv(d.spec.data,d,d.context.getNamedDataFromProvider):VF(d.spec.data,d);i=p,n.push(p),o.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof Qt){if(!i)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=i7(d);if(p){a.push(p.rewrite);for(const y of p.transforms)u(y)}d.mark.isPickingParticipant()&&!c()&&(u(new kf),u(new Y0({type:"identifier"})));const m=new Tv({type:"collect",groupby:d.getFacetFields(),sort:o7(d,p==null?void 0:p.rewrittenEncoding)});s(m),o.addCollector(m,d)}},h=t7(e.getDescendants(),d=>d.dataParent);for(const d of h)n7(d,{preOrder:p=>{r.push({view:p.ref,nodeStackDepth:n.length}),f(p.ref)},postOrder:()=>{const{nodeStackDepth:p}=r.pop();n.length=p,i=n.at(-1)}});return a.forEach(d=>d()),o}function i7(e){var o;const t=[],n={},r=[];for(const[a,s]of Object.entries(e.getEncoding())){const u=a;fl(u)&&_w(s)&&r.push({channel:u,chromPosDef:s})}const i=cc(r,a=>Ki(a.channel),a=>a.chromPosDef.chrom);for(const[a,s]of i.entries())for(const[u,l]of s.entries()){const c=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const m=A=>A.replace(/[^A-Za-z0-9_]/g,""),y=["_linearized_",m(p.chrom),"_",m(p.pos)].join(""),w={...((o=e.spec.encoding)==null?void 0:o[d])??e.getEncoding()[d]??{},field:y};delete w.chrom,delete w.pos,!w.type&&p.type&&(w.type=p.type),n[d]=w,c.push(p.pos),h.push(p.offset??0),f.push(y)}t.push(new kf),t.push(new Iv({type:"linearizeGenomicCoordinate",channel:a,chrom:u,pos:c,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},ED(e.mark,"encoding")}}:void 0}function o7(e,t){var r;const n={...e.getEncoding(),...t}.x;if(Yt(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(ti(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!ul(n)){if(cl(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Ov(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!Ov(n,e))return!1;return!0}function mp(e,t=!1){if(e.behavior&Z0&&(t=!0),e instanceof kf)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&mp(n,t);return}e.behavior&jn&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)mp(e.children[n],t||r>1)}function a7(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const o=n.get(i.identifier);o&&(o.adoptChildrenOf(i),i=o),e.addDataSource(i,r)}}function s7(e){if(mp(e),!Ov(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function l7(e){a7(e);for(const t of e.dataSources)s7(t)}function u7(e){const t=new Set;e.visit(n=>{for(const r of Object.values(n.resolutions.scale)){const i=r.name;if(i&&t.has(i))throw new Error(`The same scale name "${i}" occurs in multiple scale resolutions!`);t.add(i)}})}function c7(e){for(const t of sa){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function f7(e,t,n){const r=e.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const i=wl(t,r.url);let o;try{const a=await fetch(i);if(!a.ok)throw new Error(`${a.status} ${a.statusText}`);o=await a.json()}catch(a){throw new Error(`Could not load imported view spec: ${i}. Reason: ${a.message}`)}if(n.isViewSpec(o))return o.baseUrl=wl(uv(r.url),o.baseUrl),o;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function h7(e){const t=e.getSize(),n=e.getPadding(),r=(i,o)=>i.grow>0?void 0:i.px+o;return{width:r(t.width,n.horizontalTotal),height:r(t.height,n.verticalTotal)}}function pr(e){return()=>e}const Rn=class Rn{static create(t,n,r,i){return new Rn(pr(t),pr(n),pr(r),pr(i))}_offset(t,n){const r=this["_"+t];if(n===0)return r;switch(typeof n){case"number":return()=>r()+n;case"function":return()=>r()+n();default:throw new Error("Not a number of function")}}_passThrough(t){return this._offset(t,0)}constructor(t,n,r,i){this._x=t,this._y=n,this._width=r,this._height=i}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(t){return t?this===t||this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height:!1}modify(t){if(!Object.keys(t).length)return this;const n=r=>{const i=t[r];return typeof i=="number"?pr(i):typeof i=="function"?i:this._passThrough(r)};return new Rn(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new Rn(this._offset("x",t),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(t){return this.translate(t.x,t.y)}expand(t,n=1){return t.left==0&&t.top==0&&t.right==0&&t.bottom==0?this:new Rn(t.left?this._offset("x",-t.left*n):this._passThrough("x"),t.top?this._offset("y",-t.top*n):this._passThrough("y"),t.width?this._offset("width",t.width*n):this._passThrough("width"),t.height?this._offset("height",t.height*n):this._passThrough("height"))}shrink(t){return this.expand(t,-1)}intersect(t){return this===t||t==null?this:new Rn(()=>Math.max(this.x,t.x),()=>Math.max(this.y,t.y),()=>Math.min(this.x2,t.x2)-Math.max(this.x,t.x),()=>Math.min(this.y2,t.y2)-Math.max(this.y,t.y))}union(t){return this===t||t==null?this:new Rn(()=>Math.min(this.x,t.x),()=>Math.min(this.y,t.y),()=>Math.max(this.x2,t.x2)-Math.min(this.x,t.x),()=>Math.max(this.y2,t.y2)-Math.min(this.y,t.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new Rn(pr(this.x),pr(this.y),pr(this.width),pr(this.height))}containsPoint(t,n){return t>=this.x&&t<this.x2&&n>=this.y&&n<this.y2}normalizePoint(t,n){return{x:(t-this.x)/this.width,y:(n-this.y)/this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};Pt(Rn,"ZERO",Rn.create(0,0,0,0));let gr=Rn;class zv{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class Uv extends zv{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=a=>()=>{t&&a()},i=a=>()=>{t&&n&&a()},o=cc(this.buffer.reverse(),a=>a.mark);for(const[a,s]of[...o.entries()].reverse()){if(!a.isReady())continue;this.batch.push(()=>{t=a.unitView.getEffectiveOpacity()>0}),this.batch.push(...a.prepareRender(this.globalOptions).map(l=>r(l)));let u;for(const l of s){const c=l.coords;c.equals(u)||this.batch.push(r(()=>{n=a.setViewport(c,l.clipRect)})),this.batch.push(i(l.callback)),u=l.coords}}}}class d7 extends zv{constructor(...t){super({}),this.contexts=t}pushView(t,n){for(const r of this.contexts)r.pushView(t,n)}popView(t){for(const n of this.contexts)n.popView(t)}renderMark(t,n){for(const r of this.contexts)r.renderMark(t,n)}}class p7{constructor(t,n){this.point=t,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class $n{static fromMouseEvent(t){return new $n(t.clientX,t.clientY)}constructor(t,n){this.x=t,this.y=n}subtract(t){return new $n(this.x-t.x,this.y-t.y)}add(t){return new $n(this.x-t.x,this.y-t.y)}multiply(t){return new $n(this.x*t,this.y*t)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const g7=e=>new Promise(t=>setTimeout(t,e));function m7(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,o)=>{if(n!=null&&n.aborted)return o("aborted");const a=performance.now(),s=a+(e.duration||1e3),u=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,c=e.easingFunction||(m=>m),f=m=>(m-a)/(s-a),h=m=>m*(l-u)+u,d=m=>Math.max(0,Math.min(1,m)),p=m=>{n!=null&&n.aborted?o("aborted"):(e.onUpdate(h(c(d(f(m))))),m<s?t(p):(e.onUpdate(h(c(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):g7(e.delay).then(r):r()}class b7{constructor(t){this._renderCallback=t,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(t){this.cancelTransition(t),this.transitions.push(t),this.requestRender()}cancelTransition(t){const n=this.transitions.indexOf(t);n>=0&&this.transitions.splice(n,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(t=>{this._renderRequested=!1;const n=this.transitions;this.transitions=[];let r;for(;r=n.shift();)r(t);this._renderCallback(t)}))}transition(t){return m7({requestAnimationFrame:n=>this.requestTransition(n),...t})}}function bp(e,t,n,r,i){let o=0,a=!0,s=structuredClone(i),u=s;function l(h,d,p,m){return d+(h-d)*Math.pow(2,-p/m)}function c(h){if(a)return;const d=h-o;o=h;for(const m of Object.keys(u))s[m]=l(s[m],u[m],d,n);t(s);let p=-1/0;for(const m of Object.keys(u))p=Math.max(p,Math.abs(u[m]-s[m]));p<r?(s=u,t(s),a=!0,p!=0&&e.requestRender()):e.requestTransition(m=>c(m))}function f(h){u=h,a&&(a=!1,o=+document.timeline.currentTime,c(o))}return f.stop=()=>{a=!0},f}class y7{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new BR(t);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(t){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(t){const n=this.genomes.get(t);if(!n)throw new Error(`No genome with the name ${t} has been configured!`);return n}else{if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");return this.genomes.values().next().value}}}const w7="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/jI+9lJcecjjJJD15Ho8+yo9/TKUCb7J5vY1tcw+JiOgMILYJcDpNuFQKq5+neMrFbRXLnI+fu7im6KlSCS9fqXDBccLb31siIgqARBOu1SiV8DzKZbpr0nRxWxnQqs8tv51lol/2Xf63qlS6euOpKYZIREQ7ANOHTYdu1SDL/wMOlguFlxW+Hf8dujMX9ryrNx4KEREFgGXd9BQoWu97S0vLbU36T4EOD6NwGf78R0REAZBoxWaJ3qqDA9Kcx3p9YXW1sLLSCoBM5jIV+i7/gwCWl8Nbzs0xLCIiCgDbDi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z6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",v7={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class x7{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new or([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:np(Bv),texture:t?this._createTextureNow(w7):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Be(r)&&(r=v7[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let o=this._fonts.get(i);return o||(o={metrics:void 0,texture:void 0},this._fonts.set(i,o),this._promises.push(this._loadFontEntry(o,i))),o}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=E7(r,n),o=this.fontRepository+Gv(n.family)+"/"+i.replace(/\.\w+/,""),a=this._createTexture(o+".png"),s=this._loadFont(o+".json");t.texture=await a,t.metrics=await s}catch{console.warn(`Cannot load font: "${n.family}". Using the embedded default font.`),t.metrics=this._defaultFontEntry.metrics,t.texture=this._defaultFontEntry.texture}}_loadFont(t){let n=this._fontPromises.get(t);return n||(n=fetch(t).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>np(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=Gv(t);let r=this._metadataPromises.get(n);if(!r){const i=this.fontRepository+n+"/METADATA.pb";r=fetch(i).then(o=>{if(!o.ok)throw new Error("Could not load font metadata. Response status: "+o.status+", url: "+i);return o}).then(o=>o.text()).then(o=>A7(o)).catch(o=>{console.warn(o.message)}),this._metadataPromises.set(n,r)}return r}getDefaultFont(){return this._defaultFontEntry}_createTexture(t){const n=this._webGLHelper.gl;return new Promise((r,i)=>{js(n,{src:t,min:n.LINEAR},(o,a,s)=>{o?i(o):r(a)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((o,a)=>{r=js(n,{src:t,min:n.LINEAR},(s,u,l)=>{s?a(s):o(u)})});return this._promises.push(i),r}}function Gv(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function A7(e){const t=e.split(`
513
- `),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let o=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(o){const a=o[1];r[a]=o[2]}if(o=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),o){const a=o[1];r[a]=+o[2]}}return n}function E7(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const o=Math.abs(t.weight-i.weight);o<r&&(r=o,n=i)}return n==null?void 0:n.filename}function _7(e,t){const n=[];let r;for(const i of e.split(`
514
- `))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return n}class S7{constructor(t,n){this.animator=t,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=bp(t,r=>{var o;const i=r.x-this.lastValue;this.lastValue=r.x,(o=this.callback)==null||o.call(this,i)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=l1([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(t,n){if(this.disabled){n(t);return}this.callback=n;const r=aa(this.targetValue+t-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function C7(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const o=i;!r.includes(i)&&n.includes(typeof e[o])&&(t[o]=e[o])}return t}const Hv=new Map;async function k7(e,t,n){const r=e.symbol;let i=Hv.get(r)??await B7(e.symbol);return i?(Hv.set(r,i),Ke`
510
+ }`)(f,c));function y(x){r=x,i=x.length,n=0}function w(x,S,_,k){y(k),o=d(x,S,_);for(const B of m)B(o);return o}return w}function OR(e,t){return Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t))}class zR extends Sl{constructor(n,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,To,void 0);Pt(this,"chrPrefixFixer",n=>n);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>GU),Promise.resolve().then(()=>Tl)]).then(([{BamFile:s},{RemoteFile:a}])=>{const u=l=>new a(El(l,this.view.getBaseUrl()));ae(this,To,new s({bamFilehandle:u(this.params.url),baiFilehandle:u(this.params.indexUrl??this.params.url+".bai")})),z(this,To).getHeader().then(l=>{var h,d;const c=this.genome.hasChrPrefix(),f=(d=(h=z(this,To).indexToChr)==null?void 0:h[0])==null?void 0:d.refName.startsWith("chr");c&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!c&&f&&(this.chrPrefixFixer=p=>"chr"+p),o()})})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>z(this,To).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:o}).then(s=>s.map(a=>({chrom:i.chrom,start:a.get("start"),end:a.get("end"),name:a.get("name"),MD:a.get("MD"),cigar:a.get("cigar"),mapq:a.get("mq"),strand:a.get("strand")===1?"+":"-"}))));r&&this.publishData(r)}}To=new WeakMap;class UR extends Sl{constructor(n,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",...n};super(r,i.channel);Z(this,Vu,void 0);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>oA),Promise.resolve().then(()=>XU),Promise.resolve().then(()=>Tl)]).then(([{Buffer:s},{TabixIndexedFile:a},{RemoteFile:u}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=s));const l=c=>new u(El(c,this.view.getBaseUrl()));ae(this,Vu,new a({filehandle:l(this.params.url),tbiFilehandle:l(this.params.indexUrl??this.params.url+".tbi")})),o()})})}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(i,o)=>{const s=[];return await z(this,Vu).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:a=>{s.push(a)},signal:o}),this._parseFeatures(s)});r&&this.publishData(r)}_parseFeatures(n){return[]}}Vu=new WeakMap;class GR extends UR{constructor(n,r){super(n,r);Z(this,ju,void 0);Promise.resolve().then(()=>PG).then(i=>{ae(this,ju,i.default)})}_parseFeatures(n){var i;return(i=z(this,ju))==null?void 0:i.parseStringSync(n.join(`
511
+ `),{parseSequences:!1})}}ju=new WeakMap;function HR(e,t){if(Dv(e))return new CR(e,t);if(kR(e))return new TR(e,t);if(IR(e))return new BR(e,t);if(VR(e))return XR(e.lazy,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function VR(e){return"lazy"in e}function jR(e){return(e==null?void 0:e.type)=="axisTicks"}function $R(e){return(e==null?void 0:e.type)=="axisGenome"}function qR(e){return(e==null?void 0:e.type)=="indexedFasta"}function WR(e){return(e==null?void 0:e.type)=="bigwig"}function ZR(e){return(e==null?void 0:e.type)=="bigbed"}function YR(e){return(e==null?void 0:e.type)=="bam"}function QR(e){return(e==null?void 0:e.type)=="gff3"}function XR(e,t){if(jR(e))return new DR(e,t);if($R(e))return new RR(e,t);if(qR(e))return new FR(e,t);if(WR(e))return new MR(e,t);if(ZR(e))return new LR(e,t);if(YR(e))return new zR(e,t);if(QR(e))return new GR(e,t);throw new Error("Cannot figure out the data source type: "+JSON.stringify(e))}function KR(e){const t=Rv(e).filter(r=>typeof r=="string"),n=new Function("source","return { "+t.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
512
+ `)+" };");return n.properties=t,n}function Rv(e){let t=[];do t=t.concat(Object.keys(e)),e=Object.getPrototypeOf(e);while(e&&e!==Object.prototype);return Array.from(new Set(t))}class Tf extends et{constructor(){super();Z(this,na,void 0);Z(this,$u,n=>n);const n=r=>{const i=Rv(r);(!z(this,na)||!kc(i,z(this,na)))&&(ae(this,na,i),ae(this,$u,KR(r)));const o=z(this,$u);this.handle=s=>this._propagate(o(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{hw(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return jn}}na=new WeakMap,$u=new WeakMap;function JR(e){return"name"in e}class Fv extends us{constructor(n,r,i){super(r);Z(this,qu,void 0);this.provider=i,this.params=n}get identifier(){return this.params.name}updateDynamicData(n){ae(this,qu,n),this.loadSynchronously()}loadSynchronously(){const n=z(this,qu)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(n))n.length>0&&(r=Iv(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of n)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}qu=new WeakMap;class Mv{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(t,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(t)}_relayObserverCallback(t,n){const r=this._observers.get(n);if(r)for(const i of r)i(t)}addDataSource(t,n){this._dataSourcesByHost.set(n,t)}findDataSourceByKey(t){return this._dataSourcesByHost.get(t)}findNamedDataSource(t){let n,r=[];for(const[i,o]of this._dataSourcesByHost.entries())if(o instanceof Fv&&t==o.identifier){if(n&&n!==o)throw new Error(`Found multiple instances of named data: ${t}. Data flow optimization is broken (it's a bug).`);n=o,r.push(i)}if(n)return{dataSource:n,hosts:r}}addCollector(t,n){this._collectorsByHost.set(n,t),t.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(t){return this._collectorsByHost.get(t)}initialize(){for(const t of this.dataSources)t.visit(n=>n.initialize())}}function eF(e,t){const n=new Map,r=[];for(const i of e)n.set(i,{ref:i,children:[]});for(const i of n.values()){const o=n.get(t(i.ref));o?o.children.push(i):r.push(i)}return r}function Pv(e,t,n){var i,o;const r=(i=t.preOrder)==null?void 0:i.call(t,e);if(r)return r;for(const s of n(e)){const a=Pv(s,t,n);if(a==="stop")return a}return(o=t.postOrder)==null?void 0:o.call(t,e)}function tF(e,t){return Pv(e,t,n=>n.children)}function nF(e,t){const n=[],r=[];let i;const o=t??new Mv,s=[];function a(d,p=()=>{}){if(!i)throw p()||new Error("Cannot append data flow node, no parent exist!");return i.addChild(d),i=d,n.push(d),d}function u(d,p){return a(d,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function l(d,p){for(const m of d){let y;try{y=AR(m,p)}catch(w){throw console.warn(w),new Error(`Cannot initialize "${m.type}" transform: ${w}`)}y.behavior&Kr&&u(new Tf),u(y)}}function c(){return n.findLastIndex(d=>d instanceof tp)>n.findLastIndex(d=>d instanceof us)}const f=d=>{if(d.spec.data){const p=JR(d.spec.data)?new Fv(d.spec.data,d,d.context.getNamedDataFromProvider):HR(d.spec.data,d);i=p,n.push(p),o.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof Qt){if(!i)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=rF(d);if(p){s.push(p.rewrite);for(const y of p.transforms)u(y)}d.mark.isPickingParticipant()&&!c()&&(u(new Tf),u(new tp({type:"identifier"})));const m=new Sv({type:"collect",groupby:d.getFacetFields(),sort:iF(d,p==null?void 0:p.rewrittenEncoding)});a(m),o.addCollector(m,d)}},h=eF(e.getDescendants(),d=>d.dataParent);for(const d of h)tF(d,{preOrder:p=>{r.push({view:p.ref,nodeStackDepth:n.length}),f(p.ref)},postOrder:()=>{const{nodeStackDepth:p}=r.pop();n.length=p,i=n.at(-1)}});return s.forEach(d=>d()),o}function rF(e){var o;const t=[],n={},r=[];for(const[s,a]of Object.entries(e.getEncoding())){const u=s;hl(u)&&Aw(a)&&r.push({channel:u,chromPosDef:a})}const i=fc(r,s=>Xi(s.channel),s=>s.chromPosDef.chrom);for(const[s,a]of i.entries())for(const[u,l]of a.entries()){const c=[],f=[],h=[];for(const{channel:d,chromPosDef:p}of l){const m=x=>x.replace(/[^A-Za-z0-9_]/g,""),y=["_linearized_",m(p.chrom),"_",m(p.pos)].join(""),w={...((o=e.spec.encoding)==null?void 0:o[d])??e.getEncoding()[d]??{},field:y};delete w.chrom,delete w.pos,!w.type&&p.type&&(w.type=p.type),n[d]=w,c.push(p.pos),h.push(p.offset??0),f.push(y)}t.push(new Tf),t.push(new Cv({type:"linearizeGenomicCoordinate",channel:s,chrom:u,pos:c,offset:h,as:f},e))}return t.length?{transforms:t,rewrittenEncoding:n,rewrite:()=>{e.spec.encoding={...e.spec.encoding,...n},A7(e.mark,"encoding")}}:void 0}function iF(e,t){var r;const n={...e.getEncoding(),...t}.x;if(Yt(n)&&(r=e.getScaleResolution("x"))!=null&&r.isZoomable()){if(ei(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!cl(n)){if(fl(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Lv(e,t=void 0){if(e.parent!==t)return!1;for(const n of e.children)if(!Lv(n,e))return!1;return!0}function xp(e,t=!1){if(e.behavior&ep&&(t=!0),e instanceof Tf)if(t)t=!1;else{const n=e.children[0];e.excise(),n&&xp(n,t);return}e.behavior&jn&&(t=!1);for(let n=0,r=e.children.length;n<r;n++)xp(e.children[n],t||r>1)}function oF(e){const t=[...e._dataSourcesByHost.entries()],n=new Map;for(const r of t){const i=r[1];i.identifier&&!n.has(i.identifier)&&n.set(i.identifier,i)}e._dataSourcesByHost.clear();for(let[r,i]of t){const o=n.get(i.identifier);o&&(o.adoptChildrenOf(i),i=o),e.addDataSource(i,r)}}function sF(e){if(xp(e),!Lv(e))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function aF(e){oF(e);for(const t of e.dataSources)sF(t)}function lF(e){const t=new Set;e.visit(n=>{for(const r of Object.values(n.resolutions.scale)){const i=r.name;if(i&&t.has(i))throw new Error(`The same scale name "${i}" occurs in multiple scale resolutions!`);t.add(i)}})}function uF(e){for(const t of ss){const n=e.getScaleResolution(t);n&&!n.name&&n.isZoomable()&&(n.name=`${t}_at_root`)}}async function cF(e,t,n){const r=e.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const i=vl(t,r.url);let o;try{const s=await fetch(i);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);o=await s.json()}catch(s){throw new Error(`Could not load imported view spec: ${i}. Reason: ${s.message}`)}if(n.isViewSpec(o))return o.baseUrl=vl(sv(r.url),o.baseUrl),o;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(e)}`)}function fF(e){const t=e.getSize(),n=e.getPadding(),r=(i,o)=>i.grow>0?void 0:i.px+o;return{width:r(t.width,n.horizontalTotal),height:r(t.height,n.verticalTotal)}}function pr(e){return()=>e}const Fn=class Fn{static create(t,n,r,i){return new Fn(pr(t),pr(n),pr(r),pr(i))}_offset(t,n){const r=this["_"+t];if(n===0)return r;switch(typeof n){case"number":return()=>r()+n;case"function":return()=>r()+n();default:throw new Error("Not a number of function")}}_passThrough(t){return this._offset(t,0)}constructor(t,n,r,i){this._x=t,this._y=n,this._width=r,this._height=i}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(t){return t?this===t||this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height:!1}modify(t){if(!Object.keys(t).length)return this;const n=r=>{const i=t[r];return typeof i=="number"?pr(i):typeof i=="function"?i:this._passThrough(r)};return new Fn(n("x"),n("y"),n("width"),n("height"))}translate(t,n){return t===0&&n===0?this:new Fn(this._offset("x",t),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(t){return this.translate(t.x,t.y)}expand(t,n=1){return t.left==0&&t.top==0&&t.right==0&&t.bottom==0?this:new Fn(t.left?this._offset("x",-t.left*n):this._passThrough("x"),t.top?this._offset("y",-t.top*n):this._passThrough("y"),t.width?this._offset("width",t.width*n):this._passThrough("width"),t.height?this._offset("height",t.height*n):this._passThrough("height"))}shrink(t){return this.expand(t,-1)}intersect(t){return this===t||t==null?this:new Fn(()=>Math.max(this.x,t.x),()=>Math.max(this.y,t.y),()=>Math.min(this.x2,t.x2)-Math.max(this.x,t.x),()=>Math.min(this.y2,t.y2)-Math.max(this.y,t.y))}union(t){return this===t||t==null?this:new Fn(()=>Math.min(this.x,t.x),()=>Math.min(this.y,t.y),()=>Math.max(this.x2,t.x2)-Math.min(this.x,t.x),()=>Math.max(this.y2,t.y2)-Math.min(this.y,t.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new Fn(pr(this.x),pr(this.y),pr(this.width),pr(this.height))}containsPoint(t,n){return t>=this.x&&t<this.x2&&n>=this.y&&n<this.y2}normalizePoint(t,n){return{x:(t-this.x)/this.width,y:(n-this.y)/this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};Pt(Fn,"ZERO",Fn.create(0,0,0,0));let gr=Fn;class Nv{constructor(t){this.globalOptions=t}pushView(t,n){}popView(t){}renderMark(t,n){}}class Ov extends Nv{constructor(t,n){super(t),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(t,n){this.views.add(t),this.coords=n}renderMark(t,n){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const r=t.render(n);r&&this.buffer.push({mark:t,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const t=this.webGLHelper.gl,n=this.globalOptions.picking;t.bindFramebuffer(t.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&t.bindFramebuffer(t.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let t=!0,n=!0;const r=s=>()=>{t&&s()},i=s=>()=>{t&&n&&s()},o=fc(this.buffer.reverse(),s=>s.mark);for(const[s,a]of[...o.entries()].reverse()){if(!s.isReady())continue;this.batch.push(()=>{t=s.unitView.getEffectiveOpacity()>0}),this.batch.push(...s.prepareRender(this.globalOptions).map(l=>r(l)));let u;for(const l of a){const c=l.coords;c.equals(u)||this.batch.push(r(()=>{n=s.setViewport(c,l.clipRect)})),this.batch.push(i(l.callback)),u=l.coords}}}}class hF extends Nv{constructor(...t){super({}),this.contexts=t}pushView(t,n){for(const r of this.contexts)r.pushView(t,n)}popView(t){for(const n of this.contexts)n.popView(t)}renderMark(t,n){for(const r of this.contexts)r.renderMark(t,n)}}class dF{constructor(t,n){this.point=t,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class $n{static fromMouseEvent(t){return new $n(t.clientX,t.clientY)}constructor(t,n){this.x=t,this.y=n}subtract(t){return new $n(this.x-t.x,this.y-t.y)}add(t){return new $n(this.x-t.x,this.y-t.y)}multiply(t){return new $n(this.x*t,this.y*t)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(t){return t?t===this||t.x===this.x&&t.y===this.y:!1}}const pF=e=>new Promise(t=>setTimeout(t,e));function gF(e){const t=e.requestAnimationFrame||window.requestAnimationFrame,n=e.signal,r=()=>new Promise((i,o)=>{if(n!=null&&n.aborted)return o("aborted");const s=performance.now(),a=s+(e.duration||1e3),u=typeof e.from=="number"?e.from:0,l=typeof e.to=="number"?e.to:1,c=e.easingFunction||(m=>m),f=m=>(m-s)/(a-s),h=m=>m*(l-u)+u,d=m=>Math.max(0,Math.min(1,m)),p=m=>{n!=null&&n.aborted?o("aborted"):(e.onUpdate(h(c(d(f(m))))),m<a?t(p):(e.onUpdate(h(c(1))),i()))};t(p)});return e.delay?n!=null&&n.aborted?Promise.reject("aborted"):pF(e.delay).then(r):r()}class mF{constructor(t){this._renderCallback=t,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(t){this.cancelTransition(t),this.transitions.push(t),this.requestRender()}cancelTransition(t){const n=this.transitions.indexOf(t);n>=0&&this.transitions.splice(n,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(t=>{this._renderRequested=!1;const n=this.transitions;this.transitions=[];let r;for(;r=n.shift();)r(t);this._renderCallback(t)}))}transition(t){return gF({requestAnimationFrame:n=>this.requestTransition(n),...t})}}function Ep(e,t,n,r,i){let o=0,s=!0,a=structuredClone(i),u=a;function l(h,d,p,m){return d+(h-d)*Math.pow(2,-p/m)}function c(h){if(s)return;const d=h-o;o=h;for(const m of Object.keys(u))a[m]=l(a[m],u[m],d,n);t(a);let p=-1/0;for(const m of Object.keys(u))p=Math.max(p,Math.abs(u[m]-a[m]));p<r?(a=u,t(a),s=!0,p!=0&&e.requestRender()):e.requestTransition(m=>c(m))}function f(h){u=h,s&&(s=!1,o=+document.timeline.currentTime,c(o))}return f.stop=()=>{s=!0},f}class bF{constructor(t){this.genomes=new Map,this.baseUrl=t}async initialize(t){const n=new TD(t);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(t){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(t){const n=this.genomes.get(t);if(!n)throw new Error(`No genome with the name ${t} has been configured!`);return n}else{if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");return this.genomes.values().next().value}}}const yF="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQV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K5MG6OUdG+nrkwa49YB9+9gwzJ0/BoPBCMDwcOLllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",wF={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class vF{constructor(t){this._webGLHelper=t,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new or([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:lp(kv),texture:t?this._createTextureNow(yF):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(t,n="normal",r="regular"){if(Be(r)&&(r=wF[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:t,style:n,weight:r};let o=this._fonts.get(i);return o||(o={metrics:void 0,texture:void 0},this._fonts.set(i,o),this._promises.push(this._loadFontEntry(o,i))),o}async _loadFontEntry(t,n){try{const r=await this._loadMetadata(n.family),i=xF(r,n),o=this.fontRepository+zv(n.family)+"/"+i.replace(/\.\w+/,""),s=this._createTexture(o+".png"),a=this._loadFont(o+".json");t.texture=await s,t.metrics=await a}catch{console.warn(`Cannot load font: "${n.family}". Using the embedded default font.`),t.metrics=this._defaultFontEntry.metrics,t.texture=this._defaultFontEntry.texture}}_loadFont(t){let n=this._fontPromises.get(t);return n||(n=fetch(t).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>lp(r)),this._fontPromises.set(t,n)),n}_loadMetadata(t){const n=zv(t);let r=this._metadataPromises.get(n);if(!r){const i=this.fontRepository+n+"/METADATA.pb";r=fetch(i).then(o=>{if(!o.ok)throw new Error("Could not load font metadata. Response status: "+o.status+", url: "+i);return o}).then(o=>o.text()).then(o=>AF(o)).catch(o=>{console.warn(o.message)}),this._metadataPromises.set(n,r)}return r}getDefaultFont(){return this._defaultFontEntry}_createTexture(t){const n=this._webGLHelper.gl;return new Promise((r,i)=>{$a(n,{src:t,min:n.LINEAR},(o,s,a)=>{o?i(o):r(s)})})}_createTextureNow(t){const n=this._webGLHelper.gl;let r;const i=new Promise((o,s)=>{r=$a(n,{src:t,min:n.LINEAR},(a,u,l)=>{a?s(a):o(u)})});return this._promises.push(i),r}}function zv(e){return e.toLowerCase().replaceAll(/[^\w]/g,"")}function AF(e){const t=e.split(`
513
+ `),n=[];let r;for(const i of t)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(n.push(r),r=void 0),r){let o=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(o){const s=o[1];r[s]=o[2]}if(o=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),o){const s=o[1];r[s]=+o[2]}}return n}function xF(e,t){let n,r=Number.POSITIVE_INFINITY;for(const i of e)if(t.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&t.style==i.style){const o=Math.abs(t.weight-i.weight);o<r&&(r=o,n=i)}return n==null?void 0:n.filename}function EF(e,t){const n=[];let r;for(const i of e.split(`
514
+ `))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return n}class _F{constructor(t,n){this.animator=t,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=Ep(t,r=>{var o;const i=r.x-this.lastValue;this.lastValue=r.x,(o=this.callback)==null||o.call(this,i)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=h1([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(t,n){if(this.disabled){n(t);return}this.callback=n;const r=os(this.targetValue+t-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function SF(e){const t={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in e){const o=i;!r.includes(i)&&n.includes(typeof e[o])&&(t[o]=e[o])}return t}const Uv=new Map;async function CF(e,t,n){const r=e.symbol;let i=Uv.get(r)??await IF(e.symbol);return i?(Uv.set(r,i),Ke`
515
515
  <div class="title">
516
516
  <strong>${i.name}</strong>
517
517
  ${i.description}
518
518
  </div>
519
519
  <p class="summary">${i.summary}</p>
520
520
  <p class="source">Source: NCBI RefSeq Gene</p>
521
- `):null}async function T7(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(a=>a.json())).result[r]:null}const I7=Cf(T7,500);function B7(e){return I7(e)}const D7=mt(".4~r"),R7=mt(".4~e");function Vv(e){return e==null?Ke` <span class="na">NA</span> `:Be(e)?e.substring(0,30):Number.isInteger(e)?""+e:Tt(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?R7(e):D7(e):cs(e)?e?"True":"False":xt(e)?Ke`${e.map((t,n)=>[Vv(t),n<e.length-1?", ":nt])}`:"?"+typeof e+" "+e}async function F7(e,t,n){const r=(u,l)=>{var c;for(const[f,h]of Object.entries(t.encoders))if((c=h==null?void 0:h.dataAccessor)!=null&&c.fields.includes(u))switch(f){case"color":case"fill":case"stroke":return Ke`
521
+ `):null}async function kF(e){console.log("Searching: "+e);const t={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${e}[GENE]&sort=relevance&retmode=json`,t).then(i=>i.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,t).then(s=>s.json())).result[r]:null}const TF=kf(kF,500);function IF(e){return TF(e)}const BF=xt(".4~r"),DF=xt(".4~e");function Gv(e){return e==null?Ke` <span class="na">NA</span> `:Be(e)?e.substring(0,30):Number.isInteger(e)?""+e:Tt(e)?Math.abs(e)>Math.pow(10,8)||Math.abs(e)<Math.pow(10,-8)?DF(e):BF(e):fa(e)?e?"True":"False":vt(e)?Ke`${e.map((t,n)=>[Gv(t),n<e.length-1?", ":nt])}`:"?"+typeof e+" "+e}async function RF(e,t,n){const r=(u,l)=>{var c;for(const[f,h]of Object.entries(t.encoders))if((c=h==null?void 0:h.dataAccessor)!=null&&c.fields.includes(u))switch(f){case"color":case"fill":case"stroke":return Ke`
522
522
  <span
523
523
  class="color-legend"
524
524
  style=${`background-color: ${h(l)}`}
@@ -528,30 +528,30 @@ chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e
528
528
  ${i.map(([u,l])=>Ke`
529
529
  <tr>
530
530
  <th>${u}</th>
531
- <td>${Vv(l)} ${r(u,e)}</td>
531
+ <td>${Gv(l)} ${r(u,e)}</td>
532
532
  </tr>
533
533
  `)}
534
534
  </table>
535
- `,a=t.unitView.getTitleText(),s=a?Ke`
535
+ `,s=t.unitView.getTitleText(),a=s?Ke`
536
536
  <div class="title">
537
- <strong>${a}</strong>
537
+ <strong>${s}</strong>
538
538
  </div>
539
- `:"";return Ke`${s}${o}`}class Sl extends _v{constructor(t,n,r,i,o,a){super(t,n,r,i,o,a),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===El)return n;if(n!==qR){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===El)return i}t.afterChildren&&t.afterChildren(this),t.postOrder&&t.postOrder(this)}}findDescendantByPath(t){for(const n of this)if(n.name===t[0]){if(t.length==1)return n;if(n instanceof Sl)return n.findDescendantByPath(t.slice(1))}}findChildByName(t){for(const n of this)if(n.name===t)return n}findDescendantByName(t){let n;return this.visit(r=>{if(r.name==t)return n=r,El}),n}getDefaultResolution(t,n){return"shared"}}class Cl extends Sl{constructor(n,r,i,o,a,s){super(n,r,i,o,a,{layersChildren:!0,...s});Z(this,Cr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){le(this,Cr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!Ep(i)&&!Ap(i))throw new eo("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return z(this,Cr).slice()}*[Symbol.iterator](){for(const n of z(this,Cr))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const o of z(this,Cr))o.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=z(this,Cr).length-1;r>=0;r--)if(z(this,Cr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}Cr=new WeakMap;class jv{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const o=[];t.push(o);for(let a=0;a<n;a++){const s=i*n+a;s<this.n&&o.push(s)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const o=[];t.push(o);for(let a=0;a<r;a++){const s=a*n+i;s<this.n&&o.push(s)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const M7="chromosome_ticks_and_labels",P7={x:"width",y:"height"};function yp(e){return e=="x"?"y":"x"}const Tf={x:["bottom","top"],y:["left","right"]},wp=Object.fromEntries(Object.entries(Tf).map(([e,t])=>t.map(n=>[n,e])).flat(1));function ii(e){return wp[e]}class $v extends Cl{constructor(t,n,r,i,o,a){const s=n=="locus",u={...s?N7:qv,...L7(n,t),...t};super(s?O7(u,n):Wv(u,n),r,i,o,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=u}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return wp[this.axisProps.orient]=="x"?new ri(n,t):new ri(t,n)}getPerpendicularSize(){return vp(this.axisProps)}isPickingSupported(){return!1}}function vp(e){const t=ii(e.orient);let n=e.ticks&&e.tickSize||0;return e.labels&&(n+=e.labelPadding,t=="x"?n+=e.labelFontSize:n+=30),e.title&&(n+=e.titlePadding+e.titleFontSize),n=Math.min(e.maxExtent||1/0,Math.max(e.minExtent||0,n)),n}const qv={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function L7(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",o="middle",a=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(a)>30?(i=a>0==(n=="bottom")?"left":"right",o="middle"):o=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:a,labelBaseline:o}}function Wv(e,t){const n={...e,extent:vp(e)},r=ii(n.orient),i=yp(r),o=n.orient=="bottom"||n.orient=="right"?1:-1,a=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"domain",data:{values:[0]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:a,size:n.domainWidth}}),u=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*o,[i]:a,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:a},[i+"2"]:{value:a-n.tickSize/n.extent*(a?1:-1)}}}),c=()=>({name:"title",data:{values:[0]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-a}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(u()),d},h={resolve:{scale:{[r]:"forced"}},[P7[yp(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(s()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(c()),h}const N7={...qv,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function O7(e,t){const n={...e,extent:vp(e)},r=ii(n.orient),i=yp(r),o=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:o,[i+"2"]:o-n.chromTickSize/n.extent*(o?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),s=()=>{let c;switch(n.orient){case"top":c={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":c={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":c={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":c={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:c={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:e.chromLabelAlign,baseline:"alphabetic",clip:!1,...c},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let u;switch(n.orient){case"bottom":case"top":u={};break;case"left":u={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":u={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:u={}}const l=Wv({...e,...u},t);if(e.chromTicks||e.chromLabels){const c={name:M7,data:{lazy:{type:"axisGenome",channel:ii(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&c.layer.push(a()),e.chromLabels){c.layer.push(s());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(c)}return l}class z7 extends Cl{constructor(t,n,r,i,o,a){const u={...n=="locus"?U7:Zv,...t};super(j7(u,n),r,i,o,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...a}),this.axisProps=u}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const Zv={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},U7={...Zv,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function G7(e,t){const n=e,r=ii(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:e}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:t}}}}function H7(e,t){const n=e,r=ii(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:t,band:0}}}}function V7(e,t){const n=e,r=ii(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:t,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[n.chromGridFillEven??"white",n.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[n.chromGridFillEven?1:0,n.chromGridFillOdd?1:0]}}}}}function j7(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(V7(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(H7(n,t)),n.grid&&n.gridOpacity>0&&r.push(G7(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[ii(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const Yv={anchor:"middle",frame:"group",offset:10,orient:"top",align:void 0,angle:0,baseline:"alphabetic",dx:0,dy:0,color:void 0,font:void 0,fontSize:12,fontStyle:"normal",fontWeight:"normal"},$7={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},q7={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},W7={start:0,middle:.5,end:1},Z7={start:"left",middle:"center",end:"right"};function Y7(e){if(!e)return;const t=Be(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":$7,overlay:q7}[t.style]??{},r={...Yv,...n,...t};let i={},o={x:0,y:0};const a=W7[r.anchor??"middle"];switch(r.orient){case"top":o={x:a,y:1},i={baseline:"alphabetic",angle:0};break;case"right":o={x:1,y:1-a},i={baseline:"alphabetic",angle:90};break;case"bottom":o={x:a,y:0},i={baseline:"top",angle:0};break;case"left":o={x:0,y:a},i={baseline:"alphabetic",angle:-90};break}const s={...Yv,...i,...n,...t},u={xOffset:0,yOffset:0};switch(r.orient){case"top":u.yOffset=-s.offset;break;case"right":u.xOffset=s.offset;break;case"bottom":u.yOffset=s.offset;break;case"left":u.xOffset=-s.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...o,...u,text:s.text,align:s.align??Z7[s.anchor],angle:s.angle,baseline:s.baseline,dx:s.dx,dy:s.dy,color:s.color,font:s.font,size:s.fontSize,fontStyle:s.fontStyle,fontWeight:s.fontWeight}}}class Q7{constructor(t){Z(this,Io,void 0);Z(this,Ai,0);Z(this,Ei,0);le(this,Io,new Array(t))}push(t){z(this,Io)[z(this,Ai)]=t,le(this,Ai,(z(this,Ai)+1)%this.size),le(this,Ei,Math.min(z(this,Ei)+1,this.size))}get(){const t=z(this,Io);return z(this,Ei)<this.size?t.slice(0,z(this,Ei)):t.slice(z(this,Ai),this.size).concat(t.slice(0,z(this,Ai)))}get size(){return z(this,Io).length}get length(){return z(this,Ei)}}Io=new WeakMap,Ai=new WeakMap,Ei=new WeakMap;let to,Qv=0;function Xv(){return performance.now()-Qv<50}function X7(e){return function(...t){Qv=performance.now(),e(...t)}}function K7(e,t,n,r,i){if(n=X7(n),e.type=="wheel"){e.uiEvent.preventDefault();const o=e.uiEvent,a=o.deltaMode?120:1;if(!o.deltaX&&!o.deltaY)return;to==null||to.stop();let{x:s,y:u}=e.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(s=+l.x(r.datum)*t.width+t.x),l.y&&!l.y2&&!l.y.constant&&(u=(1-+l.y(r.datum))*t.height+t.y)}Math.abs(o.deltaX)<Math.abs(o.deltaY)?n({x:s,y:u,xDelta:0,yDelta:0,zDelta:o.deltaY*a/300}):n({x:s,y:u,xDelta:-o.deltaX*a,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){to&&to.stop();const o=new Q7(30),a=e.uiEvent;a.preventDefault();let s=$n.fromMouseEvent(a);const u=f=>{const h=$n.fromMouseEvent(f);o.push({point:h,timestamp:performance.now()});const d=h.subtract(s);n({x:s.x,y:s.y,xDelta:d.x,yDelta:d.y,zDelta:0}),s=h},l=()=>{const h=performance.now(),d=o.get().filter(S=>h-S.timestamp<160);if(d.length<5||!i||J7(d))return;const p=d.at(-1),m=d[0],y=p.point.subtract(m.point).multiply(1/(p.timestamp-m.timestamp));let w=s.x,A=s.y;to=bp(i,S=>{n({x:S.x,y:S.y,xDelta:w-S.x,yDelta:A-S.y,zDelta:0}),w=S.x,A=S.y},150,.5,{x:w,y:A}),to({x:s.x-y.x*250,y:s.y-y.y*250})},c=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c),l()};document.addEventListener("mouseup",c,!1),document.addEventListener("mousemove",u,!1)}}function J7(e){const t=e[Math.floor(e.length/2)],n=t.point.subtract(e[0].point).multiply(t.timestamp-e[0].timestamp),r=e.at(-1).point.subtract(t.point).multiply(e.at(-1).timestamp-t.timestamp),i=n.length,o=r.length,a=.4;return o/i<a}class eM extends Sl{constructor(n,r,i,o,a,s,u){super(n,r,i,o,a,u);Z(this,kr);Z(this,Nh);Z(this,Do);Z(this,qu);Z(this,Wu);Z(this,Zu);Z(this,Oh);Z(this,os);Z(this,zh);Z(this,ns,1/0);Z(this,rs,10);Z(this,tn,[]);Z(this,Bo,{});Z(this,is,0);this.spec=n,le(this,rs,n.spacing??10),le(this,ns,s),le(this,tn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),z(this,tn).push(new Jv(n,this,z(this,is))),M_(this,is)._++}setChildren(n){le(this,tn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=z(this,tn).findIndex(o=>o.view==n);if(i>=0)z(this,tn)[i]=new Jv(r,this,z(this,is));else throw new Error("Not my child view!")}get children(){return z(this,tn).map(n=>n.view)}get childCount(){return z(this,tn).length}async createAxes(){const n=[];for(const r of sa){const i=this.resolutions.axis[r];if(i){const o=i.getAxisProps();if(o){const a={title:i.getTitle(),orient:Tf[r][0],...o},s=new $v(a,i.scaleResolution.type,this.context,this,this);n.push(s.initializeChildren()),z(this,Bo)[r]=s}}}return Promise.all([...n,...z(this,tn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of z(this,tn))yield*n.getChildren();for(const n of Object.values(z(this,Bo)))yield n}getOverhang(){return X(this,Oh,j_).call(this).union(X(this,os,Wh).call(this))}getSize(){return this._cache("size",()=>new ri(X(this,Wu,e1).call(this,"column"),X(this,Wu,e1).call(this,"row")).addPadding(X(this,os,Wh).call(this)))}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(X(this,os,Wh).call(this)),n.pushView(this,r);const o={devicePixelRatio:this.context.devicePixelRatio},a=vv(X(this,qu,Jm).call(this,"column"),r.width,o),s=vv(X(this,qu,Jm).call(this,"row"),r.height,o),u=new jv(z(this,kr,Mo).length,z(this,ns)??1/0),l=c=>Math.round(c*devicePixelRatio)/devicePixelRatio;for(const[c,f]of z(this,kr,Mo).entries()){const{view:h,axes:d,gridLines:p,background:m,backgroundStroke:y,title:w}=f,[A,S]=u.getCellCoords(c),_=a[X(this,Zu,t1).call(this,"column",A)],k=s[X(this,Zu,t1).call(this,"row",S)],B=h.getViewportSize(),I=h.getSize(),D=h.getOverhang(),M=_.location-D.left,G=k.location-D.top,N=(He,L)=>(He[L].grow?(L=="width"?_:k).size:He[L].px)+D[L],ne=N(B,"width"),ie=N(B,"height"),he=N(I,"width"),me=N(I,"height"),Fe=f.scrollbars.horizontal,Ae=f.scrollbars.vertical,Le=Fe?()=>l(Fe.viewportOffset):()=>0,Oe=Ae?()=>l(Ae.viewportOffset):()=>0,Je=new gr(()=>r.x+M,()=>r.y+G,()=>ne,()=>ie),Ce=h.isScrollable(),ke=Ce?new gr(()=>r.x+M-Le(),()=>r.y+G-Oe(),()=>he,()=>me):Je;f.coords=Je;const gt=i.clipRect?Je.intersect(i.clipRect):Je;m==null||m.render(n,gt,{...i,clipRect:void 0});for(const He of Object.values(p))He.render(n,Je,i);const $t=iM(h)||Ce;$t&&h.render(n,ke,{...i,clipRect:gt}),y==null||y.render(n,gt,{...i,clipRect:void 0});for(const[He,L]of Object.entries(d)){const P=He=="left"||He=="right"?"vertical":"horizontal",q=f.scrollbars[P],j=q?Je.modify(P=="vertical"?{y:()=>ke.y,height:me}:{x:()=>ke.x,width:he}):Je,Y=Kv(j,He,L);let C=i.clipRect;q&&(C=Y.intersect(C).intersect(q?Je.modify(P=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,Y,{...i,clipRect:C})}for(const He of Object.values(z(this,Bo))){const P=He.axisProps.orient;(P=="left"&&A==0||P=="right"&&A==u.nCols-1||P=="top"&&S==0||P=="bottom"&&S==u.nRows-1)&&He.render(n,Kv(Je.shrink(f.view.getOverhang()),P,He),i)}$t||h.render(n,ke,i);for(const He of Object.values(f.scrollbars))He.updateScrollbar(Je,ke),He.render(n,r,i);w==null||w.render(n,Je,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=z(this,kr,Mo).find(o=>o.coords.containsPoint(n.point.x,n.point.y));for(const o of Object.values((r==null?void 0:r.scrollbars)??{}))if(o.coords.containsPoint(n.point.x,n.point.y)&&(o.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof Qt||i instanceof Cl)&&K7(n,r.coords,o=>X(this,zh,$_).call(this,r.coords,r.view,o),this.context.getCurrentHover(),this.context.animator)),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}ns=new WeakMap,rs=new WeakMap,tn=new WeakMap,Bo=new WeakMap,is=new WeakMap,kr=new WeakSet,Mo=function(){return z(this,tn).filter(n=>n.view.isConfiguredVisible())},Nh=new WeakSet,V_=function(){return new jv(z(this,kr,Mo).length,z(this,ns)??1/0)},Do=new WeakSet,Ju=function(n){const r=n=="column"?"width":"height",i=(o,a)=>o.map(s=>{const l=z(this,kr,Mo)[s].getOverhangAndPadding();return n=="column"?a?l.right:l.left:a?l.bottom:l.top}).reduce((s,u)=>Math.max(s,u),0);return this._cache(`size/directionSizes/${n}`,()=>z(this,Nh,V_)[n=="column"?"colIndices":"rowIndices"].map(o=>({axisBefore:i(o,0),axisAfter:i(o,1),view:VR(o.map(a=>z(this,kr,Mo)[a].view.getViewportSize()[r]))})))},qu=new WeakSet,Jm=function(n){const r=X(this,Do,Ju).call(this,n),i=[];i.push(xl);for(const[o,a]of r.entries())o>0&&i.push({px:z(this,rs),grow:0}),(o==0||this.wrappingFacet)&&i.push(xl),i.push({px:a.axisBefore,grow:0}),i.push(a.view),i.push({px:a.axisAfter,grow:0}),(o==r.length-1||this.wrappingFacet)&&i.push(xl);return i},Wu=new WeakSet,e1=function(n){let r=0,i=0;const o=n=="row"?this.spec.height:this.spec.width;if(o||o===0)return Av(o);const a=X(this,Do,Ju).call(this,n);for(const[s,u]of a.entries())s>0&&(i+=z(this,rs)),(s==0||this.wrappingFacet)&&(i+=0),i+=u.axisBefore,i+=u.view.px??0,r+=u.view.grow??0,i+=u.axisAfter,(s==a.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Zu=new WeakSet,t1=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Oh=new WeakSet,j_=function(){const n=X(this,Do,Ju).call(this,"column"),r=X(this,Do,Ju).call(this,"row");return!n.length||!r.length?Ct.zero():new Ct(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},os=new WeakSet,Wh=function(){const n=r=>{const i=wp[r],o=z(this,Bo)[i];return(o==null?void 0:o.axisProps.orient)!==r?0:Math.max(o.getPerpendicularSize()+o.axisProps.offset,0)};return new Ct(n("top"),n("right"),n("bottom"),n("left"))},zh=new WeakSet,$_=function(n,r,i){for(const[o,a]of Object.entries(rM(r))){if(a.size<=0)continue;const s=n.normalizePoint(i.x,i.y),u=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:u.x-s.x,y:u.y-s.y};for(const c of a)c.zoom(2**i.zDelta,o=="y"?1-s[o]:s[o],o=="x"?l.x:-l.y)}this.context.animator.requestRender()};function tM(e){if(!(!e||!e.fill||e.fillOpacity===0))return{configurableVisibility:!1,data:{values:[{}]},mark:{color:e.fill,opacity:e.fillOpacity??1,type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0}}}function nM(e){if(!(!e||!e.stroke||e.strokeWidth===0||e.strokeOpacity===0))return{configurableVisibility:!1,resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},data:{values:[{x:0,y:0,x2:1,y2:0},{x:1,y:0,x2:1,y2:1},{x:1,y:1,x2:0,y2:1},{x:0,y:1,x2:0,y2:0}]},mark:{size:e.strokeWidth??1,color:e.stroke??"lightgray",strokeCap:"square",opacity:e.strokeOpacity??1,type:"rule",clip:!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:null},y:{field:"y",type:"quantitative",scale:null},x2:{field:"x2"},y2:{field:"y2"}}}}function rM(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const o=n.getScaleResolution(r);o&&o.isZoomable()&&i.add(o)}}),t}function iM(e){let t=!0;return e.visit(n=>{n instanceof Qt&&t&&(t=n.mark.properties.clip===!0)}),t}function Kv(e,t,n){const r=n.axisProps,i=n.getPerpendicularSize();if(t=="bottom")return e.translate(0,e.height+r.offset).modify({height:i});if(t=="top")return e.translate(0,-i-r.offset).modify({height:i});if(t=="left")return e.translate(-i-r.offset,0).modify({width:i});if(t=="right")return e.translate(e.width+r.offset,0).modify({width:i})}class Jv{constructor(t,n,r){if(this.layoutParent=n,this.view=t,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.title=void 0,this.coords=gr.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,o="view"in i?i==null?void 0:i.view:void 0,a=tM(o);a&&(this.background=new Qt(a,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const s=nM(o);s&&(this.backgroundStroke=new Qt(s,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const u=Y7(t.spec.title);if(u){const l=new Qt(u,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new ex(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new ex(this,"vertical"))}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars)}async createAxes(){const{view:t,axes:n,gridLines:r}=this,i=(s,u)=>{const l=s.getAxisProps();if(l===null)return;const c=l?{...l}:{};if(!c.orient){for(const f of Tf[u])if(!n[f]){c.orient=f;break}if(!c.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(c.title??(c.title=s.getTitle()),!Tf[u].includes(c.orient))throw new Error(`Invalid axis orientation "${c.orient}" on channel "${u}"!`);return c},o=async(s,u,l)=>{const c=i(s,u);if(c){if(n[c.orient])throw new Error(`An axis with the orient "${c.orient}" already exists!`);const f=new $v(c,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[c.orient]=f,await f.initializeChildren()}},a=async(s,u,l)=>{const c=i(s,u);if(c&&(c.grid||c.chromGrid)){const f=new z7(c,s.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[c.orient]=f,await f.initializeChildren()}};for(const s of["x","y"])if(t.needsAxes[s]){const u=t.resolutions.axis[s];if(!u)continue;await o(u,s,t)}for(const s of["x","y"])if(t.needsAxes[s]){const u=t.getAxisResolution(s);if(!u)continue;await a(u,s,t)}if(t instanceof Cl){for(const s of t)for(const[u,l]of Object.entries(s.resolutions.axis)){const c=l.getAxisProps();c&&c.orient&&await o(l,u,s)}for(const s of t)for(const[u,l]of Object.entries(s.resolutions.axis)){const c=l.getAxisProps();c&&!c.orient&&await o(l,u,s)}}[...Object.values(n),...Object.values(r)].forEach(s=>s.visit(u=>{u instanceof Qt&&u.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new Ct(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class ex extends Qt{constructor(n,r){const i={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});Z(this,as,void 0);Z(this,Yu,gr.ZERO);Z(this,_i,0);Z(this,Ro,0);Pt(this,"viewportOffset",0);this.config=i,le(this,as,r),this.interpolateViewportOffset=bp(this.context.animator,o=>{this.viewportOffset=o.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(o,a)=>{if(a.stopPropagation(),z(this,_i)<=0)return;const s=d=>r=="vertical"?d.clientY:d.clientX,u=a.uiEvent;u.preventDefault();const l=this.scrollOffset,c=s(u),f=d=>{const p=aa(s(d)-c+l,0,z(this,_i));this.interpolateViewportOffset({x:p/z(this,_i)*z(this,Ro)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/z(this,Ro)*z(this,_i)}render(n,r,i){super.render(n,z(this,Yu),i)}updateScrollbar(n,r){const i=this.config.scrollbarPadding,o=this.config.scrollbarSize,a=z(this,as)=="horizontal"?"width":"height",s=Math.min(1,n[a]/r[a]),u=n[a]-2*i,l=s*u;le(this,_i,u-l),le(this,Ro,r[a]-n[a]),this.viewportOffset=aa(this.viewportOffset,0,z(this,Ro)),le(this,Yu,z(this,as)=="vertical"?new gr(()=>n.x+n.width-o-i,()=>n.y+i+this.scrollOffset,()=>o,()=>l):new gr(()=>n.x+i+this.scrollOffset,()=>n.y+n.height-o-i,()=>l,()=>o))}}as=new WeakMap,Yu=new WeakMap,_i=new WeakMap,Ro=new WeakMap;class xp extends eM{constructor(t,n,r,i,o){super(t,n,r,i,o,_p(t)?t.columns:If(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=_p(t)?t.concat:If(t)?t.vconcat:t.hconcat;this.setChildren(await Promise.all(n.map((r,i)=>this.context.createOrImportView(r,this,this,"grid"+i)))),await this.createAxes()}getDefaultResolution(t,n){return n=="axis"?"independent":If(this.spec)&&t==="x"||rx(this.spec)&&t==="y"?"shared":"independent"}}const tx="viewRoot";class oM{constructor(t={}){Z(this,ss,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,o,a,s,u)=>new r(i,o,a,s,i.name??u);this.addViewType(Ep,n(Cl)),this.addViewType(Ap,n(Qt)),this.addViewType(If,n(xp)),this.addViewType(rx,n(xp)),this.addViewType(_p,n(xp)),this.addViewType(lM,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){z(this,ss).set(t,n)}createView(t,n,r,i,o){for(const[a,s]of z(this,ss))if(a(t))return s(t,n,r,i,o);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...z(this,ss).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,o,a){let s;if(sM(t)){let l;if("url"in t.import)if(this.options.allowImport)l=await f7(t,i.getBaseUrl(),n);else throw new eo("Importing views is not allowed!",r);else if("template"in t.import)l=nx(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));a==null||a(l),aM(l,t),s=l}else s=t;!i&&this.options.wrapRoot&&(Ap(s)||Ep(s))&&o===tx&&(s={name:"implicitRoot",vconcat:[s]});const u=this.createView(s,n,r,i,o);return u instanceof Sl&&await u.initializeChildren(),u}}ss=new WeakMap;function nx(e,t){var r,i;const n=(i=(r=t.spec)==null?void 0:r.templates)==null?void 0:i[e];if(n)return structuredClone(n);if(t.dataParent)return nx(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function aM(e,t){t.name!=null&&(e.name=t.name);const n=xt(t.params)?t.params:At(t.params)?Object.entries(t.params).map(([r,i])=>({name:r,value:i})):[];if(n.length){e.params??(e.params=[]);for(const r of n){const i=e.params.findIndex(o=>o.name==r.name);i>=0&&(e.params[i]=r)}for(const r of n)e.params.some(i=>i.name==r.name)||e.params.push(r)}}function Ap(e){return"mark"in e&&(Be(e.mark)||At(e.mark))}function Ep(e){return"layer"in e&&At(e.layer)}function sM(e){return"import"in e}function If(e){return"vconcat"in e&&xt(e.vconcat)}function rx(e){return"hconcat"in e&&xt(e.hconcat)}function _p(e){return"concat"in e&&xt(e.concat)}function lM(e){return"samples"in e&&At(e.samples)&&"spec"in e&&At(e.spec)}function uM(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){if(!MB(r))continue;const i=r.bind;if(!i||!("input"in i))continue;const o=r.name,a=e.getSetter(o),s=e.getValue(o),u=i.name??o,l=i.debounce?Cf(a,i.debounce,!1):a,c=`${t}-param-${o}`;if(i.input=="range")n.push(Ke`<label for=${c}>${u}</label>
539
+ `:"";return Ke`${a}${o}`}class Cl extends Av{constructor(t,n,r,i,o,s){super(t,n,r,i,o,s),this.spec=t}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(t,n){throw new Error("Not implemented")}visit(t){let n;try{n=t(this)}catch(r){throw r.view=this,r}if(n===_l)return n;if(n!==jD){t.beforeChildren&&t.beforeChildren(this);for(const r of this){const i=r.visit(t);if(i===_l)return i}t.afterChildren&&t.afterChildren(this),t.postOrder&&t.postOrder(this)}}findDescendantByPath(t){for(const n of this)if(n.name===t[0]){if(t.length==1)return n;if(n instanceof Cl)return n.findDescendantByPath(t.slice(1))}}findChildByName(t){for(const n of this)if(n.name===t)return n}findDescendantByName(t){let n;return this.visit(r=>{if(r.name==t)return n=r,_l}),n}getDefaultResolution(t,n){return"shared"}}class kl extends Cl{constructor(n,r,i,o,s,a){super(n,r,i,o,s,{layersChildren:!0,...a});Z(this,Cr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){ae(this,Cr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,i=>{if(!Ip(i)&&!Tp(i))throw new Ji("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return z(this,Cr).slice()}*[Symbol.iterator](){for(const n of z(this,Cr))yield n}render(n,r,i={}){if(super.render(n,r,i),!!this.isConfiguredVisible()){n.pushView(this,r);for(const o of z(this,Cr))o.render(n,r,i);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=z(this,Cr).length-1;r>=0;r--)if(z(this,Cr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}Cr=new WeakMap;class Hv{constructor(t,n){this.n=t,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const o=[];t.push(o);for(let s=0;s<n;s++){const a=i*n+s;a<this.n&&o.push(a)}}return t}get colIndices(){const t=[],n=this.nCols,r=this.nRows;for(let i=0;i<n;i++){const o=[];t.push(o);for(let s=0;s<r;s++){const a=s*n+i;a<this.n&&o.push(a)}}return t}getCellIndex(t,n){let r=0;if(this.maxCols==1/0)r=n==0?t:void 0;else{if(t>=this.maxCols)return;r=n*this.nCols+t}return r<this.n?r:void 0}getCellCoords(t){if(!(t<0||t>=this.n))return[t%this.nCols,Math.floor(t/this.nCols)]}}const FF="chromosome_ticks_and_labels",MF={x:"width",y:"height"};function _p(e){return e=="x"?"y":"x"}const If={x:["bottom","top"],y:["left","right"]},Sp=Object.fromEntries(Object.entries(If).map(([e,t])=>t.map(n=>[n,e])).flat(1));function ri(e){return Sp[e]}class Vv extends kl{constructor(t,n,r,i,o,s){const a=n=="locus",u={...a?LF:jv,...PF(n,t),...t};super(a?NF(u,n):$v(u,n),r,i,o,`axis_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=u}getSize(){const t={px:this.getPerpendicularSize()},n={grow:1};return Sp[this.axisProps.orient]=="x"?new ni(n,t):new ni(t,n)}getPerpendicularSize(){return Cp(this.axisProps)}isPickingSupported(){return!1}}function Cp(e){const t=ri(e.orient);let n=e.ticks&&e.tickSize||0;return e.labels&&(n+=e.labelPadding,t=="x"?n+=e.labelFontSize:n+=30),e.title&&(n+=e.titlePadding+e.titleFontSize),n=Math.min(e.maxExtent||1/0,Math.max(e.minExtent||0,n)),n}const jv={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function PF(e,t){const n=t.orient,r=e=="nominal"||e=="ordinal";let i="center",o="middle",s=t.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(s)>30?(i=s>0==(n=="bottom")?"left":"right",o="middle"):o=n=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:s,labelBaseline:o}}function $v(e,t){const n={...e,extent:Cp(e)},r=ri(n.orient),i=_p(r),o=n.orient=="bottom"||n.orient=="right"?1:-1,s=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"domain",data:{values:[0]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[i]:s,size:n.domainWidth}}),u=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[i+"Offset"]:(n.tickSize+n.labelPadding)*o,[i]:s,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:t},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[i]:{value:s},[i+"2"]:{value:s-n.tickSize/n.extent*(s?1:-1)}}}),c=()=>({name:"title",data:{values:[0]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[i]:1-s}}),f=()=>{const d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:t}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(u()),d},h={resolve:{scale:{[r]:"forced"}},[MF[_p(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:e}},layer:[]};return n.domain&&h.layer.push(a()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(c()),h}const LF={...jv,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function NF(e,t){const n={...e,extent:Cp(e)},r=ri(n.orient),i=_p(r),o=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:e.chromTickDash,strokeDashOffset:e.chromTickDashOffset,[i]:o,[i+"2"]:o-n.chromTickSize/n.extent*(o?1:-1),color:e.chromTickColor,size:n.chromTickWidth}}),a=()=>{let c;switch(n.orient){case"top":c={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":c={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":c={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":c={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:c={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:e.chromLabelAlign,baseline:"alphabetic",clip:!1,...c},encoding:{[r+"2"]:{field:"continuousEnd",type:t},text:{field:"name"}}}};let u;switch(n.orient){case"bottom":case"top":u={};break;case"left":u={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":u={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:u={}}const l=$v({...e,...u},t);if(e.chromTicks||e.chromLabels){const c={name:FF,data:{lazy:{type:"axisGenome",channel:ri(n.orient)}},encoding:{[r]:{field:"continuousStart",type:t,band:0}},layer:[]};if(e.chromTicks&&c.layer.push(s()),e.chromLabels){c.layer.push(a());let f;l.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(c)}return l}class OF extends kl{constructor(t,n,r,i,o,s){const u={...n=="locus"?zF:qv,...t};super(VF(u,n),r,i,o,`axisGrid_${t.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=u}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const qv={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},zF={...qv,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function UF(e,t){const n=e,r=ri(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:e}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:t}}}}function GF(e,t){const n=e,r=ri(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:t,band:0}}}}function HF(e,t){const n=e,r=ri(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:t,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[n.chromGridFillEven??"white",n.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[n.chromGridFillEven?1:0,n.chromGridFillOdd?1:0]}}}}}function VF(e,t){const n={...e},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(HF(n,t)),n.chromGrid&&n.chromGridOpacity>0&&r.push(GF(n,t)),n.grid&&n.gridOpacity>0&&r.push(UF(n,t)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[ri(e.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const Wv={anchor:"middle",frame:"group",offset:10,orient:"top",align:void 0,angle:0,baseline:"alphabetic",dx:0,dy:0,color:void 0,font:void 0,fontSize:12,fontStyle:"normal",fontWeight:"normal"},jF={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},$F={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},qF={start:0,middle:.5,end:1},WF={start:"left",middle:"center",end:"right"};function ZF(e){if(!e)return;const t=Be(e)?{text:e}:e;if(!t.text||t.orient=="none")return;const n={"track-title":jF,overlay:$F}[t.style]??{},r={...Wv,...n,...t};let i={},o={x:0,y:0};const s=qF[r.anchor??"middle"];switch(r.orient){case"top":o={x:s,y:1},i={baseline:"alphabetic",angle:0};break;case"right":o={x:1,y:1-s},i={baseline:"alphabetic",angle:90};break;case"bottom":o={x:s,y:0},i={baseline:"top",angle:0};break;case"left":o={x:0,y:s},i={baseline:"alphabetic",angle:-90};break}const a={...Wv,...i,...n,...t},u={xOffset:0,yOffset:0};switch(r.orient){case"top":u.yOffset=-a.offset;break;case"right":u.xOffset=a.offset;break;case"bottom":u.yOffset=a.offset;break;case"left":u.xOffset=-a.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...o,...u,text:a.text,align:a.align??WF[a.anchor],angle:a.angle,baseline:a.baseline,dx:a.dx,dy:a.dy,color:a.color,font:a.font,size:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight}}}class YF{constructor(t){Z(this,Io,void 0);Z(this,yi,0);Z(this,wi,0);ae(this,Io,new Array(t))}push(t){z(this,Io)[z(this,yi)]=t,ae(this,yi,(z(this,yi)+1)%this.size),ae(this,wi,Math.min(z(this,wi)+1,this.size))}get(){const t=z(this,Io);return z(this,wi)<this.size?t.slice(0,z(this,wi)):t.slice(z(this,yi),this.size).concat(t.slice(0,z(this,yi)))}get size(){return z(this,Io).length}get length(){return z(this,wi)}}Io=new WeakMap,yi=new WeakMap,wi=new WeakMap;let eo,Zv=0;function Yv(){return performance.now()-Zv<50}function QF(e){return function(...t){Zv=performance.now(),e(...t)}}function XF(e,t,n,r,i){if(n=QF(n),e.type=="wheel"){e.uiEvent.preventDefault();const o=e.uiEvent,s=o.deltaMode?120:1;if(!o.deltaX&&!o.deltaY)return;eo==null||eo.stop();let{x:a,y:u}=e.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(a=+l.x(r.datum)*t.width+t.x),l.y&&!l.y2&&!l.y.constant&&(u=(1-+l.y(r.datum))*t.height+t.y)}Math.abs(o.deltaX)<Math.abs(o.deltaY)?n({x:a,y:u,xDelta:0,yDelta:0,zDelta:o.deltaY*s/300}):n({x:a,y:u,xDelta:-o.deltaX*s,yDelta:0,zDelta:0})}else if(e.type=="mousedown"&&e.uiEvent.button===0){eo&&eo.stop();const o=new YF(30),s=e.uiEvent;s.preventDefault();let a=$n.fromMouseEvent(s);const u=f=>{const h=$n.fromMouseEvent(f);o.push({point:h,timestamp:performance.now()});const d=h.subtract(a);n({x:a.x,y:a.y,xDelta:d.x,yDelta:d.y,zDelta:0}),a=h},l=()=>{const h=performance.now(),d=o.get().filter(S=>h-S.timestamp<160);if(d.length<5||!i||KF(d))return;const p=d.at(-1),m=d[0],y=p.point.subtract(m.point).multiply(1/(p.timestamp-m.timestamp));let w=a.x,x=a.y;eo=Ep(i,S=>{n({x:S.x,y:S.y,xDelta:w-S.x,yDelta:x-S.y,zDelta:0}),w=S.x,x=S.y},150,.5,{x:w,y:x}),eo({x:a.x-y.x*250,y:a.y-y.y*250})},c=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",c),l()};document.addEventListener("mouseup",c,!1),document.addEventListener("mousemove",u,!1)}}function KF(e){const t=e[Math.floor(e.length/2)],n=t.point.subtract(e[0].point).multiply(t.timestamp-e[0].timestamp),r=e.at(-1).point.subtract(t.point).multiply(e.at(-1).timestamp-t.timestamp),i=n.length;return r.length/i<.4}class JF extends Cl{constructor(n,r,i,o,s,a,u){super(n,r,i,o,s,u);Z(this,kr);Z(this,zh);Z(this,Do);Z(this,Wu);Z(this,Zu);Z(this,Yu);Z(this,Uh);Z(this,sa);Z(this,Gh);Z(this,ra,1/0);Z(this,ia,10);Z(this,tn,[]);Z(this,Bo,{});Z(this,oa,0);this.spec=n,ae(this,ia,n.spacing??10),ae(this,ra,a),ae(this,tn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),z(this,tn).push(new Xv(n,this,z(this,oa))),D_(this,oa)._++}setChildren(n){ae(this,tn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const i=z(this,tn).findIndex(o=>o.view==n);if(i>=0)z(this,tn)[i]=new Xv(r,this,z(this,oa));else throw new Error("Not my child view!")}get children(){return z(this,tn).map(n=>n.view)}get childCount(){return z(this,tn).length}async createAxes(){const n=[];for(const r of ss){const i=this.resolutions.axis[r];if(i){const o=i.getAxisProps();if(o){const s={title:i.getTitle(),orient:If[r][0],...o},a=new Vv(s,i.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),z(this,Bo)[r]=a}}}return Promise.all([...n,...z(this,tn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of z(this,tn))yield*n.getChildren();for(const n of Object.values(z(this,Bo)))yield n}getOverhang(){return X(this,Uh,G_).call(this).union(X(this,sa,Yh).call(this))}getSize(){return this._cache("size",()=>new ni(X(this,Zu,i1).call(this,"column"),X(this,Zu,i1).call(this,"row")).addPadding(X(this,sa,Yh).call(this)))}render(n,r,i={}){if(super.render(n,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(X(this,sa,Yh).call(this)),n.pushView(this,r);const o={devicePixelRatio:this.context.devicePixelRatio},s=bv(X(this,Wu,r1).call(this,"column"),r.width,o),a=bv(X(this,Wu,r1).call(this,"row"),r.height,o),u=new Hv(z(this,kr,Mo).length,z(this,ra)??1/0),l=c=>Math.round(c*devicePixelRatio)/devicePixelRatio;for(const[c,f]of z(this,kr,Mo).entries()){const{view:h,axes:d,gridLines:p,background:m,backgroundStroke:y,title:w}=f,[x,S]=u.getCellCoords(c),_=s[X(this,Yu,o1).call(this,"column",x)],k=a[X(this,Yu,o1).call(this,"row",S)],B=h.getViewportSize(),I=h.getSize(),D=h.getOverhang(),M=_.location-D.left,G=k.location-D.top,N=(Ve,L)=>(Ve[L].grow?(L=="width"?_:k).size:Ve[L].px)+D[L],ne=N(B,"width"),ie=N(B,"height"),he=N(I,"width"),me=N(I,"height"),Fe=f.scrollbars.horizontal,xe=f.scrollbars.vertical,Le=Fe?()=>l(Fe.viewportOffset):()=>0,Oe=xe?()=>l(xe.viewportOffset):()=>0,Je=new gr(()=>r.x+M,()=>r.y+G,()=>ne,()=>ie),Ce=h.isScrollable(),ke=Ce?new gr(()=>r.x+M-Le(),()=>r.y+G-Oe(),()=>he,()=>me):Je;f.coords=Je;const gt=i.clipRect?Je.intersect(i.clipRect):Je;m==null||m.render(n,gt,{...i,clipRect:void 0});for(const Ve of Object.values(p))Ve.render(n,Je,i);const $t=rM(h)||Ce;$t&&h.render(n,ke,{...i,clipRect:gt}),y==null||y.render(n,gt,{...i,clipRect:void 0});for(const[Ve,L]of Object.entries(d)){const P=Ve=="left"||Ve=="right"?"vertical":"horizontal",q=f.scrollbars[P],j=q?Je.modify(P=="vertical"?{y:()=>ke.y,height:me}:{x:()=>ke.x,width:he}):Je,Y=Qv(j,Ve,L);let C=i.clipRect;q&&(C=Y.intersect(C).intersect(q?Je.modify(P=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),L.render(n,Y,{...i,clipRect:C})}for(const Ve of Object.values(z(this,Bo))){const P=Ve.axisProps.orient;(P=="left"&&x==0||P=="right"&&x==u.nCols-1||P=="top"&&S==0||P=="bottom"&&S==u.nRows-1)&&Ve.render(n,Qv(Je.shrink(f.view.getOverhang()),P,Ve),i)}$t||h.render(n,ke,i);for(const Ve of Object.values(f.scrollbars))Ve.updateScrollbar(Je,ke),Ve.render(n,r,i);w==null||w.render(n,Je,i)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=z(this,kr,Mo).find(o=>o.coords.containsPoint(n.point.x,n.point.y));for(const o of Object.values((r==null?void 0:r.scrollbars)??{}))if(o.coords.containsPoint(n.point.x,n.point.y)&&(o.propagateInteractionEvent(n),n.stopped))return;const i=r==null?void 0:r.view;i&&(i.propagateInteractionEvent(n),(i instanceof Qt||i instanceof kl)&&XF(n,r.coords,o=>X(this,Gh,H_).call(this,r.coords,r.view,o),this.context.getCurrentHover(),this.context.animator)),!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}ra=new WeakMap,ia=new WeakMap,tn=new WeakMap,Bo=new WeakMap,oa=new WeakMap,kr=new WeakSet,Mo=function(){return z(this,tn).filter(n=>n.view.isConfiguredVisible())},zh=new WeakSet,U_=function(){return new Hv(z(this,kr,Mo).length,z(this,ra)??1/0)},Do=new WeakSet,ec=function(n){const r=n=="column"?"width":"height",i=(o,s)=>o.map(a=>{const l=z(this,kr,Mo)[a].getOverhangAndPadding();return n=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((a,u)=>Math.max(a,u),0);return this._cache(`size/directionSizes/${n}`,()=>z(this,zh,U_)[n=="column"?"colIndices":"rowIndices"].map(o=>({axisBefore:i(o,0),axisAfter:i(o,1),view:GD(o.map(s=>z(this,kr,Mo)[s].view.getViewportSize()[r]))})))},Wu=new WeakSet,r1=function(n){const r=X(this,Do,ec).call(this,n),i=[];i.push(xl);for(const[o,s]of r.entries())o>0&&i.push({px:z(this,ia),grow:0}),(o==0||this.wrappingFacet)&&i.push(xl),i.push({px:s.axisBefore,grow:0}),i.push(s.view),i.push({px:s.axisAfter,grow:0}),(o==r.length-1||this.wrappingFacet)&&i.push(xl);return i},Zu=new WeakSet,i1=function(n){let r=0,i=0;const o=n=="row"?this.spec.height:this.spec.width;if(o||o===0)return wv(o);const s=X(this,Do,ec).call(this,n);for(const[a,u]of s.entries())a>0&&(i+=z(this,ia)),(a==0||this.wrappingFacet)&&(i+=0),i+=u.axisBefore,i+=u.view.px??0,r+=u.view.grow??0,i+=u.axisAfter,(a==s.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Yu=new WeakSet,o1=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Uh=new WeakSet,G_=function(){const n=X(this,Do,ec).call(this,"column"),r=X(this,Do,ec).call(this,"row");return!n.length||!r.length?Ct.zero():new Ct(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},sa=new WeakSet,Yh=function(){const n=r=>{const i=Sp[r],o=z(this,Bo)[i];return(o==null?void 0:o.axisProps.orient)!==r?0:Math.max(o.getPerpendicularSize()+o.axisProps.offset,0)};return new Ct(n("top"),n("right"),n("bottom"),n("left"))},Gh=new WeakSet,H_=function(n,r,i){for(const[o,s]of Object.entries(nM(r))){if(s.size<=0)continue;const a=n.normalizePoint(i.x,i.y),u=n.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:u.x-a.x,y:u.y-a.y};for(const c of s)c.zoom(2**i.zDelta,o=="y"?1-a[o]:a[o],o=="x"?l.x:-l.y)}this.context.animator.requestRender()};function eM(e){if(!(!e||!e.fill||e.fillOpacity===0))return{configurableVisibility:!1,data:{values:[{}]},mark:{color:e.fill,opacity:e.fillOpacity??1,type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0}}}function tM(e){if(!(!e||!e.stroke||e.strokeWidth===0||e.strokeOpacity===0))return{configurableVisibility:!1,resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},data:{values:[{x:0,y:0,x2:1,y2:0},{x:1,y:0,x2:1,y2:1},{x:1,y:1,x2:0,y2:1},{x:0,y:1,x2:0,y2:0}]},mark:{size:e.strokeWidth??1,color:e.stroke??"lightgray",strokeCap:"square",opacity:e.strokeOpacity??1,type:"rule",clip:!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:null},y:{field:"y",type:"quantitative",scale:null},x2:{field:"x2"},y2:{field:"y2"}}}}function nM(e){const t={x:new Set,y:new Set};return e.visit(n=>{for(const[r,i]of Object.entries(t)){const o=n.getScaleResolution(r);o&&o.isZoomable()&&i.add(o)}}),t}function rM(e){let t=!0;return e.visit(n=>{n instanceof Qt&&t&&(t=n.mark.properties.clip===!0)}),t}function Qv(e,t,n){const r=n.axisProps,i=n.getPerpendicularSize();if(t=="bottom")return e.translate(0,e.height+r.offset).modify({height:i});if(t=="top")return e.translate(0,-i-r.offset).modify({height:i});if(t=="left")return e.translate(-i-r.offset,0).modify({width:i});if(t=="right")return e.translate(e.width+r.offset,0).modify({width:i})}class Xv{constructor(t,n,r){if(this.layoutParent=n,this.view=t,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.title=void 0,this.coords=gr.ZERO,t.needsAxes.x||t.needsAxes.y){const i=t.spec,o="view"in i?i==null?void 0:i.view:void 0,s=eM(o);s&&(this.background=new Qt(s,n.context,n,t,"background"+r,{blockEncodingInheritance:!0}));const a=tM(o);a&&(this.backgroundStroke=new Qt(a,n.context,n,t,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const u=ZF(t.spec.title);if(u){const l=new Qt(u,n.context,n,t,"title"+r,{blockEncodingInheritance:!0});this.title=l}}t.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new Kv(this,"horizontal")),t.spec.viewportHeight!=null&&(this.scrollbars.vertical=new Kv(this,"vertical"))}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars)}async createAxes(){const{view:t,axes:n,gridLines:r}=this,i=(a,u)=>{const l=a.getAxisProps();if(l===null)return;const c=l?{...l}:{};if(!c.orient){for(const f of If[u])if(!n[f]){c.orient=f;break}if(!c.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(c.title??(c.title=a.getTitle()),!If[u].includes(c.orient))throw new Error(`Invalid axis orientation "${c.orient}" on channel "${u}"!`);return c},o=async(a,u,l)=>{const c=i(a,u);if(c){if(n[c.orient])throw new Error(`An axis with the orient "${c.orient}" already exists!`);const f=new Vv(c,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[c.orient]=f,await f.initializeChildren()}},s=async(a,u,l)=>{const c=i(a,u);if(c&&(c.grid||c.chromGrid)){const f=new OF(c,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[c.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(t.needsAxes[a]){const u=t.resolutions.axis[a];if(!u)continue;await o(u,a,t)}for(const a of["x","y"])if(t.needsAxes[a]){const u=t.getAxisResolution(a);if(!u)continue;await s(u,a,t)}if(t instanceof kl){for(const a of t)for(const[u,l]of Object.entries(a.resolutions.axis)){const c=l.getAxisProps();c&&c.orient&&await o(l,u,a)}for(const a of t)for(const[u,l]of Object.entries(a.resolutions.axis)){const c=l.getAxisProps();c&&!c.orient&&await o(l,u,a)}}[...Object.values(n),...Object.values(r)].forEach(a=>a.visit(u=>{u instanceof Qt&&u.resolve("scale")}))}getOverhang(){const t=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+r.axisProps.offset,0):0};return new Ct(t("top"),t("right"),t("bottom"),t("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}class Kv extends Qt{constructor(n,r){const i={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});Z(this,aa,void 0);Z(this,Qu,gr.ZERO);Z(this,vi,0);Z(this,Ro,0);Pt(this,"viewportOffset",0);this.config=i,ae(this,aa,r),this.interpolateViewportOffset=Ep(this.context.animator,o=>{this.viewportOffset=o.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(o,s)=>{if(s.stopPropagation(),z(this,vi)<=0)return;const a=d=>r=="vertical"?d.clientY:d.clientX,u=s.uiEvent;u.preventDefault();const l=this.scrollOffset,c=a(u),f=d=>{const p=os(a(d)-c+l,0,z(this,vi));this.interpolateViewportOffset({x:p/z(this,vi)*z(this,Ro)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/z(this,Ro)*z(this,vi)}render(n,r,i){super.render(n,z(this,Qu),i)}updateScrollbar(n,r){const i=this.config.scrollbarPadding,o=this.config.scrollbarSize,s=z(this,aa)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),u=n[s]-2*i,l=a*u;ae(this,vi,u-l),ae(this,Ro,r[s]-n[s]),this.viewportOffset=os(this.viewportOffset,0,z(this,Ro)),ae(this,Qu,z(this,aa)=="vertical"?new gr(()=>n.x+n.width-o-i,()=>n.y+i+this.scrollOffset,()=>o,()=>l):new gr(()=>n.x+i+this.scrollOffset,()=>n.y+n.height-o-i,()=>l,()=>o))}}aa=new WeakMap,Qu=new WeakMap,vi=new WeakMap,Ro=new WeakMap;class kp extends JF{constructor(t,n,r,i,o){super(t,n,r,i,o,Bp(t)?t.columns:Bf(t)?1:1/0),this.spec=t}async initializeChildren(){const t=this.spec,n=Bp(t)?t.concat:Bf(t)?t.vconcat:t.hconcat;this.setChildren(await Promise.all(n.map((r,i)=>this.context.createOrImportView(r,this,this,"grid"+i)))),await this.createAxes()}getDefaultResolution(t,n){return n=="axis"?"independent":Bf(this.spec)&&t==="x"||tA(this.spec)&&t==="y"?"shared":"independent"}}const Jv="viewRoot";class iM{constructor(t={}){Z(this,la,new Map);this.options={allowImport:!0,wrapRoot:!0,...t};const n=r=>(i,o,s,a,u)=>new r(i,o,s,a,i.name??u);this.addViewType(Ip,n(kl)),this.addViewType(Tp,n(Qt)),this.addViewType(Bf,n(kp)),this.addViewType(tA,n(kp)),this.addViewType(Bp,n(kp)),this.addViewType(aM,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(t,n){z(this,la).set(t,n)}createView(t,n,r,i,o){for(const[s,a]of z(this,la))if(s(t))return a(t,n,r,i,o);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(t)]))}isViewSpec(t){const n=[...z(this,la).keys()].filter(r=>r(t));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(t,n,r,i,o,s){let a;if(sM(t)){let l;if("url"in t.import)if(this.options.allowImport)l=await cF(t,i.getBaseUrl(),n);else throw new Ji("Importing views is not allowed!",r);else if("template"in t.import)l=eA(t.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(t));s==null||s(l),oM(l,t),a=l}else a=t;!i&&this.options.wrapRoot&&(Tp(a)||Ip(a))&&o===Jv&&(a={name:"implicitRoot",vconcat:[a]});const u=this.createView(a,n,r,i,o);return u instanceof Cl&&await u.initializeChildren(),u}}la=new WeakMap;function eA(e,t){var r,i;const n=(i=(r=t.spec)==null?void 0:r.templates)==null?void 0:i[e];if(n)return structuredClone(n);if(t.dataParent)return eA(e,t.dataParent);throw new Error(`Cannot find template "${e}" in current view or its ancestors!`)}function oM(e,t){t.name!=null&&(e.name=t.name);const n=vt(t.params)?t.params:At(t.params)?Object.entries(t.params).map(([r,i])=>({name:r,value:i})):[];if(n.length){e.params??(e.params=[]);for(const r of n){const i=e.params.findIndex(o=>o.name==r.name);i>=0&&(e.params[i]=r)}for(const r of n)e.params.some(i=>i.name==r.name)||e.params.push(r)}}function Tp(e){return"mark"in e&&(Be(e.mark)||At(e.mark))}function Ip(e){return"layer"in e&&At(e.layer)}function sM(e){return"import"in e}function Bf(e){return"vconcat"in e&&vt(e.vconcat)}function tA(e){return"hconcat"in e&&vt(e.hconcat)}function Bp(e){return"concat"in e&&vt(e.concat)}function aM(e){return"samples"in e&&At(e.samples)&&"spec"in e&&At(e.spec)}function lM(e){const t=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of e.paramConfigs.values()){if(!RB(r))continue;const i=r.bind;if(!i||!("input"in i))continue;const o=r.name,s=e.getSetter(o),a=e.getValue(o),u=i.name??o,l=i.debounce?kf(s,i.debounce,!1):s,c=`${t}-param-${o}`;if(i.input=="range")n.push(Ke`<label for=${c}>${u}</label>
540
540
  <div>
541
541
  <input
542
542
  id=${c}
543
543
  type="range"
544
544
  min=${i.min??0}
545
545
  max=${i.max??100}
546
- step=${i.step??Lr(i.min,i.max,100)}
547
- .value=${s}
546
+ step=${i.step??Ri(i.min,i.max,100)}
547
+ .value=${a}
548
548
  @input=${f=>{l(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
549
- /><span>${s}</span>
549
+ /><span>${a}</span>
550
550
  </div>`);else if(i.input=="checkbox")n.push(Ke`<label for=${c}>${u}</label>
551
551
  <input
552
552
  id=${c}
553
553
  type="checkbox"
554
- ?checked=${s}
554
+ ?checked=${a}
555
555
  @input=${f=>l(f.target.checked)}
556
556
  />`);else if(i.input=="radio")n.push(Ke`<span class="label">${u}</span>
557
557
  <div class="radio-group">
@@ -560,7 +560,7 @@ chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e
560
560
  type="radio"
561
561
  name=${o}
562
562
  value=${f}
563
- .checked=${s==f}
563
+ .checked=${a==f}
564
564
  @input=${p=>l(p.target.value)}
565
565
  />${((d=i.labels)==null?void 0:d[h])??f}</label
566
566
  >`})}
@@ -571,7 +571,7 @@ chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e
571
571
  >
572
572
  ${i.options.map((f,h)=>{var d;return Ke`<option
573
573
  value=${f}
574
- ?selected=${s==f}
574
+ ?selected=${a==f}
575
575
  >
576
576
  ${((d=i.labels)==null?void 0:d[h])??f}
577
577
  </option>`})}
@@ -582,32 +582,32 @@ chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e
582
582
  type=${i.input}
583
583
  placeholder=${i.placeholder??""}
584
584
  autocomplete=${i.autocomplete??"off"}
585
- .value=${s}
585
+ .value=${a}
586
586
  @focus=${f=>f.target.select()}
587
587
  @input=${f=>{l(i.input=="number"?f.target.valueAsNumber:f.target.value)}}
588
588
  />
589
- </div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(Ke`<div class="description">${i.description}</div>`)}return n}yb("fasta",_7);class ix{constructor(t,n,r={}){Z(this,ls);Z(this,Uh);Z(this,Gh);Z(this,Hh);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new oM,this.namedDataProviders=[],this.animator=new b7(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new S7(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:F7,refseqgene:k7,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),cp(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(o=>o.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(o=>o(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,i]of this._loadingViews){const o=r.coords;if(o){const a={left:`${o.x}px`,top:`${o.y}px`,width:`${o.width}px`,height:`${o.height}px`};t.push(Ke`<div style=${J6(a)}>
589
+ </div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&n.push(Ke`<div class="description">${i.description}</div>`)}return n}kd("fasta",EF);class nA{constructor(t,n,r={}){Z(this,ua);Z(this,Hh);Z(this,Vh);Z(this,jh);this.container=t,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new iM,this.namedDataProviders=[],this.animator=new mF(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new _F(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:RF,refseqgene:CF,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0}registerNamedDataProvider(t){this.namedDataProviders.unshift(t)}getNamedDataFromProvider(t){for(const n of this.namedDataProviders){const r=n(t);if(r)return r}}updateNamedData(t,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(t);if(!r)throw new Error("No such named data source: "+t);r.dataSource.updateDynamicData(n),mp(r.hosts),this.animator.requestRender()}broadcast(t,n){var i;const r={type:t,payload:n};this.viewRoot.visit(o=>o.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(t))==null||i.forEach(o=>o(r))}_updateLoadingIndicators(){const t=[],n=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,i]of this._loadingViews){const o=r.coords;if(o){const s={left:`${o.x}px`,top:`${o.y}px`,width:`${o.width}px`,height:`${o.height}px`};t.push(Ke`<div style=${Y6(s)}>
590
590
  <div class=${i.status}>
591
591
  ${i.status=="error"?Ke`<span
592
592
  >Loading
593
593
  failed${i.detail?Ke`: ${i.detail}`:nt}</span
594
594
  >`:Ke`
595
- <img src="${e8}" alt="" />
595
+ <img src="${Q6}" alt="" />
596
596
  <span>Loading...</span>
597
597
  `}
598
598
  </div>
599
- </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),ys(t,this.loadingIndicatorsElement)}destroy(){var n;const t=z(this,ls,Zh);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const o of i)document.removeEventListener(r,o);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new y7(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new Lv,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new x7(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(u,l,c)=>{this._loadingViews.set(u,{status:l,detail:c}),this._updateLoadingIndicators()},addKeyboardListener:(u,l)=>{document.addEventListener(u,l);let c=this._keyboardListeners.get(u);c||(c=[],this._keyboardListeners.set(u,c)),c.push(l)},addBroadcastListener(u,l){const c=t._extraBroadcastListeners;let f=c.get(u);f||(f=new Set,c.set(u,f)),f.add(l)},removeBroadcastListener(u,l){var f;(f=t._extraBroadcastListeners.get(u))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:u=>t.viewFactory.isViewSpec(u),createView:function(u,l,c,f){return t.viewFactory.createView(u,n,l,c,f)},createOrImportView:async function(u,l,c,f,h){return t.viewFactory.createOrImportView(u,n,l,c,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(u=>r.datasets[u]),this.viewRoot=await n.createOrImportView(r,null,null,tx),z(this,ls,Zh).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",X(this,Uh,q_).call(this),u7(this.viewRoot),c7(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(u=>u.configureViewOpacity()),this._glHelper.invalidateSize(),X(this,Gh,W_).call(this);const o=i.filter(u=>u instanceof Qt),a=r7(this.viewRoot,n.dataFlow);l7(a),this.broadcast("dataFlowBuilt",a),o.forEach(u=>u.mark.initializeEncoders());const s=Promise.all(o.map(u=>u.mark.initializeGraphics()));for(const u of o)a.addObserver(l=>{u.mark.initializeData(),u.mark.updateGraphicsData(),n.animator.requestRender()},u);await n.fontManager.waitUntilReady(),a.initialize(),await Promise.all(a.dataSources.map(u=>u.load())),cp(this.viewRoot),this.broadcast("dataLoaded"),await s;for(const u of o)u.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(u=>xf(u,"size")),this._glHelper.invalidateSize()}async launch(){try{return X(this,Hh,Z_).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),cM(this.container,n),!1}finally{z(this,ls,Zh).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas;let n=performance.now();const r=i=>{var s,u;const o=performance.now(),a=o-n<200;if(i instanceof MouseEvent){const l=t.getBoundingClientRect(),c=new $n(i.clientX-l.left-t.clientLeft,i.clientY-l.top-t.clientTop);i.type=="mousemove"&&!a&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!Xv()&&(this.renderPickingFramebuffer(),this._handlePicking(c.x,c.y)));const f=h=>{this.viewRoot.propagateInteractionEvent(new p7(c,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!Xv())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=o,this._tooltipUpdateRequested=!1;const h=i;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const d=C7(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),p=>{const m=new WheelEvent("wheel",{...d,deltaMode:0,deltaX:0,deltaY:p});f(m)}),h.preventDefault();return}}if(i.type=="click"){const h=this._currentHover?{type:i.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(d=>d.name).reverse(),datum:this._currentHover.datum}:{type:i.type,viewPath:null,datum:null};(s=this._eventListeners.get("click"))==null||s.forEach(d=>d(h))}(i.type!="click"||((u=this._mouseDownCoords)==null?void 0:u.subtract($n.fromMouseEvent(i)).length)<3)&&f(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(i=>t.addEventListener(i,r)),t.addEventListener("mousedown",i=>{this._mouseDownCoords=$n.fromMouseEvent(i),document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",i=>i.stopPropagation())}_handlePicking(t,n){var o;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(i==0){this._currentHover=null;return}if(i!==((o=this._currentHover)==null?void 0:o.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof Qt){if(a.mark.isPickingParticipant()&&[...a.facetCoords.values()].some(s=>s.containsPoint(t,n))){const s=a.getCollector().findDatumByUniqueId(i);s&&(this._currentHover={mark:a.mark,datum:s,uniqueId:i})}if(this._currentHover)return El}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async s=>{if(!a.isPickingParticipant())return;const u=a.properties.tooltip;if(u!==null){const l=(u==null?void 0:u.handler)??"default",c=this.tooltipHandlers[l];if(!c)throw new Error("No such tooltip handler: "+l);return c(s,a,u==null?void 0:u.params)}})}}updateTooltip(t,n){if(!this._tooltipUpdateRequested||!t)this.tooltip.updateWithDatum(t,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const t=this.viewRoot;if(!t)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}this._renderingContext=new Uv({picking:!1},this._glHelper),this._pickingContext=new Uv({picking:!0},this._glHelper),t.render(new d7(this._renderingContext,this._pickingContext),gr.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof Qt&&n.getDataAccessor("search")&&t.push(n)}),t}getNamedScaleResolutions(){const t=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&t.set(r.name,r)}),t}}ls=new WeakSet,Zh=function(){return this.container.querySelector(".canvas-wrapper")},Uh=new WeakSet,q_=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...uM(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=Bf("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");t.length&&ys(Ke`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},Gh=new WeakSet,W_=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const o=new ResizeObserver(n);o.observe(this.container),this._destructionCallbacks.push(()=>o.disconnect())}let r=null;const i=()=>{r!=null&&(r(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",i),r=()=>{o.removeEventListener("change",i)}};i(),r&&this._destructionCallbacks.push(r)},Hh=new WeakSet,Z_=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=t8,this.container.appendChild(t);const n=Bf("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new kD(n,()=>this.viewRoot?h7(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Bf("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Bf("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new r8(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function cM(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}function Bf(e,t){const n=document.createElement(e);for(const[r,i]of Object.entries(t))["innerHTML","innerText","className"].includes(r)&&(n[r]=i),n.setAttribute(r,i);return n}const fM="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20clip-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='1.5'%3e%3cpath%20d='M4.7%2021.2s.4%202.3%201.3%203.6C7%2026%209.8%2028%209.8%2028s3.4-2.6%206.4-8.5c0%200%201%20.1%201.9-.4.9-.6.8-.4%201-1.2%200%200%202.9.5%206.6%200%202.1-.3%204.3-1%206.2-2.5%200%200-1.1-1.7-2.5-5.1-.5-1.3-2-1.8-4.6-4.6l-8.2%208.6-11.9%206.9z'%20fill-opacity='.1'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='%237fbbdd'/%3e%3cpath%20d='M12.4%2015.5c-.7-.5-2.4-.8-4.4-.4-2%20.4-4%201.3-4.8%201.8-.5.3-1.2%201-1.2%201.4%200%20.7.3%201.8.8%202.4.3.3.7.5%201.4.6.8%200%202.5-1.4%203.5-2%201-.6%201.6-.8%202.7-1.2l-2.9%202.4c-1.3%201.2-2.2%201.5-2.4%202.3%200%20.5%200%201.4.5%201.8.4.5.6.8%201.6.8.6%200%201%200%202.6-1.5.9-.9%202.3-3%202.7-3.7.6-1.1%201-2.2.7-3-.2-1-.4-1.4-.8-1.7zM17.4%2014.2c-.3-.5-.9-1.2-.2-2.5l1.9-3c.5-.8%202-2.3%202.6-2.6.6-.4%201.5-.6%202-.2.6.4%201%201%201.3%201.5.4.6.7%201.3.2%202-.7%201-1.6.9-2.8%201.7-1.2.8-1.9%201.2-2.5%201.9l3.8-1.8c1.3-.6%202.7-1.1%203.4-.7.8.5.8.7%201%201.4.3%201-.2%201.9-.8%202.4-.5.6-1.5.9-2.6%201.2-1.4.4-4.5%201-5.8.5-1.3-.5-1.3-1.4-1.5-1.8z'%20fill='%23fff'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='%237fbbdd'/%3e%3cpath%20d='M13.8%2015.3c.9.8.6%202%201.4%201.8%201-.2%201.4-.8%201.3-1.5%200-.7%200-.8-.4-1.6-.3-.7-1-1.1-2-.5-.7.5-1.4%201.3-1.4%201.3s.2-.3%201.1.5z'%20fill='%23fff'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3c/svg%3e",hM="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cg%20transform='matrix(0.10221,0.00683825,-0.0067136,0.100347,-8.03424,-13.2222)'%3e%3cpath%20d='M208.629,548.17C208.629,548.17%20219.768,594.389%20239.814,619.222C259.86,644.055%20319.119,680.831%20319.119,680.831C319.119,680.831%20385.557,622.915%20437.87,498.346C437.87,498.346%20456.021,499.236%20473.808,486.446C491.594,473.656%20490.239,478.534%20494.883,461.62C494.883,461.62%20551.848,467.937%20625.826,451.863C667.634,442.778%20710.238,425.649%20747.382,393.142C747.382,393.142%20721.992,360.244%20689.422,291.45C677.029,265.275%20647.518,257.098%20590.747,203.309L438.083,391.273L208.629,548.17Z'%20style='fill-opacity:0.11;'/%3e%3c/g%3e%3cg%20transform='matrix(0.081985,-0.0582493,0.0582493,0.081985,-40.4754,34.7668)'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip1'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cg%20transform='matrix(0.758637,0.45892,-0.45892,0.758637,425.635,-121.213)'%3e%3cpath%20d='M386.873,397.241C371.345,383.628%20335.138,374.782%20290.644,380.543C246.149,386.304%20196.827,402.266%20178.802,412.065C168.202,417.828%20151.494,429.354%20150.682,439.334C149.527,453.528%20153.593,477.066%20165.625,491.284C171.69,498.451%20179.927,503.445%20193.838,505.423C211.701,507.963%20252.714,480.627%20275.399,469.22C299.332,457.187%20313.981,454.56%20338.386,447.014C338.386,447.014%20291.346,478.587%20270.205,494.393C239.61,517.268%20218.575,522.444%20212.859,539.897C209.766,549.34%20212.237,567.767%20220.354,577.538C229.427,588.461%20233.197,595.069%20254.591,597.624C267.303,599.143%20276.685,598.802%20314.37,568.95C336.06,551.767%20370.297,509.817%20381.412,494.616C397.581,472.506%20405.165,451.462%20402.656,435.04C399.045,411.391%20394.259,403.716%20386.873,397.241Z'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.752145,0.454993,-0.454993,0.752145,468.36,-108.293)'%3e%3cpath%20d='M484.733,378.934C479.33,367.886%20467.092,350.452%20483.886,325.205C502.172,297.717%20514.898,280.938%20528.117,264.632C541.335,248.326%20574.793,218.447%20587.739,212.53C600.684,206.613%20621.026,203.852%20631.889,212.841C642.874,221.93%20648.416,233.377%20654.92,245.478C662.331,259.267%20667.318,274.808%20656.518,288.278C641.093,307.515%20622.242,305.294%20594.912,319.844C567.244,334.573%20552.644,342.943%20539.244,355.703C539.244,355.703%20591.431,334.114%20621.229,324.474C651.027,314.833%20680.952,304.461%20695.995,315.975C711.038,327.49%20710.631,331.463%20714.425,347.187C719.107,366.59%20707.231,385.165%20694.294,395.838C681.356,406.51%20659.958,411.756%20636.875,416.852C606.42,423.576%20540.278,431.917%20512.819,419.366C485.361,406.815%20488.488,386.613%20484.733,378.934Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.100298,-0.00740488,0.00740488,0.100298,-15.7457,-5.17528)'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip2'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip2)'%3e%3cg%20transform='matrix(0.909069,3.67641e-17,-3.79818e-17,0.85852,37.051,52.1829)'%3e%3cpath%20d='M413.282,402.697C430.77,421.58%20423.307,448.426%20441.683,446.137C463.409,443.431%20472.604,430.356%20473.316,413.402C474.028,396.448%20472.245,393.911%20466.172,375.321C460.099,356.731%20447.953,352.176%20422.842,357.179C401.957,361.339%20405.039,360.215%20398.735,367.228C392.43,374.242%20384.315,393.182%20384.315,393.182C384.315,393.182%20392.715,380.492%20413.282,402.697Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3c/svg%3e";async function dM(e,t,n={}){let r;if(Be(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const o=At(t)?t:await ox(t);if(o.baseUrl??(o.baseUrl=""),o.width??(o.width="container"),o.padding??(o.padding=10),r==document.body){const a=document.createElement("div");a.style.position="fixed",a.style.inset="0",a.style.overflow="hidden",r.appendChild(a),r=a}i=new ix(r,o,n),pM(i,n),await i.launch()}catch(o){r.innerText=o.toString(),console.error(o)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(o,a){const s=i._eventListeners;let u=s.get(o);u||(u=new Set,s.set(o,u)),u.add(a)},removeEventListener(o,a){var u;(u=i._eventListeners.get(o))==null||u.delete(a)},getScaleResolutionByName(o){return i.getNamedScaleResolutions().get(o)},updateNamedData:i.updateNamedData.bind(i)}}function pM(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function ox(e){let t;try{const n=await fetch(e);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);t=await n.json()}catch(n){throw new Error(`Could not load or parse configuration: ${e}, reason: ${n.message}`)}if(!t.baseUrl){const n=e.match(/^[^?#]*\//);t.baseUrl=n&&n[0]||"./"}return t}var Df=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gM(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var be={},Rf={};Rf.byteLength=yM,Rf.toByteArray=vM,Rf.fromByteArray=EM;for(var qn=[],sn=[],mM=typeof Uint8Array<"u"?Uint8Array:Array,Sp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fa=0,bM=Sp.length;fa<bM;++fa)qn[fa]=Sp[fa],sn[Sp.charCodeAt(fa)]=fa;sn["-".charCodeAt(0)]=62,sn["_".charCodeAt(0)]=63;function ax(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function yM(e){var t=ax(e),n=t[0],r=t[1];return(n+r)*3/4-r}function wM(e,t,n){return(t+n)*3/4-n}function vM(e){var t,n=ax(e),r=n[0],i=n[1],o=new mM(wM(e,r,i)),a=0,s=i>0?r-4:r,u;for(u=0;u<s;u+=4)t=sn[e.charCodeAt(u)]<<18|sn[e.charCodeAt(u+1)]<<12|sn[e.charCodeAt(u+2)]<<6|sn[e.charCodeAt(u+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=sn[e.charCodeAt(u)]<<2|sn[e.charCodeAt(u+1)]>>4,o[a++]=t&255),i===1&&(t=sn[e.charCodeAt(u)]<<10|sn[e.charCodeAt(u+1)]<<4|sn[e.charCodeAt(u+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function xM(e){return qn[e>>18&63]+qn[e>>12&63]+qn[e>>6&63]+qn[e&63]}function AM(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(xM(r));return i.join("")}function EM(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(AM(e,a,a+o>s?s:a+o));return r===1?(t=e[n-1],i.push(qn[t>>2]+qn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(qn[t>>10]+qn[t>>4&63]+qn[t<<2&63]+"=")),i.join("")}var Cp={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Cp.read=function(e,t,n,r,i){var o,a,s=i*8-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=o*256+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=a*256+e[t+f],f+=h,c-=8);if(o===0)o=1-l;else{if(o===u)return a?NaN:(d?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(d?-1:1)*a*Math.pow(2,o-r)},Cp.write=function(e,t,n,r,i,o){var a,s,u,l=o*8-i-1,c=(1<<l)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a=a+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=s&255,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=a&255,d+=p,a/=256,l-=8);e[n+d-p]|=m*128};/*!
599
+ </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),wa(t,this.loadingIndicatorsElement)}destroy(){var n;const t=z(this,ua,Qh);this.container.classList.remove("genome-spy"),t.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const o of i)document.removeEventListener(r,o);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new bF(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const t=this,n={dataFlow:new Mv,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new vF(this._glHelper),get devicePixelRatio(){return t._glHelper.dpr},requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(u,l,c)=>{this._loadingViews.set(u,{status:l,detail:c}),this._updateLoadingIndicators()},addKeyboardListener:(u,l)=>{document.addEventListener(u,l);let c=this._keyboardListeners.get(u);c||(c=[],this._keyboardListeners.set(u,c)),c.push(l)},addBroadcastListener(u,l){const c=t._extraBroadcastListeners;let f=c.get(u);f||(f=new Set,c.set(u,f)),f.add(l)},removeBroadcastListener(u,l){var f;(f=t._extraBroadcastListeners.get(u))==null||f.delete(l)},isViewConfiguredVisible:t.viewVisibilityPredicate,isViewSpec:u=>t.viewFactory.isViewSpec(u),createView:function(u,l,c,f){return t.viewFactory.createView(u,n,l,c,f)},createOrImportView:async function(u,l,c,f,h){return t.viewFactory.createOrImportView(u,n,l,c,f,h)}},r=this.spec;r.datasets&&this.registerNamedDataProvider(u=>r.datasets[u]),this.viewRoot=await n.createOrImportView(r,null,null,Jv),z(this,ua,Qh).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",X(this,Hh,V_).call(this),lF(this.viewRoot),uF(this.viewRoot);const i=this.viewRoot.getDescendants();i.forEach(u=>u.configureViewOpacity()),this._glHelper.invalidateSize(),X(this,Vh,j_).call(this);const o=i.filter(u=>u instanceof Qt),s=nF(this.viewRoot,n.dataFlow);aF(s),this.broadcast("dataFlowBuilt",s),o.forEach(u=>u.mark.initializeEncoders());const a=Promise.all(o.map(u=>u.mark.initializeGraphics()));for(const u of o)s.addObserver(l=>{u.mark.initializeData(),u.mark.updateGraphicsData(),n.animator.requestRender()},u);await n.fontManager.waitUntilReady(),s.initialize(),await Promise.all(s.dataSources.map(u=>u.load())),mp(this.viewRoot),this.broadcast("dataLoaded"),await a;for(const u of o)u.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(u=>xf(u,"size")),this._glHelper.invalidateSize()}async launch(){try{return X(this,jh,$_).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(t){const n=`${t.view?`At "${t.view.getPathString()}": `:""}${t.toString()}`;return console.error(t.stack),uM(this.container,n),!1}finally{z(this,ua,Qh).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const t=this._glHelper.canvas;let n=performance.now();const r=i=>{var a,u;const o=performance.now(),s=o-n<200;if(i instanceof MouseEvent){const l=t.getBoundingClientRect(),c=new $n(i.clientX-l.left-t.clientLeft,i.clientY-l.top-t.clientTop);i.type=="mousemove"&&!s&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!Yv()&&(this.renderPickingFramebuffer(),this._handlePicking(c.x,c.y)));const f=h=>{this.viewRoot.propagateInteractionEvent(new dF(c,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!Yv())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=o,this._tooltipUpdateRequested=!1;const h=i;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const d=SF(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),p=>{const m=new WheelEvent("wheel",{...d,deltaMode:0,deltaX:0,deltaY:p});f(m)}),h.preventDefault();return}}if(i.type=="click"){const h=this._currentHover?{type:i.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(d=>d.name).reverse(),datum:this._currentHover.datum}:{type:i.type,viewPath:null,datum:null};(a=this._eventListeners.get("click"))==null||a.forEach(d=>d(h))}(i.type!="click"||((u=this._mouseDownCoords)==null?void 0:u.subtract($n.fromMouseEvent(i)).length)<3)&&f(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(i=>t.addEventListener(i,r)),t.addEventListener("mousedown",i=>{this._mouseDownCoords=$n.fromMouseEvent(i),document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),t.addEventListener("dragstart",i=>i.stopPropagation())}_handlePicking(t,n){var o;const r=this._glHelper.readPickingPixel(t,n),i=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(i==0){this._currentHover=null;return}if(i!==((o=this._currentHover)==null?void 0:o.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(s=>{if(s instanceof Qt){if(s.mark.isPickingParticipant()&&[...s.facetCoords.values()].some(a=>a.containsPoint(t,n))){const a=s.getCollector().findDatumByUniqueId(i);a&&(this._currentHover={mark:s.mark,datum:a,uniqueId:i})}if(this._currentHover)return _l}}),this._currentHover){const s=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async a=>{if(!s.isPickingParticipant())return;const u=s.properties.tooltip;if(u!==null){const l=(u==null?void 0:u.handler)??"default",c=this.tooltipHandlers[l];if(!c)throw new Error("No such tooltip handler: "+l);return c(a,s,u==null?void 0:u.params)}})}}updateTooltip(t,n){if(!this._tooltipUpdateRequested||!t)this.tooltip.updateWithDatum(t,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}computeLayout(){const t=this.viewRoot;if(!t)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}this._renderingContext=new Ov({picking:!1},this._glHelper),this._pickingContext=new Ov({picking:!0},this._glHelper),t.render(new hF(this._renderingContext,this._pickingContext),gr.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var t;(t=this._renderingContext)==null||t.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const t=[];return this.viewRoot.visit(n=>{n instanceof Qt&&n.getDataAccessor("search")&&t.push(n)}),t}getNamedScaleResolutions(){const t=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&t.set(r.name,r)}),t}}ua=new WeakSet,Qh=function(){return this.container.querySelector(".canvas-wrapper")},Hh=new WeakSet,V_=function(){const t=[];this.viewRoot.visit(r=>{const i=r.paramMediator;t.push(...lM(i))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!t.length)){if(this._inputBindingContainer=Df("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");t.length&&wa(Ke`<div class="gs-input-binding">${t}</div>`,this._inputBindingContainer)}},Vh=new WeakSet,j_=function(){const t=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),t(window.devicePixelRatio),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const o=new ResizeObserver(n);o.observe(this.container),this._destructionCallbacks.push(()=>o.disconnect())}let r=null;const i=()=>{r!=null&&(r(),n());const o=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);o.addEventListener("change",i),r=()=>{o.removeEventListener("change",i)}};i(),r&&this._destructionCallbacks.push(r)},jh=new WeakSet,$_=function(){this.container.classList.add("genome-spy");const t=document.createElement("style");t.innerHTML=X6,this.container.appendChild(t);const n=Df("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new S7(n,()=>this.viewRoot?fF(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Df("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Df("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new J6(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function uM(e,t){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=t,n.appendChild(r),e.appendChild(n)}function Df(e,t){const n=document.createElement(e);for(const[r,i]of Object.entries(t))["innerHTML","innerText","className"].includes(r)&&(n[r]=i),n.setAttribute(r,i);return n}const cM="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20clip-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='1.5'%3e%3cpath%20d='M4.7%2021.2s.4%202.3%201.3%203.6C7%2026%209.8%2028%209.8%2028s3.4-2.6%206.4-8.5c0%200%201%20.1%201.9-.4.9-.6.8-.4%201-1.2%200%200%202.9.5%206.6%200%202.1-.3%204.3-1%206.2-2.5%200%200-1.1-1.7-2.5-5.1-.5-1.3-2-1.8-4.6-4.6l-8.2%208.6-11.9%206.9z'%20fill-opacity='.1'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='%237fbbdd'/%3e%3cpath%20d='M12.4%2015.5c-.7-.5-2.4-.8-4.4-.4-2%20.4-4%201.3-4.8%201.8-.5.3-1.2%201-1.2%201.4%200%20.7.3%201.8.8%202.4.3.3.7.5%201.4.6.8%200%202.5-1.4%203.5-2%201-.6%201.6-.8%202.7-1.2l-2.9%202.4c-1.3%201.2-2.2%201.5-2.4%202.3%200%20.5%200%201.4.5%201.8.4.5.6.8%201.6.8.6%200%201%200%202.6-1.5.9-.9%202.3-3%202.7-3.7.6-1.1%201-2.2.7-3-.2-1-.4-1.4-.8-1.7zM17.4%2014.2c-.3-.5-.9-1.2-.2-2.5l1.9-3c.5-.8%202-2.3%202.6-2.6.6-.4%201.5-.6%202-.2.6.4%201%201%201.3%201.5.4.6.7%201.3.2%202-.7%201-1.6.9-2.8%201.7-1.2.8-1.9%201.2-2.5%201.9l3.8-1.8c1.3-.6%202.7-1.1%203.4-.7.8.5.8.7%201%201.4.3%201-.2%201.9-.8%202.4-.5.6-1.5.9-2.6%201.2-1.4.4-4.5%201-5.8.5-1.3-.5-1.3-1.4-1.5-1.8z'%20fill='%23fff'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='%237fbbdd'/%3e%3cpath%20d='M13.8%2015.3c.9.8.6%202%201.4%201.8%201-.2%201.4-.8%201.3-1.5%200-.7%200-.8-.4-1.6-.3-.7-1-1.1-2-.5-.7.5-1.4%201.3-1.4%201.3s.2-.3%201.1.5z'%20fill='%23fff'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3c/svg%3e",fM="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2064%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cg%20transform='matrix(0.10221,0.00683825,-0.0067136,0.100347,-8.03424,-13.2222)'%3e%3cpath%20d='M208.629,548.17C208.629,548.17%20219.768,594.389%20239.814,619.222C259.86,644.055%20319.119,680.831%20319.119,680.831C319.119,680.831%20385.557,622.915%20437.87,498.346C437.87,498.346%20456.021,499.236%20473.808,486.446C491.594,473.656%20490.239,478.534%20494.883,461.62C494.883,461.62%20551.848,467.937%20625.826,451.863C667.634,442.778%20710.238,425.649%20747.382,393.142C747.382,393.142%20721.992,360.244%20689.422,291.45C677.029,265.275%20647.518,257.098%20590.747,203.309L438.083,391.273L208.629,548.17Z'%20style='fill-opacity:0.11;'/%3e%3c/g%3e%3cg%20transform='matrix(0.081985,-0.0582493,0.0582493,0.081985,-40.4754,34.7668)'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip1'%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cg%20transform='matrix(0.758637,0.45892,-0.45892,0.758637,425.635,-121.213)'%3e%3cpath%20d='M386.873,397.241C371.345,383.628%20335.138,374.782%20290.644,380.543C246.149,386.304%20196.827,402.266%20178.802,412.065C168.202,417.828%20151.494,429.354%20150.682,439.334C149.527,453.528%20153.593,477.066%20165.625,491.284C171.69,498.451%20179.927,503.445%20193.838,505.423C211.701,507.963%20252.714,480.627%20275.399,469.22C299.332,457.187%20313.981,454.56%20338.386,447.014C338.386,447.014%20291.346,478.587%20270.205,494.393C239.61,517.268%20218.575,522.444%20212.859,539.897C209.766,549.34%20212.237,567.767%20220.354,577.538C229.427,588.461%20233.197,595.069%20254.591,597.624C267.303,599.143%20276.685,598.802%20314.37,568.95C336.06,551.767%20370.297,509.817%20381.412,494.616C397.581,472.506%20405.165,451.462%20402.656,435.04C399.045,411.391%20394.259,403.716%20386.873,397.241Z'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.752145,0.454993,-0.454993,0.752145,468.36,-108.293)'%3e%3cpath%20d='M484.733,378.934C479.33,367.886%20467.092,350.452%20483.886,325.205C502.172,297.717%20514.898,280.938%20528.117,264.632C541.335,248.326%20574.793,218.447%20587.739,212.53C600.684,206.613%20621.026,203.852%20631.889,212.841C642.874,221.93%20648.416,233.377%20654.92,245.478C662.331,259.267%20667.318,274.808%20656.518,288.278C641.093,307.515%20622.242,305.294%20594.912,319.844C567.244,334.573%20552.644,342.943%20539.244,355.703C539.244,355.703%20591.431,334.114%20621.229,324.474C651.027,314.833%20680.952,304.461%20695.995,315.975C711.038,327.49%20710.631,331.463%20714.425,347.187C719.107,366.59%20707.231,385.165%20694.294,395.838C681.356,406.51%20659.958,411.756%20636.875,416.852C606.42,423.576%20540.278,431.917%20512.819,419.366C485.361,406.815%20488.488,386.613%20484.733,378.934Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M561.588,349.155C561.588,349.155%20516.297,271.341%20328.841,252.044C328.841,252.044%20302.342,325.189%20307.686,368.056C313.031,410.922%20303.001,456.147%20329.132,501.174C329.132,501.174%20443.114,506.743%20554.649,428.469L629.204,432.112C629.204,432.112%20673.755,534.351%20856.964,554.375C856.964,554.375%20886.717,491.768%20879.193,417.478C871.211,338.673%20871.716,293.443%20871.716,293.443C871.716,293.443%20775.485,283.928%20635.418,361.795L561.588,349.155Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.100298,-0.00740488,0.00740488,0.100298,-15.7457,-5.17528)'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:rgb(127,187,221);'/%3e%3cclipPath%20id='_clip2'%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip2)'%3e%3cg%20transform='matrix(0.909069,3.67641e-17,-3.79818e-17,0.85852,37.051,52.1829)'%3e%3cpath%20d='M413.282,402.697C430.77,421.58%20423.307,448.426%20441.683,446.137C463.409,443.431%20472.604,430.356%20473.316,413.402C474.028,396.448%20472.245,393.911%20466.172,375.321C460.099,356.731%20447.953,352.176%20422.842,357.179C401.957,361.339%20405.039,360.215%20398.735,367.228C392.43,374.242%20384.315,393.182%20384.315,393.182C384.315,393.182%20392.715,380.492%20413.282,402.697Z'%20style='fill:white;'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='M384.916,385.459C384.916,385.459%20430.781,347.868%20450.027,350.093C471.685,352.596%20490.49,407.747%20490.208,424.416C489.927,441.085%20442.948,469.866%20422.537,466.24C422.537,466.24%20425.525,442.129%20412.114,413.335C398.702,384.54%20384.916,385.459%20384.916,385.459Z'%20style='fill:none;stroke:black;stroke-width:16.57px;'/%3e%3c/g%3e%3c/svg%3e";async function hM(e,t,n={}){let r;if(Be(e)){if(r=document.querySelector(e),!r)throw new Error(`No such element: ${e}`)}else if(e instanceof HTMLElement)r=e;else throw new Error(`Invalid element: ${e}`);let i;try{const o=At(t)?t:await rA(t);if(o.baseUrl??(o.baseUrl=""),o.width??(o.width="container"),o.padding??(o.padding=10),r==document.body){const s=document.createElement("div");s.style.position="fixed",s.style.inset="0",s.style.overflow="hidden",r.appendChild(s),r=s}i=new nA(r,o,n),dM(i,n),await i.launch()}catch(o){r.innerText=o.toString(),console.error(o)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(o,s){const a=i._eventListeners;let u=a.get(o);u||(u=new Set,a.set(o,u)),u.add(s)},removeEventListener(o,s){var u;(u=i._eventListeners.get(o))==null||u.delete(s)},getScaleResolutionByName(o){return i.getNamedScaleResolutions().get(o)},updateNamedData:i.updateNamedData.bind(i)}}function dM(e,t){t.namedDataProvider&&e.registerNamedDataProvider(t.namedDataProvider)}async function rA(e){let t;try{const n=await fetch(e);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);t=await n.json()}catch(n){throw new Error(`Could not load or parse configuration: ${e}, reason: ${n.message}`)}if(!t.baseUrl){const n=e.match(/^[^?#]*\//);t.baseUrl=n&&n[0]||"./"}return t}var Rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};function Ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pM(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ve={},Mf={};Mf.byteLength=bM,Mf.toByteArray=wM,Mf.fromByteArray=xM;for(var qn=[],ln=[],gM=typeof Uint8Array<"u"?Uint8Array:Array,Dp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cs=0,mM=Dp.length;cs<mM;++cs)qn[cs]=Dp[cs],ln[Dp.charCodeAt(cs)]=cs;ln[45]=62,ln[95]=63;function iA(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function bM(e){var t=iA(e),n=t[0],r=t[1];return(n+r)*3/4-r}function yM(e,t,n){return(t+n)*3/4-n}function wM(e){var t,n=iA(e),r=n[0],i=n[1],o=new gM(yM(e,r,i)),s=0,a=i>0?r-4:r,u;for(u=0;u<a;u+=4)t=ln[e.charCodeAt(u)]<<18|ln[e.charCodeAt(u+1)]<<12|ln[e.charCodeAt(u+2)]<<6|ln[e.charCodeAt(u+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return i===2&&(t=ln[e.charCodeAt(u)]<<2|ln[e.charCodeAt(u+1)]>>4,o[s++]=t&255),i===1&&(t=ln[e.charCodeAt(u)]<<10|ln[e.charCodeAt(u+1)]<<4|ln[e.charCodeAt(u+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function vM(e){return qn[e>>18&63]+qn[e>>12&63]+qn[e>>6&63]+qn[e&63]}function AM(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(vM(r));return i.join("")}function xM(e){for(var t,n=e.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(AM(e,s,s+o>a?a:s+o));return r===1?(t=e[n-1],i.push(qn[t>>2]+qn[t<<4&63]+"==")):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(qn[t>>10]+qn[t>>4&63]+qn[t<<2&63]+"=")),i.join("")}var Rp={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Rp.read=function(e,t,n,r,i){var o,s,a=i*8-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=o*256+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+e[t+f],f+=h,c-=8);if(o===0)o=1-l;else{if(o===u)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-l}return(d?-1:1)*s*Math.pow(2,o-r)},Rp.write=function(e,t,n,r,i,o){var s,a,u,l=o*8-i-1,c=(1<<l)-1,f=c>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s=s+f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=a&255,d+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+d]=s&255,d+=p,s/=256,l-=8);e[n+d-p]|=m*128};/*!
600
600
  * The buffer module from node.js, for the browser.
601
601
  *
602
602
  * @author Feross Aboukhadijeh <https://feross.org>
603
603
  * @license MIT
604
- */(function(e){const t=Rf,n=Cp,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const v=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(v,g),v.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(v){if(v>i)throw new RangeError('The value "'+v+'" is invalid for option "size"');const g=new Uint8Array(v);return Object.setPrototypeOf(g,s.prototype),g}function s(v,g,b){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(v)}return u(v,g,b)}s.poolSize=8192;function u(v,g,b){if(typeof v=="string")return h(v,g);if(ArrayBuffer.isView(v))return p(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(kt(v,ArrayBuffer)||v&&kt(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(kt(v,SharedArrayBuffer)||v&&kt(v.buffer,SharedArrayBuffer)))return m(v,g,b);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=v.valueOf&&v.valueOf();if(T!=null&&T!==v)return s.from(T,g,b);const F=y(v);if(F)return F;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return s.from(v[Symbol.toPrimitive]("string"),g,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}s.from=function(v,g,b){return u(v,g,b)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function c(v,g,b){return l(v),v<=0?a(v):g!==void 0?typeof b=="string"?a(v).fill(g,b):a(v).fill(g):a(v)}s.alloc=function(v,g,b){return c(v,g,b)};function f(v){return l(v),a(v<0?0:w(v)|0)}s.allocUnsafe=function(v){return f(v)},s.allocUnsafeSlow=function(v){return f(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!s.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=S(v,g)|0;let T=a(b);const F=T.write(v,g);return F!==b&&(T=T.slice(0,F)),T}function d(v){const g=v.length<0?0:w(v.length)|0,b=a(g);for(let T=0;T<g;T+=1)b[T]=v[T]&255;return b}function p(v){if(kt(v,Uint8Array)){const g=new Uint8Array(v);return m(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function m(v,g,b){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let T;return g===void 0&&b===void 0?T=new Uint8Array(v):b===void 0?T=new Uint8Array(v,g):T=new Uint8Array(v,g,b),Object.setPrototypeOf(T,s.prototype),T}function y(v){if(s.isBuffer(v)){const g=w(v.length)|0,b=a(g);return b.length===0||v.copy(b,0,0,g),b}if(v.length!==void 0)return typeof v.length!="number"||Tr(v.length)?a(0):d(v);if(v.type==="Buffer"&&Array.isArray(v.data))return d(v.data)}function w(v){if(v>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return v|0}function A(v){return+v!=v&&(v=0),s.alloc(+v)}s.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==s.prototype},s.compare=function(g,b){if(kt(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),kt(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(g)||!s.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let T=g.length,F=b.length;for(let O=0,$=Math.min(T,F);O<$;++O)if(g[O]!==b[O]){T=g[O],F=b[O];break}return T<F?-1:F<T?1:0},s.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(g,b){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return s.alloc(0);let T;if(b===void 0)for(b=0,T=0;T<g.length;++T)b+=g[T].length;const F=s.allocUnsafe(b);let O=0;for(T=0;T<g.length;++T){let $=g[T];if(kt($,Uint8Array))O+$.length>F.length?(s.isBuffer($)||($=s.from($)),$.copy(F,O)):Uint8Array.prototype.set.call(F,$,O);else if(s.isBuffer($))$.copy(F,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=$.length}return F};function S(v,g){if(s.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||kt(v,ArrayBuffer))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);const b=v.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&b===0)return 0;let F=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return ce(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return Ci(v).length;default:if(F)return T?-1:ce(v).length;g=(""+g).toLowerCase(),F=!0}}s.byteLength=S;function _(v,g,b){let T=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return Oe(this,g,b);case"utf8":case"utf-8":return he(this,g,b);case"ascii":return Ae(this,g,b);case"latin1":case"binary":return Le(this,g,b);case"base64":return ie(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,g,b);default:if(T)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),T=!0}}s.prototype._isBuffer=!0;function k(v,g,b){const T=v[g];v[g]=v[b],v[b]=T}s.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<g;b+=2)k(this,b,b+1);return this},s.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<g;b+=4)k(this,b,b+3),k(this,b+1,b+2);return this},s.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<g;b+=8)k(this,b,b+7),k(this,b+1,b+6),k(this,b+2,b+5),k(this,b+3,b+4);return this},s.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?he(this,0,g):_.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(g){if(!s.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:s.compare(this,g)===0},s.prototype.inspect=function(){let g="";const b=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(g,b,T,F,O){if(kt(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),!s.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(b===void 0&&(b=0),T===void 0&&(T=g?g.length:0),F===void 0&&(F=0),O===void 0&&(O=this.length),b<0||T>g.length||F<0||O>this.length)throw new RangeError("out of range index");if(F>=O&&b>=T)return 0;if(F>=O)return-1;if(b>=T)return 1;if(b>>>=0,T>>>=0,F>>>=0,O>>>=0,this===g)return 0;let $=O-F,fe=T-b;const $e=Math.min($,fe),ze=this.slice(F,O),Qe=g.slice(b,T);for(let Te=0;Te<$e;++Te)if(ze[Te]!==Qe[Te]){$=ze[Te],fe=Qe[Te];break}return $<fe?-1:fe<$?1:0};function B(v,g,b,T,F){if(v.length===0)return-1;if(typeof b=="string"?(T=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Tr(b)&&(b=F?0:v.length-1),b<0&&(b=v.length+b),b>=v.length){if(F)return-1;b=v.length-1}else if(b<0)if(F)b=0;else return-1;if(typeof g=="string"&&(g=s.from(g,T)),s.isBuffer(g))return g.length===0?-1:I(v,g,b,T,F);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(v,g,b):Uint8Array.prototype.lastIndexOf.call(v,g,b):I(v,[g],b,T,F);throw new TypeError("val must be string, number or Buffer")}function I(v,g,b,T,F){let O=1,$=v.length,fe=g.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(v.length<2||g.length<2)return-1;O=2,$/=2,fe/=2,b/=2}function $e(Qe,Te){return O===1?Qe[Te]:Qe.readUInt16BE(Te*O)}let ze;if(F){let Qe=-1;for(ze=b;ze<$;ze++)if($e(v,ze)===$e(g,Qe===-1?0:ze-Qe)){if(Qe===-1&&(Qe=ze),ze-Qe+1===fe)return Qe*O}else Qe!==-1&&(ze-=ze-Qe),Qe=-1}else for(b+fe>$&&(b=$-fe),ze=b;ze>=0;ze--){let Qe=!0;for(let Te=0;Te<fe;Te++)if($e(v,ze+Te)!==$e(g,Te)){Qe=!1;break}if(Qe)return ze}return-1}s.prototype.includes=function(g,b,T){return this.indexOf(g,b,T)!==-1},s.prototype.indexOf=function(g,b,T){return B(this,g,b,T,!0)},s.prototype.lastIndexOf=function(g,b,T){return B(this,g,b,T,!1)};function D(v,g,b,T){b=Number(b)||0;const F=v.length-b;T?(T=Number(T),T>F&&(T=F)):T=F;const O=g.length;T>O/2&&(T=O/2);let $;for($=0;$<T;++$){const fe=parseInt(g.substr($*2,2),16);if(Tr(fe))return $;v[b+$]=fe}return $}function M(v,g,b,T){return ki(ce(g,v.length-b),v,b,T)}function G(v,g,b,T){return ki(qt(g),v,b,T)}function N(v,g,b,T){return ki(Ci(g),v,b,T)}function ne(v,g,b,T){return ki(Si(g,v.length-b),v,b,T)}s.prototype.write=function(g,b,T,F){if(b===void 0)F="utf8",T=this.length,b=0;else if(T===void 0&&typeof b=="string")F=b,T=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(T)?(T=T>>>0,F===void 0&&(F="utf8")):(F=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const O=this.length-b;if((T===void 0||T>O)&&(T=O),g.length>0&&(T<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let $=!1;for(;;)switch(F){case"hex":return D(this,g,b,T);case"utf8":case"utf-8":return M(this,g,b,T);case"ascii":case"latin1":case"binary":return G(this,g,b,T);case"base64":return N(this,g,b,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,g,b,T);default:if($)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),$=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(v,g,b){return g===0&&b===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,b))}function he(v,g,b){b=Math.min(v.length,b);const T=[];let F=g;for(;F<b;){const O=v[F];let $=null,fe=O>239?4:O>223?3:O>191?2:1;if(F+fe<=b){let $e,ze,Qe,Te;switch(fe){case 1:O<128&&($=O);break;case 2:$e=v[F+1],($e&192)===128&&(Te=(O&31)<<6|$e&63,Te>127&&($=Te));break;case 3:$e=v[F+1],ze=v[F+2],($e&192)===128&&(ze&192)===128&&(Te=(O&15)<<12|($e&63)<<6|ze&63,Te>2047&&(Te<55296||Te>57343)&&($=Te));break;case 4:$e=v[F+1],ze=v[F+2],Qe=v[F+3],($e&192)===128&&(ze&192)===128&&(Qe&192)===128&&(Te=(O&15)<<18|($e&63)<<12|(ze&63)<<6|Qe&63,Te>65535&&Te<1114112&&($=Te))}}$===null?($=65533,fe=1):$>65535&&($-=65536,T.push($>>>10&1023|55296),$=56320|$&1023),T.push($),F+=fe}return Fe(T)}const me=4096;function Fe(v){const g=v.length;if(g<=me)return String.fromCharCode.apply(String,v);let b="",T=0;for(;T<g;)b+=String.fromCharCode.apply(String,v.slice(T,T+=me));return b}function Ae(v,g,b){let T="";b=Math.min(v.length,b);for(let F=g;F<b;++F)T+=String.fromCharCode(v[F]&127);return T}function Le(v,g,b){let T="";b=Math.min(v.length,b);for(let F=g;F<b;++F)T+=String.fromCharCode(v[F]);return T}function Oe(v,g,b){const T=v.length;(!g||g<0)&&(g=0),(!b||b<0||b>T)&&(b=T);let F="";for(let O=g;O<b;++O)F+=Ti[v[O]];return F}function Je(v,g,b){const T=v.slice(g,b);let F="";for(let O=0;O<T.length-1;O+=2)F+=String.fromCharCode(T[O]+T[O+1]*256);return F}s.prototype.slice=function(g,b){const T=this.length;g=~~g,b=b===void 0?T:~~b,g<0?(g+=T,g<0&&(g=0)):g>T&&(g=T),b<0?(b+=T,b<0&&(b=0)):b>T&&(b=T),b<g&&(b=g);const F=this.subarray(g,b);return Object.setPrototypeOf(F,s.prototype),F};function Ce(v,g,b){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>b)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=this[g],O=1,$=0;for(;++$<b&&(O*=256);)F+=this[g+$]*O;return F},s.prototype.readUintBE=s.prototype.readUIntBE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=this[g+--b],O=1;for(;b>0&&(O*=256);)F+=this[g+--b]*O;return F},s.prototype.readUint8=s.prototype.readUInt8=function(g,b){return g=g>>>0,b||Ce(g,1,this.length),this[g]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||Ce(g,2,this.length),this[g]|this[g+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||Ce(g,2,this.length),this[g]<<8|this[g+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},s.prototype.readBigUInt64LE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,O=this[++g]+this[++g]*2**8+this[++g]*2**16+T*2**24;return BigInt(F)+(BigInt(O)<<BigInt(32))}),s.prototype.readBigUInt64BE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],O=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+T;return(BigInt(F)<<BigInt(32))+BigInt(O)}),s.prototype.readIntLE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=this[g],O=1,$=0;for(;++$<b&&(O*=256);)F+=this[g+$]*O;return O*=128,F>=O&&(F-=Math.pow(2,8*b)),F},s.prototype.readIntBE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=b,O=1,$=this[g+--F];for(;F>0&&(O*=256);)$+=this[g+--F]*O;return O*=128,$>=O&&($-=Math.pow(2,8*b)),$},s.prototype.readInt8=function(g,b){return g=g>>>0,b||Ce(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},s.prototype.readInt16LE=function(g,b){g=g>>>0,b||Ce(g,2,this.length);const T=this[g]|this[g+1]<<8;return T&32768?T|4294901760:T},s.prototype.readInt16BE=function(g,b){g=g>>>0,b||Ce(g,2,this.length);const T=this[g+1]|this[g]<<8;return T&32768?T|4294901760:T},s.prototype.readInt32LE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},s.prototype.readInt32BE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},s.prototype.readBigInt64LE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(T<<24);return(BigInt(F)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),s.prototype.readBigInt64BE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=(b<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(F)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+T)}),s.prototype.readFloatLE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),n.read(this,g,!0,23,4)},s.prototype.readFloatBE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),n.read(this,g,!1,23,4)},s.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||Ce(g,8,this.length),n.read(this,g,!0,52,8)},s.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||Ce(g,8,this.length),n.read(this,g,!1,52,8)};function ke(v,g,b,T,F,O){if(!s.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>F||g<O)throw new RangeError('"value" argument is out of bounds');if(b+T>v.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(g,b,T,F){if(g=+g,b=b>>>0,T=T>>>0,!F){const fe=Math.pow(2,8*T)-1;ke(this,g,b,T,fe,0)}let O=1,$=0;for(this[b]=g&255;++$<T&&(O*=256);)this[b+$]=g/O&255;return b+T},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(g,b,T,F){if(g=+g,b=b>>>0,T=T>>>0,!F){const fe=Math.pow(2,8*T)-1;ke(this,g,b,T,fe,0)}let O=T-1,$=1;for(this[b+O]=g&255;--O>=0&&($*=256);)this[b+O]=g/$&255;return b+T},s.prototype.writeUint8=s.prototype.writeUInt8=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,1,255,0),this[b]=g&255,b+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function gt(v,g,b,T,F){x(g,T,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O;let $=Number(g>>BigInt(32)&BigInt(4294967295));return v[b++]=$,$=$>>8,v[b++]=$,$=$>>8,v[b++]=$,$=$>>8,v[b++]=$,b}function $t(v,g,b,T,F){x(g,T,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b+7]=O,O=O>>8,v[b+6]=O,O=O>>8,v[b+5]=O,O=O>>8,v[b+4]=O;let $=Number(g>>BigInt(32)&BigInt(4294967295));return v[b+3]=$,$=$>>8,v[b+2]=$,$=$>>8,v[b+1]=$,$=$>>8,v[b]=$,b+8}s.prototype.writeBigUInt64LE=Wt(function(g,b=0){return gt(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Wt(function(g,b=0){return $t(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(g,b,T,F){if(g=+g,b=b>>>0,!F){const $e=Math.pow(2,8*T-1);ke(this,g,b,T,$e-1,-$e)}let O=0,$=1,fe=0;for(this[b]=g&255;++O<T&&($*=256);)g<0&&fe===0&&this[b+O-1]!==0&&(fe=1),this[b+O]=(g/$>>0)-fe&255;return b+T},s.prototype.writeIntBE=function(g,b,T,F){if(g=+g,b=b>>>0,!F){const $e=Math.pow(2,8*T-1);ke(this,g,b,T,$e-1,-$e)}let O=T-1,$=1,fe=0;for(this[b+O]=g&255;--O>=0&&($*=256);)g<0&&fe===0&&this[b+O+1]!==0&&(fe=1),this[b+O]=(g/$>>0)-fe&255;return b+T},s.prototype.writeInt8=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},s.prototype.writeInt16LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},s.prototype.writeInt16BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},s.prototype.writeInt32LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},s.prototype.writeInt32BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},s.prototype.writeBigInt64LE=Wt(function(g,b=0){return gt(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Wt(function(g,b=0){return $t(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function He(v,g,b,T,F,O){if(b+T>v.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function L(v,g,b,T,F){return g=+g,b=b>>>0,F||He(v,g,b,4),n.write(v,g,b,T,23,4),b+4}s.prototype.writeFloatLE=function(g,b,T){return L(this,g,b,!0,T)},s.prototype.writeFloatBE=function(g,b,T){return L(this,g,b,!1,T)};function P(v,g,b,T,F){return g=+g,b=b>>>0,F||He(v,g,b,8),n.write(v,g,b,T,52,8),b+8}s.prototype.writeDoubleLE=function(g,b,T){return P(this,g,b,!0,T)},s.prototype.writeDoubleBE=function(g,b,T){return P(this,g,b,!1,T)},s.prototype.copy=function(g,b,T,F){if(!s.isBuffer(g))throw new TypeError("argument should be a Buffer");if(T||(T=0),!F&&F!==0&&(F=this.length),b>=g.length&&(b=g.length),b||(b=0),F>0&&F<T&&(F=T),F===T||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),g.length-b<F-T&&(F=g.length-b+T);const O=F-T;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,T,F):Uint8Array.prototype.set.call(g,this.subarray(T,F),b),O},s.prototype.fill=function(g,b,T,F){if(typeof g=="string"){if(typeof b=="string"?(F=b,b=0,T=this.length):typeof T=="string"&&(F=T,T=this.length),F!==void 0&&typeof F!="string")throw new TypeError("encoding must be a string");if(typeof F=="string"&&!s.isEncoding(F))throw new TypeError("Unknown encoding: "+F);if(g.length===1){const $=g.charCodeAt(0);(F==="utf8"&&$<128||F==="latin1")&&(g=$)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<T)throw new RangeError("Out of range index");if(T<=b)return this;b=b>>>0,T=T===void 0?this.length:T>>>0,g||(g=0);let O;if(typeof g=="number")for(O=b;O<T;++O)this[O]=g;else{const $=s.isBuffer(g)?g:s.from(g,F),fe=$.length;if(fe===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(O=0;O<T-b;++O)this[O+b]=$[O%fe]}return this};const q={};function j(v,g,b){q[v]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${v}]`,this.stack,delete this.name}get code(){return v}set code(F){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:F,writable:!0})}toString(){return`${this.name} [${v}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),j("ERR_OUT_OF_RANGE",function(v,g,b){let T=`The value of "${v}" is out of range.`,F=b;return Number.isInteger(b)&&Math.abs(b)>2**32?F=Y(String(b)):typeof b=="bigint"&&(F=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(F=Y(F)),F+="n"),T+=` It must be ${g}. Received ${F}`,T},RangeError);function Y(v){let g="",b=v.length;const T=v[0]==="-"?1:0;for(;b>=T+4;b-=3)g=`_${v.slice(b-3,b)}${g}`;return`${v.slice(0,b)}${g}`}function C(v,g,b){V(g,"offset"),(v[g]===void 0||v[g+b]===void 0)&&W(g,v.length-(b+1))}function x(v,g,b,T,F,O){if(v>b||v<g){const $=typeof g=="bigint"?"n":"";let fe;throw O>3?g===0||g===BigInt(0)?fe=`>= 0${$} and < 2${$} ** ${(O+1)*8}${$}`:fe=`>= -(2${$} ** ${(O+1)*8-1}${$}) and < 2 ** ${(O+1)*8-1}${$}`:fe=`>= ${g}${$} and <= ${b}${$}`,new q.ERR_OUT_OF_RANGE("value",fe,v)}C(T,F,O)}function V(v,g){if(typeof v!="number")throw new q.ERR_INVALID_ARG_TYPE(g,"number",v)}function W(v,g,b){throw Math.floor(v)!==v?(V(v,b),new q.ERR_OUT_OF_RANGE(b||"offset","an integer",v)):g<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${g}`,v)}const ue=/[^+/0-9A-Za-z-_]/g;function te(v){if(v=v.split("=")[0],v=v.trim().replace(ue,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function ce(v,g){g=g||1/0;let b;const T=v.length;let F=null;const O=[];for(let $=0;$<T;++$){if(b=v.charCodeAt($),b>55295&&b<57344){if(!F){if(b>56319){(g-=3)>-1&&O.push(239,191,189);continue}else if($+1===T){(g-=3)>-1&&O.push(239,191,189);continue}F=b;continue}if(b<56320){(g-=3)>-1&&O.push(239,191,189),F=b;continue}b=(F-55296<<10|b-56320)+65536}else F&&(g-=3)>-1&&O.push(239,191,189);if(F=null,b<128){if((g-=1)<0)break;O.push(b)}else if(b<2048){if((g-=2)<0)break;O.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;O.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;O.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return O}function qt(v){const g=[];for(let b=0;b<v.length;++b)g.push(v.charCodeAt(b)&255);return g}function Si(v,g){let b,T,F;const O=[];for(let $=0;$<v.length&&!((g-=2)<0);++$)b=v.charCodeAt($),T=b>>8,F=b%256,O.push(F),O.push(T);return O}function Ci(v){return t.toByteArray(te(v))}function ki(v,g,b,T){let F;for(F=0;F<T&&!(F+b>=g.length||F>=v.length);++F)g[F+b]=v[F];return F}function kt(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function Tr(v){return v!==v}const Ti=function(){const v="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const T=b*16;for(let F=0;F<16;++F)g[T+F]=v[b]+v[F]}return g}();function Wt(v){return typeof BigInt>"u"?rr:v}function rr(){throw new Error("BigInt not supported")}})(be);const sx=Ee({__proto__:null,default:kl(be)},[be]),dt={},_M=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"})),kp=typeof window<"u"?window:typeof self<"u"?self:{fetch:void 0};class no{async getBufferFromResponse(t){if(typeof t.buffer=="function")return t.buffer();if(typeof t.arrayBuffer=="function"){const n=await t.arrayBuffer();return be.Buffer.from(n)}else throw new TypeError("invalid HTTP response object, has no buffer method, and no arrayBuffer method")}constructor(t,n={}){this.baseOverrides={},this.url=t;const r=n.fetch||kp.fetch&&kp.fetch.bind(kp);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(t,n){let r;try{r=await this.fetchImplementation(t,n)}catch(i){if(`${i}`.includes("Failed to fetch"))console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(t,{...n,cache:"reload"});else throw i}return r}async read(t,n=0,r,i=0,o={}){const{headers:a={},signal:s,overrides:u={}}=o;r<1/0?a.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(a.range=`bytes=${i}-`);const l={...this.baseOverrides,...u,headers:{...a,...u.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s},c=await this.fetch(this.url,l);if(!c.ok)throw new Error(`HTTP ${c.status} ${c.statusText} ${this.url}`);if(c.status===200&&i===0||c.status===206){const f=await this.getBufferFromResponse(c),h=f.copy(t,n,0,Math.min(r,f.length)),d=c.headers.get("content-range"),p=/\/(\d+)$/.exec(d||"");return p&&p[1]&&(this._stat={size:parseInt(p[1],10)}),{bytesRead:h,buffer:t}}throw c.status===200?new Error("${this.url} fetch returned status 200, expected 206"):new Error(`HTTP ${c.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:o,overrides:a={}}=r,s={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a},u=await this.fetch(this.url,s);if(!u)throw new Error("generic-filehandle failed to fetch");if(u.status!==200)throw Object.assign(new Error(`HTTP ${u.status} fetching ${this.url}`),{status:u.status});if(n==="utf8")return u.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(u)}async stat(){if(!this._stat){const t=be.Buffer.allocUnsafe(10);if(await this.read(t,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function lx(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result!="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)})}function SM(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result=="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsText(e)})}class CM{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const o=i,a=o+r,s=await lx(this.blob.slice(o,a)),u=be.Buffer.from(s);return{bytesRead:u.copy(t,n),buffer:u}}async readFile(t){let n;if(typeof t=="string"?n=t:n=t&&t.encoding,n==="utf8")return SM(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await lx(this.blob);return be.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function ux(e,t={}){return new no(e,t)}function kM(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return ux(e,r);if(t!==void 0)return new dt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Tl=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:CM,LocalFile:dt,RemoteFile:no,fromUrl:ux,open:kM},Symbol.toStringTag,{value:"Module"}));var mr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(o,a){return Object.prototype.hasOwnProperty.call(o,a)}e.assign=function(o){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var s=a.shift();if(s){if(typeof s!="object")throw new TypeError(s+"must be non-object");for(var u in s)n(s,u)&&(o[u]=s[u])}}return o},e.shrinkBuf=function(o,a){return o.length===a?o:o.subarray?o.subarray(0,a):(o.length=a,o)};var r={arraySet:function(o,a,s,u,l){if(a.subarray&&o.subarray){o.set(a.subarray(s,s+u),l);return}for(var c=0;c<u;c++)o[l+c]=a[s+c]},flattenChunks:function(o){var a,s,u,l,c,f;for(u=0,a=0,s=o.length;a<s;a++)u+=o[a].length;for(f=new Uint8Array(u),l=0,a=0,s=o.length;a<s;a++)c=o[a],f.set(c,l),l+=c.length;return f}},i={arraySet:function(o,a,s,u,l){for(var c=0;c<u;c++)o[l+c]=a[s+c]},flattenChunks:function(o){return[].concat.apply([],o)}};e.setTyped=function(o){o?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(mr);var Il={},Wn={},ha={},TM=mr,IM=4,cx=0,fx=1,BM=2;function da(e){for(var t=e.length;--t>=0;)e[t]=0}var DM=0,hx=1,RM=2,FM=3,MM=258,Tp=29,Bl=256,Dl=Bl+1+Tp,pa=30,Ip=19,dx=2*Dl+1,ro=15,Bp=16,PM=7,Dp=256,px=16,gx=17,mx=18,Rp=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ff=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],LM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],bx=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],NM=512,br=new Array((Dl+2)*2);da(br);var Rl=new Array(pa*2);da(Rl);var Fl=new Array(NM);da(Fl);var Ml=new Array(MM-FM+1);da(Ml);var Fp=new Array(Tp);da(Fp);var Mf=new Array(pa);da(Mf);function Mp(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var yx,wx,vx;function Pp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function xx(e){return e<256?Fl[e]:Fl[256+(e>>>7)]}function Pl(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Gt(e,t,n){e.bi_valid>Bp-n?(e.bi_buf|=t<<e.bi_valid&65535,Pl(e,e.bi_buf),e.bi_buf=t>>Bp-e.bi_valid,e.bi_valid+=n-Bp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Zn(e,t,n){Gt(e,n[t*2],n[t*2+1])}function Ax(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function OM(e){e.bi_valid===16?(Pl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function zM(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,c,f,h,d,p,m=0;for(h=0;h<=ro;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<dx;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=s&&(d=a[c-s]),p=n[c*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}}function Ex(e,t,n){var r=new Array(ro+1),i=0,o,a;for(o=1;o<=ro;o++)r[o]=i=i+n[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=Ax(r[s]++,s))}}function UM(){var e,t,n,r,i,o=new Array(ro+1);for(n=0,r=0;r<Tp-1;r++)for(Fp[r]=n,e=0;e<1<<Rp[r];e++)Ml[n++]=r;for(Ml[n-1]=r,i=0,r=0;r<16;r++)for(Mf[r]=i,e=0;e<1<<Ff[r];e++)Fl[i++]=r;for(i>>=7;r<pa;r++)for(Mf[r]=i<<7,e=0;e<1<<Ff[r]-7;e++)Fl[256+i++]=r;for(t=0;t<=ro;t++)o[t]=0;for(e=0;e<=143;)br[e*2+1]=8,e++,o[8]++;for(;e<=255;)br[e*2+1]=9,e++,o[9]++;for(;e<=279;)br[e*2+1]=7,e++,o[7]++;for(;e<=287;)br[e*2+1]=8,e++,o[8]++;for(Ex(br,Dl+1,o),e=0;e<pa;e++)Rl[e*2+1]=5,Rl[e*2]=Ax(e,5);yx=new Mp(br,Rp,Bl+1,Dl,ro),wx=new Mp(Rl,Ff,0,pa,ro),vx=new Mp(new Array(0),LM,0,Ip,PM)}function _x(e){var t;for(t=0;t<Dl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<pa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ip;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Dp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Sx(e){e.bi_valid>8?Pl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function GM(e,t,n,r){Sx(e),r&&(Pl(e,n),Pl(e,~n)),TM.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function Cx(e,t,n,r){var i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function Lp(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Cx(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Cx(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function kx(e,t,n){var r,i,o=0,a,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,r===0?Zn(e,i,t):(a=Ml[i],Zn(e,a+Bl+1,t),s=Rp[a],s!==0&&(i-=Fp[a],Gt(e,i,s)),r--,a=xx(r),Zn(e,a,n),s=Ff[a],s!==0&&(r-=Mf[a],Gt(e,r,s)));while(o<e.last_lit);Zn(e,Dp,t)}function Np(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,u=-1,l;for(e.heap_len=0,e.heap_max=dx,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=u=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,a=e.heap_len>>1;a>=1;a--)Lp(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Lp(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,Lp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],zM(e,t),Ex(n,u,e.bl_count)}function Tx(e,t,n){var r,i=-1,o,a=t[0*2+1],s=0,u=7,l=4;for(a===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<u&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[px*2]++):s<=10?e.bl_tree[gx*2]++:e.bl_tree[mx*2]++,s=0,i=o,a===0?(u=138,l=3):o===a?(u=6,l=3):(u=7,l=4))}function Ix(e,t,n){var r,i=-1,o,a=t[0*2+1],s=0,u=7,l=4;for(a===0&&(u=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<u&&o===a)){if(s<l)do Zn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Zn(e,o,e.bl_tree),s--),Zn(e,px,e.bl_tree),Gt(e,s-3,2)):s<=10?(Zn(e,gx,e.bl_tree),Gt(e,s-3,3)):(Zn(e,mx,e.bl_tree),Gt(e,s-11,7));s=0,i=o,a===0?(u=138,l=3):o===a?(u=6,l=3):(u=7,l=4)}}function HM(e){var t;for(Tx(e,e.dyn_ltree,e.l_desc.max_code),Tx(e,e.dyn_dtree,e.d_desc.max_code),Np(e,e.bl_desc),t=Ip-1;t>=3&&e.bl_tree[bx[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function VM(e,t,n,r){var i;for(Gt(e,t-257,5),Gt(e,n-1,5),Gt(e,r-4,4),i=0;i<r;i++)Gt(e,e.bl_tree[bx[i]*2+1],3);Ix(e,e.dyn_ltree,t-1),Ix(e,e.dyn_dtree,n-1)}function jM(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return cx;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return fx;for(n=32;n<Bl;n++)if(e.dyn_ltree[n*2]!==0)return fx;return cx}var Bx=!1;function $M(e){Bx||(UM(),Bx=!0),e.l_desc=new Pp(e.dyn_ltree,yx),e.d_desc=new Pp(e.dyn_dtree,wx),e.bl_desc=new Pp(e.bl_tree,vx),e.bi_buf=0,e.bi_valid=0,_x(e)}function Dx(e,t,n,r){Gt(e,(DM<<1)+(r?1:0),3),GM(e,t,n,!0)}function qM(e){Gt(e,hx<<1,3),Zn(e,Dp,br),OM(e)}function WM(e,t,n,r){var i,o,a=0;e.level>0?(e.strm.data_type===BM&&(e.strm.data_type=jM(e)),Np(e,e.l_desc),Np(e,e.d_desc),a=HM(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Dx(e,t,n,r):e.strategy===IM||o===i?(Gt(e,(hx<<1)+(r?1:0),3),kx(e,br,Rl)):(Gt(e,(RM<<1)+(r?1:0),3),VM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),kx(e,e.dyn_ltree,e.dyn_dtree)),_x(e),r&&Sx(e)}function ZM(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Ml[n]+Bl+1)*2]++,e.dyn_dtree[xx(t)*2]++),e.last_lit===e.lit_bufsize-1}ha._tr_init=$M,ha._tr_stored_block=Dx,ha._tr_flush_block=WM,ha._tr_tally=ZM,ha._tr_align=qM;function YM(e,t,n,r){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}var Rx=YM;function QM(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var XM=QM();function KM(e,t,n,r){var i=XM,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}var Fx=KM,Op={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Rt=mr,ln=ha,Mx=Rx,oi=Fx,JM=Op,io=0,eP=1,tP=3,ai=4,Px=5,Yn=0,Lx=1,un=-2,nP=-3,zp=-5,rP=-1,iP=1,Pf=2,oP=3,aP=4,sP=0,lP=2,Lf=8,uP=9,cP=15,fP=8,hP=29,dP=256,Up=dP+1+hP,pP=30,gP=19,mP=2*Up+1,bP=15,pe=3,si=258,Cn=si+pe+1,yP=32,Nf=42,Gp=69,Of=73,zf=91,Uf=103,oo=113,Ll=666,st=1,Nl=2,ao=3,ga=4,wP=3;function li(e,t){return e.msg=JM[t],t}function Nx(e){return(e<<1)-(e>4?9:0)}function ui(e){for(var t=e.length;--t>=0;)e[t]=0}function ci(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Rt.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function wt(e,t){ln._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ci(e.strm)}function xe(e,t){e.pending_buf[e.pending++]=t}function Ol(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function vP(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Rt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=Mx(e.adler,t,i,n):e.state.wrap===2&&(e.adler=oi(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function Ox(e,t){var n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Cn?e.strstart-(e.w_size-Cn):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+si,d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=si-(h-r),r=h-si,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=f[t&c])>u&&--n!==0);return a<=e.lookahead?a:e.lookahead}function so(e){var t=e.w_size,n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Cn)){Rt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);o+=t}if(e.strm.avail_in===0)break;if(r=vP(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=pe)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+pe-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<pe)););}while(e.lookahead<Cn&&e.strm.avail_in!==0)}function xP(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(so(e),e.lookahead===0&&t===io)return st;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Cn&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ai?(wt(e,!0),e.strm.avail_out===0?ao:ga):(e.strstart>e.block_start&&(wt(e,!1),e.strm.avail_out===0),st)}function Hp(e,t){for(var n,r;;){if(e.lookahead<Cn){if(so(e),e.lookahead<Cn&&t===io)return st;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Cn&&(e.match_length=Ox(e,n)),e.match_length>=pe)if(r=ln._tr_tally(e,e.strstart-e.match_start,e.match_length-pe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=pe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=ln._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=e.strstart<pe-1?e.strstart:pe-1,t===ai?(wt(e,!0),e.strm.avail_out===0?ao:ga):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:Nl}function ma(e,t){for(var n,r,i;;){if(e.lookahead<Cn){if(so(e),e.lookahead<Cn&&t===io)return st;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=pe-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Cn&&(e.match_length=Ox(e,n),e.match_length<=5&&(e.strategy===iP||e.match_length===pe&&e.strstart-e.match_start>4096)&&(e.match_length=pe-1)),e.prev_length>=pe&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-pe,r=ln._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-pe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=pe-1,e.strstart++,r&&(wt(e,!1),e.strm.avail_out===0))return st}else if(e.match_available){if(r=ln._tr_tally(e,0,e.window[e.strstart-1]),r&&wt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return st}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ln._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<pe-1?e.strstart:pe-1,t===ai?(wt(e,!0),e.strm.avail_out===0?ao:ga):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:Nl}function AP(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=si){if(so(e),e.lookahead<=si&&t===io)return st;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=pe&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+si;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=si-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=pe?(n=ln._tr_tally(e,1,e.match_length-pe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ln._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ai?(wt(e,!0),e.strm.avail_out===0?ao:ga):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:Nl}function EP(e,t){for(var n;;){if(e.lookahead===0&&(so(e),e.lookahead===0)){if(t===io)return st;break}if(e.match_length=0,n=ln._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wt(e,!1),e.strm.avail_out===0))return st}return e.insert=0,t===ai?(wt(e,!0),e.strm.avail_out===0?ao:ga):e.last_lit&&(wt(e,!1),e.strm.avail_out===0)?st:Nl}function Qn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var ba;ba=[new Qn(0,0,0,0,xP),new Qn(4,4,8,4,Hp),new Qn(4,5,16,8,Hp),new Qn(4,6,32,32,Hp),new Qn(4,4,16,16,ma),new Qn(8,16,32,32,ma),new Qn(8,16,128,128,ma),new Qn(8,32,128,256,ma),new Qn(32,128,258,1024,ma),new Qn(32,258,258,4096,ma)];function _P(e){e.window_size=2*e.w_size,ui(e.head),e.max_lazy_match=ba[e.level].max_lazy,e.good_match=ba[e.level].good_length,e.nice_match=ba[e.level].nice_length,e.max_chain_length=ba[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=pe-1,e.match_available=0,e.ins_h=0}function SP(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Lf,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Rt.Buf16(mP*2),this.dyn_dtree=new Rt.Buf16((2*pP+1)*2),this.bl_tree=new Rt.Buf16((2*gP+1)*2),ui(this.dyn_ltree),ui(this.dyn_dtree),ui(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Rt.Buf16(bP+1),this.heap=new Rt.Buf16(2*Up+1),ui(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Rt.Buf16(2*Up+1),ui(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function zx(e){var t;return!e||!e.state?li(e,un):(e.total_in=e.total_out=0,e.data_type=lP,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Nf:oo,e.adler=t.wrap===2?0:1,t.last_flush=io,ln._tr_init(t),Yn)}function Ux(e){var t=zx(e);return t===Yn&&_P(e.state),t}function CP(e,t){return!e||!e.state||e.state.wrap!==2?un:(e.state.gzhead=t,Yn)}function Gx(e,t,n,r,i,o){if(!e)return un;var a=1;if(t===rP&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>uP||n!==Lf||r<8||r>15||t<0||t>9||o<0||o>aP)return li(e,un);r===8&&(r=9);var s=new SP;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+pe-1)/pe),s.window=new Rt.Buf8(s.w_size*2),s.head=new Rt.Buf16(s.hash_size),s.prev=new Rt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Rt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=t,s.strategy=o,s.method=n,Ux(e)}function kP(e,t){return Gx(e,t,Lf,cP,fP,sP)}function TP(e,t){var n,r,i,o;if(!e||!e.state||t>Px||t<0)return e?li(e,un):un;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Ll&&t!==ai)return li(e,e.avail_out===0?zp:un);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Nf)if(r.wrap===2)e.adler=0,xe(r,31),xe(r,139),xe(r,8),r.gzhead?(xe(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xe(r,r.gzhead.time&255),xe(r,r.gzhead.time>>8&255),xe(r,r.gzhead.time>>16&255),xe(r,r.gzhead.time>>24&255),xe(r,r.level===9?2:r.strategy>=Pf||r.level<2?4:0),xe(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(xe(r,r.gzhead.extra.length&255),xe(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=oi(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Gp):(xe(r,0),xe(r,0),xe(r,0),xe(r,0),xe(r,0),xe(r,r.level===9?2:r.strategy>=Pf||r.level<2?4:0),xe(r,wP),r.status=oo);else{var a=Lf+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=Pf||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,a|=s<<6,r.strstart!==0&&(a|=yP),a+=31-a%31,r.status=oo,Ol(r,a),r.strstart!==0&&(Ol(r,e.adler>>>16),Ol(r,e.adler&65535)),e.adler=1}if(r.status===Gp)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=oi(e.adler,r.pending_buf,r.pending-i,i)),ci(e),i=r.pending,r.pending===r.pending_buf_size));)xe(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=oi(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Of)}else r.status=Of;if(r.status===Of)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=oi(e.adler,r.pending_buf,r.pending-i,i)),ci(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.name.length?o=r.gzhead.name.charCodeAt(r.gzindex++)&255:o=0,xe(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=oi(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.gzindex=0,r.status=zf)}else r.status=zf;if(r.status===zf)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=oi(e.adler,r.pending_buf,r.pending-i,i)),ci(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.comment.length?o=r.gzhead.comment.charCodeAt(r.gzindex++)&255:o=0,xe(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=oi(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.status=Uf)}else r.status=Uf;if(r.status===Uf&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&ci(e),r.pending+2<=r.pending_buf_size&&(xe(r,e.adler&255),xe(r,e.adler>>8&255),e.adler=0,r.status=oo)):r.status=oo),r.pending!==0){if(ci(e),e.avail_out===0)return r.last_flush=-1,Yn}else if(e.avail_in===0&&Nx(t)<=Nx(n)&&t!==ai)return li(e,zp);if(r.status===Ll&&e.avail_in!==0)return li(e,zp);if(e.avail_in!==0||r.lookahead!==0||t!==io&&r.status!==Ll){var u=r.strategy===Pf?EP(r,t):r.strategy===oP?AP(r,t):ba[r.level].func(r,t);if((u===ao||u===ga)&&(r.status=Ll),u===st||u===ao)return e.avail_out===0&&(r.last_flush=-1),Yn;if(u===Nl&&(t===eP?ln._tr_align(r):t!==Px&&(ln._tr_stored_block(r,0,0,!1),t===tP&&(ui(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),ci(e),e.avail_out===0))return r.last_flush=-1,Yn}return t!==ai?Yn:r.wrap<=0?Lx:(r.wrap===2?(xe(r,e.adler&255),xe(r,e.adler>>8&255),xe(r,e.adler>>16&255),xe(r,e.adler>>24&255),xe(r,e.total_in&255),xe(r,e.total_in>>8&255),xe(r,e.total_in>>16&255),xe(r,e.total_in>>24&255)):(Ol(r,e.adler>>>16),Ol(r,e.adler&65535)),ci(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Yn:Lx)}function IP(e){var t;return!e||!e.state?un:(t=e.state.status,t!==Nf&&t!==Gp&&t!==Of&&t!==zf&&t!==Uf&&t!==oo&&t!==Ll?li(e,un):(e.state=null,t===oo?li(e,nP):Yn))}function BP(e,t){var n=t.length,r,i,o,a,s,u,l,c;if(!e||!e.state||(r=e.state,a=r.wrap,a===2||a===1&&r.status!==Nf||r.lookahead))return un;for(a===1&&(e.adler=Mx(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(a===0&&(ui(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new Rt.Buf8(r.w_size),Rt.arraySet(c,t,n-r.w_size,r.w_size,0),t=c,n=r.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,so(r);r.lookahead>=pe;){i=r.strstart,o=r.lookahead-(pe-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+pe-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--o);r.strstart=i,r.lookahead=pe-1,so(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=pe-1,r.match_available=0,e.next_in=u,e.input=l,e.avail_in=s,r.wrap=a,Yn}Wn.deflateInit=kP,Wn.deflateInit2=Gx,Wn.deflateReset=Ux,Wn.deflateResetKeep=zx,Wn.deflateSetHeader=CP,Wn.deflate=TP,Wn.deflateEnd=IP,Wn.deflateSetDictionary=BP,Wn.deflateInfo="pako deflate (from Nodeca project)";var lo={},Gf=mr,Hx=!0,Vx=!0;try{String.fromCharCode.apply(null,[0])}catch{Hx=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Vx=!1}for(var zl=new Gf.Buf8(256),fi=0;fi<256;fi++)zl[fi]=fi>=252?6:fi>=248?5:fi>=240?4:fi>=224?3:fi>=192?2:1;zl[254]=zl[254]=1,lo.string2buf=function(e){var t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Gf.Buf8(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};function jx(e,t){if(t<65534&&(e.subarray&&Vx||!e.subarray&&Hx))return String.fromCharCode.apply(null,Gf.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}lo.buf2binstring=function(e){return jx(e,e.length)},lo.binstring2buf=function(e){for(var t=new Gf.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},lo.buf2string=function(e,t){var n,r,i,o,a=t||e.length,s=new Array(a*2);for(r=0,n=0;n<a;){if(i=e[n++],i<128){s[r++]=i;continue}if(o=zl[i],o>4){s[r++]=65533,n+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&n<a;)i=i<<6|e[n++]&63,o--;if(o>1){s[r++]=65533;continue}i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|i&1023)}return jx(s,r)},lo.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+zl[e[n]]>t?n:t};function DP(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var $x=DP,Ul=Wn,Gl=mr,Vp=lo,jp=Op,RP=$x,qx=Object.prototype.toString,FP=0,$p=4,ya=0,Wx=1,Zx=2,MP=-1,PP=0,LP=8;function uo(e){if(!(this instanceof uo))return new uo(e);this.options=Gl.assign({level:MP,method:LP,chunkSize:16384,windowBits:15,memLevel:8,strategy:PP,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new RP,this.strm.avail_out=0;var n=Ul.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ya)throw new Error(jp[n]);if(t.header&&Ul.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=Vp.string2buf(t.dictionary):qx.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ul.deflateSetDictionary(this.strm,r),n!==ya)throw new Error(jp[n]);this._dict_set=!0}}uo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?$p:FP,typeof e=="string"?n.input=Vp.string2buf(e):qx.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Gl.Buf8(r),n.next_out=0,n.avail_out=r),i=Ul.deflate(n,o),i!==Wx&&i!==ya)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(o===$p||o===Zx))&&(this.options.to==="string"?this.onData(Vp.buf2binstring(Gl.shrinkBuf(n.output,n.next_out))):this.onData(Gl.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==Wx);return o===$p?(i=Ul.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ya):(o===Zx&&(this.onEnd(ya),n.avail_out=0),!0)},uo.prototype.onData=function(e){this.chunks.push(e)},uo.prototype.onEnd=function(e){e===ya&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Gl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function qp(e,t){var n=new uo(t);if(n.push(e,!0),n.err)throw n.msg||jp[n.err];return n.result}function NP(e,t){return t=t||{},t.raw=!0,qp(e,t)}function OP(e,t){return t=t||{},t.gzip=!0,qp(e,t)}Il.Deflate=uo,Il.deflate=qp,Il.deflateRaw=NP,Il.gzip=OP;var Hl={},kn={},Hf=30,zP=12,UP=function(t,n){var r,i,o,a,s,u,l,c,f,h,d,p,m,y,w,A,S,_,k,B,I,D,M,G,N;r=t.state,i=t.next_in,G=t.input,o=i+(t.avail_in-5),a=t.next_out,N=t.output,s=a-(n-t.avail_out),u=a+(t.avail_out-257),l=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,m=r.bits,y=r.lencode,w=r.distcode,A=(1<<r.lenbits)-1,S=(1<<r.distbits)-1;e:do{m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=y[p&A];t:for(;;){if(k=_>>>24,p>>>=k,m-=k,k=_>>>16&255,k===0)N[a++]=_&65535;else if(k&16){B=_&65535,k&=15,k&&(m<k&&(p+=G[i++]<<m,m+=8),B+=p&(1<<k)-1,p>>>=k,m-=k),m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=w[p&S];n:for(;;){if(k=_>>>24,p>>>=k,m-=k,k=_>>>16&255,k&16){if(I=_&65535,k&=15,m<k&&(p+=G[i++]<<m,m+=8,m<k&&(p+=G[i++]<<m,m+=8)),I+=p&(1<<k)-1,I>l){t.msg="invalid distance too far back",r.mode=Hf;break e}if(p>>>=k,m-=k,k=a-s,I>k){if(k=I-k,k>f&&r.sane){t.msg="invalid distance too far back",r.mode=Hf;break e}if(D=0,M=d,h===0){if(D+=c-k,k<B){B-=k;do N[a++]=d[D++];while(--k);D=a-I,M=N}}else if(h<k){if(D+=c+h-k,k-=h,k<B){B-=k;do N[a++]=d[D++];while(--k);if(D=0,h<B){k=h,B-=k;do N[a++]=d[D++];while(--k);D=a-I,M=N}}}else if(D+=h-k,k<B){B-=k;do N[a++]=d[D++];while(--k);D=a-I,M=N}for(;B>2;)N[a++]=M[D++],N[a++]=M[D++],N[a++]=M[D++],B-=3;B&&(N[a++]=M[D++],B>1&&(N[a++]=M[D++]))}else{D=a-I;do N[a++]=N[D++],N[a++]=N[D++],N[a++]=N[D++],B-=3;while(B>2);B&&(N[a++]=N[D++],B>1&&(N[a++]=N[D++]))}}else if(k&64){t.msg="invalid distance code",r.mode=Hf;break e}else{_=w[(_&65535)+(p&(1<<k)-1)];continue n}break}}else if(k&64)if(k&32){r.mode=zP;break e}else{t.msg="invalid literal/length code",r.mode=Hf;break e}else{_=y[(_&65535)+(p&(1<<k)-1)];continue t}break}}while(i<o&&a<u);B=m>>3,i-=B,m-=B<<3,p&=(1<<m)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<u?257+(u-a):257-(a-u),r.hold=p,r.bits=m},Yx=mr,wa=15,Qx=852,Xx=592,Kx=0,Wp=1,Jx=2,GP=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],HP=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],VP=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],jP=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],$P=function(t,n,r,i,o,a,s,u){var l=u.bits,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,S=0,_,k,B,I,D,M=null,G=0,N,ne=new Yx.Buf16(wa+1),ie=new Yx.Buf16(wa+1),he=null,me=0,Fe,Ae,Le;for(c=0;c<=wa;c++)ne[c]=0;for(f=0;f<i;f++)ne[n[r+f]]++;for(p=l,d=wa;d>=1&&ne[d]===0;d--);if(p>d&&(p=d),d===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,u.bits=1,0;for(h=1;h<d&&ne[h]===0;h++);for(p<h&&(p=h),w=1,c=1;c<=wa;c++)if(w<<=1,w-=ne[c],w<0)return-1;if(w>0&&(t===Kx||d!==1))return-1;for(ie[1]=0,c=1;c<wa;c++)ie[c+1]=ie[c]+ne[c];for(f=0;f<i;f++)n[r+f]!==0&&(s[ie[n[r+f]]++]=f);if(t===Kx?(M=he=s,N=19):t===Wp?(M=GP,G-=257,he=HP,me-=257,N=256):(M=VP,he=jP,N=-1),S=0,f=0,c=h,D=a,m=p,y=0,B=-1,A=1<<p,I=A-1,t===Wp&&A>Qx||t===Jx&&A>Xx)return 1;for(;;){Fe=c-y,s[f]<N?(Ae=0,Le=s[f]):s[f]>N?(Ae=he[me+s[f]],Le=M[G+s[f]]):(Ae=32+64,Le=0),_=1<<c-y,k=1<<m,h=k;do k-=_,o[D+(S>>y)+k]=Fe<<24|Ae<<16|Le|0;while(k!==0);for(_=1<<c-1;S&_;)_>>=1;if(_!==0?(S&=_-1,S+=_):S=0,f++,--ne[c]===0){if(c===d)break;c=n[r+s[f]]}if(c>p&&(S&I)!==B){for(y===0&&(y=p),D+=h,m=c-y,w=1<<m;m+y<d&&(w-=ne[m+y],!(w<=0));)m++,w<<=1;if(A+=1<<m,t===Wp&&A>Qx||t===Jx&&A>Xx)return 1;B=S&I,o[B]=p<<24|m<<16|D-a|0}}return S!==0&&(o[D+S]=c-y<<24|64<<16|0),u.bits=p,0},Xt=mr,Zp=Rx,Xn=Fx,qP=UP,Vl=$P,WP=0,eA=1,tA=2,nA=4,ZP=5,Vf=6,co=0,YP=1,QP=2,cn=-2,rA=-3,iA=-4,XP=-5,oA=8,aA=1,sA=2,lA=3,uA=4,cA=5,fA=6,hA=7,dA=8,pA=9,gA=10,jf=11,yr=12,Yp=13,mA=14,Qp=15,bA=16,yA=17,wA=18,vA=19,$f=20,qf=21,xA=22,AA=23,EA=24,_A=25,SA=26,Xp=27,CA=28,kA=29,Ze=30,TA=31,KP=32,JP=852,eL=592,tL=15,nL=tL;function IA(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function rL(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Xt.Buf16(320),this.work=new Xt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function BA(e){var t;return!e||!e.state?cn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=aA,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Xt.Buf32(JP),t.distcode=t.distdyn=new Xt.Buf32(eL),t.sane=1,t.back=-1,co)}function DA(e){var t;return!e||!e.state?cn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,BA(e))}function RA(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?cn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,DA(e))}function FA(e,t){var n,r;return e?(r=new rL,e.state=r,r.window=null,n=RA(e,t),n!==co&&(e.state=null),n):cn}function iL(e){return FA(e,nL)}var MA=!0,Kp,Jp;function oL(e){if(MA){var t;for(Kp=new Xt.Buf32(512),Jp=new Xt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Vl(eA,e.lens,0,288,Kp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vl(tA,e.lens,0,32,Jp,0,e.work,{bits:5}),MA=!1}e.lencode=Kp,e.lenbits=9,e.distcode=Jp,e.distbits=5}function PA(e,t,n,r){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Xt.Buf8(o.wsize)),r>=o.wsize?(Xt.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),Xt.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(Xt.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function aL(e,t){var n,r,i,o,a,s,u,l,c,f,h,d,p,m,y=0,w,A,S,_,k,B,I,D,M=new Xt.Buf8(4),G,N,ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return cn;n=e.state,n.mode===yr&&(n.mode=Yp),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,f=s,h=u,D=co;e:for(;;)switch(n.mode){case aA:if(n.wrap===0){n.mode=Yp;break}for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0),l=0,c=0,n.mode=sA;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ze;break}if((l&15)!==oA){e.msg="unknown compression method",n.mode=Ze;break}if(l>>>=4,c-=4,I=(l&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=Ze;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=l&512?gA:yr,l=0,c=0;break;case sA:for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==oA){e.msg="unknown compression method",n.mode=Ze;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ze;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0,n.mode=lA;case lA:for(;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Xn(n.check,M,4,0)),l=0,c=0,n.mode=uA;case uA:for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0,n.mode=cA;case cA:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=fA;case fA:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Xt.arraySet(n.head.extra,r,o,d,I)),n.flags&512&&(n.check=Xn(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=hA;case hA:if(n.flags&2048){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=Xn(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=dA;case dA:if(n.flags&4096){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&(n.check=Xn(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=pA;case pA:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ze;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=yr;break;case gA:for(;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=IA(l),l=0,c=0,n.mode=jf;case jf:if(n.havedict===0)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,QP;e.adler=n.check=1,n.mode=yr;case yr:if(t===ZP||t===Vf)break e;case Yp:if(n.last){l>>>=c&7,c-=c&7,n.mode=Xp;break}for(;c<3;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=mA;break;case 1:if(oL(n),n.mode=$f,t===Vf){l>>>=2,c-=2;break e}break;case 2:n.mode=yA;break;case 3:e.msg="invalid block type",n.mode=Ze}l>>>=2,c-=2;break;case mA:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ze;break}if(n.length=l&65535,l=0,c=0,n.mode=Qp,t===Vf)break e;case Qp:n.mode=bA;case bA:if(d=n.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;Xt.arraySet(i,r,o,d,a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=yr;break;case yA:for(;c<14;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ze;break}n.have=0,n.mode=wA;case wA:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.lens[ne[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[ne[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=Vl(WP,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Ze;break}n.have=0,n.mode=vA;case vA:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Ze;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ze;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Ze)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ze;break}if(n.lenbits=9,G={bits:n.lenbits},D=Vl(eA,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Ze;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=Vl(tA,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Ze;break}if(n.mode=$f,t===Vf)break e;case $f:n.mode=qf;case qf:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,qP(e,h),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===yr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(A&&!(A&240)){for(_=w,k=A,B=S;y=n.lencode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,A===0){n.mode=SA;break}if(A&32){n.back=-1,n.mode=yr;break}if(A&64){e.msg="invalid literal/length code",n.mode=Ze;break}n.extra=A&15,n.mode=xA;case xA:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=AA;case AA:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(!(A&240)){for(_=w,k=A,B=S;y=n.distcode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=Ze;break}n.offset=S,n.extra=A&15,n.mode=EA;case EA:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ze;break}n.mode=_A;case _A:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ze;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[a++]=m[p++];while(--d);n.length===0&&(n.mode=qf);break;case SA:if(u===0)break e;i[a++]=n.length,u--,n.mode=qf;break;case Xp:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[o++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,a-h):Zp(n.check,i,h,a-h)),h=u,(n.flags?l:IA(l))!==n.check){e.msg="incorrect data check",n.mode=Ze;break}l=0,c=0}n.mode=CA;case CA:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ze;break}l=0,c=0}n.mode=kA;case kA:D=YP;break e;case Ze:D=rA;break e;case TA:return iA;case KP:default:return cn}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Ze&&(n.mode<Xp||t!==nA))&&PA(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,e.next_out-h):Zp(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===yr?128:0)+(n.mode===$f||n.mode===Qp?256:0),(f===0&&h===0||t===nA)&&D===co&&(D=XP),D}function sL(e){if(!e||!e.state)return cn;var t=e.state;return t.window&&(t.window=null),e.state=null,co}function lL(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?cn:(n.head=t,t.done=!1,co)}function uL(e,t){var n=t.length,r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==jf)?cn:r.mode===jf&&(i=1,i=Zp(i,t,n,0),i!==r.check)?rA:(o=PA(e,t,n,n),o?(r.mode=TA,iA):(r.havedict=1,co))}kn.inflateReset=DA,kn.inflateReset2=RA,kn.inflateResetKeep=BA,kn.inflateInit=iL,kn.inflateInit2=FA,kn.inflate=aL,kn.inflateEnd=sL,kn.inflateGetHeader=lL,kn.inflateSetDictionary=uL,kn.inflateInfo="pako inflate (from Nodeca project)";var LA={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function cL(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var fL=cL,va=kn,jl=mr,Wf=lo,tt=LA,eg=Op,hL=$x,dL=fL,NA=Object.prototype.toString;function fo(e){if(!(this instanceof fo))return new fo(e);this.options=jl.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new hL,this.strm.avail_out=0;var n=va.inflateInit2(this.strm,t.windowBits);if(n!==tt.Z_OK)throw new Error(eg[n]);if(this.header=new dL,va.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Wf.string2buf(t.dictionary):NA.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=va.inflateSetDictionary(this.strm,t.dictionary),n!==tt.Z_OK)))throw new Error(eg[n])}fo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,a,s,u,l,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?tt.Z_FINISH:tt.Z_NO_FLUSH,typeof e=="string"?n.input=Wf.binstring2buf(e):NA.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new jl.Buf8(r),n.next_out=0,n.avail_out=r),o=va.inflate(n,tt.Z_NO_FLUSH),o===tt.Z_NEED_DICT&&i&&(o=va.inflateSetDictionary(this.strm,i)),o===tt.Z_BUF_ERROR&&c===!0&&(o=tt.Z_OK,c=!1),o!==tt.Z_STREAM_END&&o!==tt.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===tt.Z_STREAM_END||n.avail_in===0&&(a===tt.Z_FINISH||a===tt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Wf.utf8border(n.output,n.next_out),u=n.next_out-s,l=Wf.buf2string(n.output,s),n.next_out=u,n.avail_out=r-u,u&&jl.arraySet(n.output,n.output,s,u,0),this.onData(l)):this.onData(jl.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(c=!0)}while((n.avail_in>0||n.avail_out===0)&&o!==tt.Z_STREAM_END);return o===tt.Z_STREAM_END&&(a=tt.Z_FINISH),a===tt.Z_FINISH?(o=va.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===tt.Z_OK):(a===tt.Z_SYNC_FLUSH&&(this.onEnd(tt.Z_OK),n.avail_out=0),!0)},fo.prototype.onData=function(e){this.chunks.push(e)},fo.prototype.onEnd=function(e){e===tt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=jl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function tg(e,t){var n=new fo(t);if(n.push(e,!0),n.err)throw n.msg||eg[n.err];return n.result}function pL(e,t){return t=t||{},t.raw=!0,tg(e,t)}Hl.Inflate=fo,Hl.inflate=tg,Hl.inflateRaw=pL,Hl.ungzip=tg;var gL=mr.assign,mL=Il,bL=Hl,yL=LA,OA={};gL(OA,mL,bL,yL);var Zf=OA;async function hi(e){try{let t,n=0,r=0;const i=[];let o=0,a;do{const u=e.subarray(n);if(a=new Zf.Inflate,{strm:t}=a,a.push(u,Zf.Z_SYNC_FLUSH),a.err)throw new Error(a.msg);n+=t.next_in,i[r]=a.result,o+=i[r].length,r+=1}while(t.avail_in);const s=new Uint8Array(o);for(let u=0,l=0;u<i.length;u++)s.set(i[u],l),l+=i[u].length;return be.Buffer.from(s)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function zA(e,t){try{let n;const{minv:r,maxv:i}=t;let o=r.blockPosition,a=r.dataPosition;const s=[],u=[],l=[];let c=0,f=0;do{const p=e.subarray(o-r.blockPosition),m=new Zf.Inflate;if({strm:n}=m,m.push(p,Zf.Z_SYNC_FLUSH),m.err)throw new Error(m.msg);const y=m.result;s.push(y);let w=y.length;u.push(o),l.push(a),s.length===1&&r.dataPosition&&(s[0]=s[0].subarray(r.dataPosition),w=s[0].length);const A=o;if(o+=n.next_in,a+=w,A>=i.blockPosition){s[f]=s[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),u.push(o),l.push(a),c+=s[f].length;break}c+=s[f].length,f++}while(n.avail_in);const h=new Uint8Array(c);for(let p=0,m=0;p<s.length;p++)h.set(s[p],m),m+=s[p].length;return{buffer:be.Buffer.from(h),cpositions:u,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var wL=Ue,fn=null;try{fn=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Ue(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Ue.prototype.__isLong__,Object.defineProperty(Ue.prototype,"__isLong__",{value:!0});function Ht(e){return(e&&e.__isLong__)===!0}Ue.isLong=Ht;var UA={},GA={};function ho(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=GA[e],r)?r:(n=Ge(e,(e|0)<0?-1:0,!0),i&&(GA[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=UA[e],r)?r:(n=Ge(e,e<0?-1:0,!1),i&&(UA[e]=n),n))}Ue.fromInt=ho;function hn(e,t){if(isNaN(e))return t?po:dn;if(t){if(e<0)return po;if(e>=VA)return ZA}else{if(e<=-jA)return Vt;if(e+1>=jA)return WA}return e<0?hn(-e,t).neg():Ge(e%xa|0,e/xa|0,t)}Ue.fromNumber=hn;function Ge(e,t,n){return new Ue(e,t,n)}Ue.fromBits=Ge;var Yf=Math.pow;function ng(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return dn;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return ng(e.substring(1),t,n).neg();for(var i=hn(Yf(n,8)),o=dn,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),u=parseInt(e.substring(a,a+s),n);if(s<8){var l=hn(Yf(n,s));o=o.mul(l).add(hn(u))}else o=o.mul(i),o=o.add(hn(u))}return o.unsigned=t,o}Ue.fromString=ng;function Tn(e,t){return typeof e=="number"?hn(e,t):typeof e=="string"?ng(e,t):Ge(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ue.fromValue=Tn;var HA=65536,vL=1<<24,xa=HA*HA,VA=xa*xa,jA=VA/2,$A=ho(vL),dn=ho(0);Ue.ZERO=dn;var po=ho(0,!0);Ue.UZERO=po;var Aa=ho(1);Ue.ONE=Aa;var qA=ho(1,!0);Ue.UONE=qA;var rg=ho(-1);Ue.NEG_ONE=rg;var WA=Ge(-1,2147483647,!1);Ue.MAX_VALUE=WA;var ZA=Ge(-1,-1,!0);Ue.MAX_UNSIGNED_VALUE=ZA;var Vt=Ge(0,-2147483648,!1);Ue.MIN_VALUE=Vt;var Q=Ue.prototype;Q.toInt=function(){return this.unsigned?this.low>>>0:this.low},Q.toNumber=function(){return this.unsigned?(this.high>>>0)*xa+(this.low>>>0):this.high*xa+(this.low>>>0)},Q.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(Vt)){var n=hn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=hn(Yf(t,6),this.unsigned),a=this,s="";;){var u=a.div(o),l=a.sub(u.mul(o)).toInt()>>>0,c=l.toString(t);if(a=u,a.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},Q.getHighBits=function(){return this.high},Q.getHighBitsUnsigned=function(){return this.high>>>0},Q.getLowBits=function(){return this.low},Q.getLowBitsUnsigned=function(){return this.low>>>0},Q.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Vt)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1},Q.isZero=function(){return this.high===0&&this.low===0},Q.eqz=Q.isZero,Q.isNegative=function(){return!this.unsigned&&this.high<0},Q.isPositive=function(){return this.unsigned||this.high>=0},Q.isOdd=function(){return(this.low&1)===1},Q.isEven=function(){return(this.low&1)===0},Q.equals=function(t){return Ht(t)||(t=Tn(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},Q.eq=Q.equals,Q.notEquals=function(t){return!this.eq(t)},Q.neq=Q.notEquals,Q.ne=Q.notEquals,Q.lessThan=function(t){return this.comp(t)<0},Q.lt=Q.lessThan,Q.lessThanOrEqual=function(t){return this.comp(t)<=0},Q.lte=Q.lessThanOrEqual,Q.le=Q.lessThanOrEqual,Q.greaterThan=function(t){return this.comp(t)>0},Q.gt=Q.greaterThan,Q.greaterThanOrEqual=function(t){return this.comp(t)>=0},Q.gte=Q.greaterThanOrEqual,Q.ge=Q.greaterThanOrEqual,Q.compare=function(t){if(Ht(t)||(t=Tn(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Q.comp=Q.compare,Q.negate=function(){return!this.unsigned&&this.eq(Vt)?Vt:this.not().add(Aa)},Q.neg=Q.negate,Q.add=function(t){Ht(t)||(t=Tn(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,s=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,f=0,h=0,d=0;return d+=o+l,h+=d>>>16,d&=65535,h+=i+u,f+=h>>>16,h&=65535,f+=r+s,c+=f>>>16,f&=65535,c+=n+a,c&=65535,Ge(h<<16|d,c<<16|f,this.unsigned)},Q.subtract=function(t){return Ht(t)||(t=Tn(t)),this.add(t.neg())},Q.sub=Q.subtract,Q.multiply=function(t){if(this.isZero())return dn;if(Ht(t)||(t=Tn(t)),fn){var n=fn.mul(this.low,this.high,t.low,t.high);return Ge(n,fn.get_high(),this.unsigned)}if(t.isZero())return dn;if(this.eq(Vt))return t.isOdd()?Vt:dn;if(t.eq(Vt))return this.isOdd()?Vt:dn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt($A)&&t.lt($A))return hn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,s=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,f=0,h=0,d=0,p=0;return p+=a*c,d+=p>>>16,p&=65535,d+=o*c,h+=d>>>16,d&=65535,d+=a*l,h+=d>>>16,d&=65535,h+=i*c,f+=h>>>16,h&=65535,h+=o*l,f+=h>>>16,h&=65535,h+=a*u,f+=h>>>16,h&=65535,f+=r*c+i*l+o*u+a*s,f&=65535,Ge(d<<16|p,f<<16|h,this.unsigned)},Q.mul=Q.multiply,Q.divide=function(t){if(Ht(t)||(t=Tn(t)),t.isZero())throw Error("division by zero");if(fn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?fn.div_u:fn.div_s)(this.low,this.high,t.low,t.high);return Ge(n,fn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?po:dn;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return po;if(t.gt(this.shru(1)))return qA;o=po}else{if(this.eq(Vt)){if(t.eq(Aa)||t.eq(rg))return Vt;if(t.eq(Vt))return Aa;var a=this.shr(1);return r=a.div(t).shl(1),r.eq(dn)?t.isNegative()?Aa:rg:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}else if(t.eq(Vt))return this.unsigned?po:dn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=dn}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),u=s<=48?1:Yf(2,s-48),l=hn(r),c=l.mul(t);c.isNegative()||c.gt(i);)r-=u,l=hn(r,this.unsigned),c=l.mul(t);l.isZero()&&(l=Aa),o=o.add(l),i=i.sub(c)}return o},Q.div=Q.divide,Q.modulo=function(t){if(Ht(t)||(t=Tn(t)),fn){var n=(this.unsigned?fn.rem_u:fn.rem_s)(this.low,this.high,t.low,t.high);return Ge(n,fn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Q.mod=Q.modulo,Q.rem=Q.modulo,Q.not=function(){return Ge(~this.low,~this.high,this.unsigned)},Q.and=function(t){return Ht(t)||(t=Tn(t)),Ge(this.low&t.low,this.high&t.high,this.unsigned)},Q.or=function(t){return Ht(t)||(t=Tn(t)),Ge(this.low|t.low,this.high|t.high,this.unsigned)},Q.xor=function(t){return Ht(t)||(t=Tn(t)),Ge(this.low^t.low,this.high^t.high,this.unsigned)},Q.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ge(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ge(0,this.low<<t-32,this.unsigned)},Q.shl=Q.shiftLeft,Q.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Ge(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ge(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Q.shr=Q.shiftRight,Q.shiftRightUnsigned=function(t){if(Ht(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return Ge(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?Ge(n,0,this.unsigned):Ge(n>>>t-32,0,this.unsigned)},Q.shru=Q.shiftRightUnsigned,Q.shr_u=Q.shiftRightUnsigned,Q.toSigned=function(){return this.unsigned?Ge(this.low,this.high,!1):this},Q.toUnsigned=function(){return this.unsigned?this:Ge(this.low,this.high,!0)},Q.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Q.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},Q.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},Ue.fromBytes=function(t,n,r){return r?Ue.fromBytesLE(t,n):Ue.fromBytesBE(t,n)},Ue.fromBytesLE=function(t,n){return new Ue(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Ue.fromBytesBE=function(t,n){return new Ue(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const Qf=kl(wL),Xf=1;class xL{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=Qf.fromBytesLE(t.slice(n,n+8),r);if(i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return i.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let t=be.Buffer.allocUnsafe(8);await this.filehandle.read(t,0,8,0);const n=this._readLongWithOverflow(t,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const i=8*2*n;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");t=be.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let o=0;o<n;o+=1){const a=this._readLongWithOverflow(t,o*16),s=this._readLongWithOverflow(t,o*16+8);r[o+1]=[a,s]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),o=[],a=(h,d)=>{const p=h[Xf],m=d?d[Xf]:1/0;return p<=n&&m>n?0:p<n?-1:1};let s=0,u=i.length-1,l=Math.floor(i.length/2),c=a(i[l],i[l+1]);for(;c!==0;)c>0?u=l-1:c<0&&(s=l+1),l=Math.ceil((u-s)/2)+s,c=a(i[l],i[l+1]);o.push(i[l]);let f=l+1;for(;f<i.length&&(o.push(i[f]),!(i[f][Xf]>=r));f+=1);return o[o.length-1][Xf]<r&&o.push([]),o}}class YA{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(n);else throw new TypeError("either filehandle or path must be defined");if(!r&&!i&&!n)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new xL({filehandle:r,path:!r&&!i&&n?i:`${n}.gzi`})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=be.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const o=r.readUInt32LE(0);return t+o}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const o=i-n;return await this.filehandle.read(t,0,o,n),await hi(t.slice(0,o))}async read(t,n,r,i){const o=await this.gzi.getRelevantBlocksForRead(r,i),a=be.Buffer.allocUnsafe(32768*2);let s=n,u=0;for(let l=0;l<o.length-1;l+=1){const c=await this._readAndUncompressBlock(a,o[l],o[l+1]),[,f]=o[l],h=f>=i?0:i-f,d=Math.min(i+r,f+c.length)-f;h>=0&&h<c.length&&(c.copy(t,s,h,d),s+=d-h,u+=d-h)}return{bytesRead:u,buffer:t}}}function QA(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function AL(e,t){const n=await e.readFile(t);if(!(n&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const o=n.toString("utf8").split(/\r?\n/).filter(a=>/\S/.test(a)).map(a=>a.split(" ")).filter(a=>a[0]!=="").map(a=>((!i||i.name!==a[0])&&(i={name:a[0],id:r},r+=1),{id:i.id,name:a[0],length:+a[1],start:0,end:+a[1],offset:+a[2],lineLength:+a[3],lineBytes:+a[4]}));return{name:Object.fromEntries(o.map(a=>[a.name,a])),id:Object.fromEntries(o.map(a=>[a.id,a]))}}class XA{constructor({fasta:t,fai:n,path:r,faiPath:i,chunkSizeLimit:o=1e6}){if(t)this.fasta=t;else if(r)this.fasta=new dt(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(i)this.fai=new dt(i);else if(r)this.fai=new dt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile");this.chunkSizeLimit=o}async _getIndexes(t){return this.indexes||(this.indexes=AL(this.fai,t)),this.indexes}async getSequenceNames(t){return Object.keys((await this._getIndexes(t)).name)}async getSequenceSizes(t){const n={},r=await this._getIndexes(t),i=Object.values(r.id);for(let o=0;o<i.length;o+=1)n[i[o].name]=i[o].length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const o=(await this._getIndexes(i)).id[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getResiduesByName(t,n,r,i){const o=(await this._getIndexes(i)).name[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let o=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((o===void 0||o>t.length)&&(o=t.length),n>=o)return"";const a=QA(t,n),s=QA(t,o)-a;if(s>this.chunkSizeLimit)throw new Error(`data size of ${s.toLocaleString()} bytes exceeded chunk size limit of ${this.chunkSizeLimit.toLocaleString()} bytes`);const u=Buffer.allocUnsafe(s);return await this.fasta.read(u,0,s,a,i),u.toString("utf8").replace(/\s+/g,"")}}class EL extends XA{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:o,gziPath:a,chunkSizeLimit:s}){super({fasta:t,path:n,fai:r,faiPath:i,chunkSizeLimit:s}),t&&o?this.fasta=new YA({filehandle:t,gziFilehandle:o}):n&&a&&(this.fasta=new YA({path:n,gziPath:a}))}}function KA(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
605
- `),[i,...o]=n.split(" "),a=r.join("").replace(/\s/g,"");return{id:i,description:o.join(" "),sequence:a}})}class _L{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new dt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return KA(i)})}async fetch(t,n,r){const o=(await this.data).find(s=>s.id===t),a=r-n;if(!o)throw new Error(`no sequence with id ${t} exists`);return o.sequence.substr(n,a)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const SL=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:EL,FetchableSmallFasta:_L,IndexedFasta:XA,parseSmallFasta:KA},Symbol.toStringTag,{value:"Module"})),Kf=BigInt(32);function CL(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<Kf|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function kL(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),o=+!!n,a=+!n;return BigInt(r*a+i*o)<<Kf|BigInt(r*o+i*a)}function TL(e,t,n,r){const i=Number(n>>Kf),o=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,o,r)):(e.setInt32(t,i,r),e.setUint32(t+4,o,r))}function IL(e,t,n,r){const i=Number(n>>Kf),o=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,o,r)):(e.setUint32(t,i,r),e.setUint32(t+4,o,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return CL(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return kL(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){TL(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){IL(this,e,t,n)});class BL{constructor(t,n){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=n}generateVariable(t){const n=[...this.scopes[this.scopes.length-1]];return t&&n.push(t),n.join(".")}generateOption(t){switch(typeof t){case"number":return t.toString();case"string":return this.generateVariable(t);case"function":return`${this.addImport(t)}.call(${this.generateVariable()}, vars)`}}generateError(t){this.pushCode(`throw new Error(${t});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(t){this.code+=t+`
606
- `}pushPath(t){t&&this.scopes[this.scopes.length-1].push(t)}popPath(t){t&&this.scopes[this.scopes.length-1].pop()}pushScope(t){this.scopes.push([t])}popScope(){this.scopes.pop()}addImport(t){if(!this.importPath)return`(${t})`;let n=this.reverseImports.get(t);return n||(n=this.imports.push(t)-1,this.reverseImports.set(t,n)),`${this.importPath}[${n}]`}addReference(t){this.references.has(t)||this.references.set(t,{resolved:!1,requested:!1})}markResolved(t){const n=this.references.get(t);n&&(n.resolved=!0)}markRequested(t){t.forEach(n=>{const r=this.references.get(n);r&&(r.requested=!0)})}getUnresolvedReferences(){return Array.from(this.references).filter(([t,n])=>!n.resolved&&!n.requested).map(([t,n])=>t)}}const In=new Map,go="___parser_",Bn={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},Jf={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},eh={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};let Re=class Mn{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Mn}primitiveGenerateN(t,n){const r=Jf[t],i=eh[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${Bn[t]};`)}primitiveN(t,n,r){return this.setNextParser(t,n,r)}useThisEndian(t){return t+this.endian.toLowerCase()}uint8(t,n={}){return this.primitiveN("uint8",t,n)}uint16(t,n={}){return this.primitiveN(this.useThisEndian("uint16"),t,n)}uint16le(t,n={}){return this.primitiveN("uint16le",t,n)}uint16be(t,n={}){return this.primitiveN("uint16be",t,n)}uint32(t,n={}){return this.primitiveN(this.useThisEndian("uint32"),t,n)}uint32le(t,n={}){return this.primitiveN("uint32le",t,n)}uint32be(t,n={}){return this.primitiveN("uint32be",t,n)}int8(t,n={}){return this.primitiveN("int8",t,n)}int16(t,n={}){return this.primitiveN(this.useThisEndian("int16"),t,n)}int16le(t,n={}){return this.primitiveN("int16le",t,n)}int16be(t,n={}){return this.primitiveN("int16be",t,n)}int32(t,n={}){return this.primitiveN(this.useThisEndian("int32"),t,n)}int32le(t,n={}){return this.primitiveN("int32le",t,n)}int32be(t,n={}){return this.primitiveN("int32be",t,n)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),t,n)}int64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",t,n)}int64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",t,n)}uint64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),t,n)}uint64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",t,n)}uint64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",t,n)}floatle(t,n={}){return this.primitiveN("floatle",t,n)}floatbe(t,n={}){return this.primitiveN("floatbe",t,n)}doublele(t,n={}){return this.primitiveN("doublele",t,n)}doublebe(t,n={}){return this.primitiveN("doublebe",t,n)}bitN(t,n,r){return r.length=t,this.setNextParser("bit",n,r)}bit1(t,n={}){return this.bitN(1,t,n)}bit2(t,n={}){return this.bitN(2,t,n)}bit3(t,n={}){return this.bitN(3,t,n)}bit4(t,n={}){return this.bitN(4,t,n)}bit5(t,n={}){return this.bitN(5,t,n)}bit6(t,n={}){return this.bitN(6,t,n)}bit7(t,n={}){return this.bitN(7,t,n)}bit8(t,n={}){return this.bitN(8,t,n)}bit9(t,n={}){return this.bitN(9,t,n)}bit10(t,n={}){return this.bitN(10,t,n)}bit11(t,n={}){return this.bitN(11,t,n)}bit12(t,n={}){return this.bitN(12,t,n)}bit13(t,n={}){return this.bitN(13,t,n)}bit14(t,n={}){return this.bitN(14,t,n)}bit15(t,n={}){return this.bitN(15,t,n)}bit16(t,n={}){return this.bitN(16,t,n)}bit17(t,n={}){return this.bitN(17,t,n)}bit18(t,n={}){return this.bitN(18,t,n)}bit19(t,n={}){return this.bitN(19,t,n)}bit20(t,n={}){return this.bitN(20,t,n)}bit21(t,n={}){return this.bitN(21,t,n)}bit22(t,n={}){return this.bitN(22,t,n)}bit23(t,n={}){return this.bitN(23,t,n)}bit24(t,n={}){return this.bitN(24,t,n)}bit25(t,n={}){return this.bitN(25,t,n)}bit26(t,n={}){return this.bitN(26,t,n)}bit27(t,n={}){return this.bitN(27,t,n)}bit28(t,n={}){return this.bitN(28,t,n)}bit29(t,n={}){return this.bitN(29,t,n)}bit30(t,n={}){return this.bitN(30,t,n)}bit31(t,n={}){return this.bitN(31,t,n)}bit32(t,n={}){return this.bitN(32,t,n)}namely(t){return In.set(t,this),this.alias=t,this}skip(t,n={}){return this.seek(t,n)}seek(t,n={}){if(n.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:t})}string(t,n){if(!n.zeroTerminated&&!n.length&&!n.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((n.zeroTerminated||n.length)&&n.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(n.stripNull&&!(n.length||n.greedy))throw new Error("length or greedy must be defined if stripNull is enabled.");return n.encoding=n.encoding||"utf8",this.setNextParser("string",t,n)}buffer(t,n){if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",t,n)}wrapped(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.wrapper||!n.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",t,n)}array(t,n){if(!n.readUntil&&!n.length&&!n.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!n.type)throw new Error("type is required for array.");if(typeof n.type=="string"&&!In.has(n.type)&&!(n.type in Bn))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),o=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof o=="string"&&!In.has(o)&&!(o in Bn))throw new Error(`Choice type "${o}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof Mn)&&!In.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Mn)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}pointer(t,n){if(!n.offset)throw new Error("offset is required for pointer.");if(!n.type)throw new Error("type is required for pointer.");if(typeof n.type=="string"&&!(n.type in Bn)&&!In.has(n.type))throw new Error(`Pointer type "${n.type}" is unkown.`);return this.setNextParser("pointer",t,n)}saveOffset(t,n={}){return this.setNextParser("saveOffset",t,n)}endianness(t){switch(t.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(t){return this.endianness(t)}useContextVars(t=!0){return this.useContextVariables=t,this}create(t){if(!(t instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=t,this}getContext(t){const n=new BL(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${go+this.alias}(0).result;`)):this.addRawCode(n),n}getCode(){const t="imports";return this.getContext(t).code}addRawCode(t){t.pushCode("var offset = 0;"),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("vars.$parent = null;"),t.pushCode("vars.$root = vars;"),this.generate(t),this.resolveReferences(t),t.pushCode("delete vars.$parent;"),t.pushCode("delete vars.$root;"),t.pushCode("return vars;")}addAliasedCode(t){return t.pushCode(`function ${go+this.alias}(offset, context) {`),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),t.pushCode("vars = Object.assign(vars, ctx);"),this.generate(t),t.markResolved(this.alias),this.resolveReferences(t),t.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),t.pushCode("return { offset: offset, result: vars };"),t.pushCode("}"),t}resolveReferences(t){const n=t.getUnresolvedReferences();t.markRequested(n),n.forEach(r=>{var i;(i=In.get(r))===null||i===void 0||i.addAliasedCode(t)})}compile(){const t="imports",n=this.getContext(t);this.compiled=new Function(t,"TextDecoder",`return function (buffer, constructorFn) { ${n.code} };`)(n.imports,TextDecoder)}sizeOf(){let t=NaN;if(Object.keys(Bn).indexOf(this.type)>=0)t=Bn[this.type];else if(this.type==="string"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="buffer"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="array"&&typeof this.options.length=="number"){let n=NaN;typeof this.options.type=="string"?n=Bn[this.options.type]:this.options.type instanceof Mn&&(n=this.options.type.sizeOf()),t=this.options.length*n}else this.type==="seek"?t=this.options.length:this.type==="nest"?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}parse(t){return this.compiled||this.compile(),this.compiled(t,this.constructorFn)}setNextParser(t,n,r){const i=new Mn;return i.type=t,i.varName=n,i.options=r,i.endian=this.endian,this.head?this.head.next=i:this.next=i,this.head=i,this}generate(t){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,t);break;case"bit":this.generateBit(t);break;case"string":this.generateString(t);break;case"buffer":this.generateBuffer(t);break;case"seek":this.generateSeek(t);break;case"nest":this.generateNest(t);break;case"array":this.generateArray(t);break;case"choice":this.generateChoice(t);break;case"pointer":this.generatePointer(t);break;case"saveOffset":this.generateSaveOffset(t);break;case"wrapper":this.generateWrapper(t);break}this.type!=="bit"&&this.generateAssert(t)}const n=t.generateVariable(this.varName);return this.options.formatter&&this.type!=="bit"&&this.generateFormatter(t,n,this.options.formatter),this.generateNext(t)}generateAssert(t){if(!this.options.assert)return;const n=t.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=t.addImport(this.options.assert);t.pushCode(`if (!${r}.call(vars, ${n})) {`)}break;case"number":t.pushCode(`if (${this.options.assert} !== ${n}) {`);break;case"string":t.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${n}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}t.generateError(`"Assertion error: ${n} is " + ${JSON.stringify(this.options.assert.toString())}`),t.pushCode("}")}generateNext(t){return this.next&&(t=this.next.generate(t)),t}generateBit(t){const n=JSON.parse(JSON.stringify(this));if(n.options=this.options,n.generateAssert=this.generateAssert.bind(this),n.generateFormatter=this.generateFormatter.bind(this),n.varName=t.generateVariable(n.varName),t.bitFields.push(n),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const r=t.generateTmpVariable();t.pushCode(`var ${r} = 0;`);const i=(c=0)=>{let f=0;for(let h=c;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},o=c=>(c<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),c=8):c<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),c=16):c<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),c=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),c=32),t.pushCode(`offset += ${c/8};`),c);let a=0;const s=this.endian==="be";let u=0,l=0;t.bitFields.forEach((c,f)=>{let h=c.options.length;if(h>l){if(l){const m=-1>>>32-l;t.pushCode(`${c.varName} = (${r} & 0x${m.toString(16)}) << ${h-l};`),h-=l}a=0,l=u=o(i(f)-l)}const d=s?u-a-h:a,p=-1>>>32-h;t.pushCode(`${c.varName} ${h<c.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),c.options.length===32&&t.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(t),c.options.formatter&&c.generateFormatter(t,c.varName,c.options.formatter),a+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,o=i.toLowerCase()==="hex",a='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const s=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${s});`);const u=`offset - ${r} < ${s} ? offset - 1 : offset`;t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, ${u}), ${a}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(o?`${n} = Array.from(buffer.subarray(offset, offset + ${s}), ${a}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${s}));`),t.pushCode(`offset += ${s};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${a}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, offset), ${a}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),o=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${o} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${o} = dataView.getUint8(offset);`);const a=t.addImport(r);t.pushCode(`if (${a}.call(${t.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,o=t.generateTmpVariable(),a=t.generateVariable(this.varName),s=t.generateTmpVariable(),u=this.options.key,l=typeof u=="string";if(l?t.pushCode(`${a} = {};`):t.pushCode(`${a} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):r!==void 0?t.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):t.pushCode(`for (var ${o} = ${n}; ${o} > 0; ${o}--) {`),typeof i=="string")if(In.get(i)){const c=t.generateTmpVariable();if(t.pushCode(`var ${c} = ${go+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${o},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${c}.result; offset = ${c}.offset;`),i!==this.alias&&t.addReference(i)}else{const c=Jf[i],f=eh[i];t.pushCode(`var ${s} = dataView.get${c}(offset, ${f});`),t.pushCode(`offset += ${Bn[i]};`)}else if(i instanceof Mn){t.pushCode(`var ${s} = {};`);const c=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode(`${s}.$parent = ${c};`),t.pushCode(`${s}.$root = ${c}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${s}.$index = ${n} - ${o};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${a}[${s}.${u}] = ${s};`):t.pushCode(`${a}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const c=this.options.readUntil,f=t.addImport(c);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(In.has(r)){const o=t.generateTmpVariable();t.pushCode(`var ${o} = ${go+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${o}.result; offset = ${o}.offset;`),r!==this.alias&&t.addReference(r)}else{const o=Jf[r],a=eh[r];t.pushCode(`${i} = dataView.get${o}(offset, ${a});`),t.pushCode(`offset += ${Bn[r]}`)}}else r instanceof Mn&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const o=parseInt(i,10),a=this.options.choices[o];t.pushCode(`case ${o}:`),this.generateChoiceCase(t,this.varName,a),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof Mn){if(this.varName&&(t.pushCode(`${n} = {};`),t.useContextVariables)){const r=t.generateVariable();t.pushCode(`${n}.$parent = ${r};`),t.pushCode(`${n}.$root = ${r}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode(`delete ${n}.$parent;`),t.pushCode(`delete ${n}.$root;`))}else if(In.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${go+this.options.type}(offset, {`),t.useContextVariables){const i=t.generateVariable();t.pushCode(`$parent: ${i},`),t.pushCode(`$root: ${i}.$root,`)}t.pushCode("});"),t.pushCode(`${n} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}}generateWrapper(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable();if(typeof this.options.readUntil=="function"){const u=this.options.readUntil,l=t.generateTmpVariable(),c=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${c} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${c} = dataView.getUint8(offset);`);const f=t.addImport(u);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${c}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const u=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${u});`),t.pushCode(`offset += ${u};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),o=t.generateTmpVariable(),a=t.generateTmpVariable(),s=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${s}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${o} = offset;`),t.pushCode(`var ${a} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Mn)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(In.has(this.options.type)){const u=t.generateTmpVariable();t.pushCode(`var ${u} = ${go+this.options.type}(0);`),t.pushCode(`${n} = ${u}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${a};`),t.pushCode(`offset = ${o};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),o=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Mn){if(t.pushCode(`${o} = {};`),t.useContextVariables){const a=t.generateVariable();t.pushCode(`${o}.$parent = ${a};`),t.pushCode(`${o}.$root = ${a}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${o}.$parent;`),t.pushCode(`delete ${o}.$root;`))}else if(In.has(this.options.type)){const a=t.generateTmpVariable();if(t.pushCode(`var ${a} = ${go+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${o} = ${a}.result; offset = ${a}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Bn).indexOf(this.options.type)>=0){const a=Jf[n],s=eh[n];t.pushCode(`${o} = dataView.get${a}(offset, ${s});`),t.pushCode(`offset += ${Bn[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var JA={},ig={},mo={},$l={};Object.defineProperty($l,"__esModule",{value:!0});function og(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ag(e,t,n){return t&&e3(e.prototype,t),n&&e3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sg(e,t)}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ea(e)}function sg(e,t){return sg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sg(e,t)}function RL(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ql(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FL(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ql(e)}function ML(e){var t=RL();return function(){var r=Ea(e),i;if(t){var o=Ea(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return FL(this,i)}}function PL(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ea(e),e!==null););return e}function th(){return typeof Reflect<"u"&&Reflect.get?th=Reflect.get.bind():th=function(t,n,r){var i=PL(t,n);if(i){var o=Object.getOwnPropertyDescriptor(i,n);return o.get?o.get.call(arguments.length<3?t:r):o.value}},th.apply(this,arguments)}var t3=function(){function e(){og(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return ag(e,[{key:"addEventListener",value:function(n,r,i){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push({callback:r,options:i})}},{key:"removeEventListener",value:function(n,r){if(n in this.listeners){for(var i=this.listeners[n],o=0,a=i.length;o<a;o++)if(i[o].callback===r){i.splice(o,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),o=0,a=i.length;o<a;o++){var s=i[o];try{s.callback.call(this,n)}catch(u){Promise.resolve().then(function(){throw u})}s.options&&s.options.once&&this.removeEventListener(n.type,s.callback)}return!n.defaultPrevented}}}]),e}(),lg=function(e){DL(n,e);var t=ML(n);function n(){var r;return og(this,n),r=t.call(this),r.listeners||t3.call(ql(r)),Object.defineProperty(ql(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(ql(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(ql(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return ag(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(i){i.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,i)),th(Ea(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(t3),n3=function(){function e(){og(this,e),Object.defineProperty(this,"signal",{value:new lg,writable:!0,configurable:!0})}return ag(e,[{key:"abort",value:function(n){var r;try{r=new Event("abort")}catch{typeof document<"u"?document.createEvent?(r=document.createEvent("Event"),r.initEvent("abort",!1,!1)):(r=document.createEventObject(),r.type="abort"):r={type:"abort",bubbles:!1,cancelable:!1}}var i=n;if(i===void 0)if(typeof document>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch{i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(r)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();typeof Symbol<"u"&&Symbol.toStringTag&&(n3.prototype[Symbol.toStringTag]="AbortController",lg.prototype[Symbol.toStringTag]="AbortSignal");function LL(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function NL(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,o=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,s=a===void 0?!1:a;if(!LL({fetch:n,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:n,Request:u};var u=i;(u&&!u.prototype.hasOwnProperty("signal")||s)&&(u=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var m=new i(h,d);return p&&Object.defineProperty(m,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),m},u.prototype=i.prototype);var l=n,c=function(h,d){var p=u&&u.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var m;try{m=new DOMException("Aborted","AbortError")}catch{m=new Error("Aborted"),m.name="AbortError"}if(p.aborted)return Promise.reject(m);var y=new Promise(function(w,A){p.addEventListener("abort",function(){return A(m)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([y,l(h,d)])}return l(h,d)};return{fetch:c,Request:u}}$l.AbortController=n3,$l.AbortSignal=lg,$l.abortableFetch=NL,Object.defineProperty(mo,"__esModule",{value:!0}),mo.AbortSignal=mo.AbortController=void 0;const r3=$l;var nh=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")};let OL=typeof nh().AbortController>"u"?r3.AbortController:nh().AbortController;mo.AbortController=OL;let zL=typeof nh().AbortController>"u"?r3.AbortSignal:nh().AbortSignal;mo.AbortSignal=zL;var ug={};Object.defineProperty(ug,"__esModule",{value:!0});const UL=mo;class GL{}class HL{constructor(){this.signals=new Set,this.abortController=new UL.AbortController}addSignal(t=new GL){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):typeof t.addEventListener=="function"&&t.addEventListener("abort",()=>{this.handleAborted(t)})}handleAborted(t){this.signals.delete(t),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}ug.default=HL;var cg={};Object.defineProperty(cg,"__esModule",{value:!0});class VL{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t,this.callbacks.forEach(n=>{n(t)})}}cg.default=VL;var i3=Df&&Df.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ig,"__esModule",{value:!0});const jL=mo,$L=i3(ug),qL=i3(cg);class rh{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const o=new $L.default,a=new qL.default;a.addCallback(i);const s={aborter:o,promise:this.fillCallback(n,o.signal,u=>{a.callback(u)}),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(r),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(u=>{throw console.error(u),u}),this.cache.set(t,s)}static checkSinglePromise(t,n){function r(){if(n&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then(i=>(r(),i),i=>{throw r(),i})}has(t){return this.cache.has(t)}get(t,n,r,i){if(!r&&n instanceof jL.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,n,r,i)):o.settled?o.promise:(o.aborter.addSignal(r),o.statusReporter.addCallback(i),rh.checkSinglePromise(o.promise,r)):(this.fill(t,n,r,i),rh.checkSinglePromise(this.cache.get(t).promise,r))}delete(t){const n=this.cache.get(t);n&&(n.settled||n.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let n=0;for(let r=t.next();!r.done;r=t.next())this.delete(r.value),n+=1;return n}}ig.default=rh;var WL=Df&&Df.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(JA,"__esModule",{value:!0});const ZL=WL(ig);var ih=JA.default=ZL.default;class YL{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,n){this.cache.set(t,n),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const n=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,n),n}}set(t,n){return this.cache.has(t)?this.cache.set(t,n):this._set(t,n),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){const n=this.cache.delete(t);return n&&this._size--,this.oldCache.delete(t)||n}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[n]=t;this.cache.has(n)||(yield t)}}get size(){let t=0;for(const n of this.oldCache.keys())this.cache.has(n)||t++;return this._size+t}}var QL=YL;const oh=kl(QL);class di{constructor(t,n){this.ranges=arguments.length===2?[{min:t,max:n}]:0 in t?Object.assign({},t):[t]}min(){return this.ranges[0].min}max(){return this.ranges[this.ranges.length-1].max}contains(t){for(let n=0;n<this.ranges.length;n+=1){const r=this.ranges[n];if(r.min<=t&&r.max>=t)return!0}return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(t=>new di(t.min,t.max))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),r=[];let i=n[0];for(let o=1;o<n.length;o+=1){const a=n[o];a.min()>i.max()+1?(r.push(i),i=a):a.max()>i.max()&&(i=new di(i.min(),a.max()))}return r.push(i),r.length===1?r[0]:new di(r)}intersection(t){let n=this,r=t;const i=this.ranges(),o=r.ranges(),a=i.length,s=o.length;let u=0,l=0;const c=[];for(;u<a&&l<s;){n=i[u],r=o[l];const f=Math.max(n.min(),r.min()),h=Math.min(n.max(),r.max());h>=f&&c.push(new di(f,h)),n.max()>r.max()?l+=1:u+=1}if(c.length===0)throw new Error("found range of length 0");return c.length===1?c[0]:new di(c)}coverage(){let t=0;const n=this.ranges();for(const r of n)t+=r.max()-r.min()+1;return t}rangeOrder(t,n){let r=t,i=n;return arguments.length<2&&(i=r,r=this),r.min()<i.min()?-1:r.min()>i.min()?1:r.max()<i.max()?-1:i.max()>r.max()?1:0}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const XL=4,o3=0,a3=1,KL=2;function _a(e){let t=e.length;for(;--t>=0;)e[t]=0}const JL=0,s3=1,eN=2,tN=3,nN=258,fg=29,Wl=256,Zl=Wl+1+fg,Sa=30,hg=19,l3=2*Zl+1,bo=15,dg=16,rN=7,pg=256,u3=16,c3=17,f3=18,gg=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ah=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),iN=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h3=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),oN=512,wr=new Array((Zl+2)*2);_a(wr);const Yl=new Array(Sa*2);_a(Yl);const Ql=new Array(oN);_a(Ql);const Xl=new Array(nN-tN+1);_a(Xl);const mg=new Array(fg);_a(mg);const sh=new Array(Sa);_a(sh);function bg(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let d3,p3,g3;function yg(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const m3=e=>e<256?Ql[e]:Ql[256+(e>>>7)],Kl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},jt=(e,t,n)=>{e.bi_valid>dg-n?(e.bi_buf|=t<<e.bi_valid&65535,Kl(e,e.bi_buf),e.bi_buf=t>>dg-e.bi_valid,e.bi_valid+=n-dg):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Kn=(e,t,n)=>{jt(e,n[t*2],n[t*2+1])},b3=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},aN=e=>{e.bi_valid===16?(Kl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},sN=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,c,f,h,d,p,m=0;for(h=0;h<=bo;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<l3;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=s&&(d=a[c-s]),p=n[c*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}},y3=(e,t,n)=>{const r=new Array(bo+1);let i=0,o,a;for(o=1;o<=bo;o++)i=i+n[o-1]<<1,r[o]=i;for(a=0;a<=t;a++){let s=e[a*2+1];s!==0&&(e[a*2]=b3(r[s]++,s))}},lN=()=>{let e,t,n,r,i;const o=new Array(bo+1);for(n=0,r=0;r<fg-1;r++)for(mg[r]=n,e=0;e<1<<gg[r];e++)Xl[n++]=r;for(Xl[n-1]=r,i=0,r=0;r<16;r++)for(sh[r]=i,e=0;e<1<<ah[r];e++)Ql[i++]=r;for(i>>=7;r<Sa;r++)for(sh[r]=i<<7,e=0;e<1<<ah[r]-7;e++)Ql[256+i++]=r;for(t=0;t<=bo;t++)o[t]=0;for(e=0;e<=143;)wr[e*2+1]=8,e++,o[8]++;for(;e<=255;)wr[e*2+1]=9,e++,o[9]++;for(;e<=279;)wr[e*2+1]=7,e++,o[7]++;for(;e<=287;)wr[e*2+1]=8,e++,o[8]++;for(y3(wr,Zl+1,o),e=0;e<Sa;e++)Yl[e*2+1]=5,Yl[e*2]=b3(e,5);d3=new bg(wr,gg,Wl+1,Zl,bo),p3=new bg(Yl,ah,0,Sa,bo),g3=new bg(new Array(0),iN,0,hg,rN)},w3=e=>{let t;for(t=0;t<Zl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Sa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<hg;t++)e.bl_tree[t*2]=0;e.dyn_ltree[pg*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},v3=e=>{e.bi_valid>8?Kl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},x3=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},wg=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&x3(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!x3(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},A3=(e,t,n)=>{let r,i,o=0,a,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Kn(e,i,t):(a=Xl[i],Kn(e,a+Wl+1,t),s=gg[a],s!==0&&(i-=mg[a],jt(e,i,s)),r--,a=m3(r),Kn(e,a,n),s=ah[a],s!==0&&(r-=sh[a],jt(e,r,s)));while(o<e.sym_next);Kn(e,pg,t)},vg=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,u=-1,l;for(e.heap_len=0,e.heap_max=l3,a=0;a<o;a++)n[a*2]!==0?(e.heap[++e.heap_len]=u=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,a=e.heap_len>>1;a>=1;a--)wg(e,n,a);l=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],wg(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[l*2]=n[a*2]+n[s*2],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=l,e.heap[1]=l++,wg(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],sN(e,t),y3(n,u,e.bl_count)},E3=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,u=7,l=4;for(a===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=a,a=t[(r+1)*2+1],!(++s<u&&o===a)&&(s<l?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[u3*2]++):s<=10?e.bl_tree[c3*2]++:e.bl_tree[f3*2]++,s=0,i=o,a===0?(u=138,l=3):o===a?(u=6,l=3):(u=7,l=4))},_3=(e,t,n)=>{let r,i=-1,o,a=t[0*2+1],s=0,u=7,l=4;for(a===0&&(u=138,l=3),r=0;r<=n;r++)if(o=a,a=t[(r+1)*2+1],!(++s<u&&o===a)){if(s<l)do Kn(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(Kn(e,o,e.bl_tree),s--),Kn(e,u3,e.bl_tree),jt(e,s-3,2)):s<=10?(Kn(e,c3,e.bl_tree),jt(e,s-3,3)):(Kn(e,f3,e.bl_tree),jt(e,s-11,7));s=0,i=o,a===0?(u=138,l=3):o===a?(u=6,l=3):(u=7,l=4)}},uN=e=>{let t;for(E3(e,e.dyn_ltree,e.l_desc.max_code),E3(e,e.dyn_dtree,e.d_desc.max_code),vg(e,e.bl_desc),t=hg-1;t>=3&&e.bl_tree[h3[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},cN=(e,t,n,r)=>{let i;for(jt(e,t-257,5),jt(e,n-1,5),jt(e,r-4,4),i=0;i<r;i++)jt(e,e.bl_tree[h3[i]*2+1],3);_3(e,e.dyn_ltree,t-1),_3(e,e.dyn_dtree,n-1)},fN=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return o3;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return a3;for(n=32;n<Wl;n++)if(e.dyn_ltree[n*2]!==0)return a3;return o3};let S3=!1;const hN=e=>{S3||(lN(),S3=!0),e.l_desc=new yg(e.dyn_ltree,d3),e.d_desc=new yg(e.dyn_dtree,p3),e.bl_desc=new yg(e.bl_tree,g3),e.bi_buf=0,e.bi_valid=0,w3(e)},C3=(e,t,n,r)=>{jt(e,(JL<<1)+(r?1:0),3),v3(e),Kl(e,n),Kl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},dN=e=>{jt(e,s3<<1,3),Kn(e,pg,wr),aN(e)},pN=(e,t,n,r)=>{let i,o,a=0;e.level>0?(e.strm.data_type===KL&&(e.strm.data_type=fN(e)),vg(e,e.l_desc),vg(e,e.d_desc),a=uN(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?C3(e,t,n,r):e.strategy===XL||o===i?(jt(e,(s3<<1)+(r?1:0),3),A3(e,wr,Yl)):(jt(e,(eN<<1)+(r?1:0),3),cN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),A3(e,e.dyn_ltree,e.dyn_dtree)),w3(e),r&&v3(e)},gN=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Xl[n]+Wl+1)*2]++,e.dyn_dtree[m3(t)*2]++),e.sym_next===e.sym_end);var mN=hN,bN=C3,yN=pN,wN=gN,vN=dN,xN={_tr_init:mN,_tr_stored_block:bN,_tr_flush_block:yN,_tr_tally:wN,_tr_align:vN},Jl=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+t[r++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0};const AN=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},EN=new Uint32Array(AN());var pt=(e,t,n,r)=>{const i=EN,o=r+n;e^=-1;for(let a=r;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1},Ca={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},eu={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:_N,_tr_stored_block:xg,_tr_flush_block:SN,_tr_tally:pi,_tr_align:CN}=xN,{Z_NO_FLUSH:gi,Z_PARTIAL_FLUSH:kN,Z_FULL_FLUSH:TN,Z_FINISH:pn,Z_BLOCK:k3,Z_OK:vt,Z_STREAM_END:T3,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:IN,Z_BUF_ERROR:Ag,Z_DEFAULT_COMPRESSION:BN,Z_FILTERED:DN,Z_HUFFMAN_ONLY:lh,Z_RLE:RN,Z_FIXED:FN,Z_DEFAULT_STRATEGY:MN,Z_UNKNOWN:PN,Z_DEFLATED:uh}=eu,LN=9,NN=15,ON=8,zN=29,Eg=256+1+zN,UN=30,GN=19,HN=2*Eg+1,VN=15,ge=3,mi=258,er=mi+ge+1,jN=32,ka=42,_g=57,Sg=69,Cg=73,kg=91,Tg=103,yo=113,tu=666,Ft=1,Ta=2,wo=3,Ia=4,$N=3,vo=(e,t)=>(e.msg=Ca[t],t),I3=e=>e*2-(e>4?9:0),bi=e=>{let t=e.length;for(;--t>=0;)e[t]=0},qN=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let yi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Kt=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Jt=(e,t)=>{SN(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Kt(e.strm)},_e=(e,t)=>{e.pending_buf[e.pending++]=t},nu=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Ig=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Jl(e.adler,t,i,n):e.state.wrap===2&&(e.adler=pt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},B3=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,a=e.prev_length,s=e.nice_match;const u=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+mi;let d=l[r+a-1],p=l[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(l[i+a]!==p||l[i+a-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=mi-(h-r),r=h-mi,o>a){if(e.match_start=t,a=o,o>=s)break;d=l[r+a-1],p=l[r+a]}}while((t=f[t&c])>u&&--n!==0);return a<=e.lookahead?a:e.lookahead},Ba=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-er)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),qN(e),r+=t),e.strm.avail_in===0)break;if(n=Ig(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ge)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=yi(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=yi(e,e.ins_h,e.window[i+ge-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<ge)););}while(e.lookahead<er&&e.strm.avail_in!==0)},D3=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r<n&&(r===0&&t!==pn||t===gi||r!==i+e.strm.avail_in)))break;a=t===pn&&r===i+e.strm.avail_in?1:0,xg(e,0,0,a),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Kt(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Ig(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(a===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?Ia:t!==gi&&t!==pn&&e.strm.avail_in===0&&e.strstart===e.block_start?Ta:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Ig(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===pn)&&t!==gi&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,a=t===pn&&e.strm.avail_in===0&&r===i?1:0,xg(e,e.block_start,r,a),e.block_start+=r,Kt(e.strm)),a?wo:Ft)},Bg=(e,t)=>{let n,r;for(;;){if(e.lookahead<er){if(Ba(e),e.lookahead<er&&t===gi)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=ge&&(e.ins_h=yi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-er&&(e.match_length=B3(e,n)),e.match_length>=ge)if(r=pi(e,e.strstart-e.match_start,e.match_length-ge),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ge){e.match_length--;do e.strstart++,e.ins_h=yi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=yi(e,e.ins_h,e.window[e.strstart+1]);else r=pi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=e.strstart<ge-1?e.strstart:ge-1,t===pn?(Jt(e,!0),e.strm.avail_out===0?wo:Ia):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ta},Da=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<er){if(Ba(e),e.lookahead<er&&t===gi)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=ge&&(e.ins_h=yi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ge-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-er&&(e.match_length=B3(e,n),e.match_length<=5&&(e.strategy===DN||e.match_length===ge&&e.strstart-e.match_start>4096)&&(e.match_length=ge-1)),e.prev_length>=ge&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ge,r=pi(e,e.strstart-1-e.prev_match,e.prev_length-ge),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=yi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=ge-1,e.strstart++,r&&(Jt(e,!1),e.strm.avail_out===0))return Ft}else if(e.match_available){if(r=pi(e,0,e.window[e.strstart-1]),r&&Jt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ft}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=pi(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ge-1?e.strstart:ge-1,t===pn?(Jt(e,!0),e.strm.avail_out===0?wo:Ia):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ta},WN=(e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=mi){if(Ba(e),e.lookahead<=mi&&t===gi)return Ft;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ge&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+mi;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=mi-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ge?(n=pi(e,1,e.match_length-ge),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=pi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===pn?(Jt(e,!0),e.strm.avail_out===0?wo:Ia):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ta},ZN=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Ba(e),e.lookahead===0)){if(t===gi)return Ft;break}if(e.match_length=0,n=pi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===pn?(Jt(e,!0),e.strm.avail_out===0?wo:Ia):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ta};function tr(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const ru=[new tr(0,0,0,0,D3),new tr(4,4,8,4,Bg),new tr(4,5,16,8,Bg),new tr(4,6,32,32,Bg),new tr(4,4,16,16,Da),new tr(8,16,32,32,Da),new tr(8,16,128,128,Da),new tr(8,32,128,256,Da),new tr(32,128,258,1024,Da),new tr(32,258,258,4096,Da)],YN=e=>{e.window_size=2*e.w_size,bi(e.head),e.max_lazy_match=ru[e.level].max_lazy,e.good_match=ru[e.level].good_length,e.nice_match=ru[e.level].nice_length,e.max_chain_length=ru[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ge-1,e.match_available=0,e.ins_h=0};function QN(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=uh,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HN*2),this.dyn_dtree=new Uint16Array((2*UN+1)*2),this.bl_tree=new Uint16Array((2*GN+1)*2),bi(this.dyn_ltree),bi(this.dyn_dtree),bi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(VN+1),this.heap=new Uint16Array(2*Eg+1),bi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Eg+1),bi(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const iu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ka&&t.status!==_g&&t.status!==Sg&&t.status!==Cg&&t.status!==kg&&t.status!==Tg&&t.status!==yo&&t.status!==tu?1:0},R3=e=>{if(iu(e))return vo(e,Jn);e.total_in=e.total_out=0,e.data_type=PN;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?_g:t.wrap?ka:yo,e.adler=t.wrap===2?0:1,t.last_flush=-2,_N(t),vt},F3=e=>{const t=R3(e);return t===vt&&YN(e.state),t},XN=(e,t)=>iu(e)||e.state.wrap!==2?Jn:(e.state.gzhead=t,vt),M3=(e,t,n,r,i,o)=>{if(!e)return Jn;let a=1;if(t===BN&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>LN||n!==uh||r<8||r>15||t<0||t>9||o<0||o>FN||r===8&&a!==1)return vo(e,Jn);r===8&&(r=9);const s=new QN;return e.state=s,s.strm=e,s.status=ka,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+ge-1)/ge),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=o,s.method=n,F3(e)},KN=(e,t)=>M3(e,t,uh,NN,ON,MN),JN=(e,t)=>{if(iu(e)||t>k3||t<0)return e?vo(e,Jn):Jn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===tu&&t!==pn)return vo(e,e.avail_out===0?Ag:Jn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Kt(e),e.avail_out===0)return n.last_flush=-1,vt}else if(e.avail_in===0&&I3(t)<=I3(r)&&t!==pn)return vo(e,Ag);if(n.status===tu&&e.avail_in!==0)return vo(e,Ag);if(n.status===ka&&n.wrap===0&&(n.status=yo),n.status===ka){let i=uh+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=lh||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=jN),i+=31-i%31,nu(n,i),n.strstart!==0&&(nu(n,e.adler>>>16),nu(n,e.adler&65535)),e.adler=1,n.status=yo,Kt(e),n.pending!==0)return n.last_flush=-1,vt}if(n.status===_g){if(e.adler=0,_e(n,31),_e(n,139),_e(n,8),n.gzhead)_e(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),_e(n,n.gzhead.time&255),_e(n,n.gzhead.time>>8&255),_e(n,n.gzhead.time>>16&255),_e(n,n.gzhead.time>>24&255),_e(n,n.level===9?2:n.strategy>=lh||n.level<2?4:0),_e(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(_e(n,n.gzhead.extra.length&255),_e(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=pt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Sg;else if(_e(n,0),_e(n,0),_e(n,0),_e(n,0),_e(n,0),_e(n,n.level===9?2:n.strategy>=lh||n.level<2?4:0),_e(n,$N),n.status=yo,Kt(e),n.pending!==0)return n.last_flush=-1,vt}if(n.status===Sg){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Kt(e),n.pending!==0)return n.last_flush=-1,vt;i=0,o-=s}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Cg}if(n.status===Cg){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Kt(e),n.pending!==0)return n.last_flush=-1,vt;i=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,_e(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=kg}if(n.status===kg){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Kt(e),n.pending!==0)return n.last_flush=-1,vt;i=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,_e(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i))}n.status=Tg}if(n.status===Tg){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Kt(e),n.pending!==0))return n.last_flush=-1,vt;_e(n,e.adler&255),_e(n,e.adler>>8&255),e.adler=0}if(n.status=yo,Kt(e),n.pending!==0)return n.last_flush=-1,vt}if(e.avail_in!==0||n.lookahead!==0||t!==gi&&n.status!==tu){let i=n.level===0?D3(n,t):n.strategy===lh?ZN(n,t):n.strategy===RN?WN(n,t):ru[n.level].func(n,t);if((i===wo||i===Ia)&&(n.status=tu),i===Ft||i===wo)return e.avail_out===0&&(n.last_flush=-1),vt;if(i===Ta&&(t===kN?CN(n):t!==k3&&(xg(n,0,0,!1),t===TN&&(bi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Kt(e),e.avail_out===0))return n.last_flush=-1,vt}return t!==pn?vt:n.wrap<=0?T3:(n.wrap===2?(_e(n,e.adler&255),_e(n,e.adler>>8&255),_e(n,e.adler>>16&255),_e(n,e.adler>>24&255),_e(n,e.total_in&255),_e(n,e.total_in>>8&255),_e(n,e.total_in>>16&255),_e(n,e.total_in>>24&255)):(nu(n,e.adler>>>16),nu(n,e.adler&65535)),Kt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?vt:T3)},eO=e=>{if(iu(e))return Jn;const t=e.state.status;return e.state=null,t===yo?vo(e,IN):vt},tO=(e,t)=>{let n=t.length;if(iu(e))return Jn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ka||r.lookahead)return Jn;if(i===1&&(e.adler=Jl(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(bi(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}const o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ba(r);r.lookahead>=ge;){let u=r.strstart,l=r.lookahead-(ge-1);do r.ins_h=yi(r,r.ins_h,r.window[u+ge-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--l);r.strstart=u,r.lookahead=ge-1,Ba(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ge-1,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,vt};var nO=KN,rO=M3,iO=F3,oO=R3,aO=XN,sO=JN,lO=eO,uO=tO,cO="pako deflate (from Nodeca project)",ou={deflateInit:nO,deflateInit2:rO,deflateReset:iO,deflateResetKeep:oO,deflateSetHeader:aO,deflate:sO,deflateEnd:lO,deflateSetDictionary:uO,deflateInfo:cO};const fO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var hO=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)fO(n,r)&&(e[r]=n[r])}}return e},dO=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let a=e[r];n.set(a,i),i+=a.length}return n},ch={assign:hO,flattenChunks:dO};let P3=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{P3=!1}const au=new Uint8Array(256);for(let e=0;e<256;e++)au[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;au[254]=au[254]=1;var pO=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const gO=(e,t)=>{if(t<65534&&e.subarray&&P3)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var mO=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const o=new Array(n*2);for(i=0,r=0;r<n;){let a=e[r++];if(a<128){o[i++]=a;continue}let s=au[a];if(s>4){o[i++]=65533,r+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&r<n;)a=a<<6|e[r++]&63,s--;if(s>1){o[i++]=65533;continue}a<65536?o[i++]=a:(a-=65536,o[i++]=55296|a>>10&1023,o[i++]=56320|a&1023)}return gO(o,i)},bO=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+au[e[n]]>t?n:t},su={string2buf:pO,buf2string:mO,utf8border:bO};function yO(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var L3=yO;const N3=Object.prototype.toString,{Z_NO_FLUSH:wO,Z_SYNC_FLUSH:vO,Z_FULL_FLUSH:xO,Z_FINISH:AO,Z_OK:fh,Z_STREAM_END:EO,Z_DEFAULT_COMPRESSION:_O,Z_DEFAULT_STRATEGY:SO,Z_DEFLATED:CO}=eu;function Dg(e){this.options=ch.assign({level:_O,method:CO,chunkSize:16384,windowBits:15,memLevel:8,strategy:SO},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new L3,this.strm.avail_out=0;let n=ou.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==fh)throw new Error(Ca[n]);if(t.header&&ou.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=su.string2buf(t.dictionary):N3.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=ou.deflateSetDictionary(this.strm,r),n!==fh)throw new Error(Ca[n]);this._dict_set=!0}}Dg.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?AO:wO,typeof e=="string"?n.input=su.string2buf(e):N3.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===vO||o===xO)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=ou.deflate(n,o),i===EO)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=ou.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===fh;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Dg.prototype.onData=function(e){this.chunks.push(e)},Dg.prototype.onEnd=function(e){e===fh&&(this.result=ch.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const hh=16209,kO=16191;var TO=function(t,n){let r,i,o,a,s,u,l,c,f,h,d,p,m,y,w,A,S,_,k,B,I,D,M,G;const N=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),o=t.next_out,G=t.output,a=o-(n-t.avail_out),s=o+(t.avail_out-257),u=N.dmax,l=N.wsize,c=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,m=N.lencode,y=N.distcode,w=(1<<N.lenbits)-1,A=(1<<N.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=m[d&w];t:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_===0)G[o++]=S&65535;else if(_&16){k=S&65535,_&=15,_&&(p<_&&(d+=M[r++]<<p,p+=8),k+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=y[d&A];n:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_&16){if(B=S&65535,_&=15,p<_&&(d+=M[r++]<<p,p+=8,p<_&&(d+=M[r++]<<p,p+=8)),B+=d&(1<<_)-1,B>u){t.msg="invalid distance too far back",N.mode=hh;break e}if(d>>>=_,p-=_,_=o-a,B>_){if(_=B-_,_>c&&N.sane){t.msg="invalid distance too far back",N.mode=hh;break e}if(I=0,D=h,f===0){if(I+=l-_,_<k){k-=_;do G[o++]=h[I++];while(--_);I=o-B,D=G}}else if(f<_){if(I+=l+f-_,_-=f,_<k){k-=_;do G[o++]=h[I++];while(--_);if(I=0,f<k){_=f,k-=_;do G[o++]=h[I++];while(--_);I=o-B,D=G}}}else if(I+=f-_,_<k){k-=_;do G[o++]=h[I++];while(--_);I=o-B,D=G}for(;k>2;)G[o++]=D[I++],G[o++]=D[I++],G[o++]=D[I++],k-=3;k&&(G[o++]=D[I++],k>1&&(G[o++]=D[I++]))}else{I=o-B;do G[o++]=G[I++],G[o++]=G[I++],G[o++]=G[I++],k-=3;while(k>2);k&&(G[o++]=G[I++],k>1&&(G[o++]=G[I++]))}}else if(_&64){t.msg="invalid distance code",N.mode=hh;break e}else{S=y[(S&65535)+(d&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){N.mode=kO;break e}else{t.msg="invalid literal/length code",N.mode=hh;break e}else{S=m[(S&65535)+(d&(1<<_)-1)];continue t}break}}while(r<i&&o<s);k=p>>3,r-=k,p-=k<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<s?257+(s-o):257-(o-s),N.hold=d,N.bits=p};const Ra=15,O3=852,z3=592,U3=0,Rg=1,G3=2,IO=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),BO=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),DO=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),RO=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var lu=(e,t,n,r,i,o,a,s)=>{const u=s.bits;let l=0,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,A=0,S,_,k,B,I,D=null,M;const G=new Uint16Array(Ra+1),N=new Uint16Array(Ra+1);let ne=null,ie,he,me;for(l=0;l<=Ra;l++)G[l]=0;for(c=0;c<r;c++)G[t[n+c]]++;for(d=u,h=Ra;h>=1&&G[h]===0;h--);if(d>h&&(d=h),h===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f<h&&G[f]===0;f++);for(d<f&&(d=f),y=1,l=1;l<=Ra;l++)if(y<<=1,y-=G[l],y<0)return-1;if(y>0&&(e===U3||h!==1))return-1;for(N[1]=0,l=1;l<Ra;l++)N[l+1]=N[l]+G[l];for(c=0;c<r;c++)t[n+c]!==0&&(a[N[t[n+c]]++]=c);if(e===U3?(D=ne=a,M=20):e===Rg?(D=IO,ne=BO,M=257):(D=DO,ne=RO,M=0),A=0,c=0,l=f,I=o,p=d,m=0,k=-1,w=1<<d,B=w-1,e===Rg&&w>O3||e===G3&&w>z3)return 1;for(;;){ie=l-m,a[c]+1<M?(he=0,me=a[c]):a[c]>=M?(he=ne[a[c]-M],me=D[a[c]-M]):(he=32+64,me=0),S=1<<l-m,_=1<<p,f=_;do _-=S,i[I+(A>>m)+_]=ie<<24|he<<16|me|0;while(_!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,c++,--G[l]===0){if(l===h)break;l=t[n+a[c]]}if(l>d&&(A&B)!==k){for(m===0&&(m=d),I+=f,p=l-m,y=1<<p;p+m<h&&(y-=G[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===Rg&&w>O3||e===G3&&w>z3)return 1;k=A&B,i[k]=d<<24|p<<16|I-o|0}}return A!==0&&(i[I+A]=l-m<<24|64<<16|0),s.bits=d,0};const FO=0,H3=1,V3=2,{Z_FINISH:j3,Z_BLOCK:MO,Z_TREES:dh,Z_OK:xo,Z_STREAM_END:PO,Z_NEED_DICT:LO,Z_STREAM_ERROR:gn,Z_DATA_ERROR:$3,Z_MEM_ERROR:q3,Z_BUF_ERROR:NO,Z_DEFLATED:W3}=eu,ph=16180,Z3=16181,Y3=16182,Q3=16183,X3=16184,K3=16185,J3=16186,eE=16187,tE=16188,nE=16189,gh=16190,vr=16191,Fg=16192,rE=16193,Mg=16194,iE=16195,oE=16196,aE=16197,sE=16198,mh=16199,bh=16200,lE=16201,uE=16202,cE=16203,fE=16204,hE=16205,Pg=16206,dE=16207,pE=16208,Ye=16209,gE=16210,mE=16211,OO=852,zO=592,UO=15,bE=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function GO(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ao=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<ph||t.mode>mE?1:0},yE=e=>{if(Ao(e))return gn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=ph,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(OO),t.distcode=t.distdyn=new Int32Array(zO),t.sane=1,t.back=-1,xo},wE=e=>{if(Ao(e))return gn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,yE(e)},vE=(e,t)=>{let n;if(Ao(e))return gn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?gn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,wE(e))},xE=(e,t)=>{if(!e)return gn;const n=new GO;e.state=n,n.strm=e,n.window=null,n.mode=ph;const r=vE(e,t);return r!==xo&&(e.state=null),r},HO=e=>xE(e,UO);let AE=!0,Lg,Ng;const VO=e=>{if(AE){Lg=new Int32Array(512),Ng=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(lu(H3,e.lens,0,288,Lg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;lu(V3,e.lens,0,32,Ng,0,e.work,{bits:5}),AE=!1}e.lencode=Lg,e.lenbits=9,e.distcode=Ng,e.distbits=5},EE=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},jO=(e,t)=>{let n,r,i,o,a,s,u,l,c,f,h,d,p,m,y=0,w,A,S,_,k,B,I,D;const M=new Uint8Array(4);let G,N;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ao(e)||!e.output||!e.input&&e.avail_in!==0)return gn;n=e.state,n.mode===vr&&(n.mode=Fg),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,f=s,h=u,D=xo;e:for(;;)switch(n.mode){case ph:if(n.wrap===0){n.mode=Fg;break}for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0),l=0,c=0,n.mode=Z3;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ye;break}if((l&15)!==W3){e.msg="unknown compression method",n.mode=Ye;break}if(l>>>=4,c-=4,I=(l&15)+8,n.wbits===0&&(n.wbits=I),I>15||I>n.wbits){e.msg="invalid window size",n.mode=Ye;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?nE:vr,l=0,c=0;break;case Z3:for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==W3){e.msg="unknown compression method",n.mode=Ye;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ye;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0,n.mode=Y3;case Y3:for(;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=pt(n.check,M,4,0)),l=0,c=0,n.mode=Q3;case Q3:for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0,n.mode=X3;case X3:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=K3;case K3:if(n.flags&1024&&(d=n.length,d>s&&(d=s),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),I)),n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=J3;case J3:if(n.flags&2048){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=eE;case eE:if(n.flags&4096){if(s===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<s);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,o)),s-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=tE;case tE:if(n.flags&512){for(;c<16;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ye;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=vr;break;case nE:for(;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=bE(l),l=0,c=0,n.mode=gh;case gh:if(n.havedict===0)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,LO;e.adler=n.check=1,n.mode=vr;case vr:if(t===MO||t===dh)break e;case Fg:if(n.last){l>>>=c&7,c-=c&7,n.mode=Pg;break}for(;c<3;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=rE;break;case 1:if(VO(n),n.mode=mh,t===dh){l>>>=2,c-=2;break e}break;case 2:n.mode=oE;break;case 3:e.msg="invalid block type",n.mode=Ye}l>>>=2,c-=2;break;case rE:for(l>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ye;break}if(n.length=l&65535,l=0,c=0,n.mode=Mg,t===dh)break e;case Mg:n.mode=iE;case iE:if(d=n.length,d){if(d>s&&(d=s),d>u&&(d=u),d===0)break e;i.set(r.subarray(o,o+d),a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=vr;break;case oE:for(;c<14;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ye;break}n.have=0,n.mode=aE;case aE:for(;n.have<n.ncode;){for(;c<3;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.lens[ne[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[ne[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=lu(FO,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Ye;break}n.have=0,n.mode=sE;case sE:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Ye;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ye;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Ye)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ye;break}if(n.lenbits=9,G={bits:n.lenbits},D=lu(H3,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Ye;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=lu(V3,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Ye;break}if(n.mode=mh,t===dh)break e;case mh:n.mode=bh;case bh:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,TO(e,h),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,n.mode===vr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(A&&!(A&240)){for(_=w,k=A,B=S;y=n.lencode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,A===0){n.mode=hE;break}if(A&32){n.back=-1,n.mode=vr;break}if(A&64){e.msg="invalid literal/length code",n.mode=Ye;break}n.extra=A&15,n.mode=lE;case lE:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=uE;case uE:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,A=y>>>16&255,S=y&65535,!(w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(!(A&240)){for(_=w,k=A,B=S;y=n.distcode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,A=y>>>16&255,S=y&65535,!(_+w<=c);){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,A&64){e.msg="invalid distance code",n.mode=Ye;break}n.offset=S,n.extra=A&15,n.mode=cE;case cE:if(n.extra){for(N=n.extra;c<N;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ye;break}n.mode=fE;case fE:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ye;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[a++]=m[p++];while(--d);n.length===0&&(n.mode=bh);break;case hE:if(u===0)break e;i[a++]=n.length,u--,n.mode=bh;break;case Pg:if(n.wrap){for(;c<32;){if(s===0)break e;s--,l|=r[o++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,a-h):Jl(n.check,i,h,a-h)),h=u,n.wrap&4&&(n.flags?l:bE(l))!==n.check){e.msg="incorrect data check",n.mode=Ye;break}l=0,c=0}n.mode=dE;case dE:if(n.wrap&&n.flags){for(;c<32;){if(s===0)break e;s--,l+=r[o++]<<c,c+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ye;break}l=0,c=0}n.mode=pE;case pE:D=PO;break e;case Ye:D=$3;break e;case gE:return q3;case mE:default:return gn}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Ye&&(n.mode<Pg||t!==j3))&&EE(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,e.next_out-h):Jl(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===vr?128:0)+(n.mode===mh||n.mode===Mg?256:0),(f===0&&h===0||t===j3)&&D===xo&&(D=NO),D},$O=e=>{if(Ao(e))return gn;let t=e.state;return t.window&&(t.window=null),e.state=null,xo},qO=(e,t)=>{if(Ao(e))return gn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,xo):gn},WO=(e,t)=>{const n=t.length;let r,i,o;return Ao(e)||(r=e.state,r.wrap!==0&&r.mode!==gh)?gn:r.mode===gh&&(i=1,i=Jl(i,t,n,0),i!==r.check)?$3:(o=EE(e,t,n,n),o?(r.mode=gE,q3):(r.havedict=1,xo))};var ZO=wE,YO=vE,QO=yE,XO=HO,KO=xE,JO=jO,ez=$O,tz=qO,nz=WO,rz="pako inflate (from Nodeca project)",xr={inflateReset:ZO,inflateReset2:YO,inflateResetKeep:QO,inflateInit:XO,inflateInit2:KO,inflate:JO,inflateEnd:ez,inflateGetHeader:tz,inflateSetDictionary:nz,inflateInfo:rz};function iz(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var oz=iz;const _E=Object.prototype.toString,{Z_NO_FLUSH:az,Z_FINISH:sz,Z_OK:uu,Z_STREAM_END:Og,Z_NEED_DICT:zg,Z_STREAM_ERROR:lz,Z_DATA_ERROR:SE,Z_MEM_ERROR:uz}=eu;function cu(e){this.options=ch.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new L3,this.strm.avail_out=0;let n=xr.inflateInit2(this.strm,t.windowBits);if(n!==uu)throw new Error(Ca[n]);if(this.header=new oz,xr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=su.string2buf(t.dictionary):_E.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=xr.inflateSetDictionary(this.strm,t.dictionary),n!==uu)))throw new Error(Ca[n])}cu.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?sz:az,_E.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=xr.inflate(n,a),o===zg&&i&&(o=xr.inflateSetDictionary(n,i),o===uu?o=xr.inflate(n,a):o===SE&&(o=zg));n.avail_in>0&&o===Og&&n.state.wrap>0&&e[n.next_in]!==0;)xr.inflateReset(n),o=xr.inflate(n,a);switch(o){case lz:case SE:case zg:case uz:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===Og))if(this.options.to==="string"){let u=su.utf8border(n.output,n.next_out),l=n.next_out-u,c=su.buf2string(n.output,u);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(u,u+l),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===uu&&s===0)){if(o===Og)return o=xr.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},cu.prototype.onData=function(e){this.chunks.push(e)},cu.prototype.onEnd=function(e){e===uu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ch.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ug(e,t){const n=new cu(t);if(n.push(e),n.err)throw n.msg||Ca[n.err];return n.result}function cz(e,t){return t=t||{},t.raw=!0,Ug(e,t)}var fz=cu,hz=Ug,dz=cz,pz=Ug,gz=eu,mz={Inflate:fz,inflate:hz,inflateRaw:dz,ungzip:pz,constants:gz};const{Inflate:gH,inflate:mH,inflateRaw:bz,ungzip:bH}=mz;var yz=bz;function wz(e){return yz(e.subarray(2))}let vz=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function xz(e){e.sort((i,o)=>Number(i.offset)-Number(o.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function yh(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new vz("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const Az=1,Ez=2,_z=3;function Gg(e,t,n,r){return e<r&&t>=n}function Sz(e){const t=e?"big":"little",n=new Re().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Re().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Re().endianess(t).array("blocksToFetch",{length:"cnt",type:new Re().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Re().array("recurOffsets",{length:"cnt",type:new Re().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Re().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Re().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[_z]:new Re().array("items",{length:"itemCount",type:new Re().floatle("score")}),[Ez]:new Re().array("items",{length:"itemCount",type:new Re().endianess(t).int32("start").floatle("score")}),[Az]:new Re().array("items",{length:"itemCount",type:new Re().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class CE{constructor(t,n,r,i,o,a){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=o,this.blockType=a,this.featureCache=new ih({cache:new oh({maxSize:1e3}),fill:async(u,l)=>{const c=Number(u.length),f=Number(u.offset),{buffer:h}=await this.bbi.read(be.Buffer.alloc(c),0,c,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const s=Sz(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}async readWigData(t,n,r,i,o){try{const{refsByName:a,bbi:s,cirTreeOffset:u,isBigEndian:l}=this,c=a[t];c===void 0&&i.complete();const f={chrId:c,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=s.read(be.Buffer.alloc(48),0,48,Number(u),o));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],m=0;const y=(_,k,B)=>{try{const I=_.subarray(k),D=this.leafParser.parse(I);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(M=>w(M)).map(M=>({offset:M.blockOffset,length:M.blockSize})))),D.recurOffsets){const M=D.recurOffsets.filter(G=>w(G)).map(G=>Number(G.blockOffset));M.length>0&&S(M,B+1)}}catch(I){i.error(I)}},w=_=>{const{startChrom:k,startBase:B,endChrom:I,endBase:D}=_;return(k<c||k===c&&B<=r)&&(I>c||I===c&&D>=n)},A=async(_,k,B)=>{try{const I=k.max()-k.min(),D=k.min(),M=await this.featureCache.get(`${I}_${D}`,{length:I,offset:D},o==null?void 0:o.signal);for(const G of _)k.contains(G)&&(y(M,G-D,B),m-=1,m===0&&this.readFeatures(i,p,{...o,request:f}))}catch(I){i.error(I)}},S=(_,k)=>{try{m+=_.length;const B=4+Number(d)*32;let I=new di(_[0],_[0]+B);for(let D=1;D<_.length;D+=1){const M=new di(_[D],_[D]+B);I=I.union(M)}I.getRanges().map(D=>A(_,D,k))}catch(B){i.error(B)}};return S([Number(u)+48],1)}catch(a){i.error(a)}}parseSummaryBlock(t,n,r){const i=[];let o=n;const a=new DataView(t.buffer,t.byteOffset,t.length);for(;o<t.byteLength;){const s=a.getUint32(o,!0);o+=4;const u=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);o+=4;const c=a.getUint32(o,!0);o+=4;const f=a.getFloat32(o,!0);o+=4;const h=a.getFloat32(o,!0);o+=4;const d=a.getFloat32(o,!0);o+=4,o+=4,(!r||s===r.chrId&&Gg(u,l,r.start,r.end))&&i.push({start:u,end:l,maxScore:h,minScore:f,summary:!0,score:d/(c||1)})}return i}parseBigBedBlock(t,n,r,i){const o=[];let a=n;for(;a<t.byteLength;){const s=this.bigBedParser.parse(t.subarray(a));s.uniqueId=`bb-${r+a}`,o.push(s),a+=s.offset}return i?o.filter(s=>Gg(s.start,s.end,i.start,i.end)):o}parseBigWigBlock(t,n,r){const i=t.subarray(n),o=new DataView(i.buffer,i.byteOffset,i.length);let a=0;a+=4;const s=o.getInt32(a,!0);a+=8;const u=o.getUint32(a,!0);a+=4;const l=o.getUint32(a,!0);a+=4;const c=o.getUint8(a);a+=2;const f=o.getUint16(a,!0);a+=2;const h=new Array(f);switch(c){case 1:{for(let d=0;d<f;d++){const p=o.getInt32(a,!0);a+=4;const m=o.getInt32(a,!0);a+=4;const y=o.getFloat32(a,!0);a+=4,h[d]={start:p,end:m,score:y}}break}case 2:{for(let d=0;d<f;d++){const p=o.getInt32(a,!0);a+=4;const m=o.getFloat32(a,!0);a+=4,h[d]={score:m,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=o.getFloat32(a,!0);a+=4;const m=s+d*u;h[d]={score:p,start:m,end:m+l}}break}}return r?h.filter(d=>Gg(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:o}=this,{signal:a,request:s}=r,u=xz(n);yh(a),await Promise.all(u.map(async l=>{yh(a);const{length:c,offset:f}=l,h=await this.featureCache.get(`${c}_${f}`,l,a);for(const d of l.blocks){yh(a);let p=Number(d.offset)-Number(l.offset),m=h;switch(o&&(m=wz(h.subarray(p)),p=0),yh(a),i){case"summary":{t.next(this.parseSummaryBlock(m,p,s));break}case"bigwig":{t.next(this.parseBigWigBlock(m,p,s));break}case"bigbed":{t.next(this.parseBigBedBlock(m,p,Number(d.offset)*256,s));break}default:console.warn(`Don't know what to do with ${i}`)}}})),t.complete()}catch(i){t.error(i)}}}var Hg=function(e,t){return Hg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hg(e,t)};function Vg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Cz(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{l(r.next(c))}catch(f){a(f)}}function u(c){try{l(r.throw(c))}catch(f){a(f)}}function l(c){c.done?o(c.value):i(c.value).then(s,u)}l((r=r.apply(e,t||[])).next())})}function kE(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function fu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function $g(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Fa(e){return this instanceof Fa?(this.v=e,this):new Fa(e)}function kz(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(h){r[h]&&(i[h]=function(d){return new Promise(function(p,m){o.push([h,d,p,m])>1||s(h,d)})})}function s(h,d){try{u(r[h](d))}catch(p){f(o[0][3],p)}}function u(h){h.value instanceof Fa?Promise.resolve(h.value.v).then(l,c):f(o[0][2],h)}function l(h){s("next",h)}function c(h){s("throw",h)}function f(h,d){h(d),o.shift(),o.length&&s(o[0][0],o[0][1])}}function Tz(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof fu=="function"?fu(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,u){a=e[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(l){o({value:l,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function lt(e){return typeof e=="function"}function TE(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var qg=TE(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
604
+ */(function(e){const t=Mf,n=Rp,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=x,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const v=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(v,g),v.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(v){if(v>i)throw new RangeError('The value "'+v+'" is invalid for option "size"');const g=new Uint8Array(v);return Object.setPrototypeOf(g,a.prototype),g}function a(v,g,b){if(typeof v=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(v)}return u(v,g,b)}a.poolSize=8192;function u(v,g,b){if(typeof v=="string")return h(v,g);if(ArrayBuffer.isView(v))return p(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(kt(v,ArrayBuffer)||v&&kt(v.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(kt(v,SharedArrayBuffer)||v&&kt(v.buffer,SharedArrayBuffer)))return m(v,g,b);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=v.valueOf&&v.valueOf();if(T!=null&&T!==v)return a.from(T,g,b);const F=y(v);if(F)return F;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return a.from(v[Symbol.toPrimitive]("string"),g,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}a.from=function(v,g,b){return u(v,g,b)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function c(v,g,b){return l(v),v<=0?s(v):g!==void 0?typeof b=="string"?s(v).fill(g,b):s(v).fill(g):s(v)}a.alloc=function(v,g,b){return c(v,g,b)};function f(v){return l(v),s(v<0?0:w(v)|0)}a.allocUnsafe=function(v){return f(v)},a.allocUnsafeSlow=function(v){return f(v)};function h(v,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const b=S(v,g)|0;let T=s(b);const F=T.write(v,g);return F!==b&&(T=T.slice(0,F)),T}function d(v){const g=v.length<0?0:w(v.length)|0,b=s(g);for(let T=0;T<g;T+=1)b[T]=v[T]&255;return b}function p(v){if(kt(v,Uint8Array)){const g=new Uint8Array(v);return m(g.buffer,g.byteOffset,g.byteLength)}return d(v)}function m(v,g,b){if(g<0||v.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<g+(b||0))throw new RangeError('"length" is outside of buffer bounds');let T;return g===void 0&&b===void 0?T=new Uint8Array(v):b===void 0?T=new Uint8Array(v,g):T=new Uint8Array(v,g,b),Object.setPrototypeOf(T,a.prototype),T}function y(v){if(a.isBuffer(v)){const g=w(v.length)|0,b=s(g);return b.length===0||v.copy(b,0,0,g),b}if(v.length!==void 0)return typeof v.length!="number"||Tr(v.length)?s(0):d(v);if(v.type==="Buffer"&&Array.isArray(v.data))return d(v.data)}function w(v){if(v>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return v|0}function x(v){return+v!=v&&(v=0),a.alloc(+v)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,b){if(kt(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),kt(b,Uint8Array)&&(b=a.from(b,b.offset,b.byteLength)),!a.isBuffer(g)||!a.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===b)return 0;let T=g.length,F=b.length;for(let O=0,$=Math.min(T,F);O<$;++O)if(g[O]!==b[O]){T=g[O],F=b[O];break}return T<F?-1:F<T?1:0},a.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(g,b){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let T;if(b===void 0)for(b=0,T=0;T<g.length;++T)b+=g[T].length;const F=a.allocUnsafe(b);let O=0;for(T=0;T<g.length;++T){let $=g[T];if(kt($,Uint8Array))O+$.length>F.length?(a.isBuffer($)||($=a.from($)),$.copy(F,O)):Uint8Array.prototype.set.call(F,$,O);else if(a.isBuffer($))$.copy(F,O);else throw new TypeError('"list" argument must be an Array of Buffers');O+=$.length}return F};function S(v,g){if(a.isBuffer(v))return v.length;if(ArrayBuffer.isView(v)||kt(v,ArrayBuffer))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);const b=v.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&b===0)return 0;let F=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return ce(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return xi(v).length;default:if(F)return T?-1:ce(v).length;g=(""+g).toLowerCase(),F=!0}}a.byteLength=S;function _(v,g,b){let T=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,g>>>=0,b<=g))return"";for(v||(v="utf8");;)switch(v){case"hex":return Oe(this,g,b);case"utf8":case"utf-8":return he(this,g,b);case"ascii":return xe(this,g,b);case"latin1":case"binary":return Le(this,g,b);case"base64":return ie(this,g,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,g,b);default:if(T)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),T=!0}}a.prototype._isBuffer=!0;function k(v,g,b){const T=v[g];v[g]=v[b],v[b]=T}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<g;b+=2)k(this,b,b+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<g;b+=4)k(this,b,b+3),k(this,b+1,b+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<g;b+=8)k(this,b,b+7),k(this,b+1,b+6),k(this,b+2,b+5),k(this,b+3,b+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?he(this,0,g):_.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const b=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(g+=" ... "),"<Buffer "+g+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(g,b,T,F,O){if(kt(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(b===void 0&&(b=0),T===void 0&&(T=g?g.length:0),F===void 0&&(F=0),O===void 0&&(O=this.length),b<0||T>g.length||F<0||O>this.length)throw new RangeError("out of range index");if(F>=O&&b>=T)return 0;if(F>=O)return-1;if(b>=T)return 1;if(b>>>=0,T>>>=0,F>>>=0,O>>>=0,this===g)return 0;let $=O-F,fe=T-b;const qe=Math.min($,fe),ze=this.slice(F,O),Qe=g.slice(b,T);for(let Te=0;Te<qe;++Te)if(ze[Te]!==Qe[Te]){$=ze[Te],fe=Qe[Te];break}return $<fe?-1:fe<$?1:0};function B(v,g,b,T,F){if(v.length===0)return-1;if(typeof b=="string"?(T=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,Tr(b)&&(b=F?0:v.length-1),b<0&&(b=v.length+b),b>=v.length){if(F)return-1;b=v.length-1}else if(b<0)if(F)b=0;else return-1;if(typeof g=="string"&&(g=a.from(g,T)),a.isBuffer(g))return g.length===0?-1:I(v,g,b,T,F);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?F?Uint8Array.prototype.indexOf.call(v,g,b):Uint8Array.prototype.lastIndexOf.call(v,g,b):I(v,[g],b,T,F);throw new TypeError("val must be string, number or Buffer")}function I(v,g,b,T,F){let O=1,$=v.length,fe=g.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(v.length<2||g.length<2)return-1;O=2,$/=2,fe/=2,b/=2}function qe(Qe,Te){return O===1?Qe[Te]:Qe.readUInt16BE(Te*O)}let ze;if(F){let Qe=-1;for(ze=b;ze<$;ze++)if(qe(v,ze)===qe(g,Qe===-1?0:ze-Qe)){if(Qe===-1&&(Qe=ze),ze-Qe+1===fe)return Qe*O}else Qe!==-1&&(ze-=ze-Qe),Qe=-1}else for(b+fe>$&&(b=$-fe),ze=b;ze>=0;ze--){let Qe=!0;for(let Te=0;Te<fe;Te++)if(qe(v,ze+Te)!==qe(g,Te)){Qe=!1;break}if(Qe)return ze}return-1}a.prototype.includes=function(g,b,T){return this.indexOf(g,b,T)!==-1},a.prototype.indexOf=function(g,b,T){return B(this,g,b,T,!0)},a.prototype.lastIndexOf=function(g,b,T){return B(this,g,b,T,!1)};function D(v,g,b,T){b=Number(b)||0;const F=v.length-b;T?(T=Number(T),T>F&&(T=F)):T=F;const O=g.length;T>O/2&&(T=O/2);let $;for($=0;$<T;++$){const fe=parseInt(g.substr($*2,2),16);if(Tr(fe))return $;v[b+$]=fe}return $}function M(v,g,b,T){return Ei(ce(g,v.length-b),v,b,T)}function G(v,g,b,T){return Ei(qt(g),v,b,T)}function N(v,g,b,T){return Ei(xi(g),v,b,T)}function ne(v,g,b,T){return Ei(Ai(g,v.length-b),v,b,T)}a.prototype.write=function(g,b,T,F){if(b===void 0)F="utf8",T=this.length,b=0;else if(T===void 0&&typeof b=="string")F=b,T=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(T)?(T=T>>>0,F===void 0&&(F="utf8")):(F=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const O=this.length-b;if((T===void 0||T>O)&&(T=O),g.length>0&&(T<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");let $=!1;for(;;)switch(F){case"hex":return D(this,g,b,T);case"utf8":case"utf-8":return M(this,g,b,T);case"ascii":case"latin1":case"binary":return G(this,g,b,T);case"base64":return N(this,g,b,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,g,b,T);default:if($)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),$=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(v,g,b){return g===0&&b===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(g,b))}function he(v,g,b){b=Math.min(v.length,b);const T=[];let F=g;for(;F<b;){const O=v[F];let $=null,fe=O>239?4:O>223?3:O>191?2:1;if(F+fe<=b){let qe,ze,Qe,Te;switch(fe){case 1:O<128&&($=O);break;case 2:qe=v[F+1],(qe&192)===128&&(Te=(O&31)<<6|qe&63,Te>127&&($=Te));break;case 3:qe=v[F+1],ze=v[F+2],(qe&192)===128&&(ze&192)===128&&(Te=(O&15)<<12|(qe&63)<<6|ze&63,Te>2047&&(Te<55296||Te>57343)&&($=Te));break;case 4:qe=v[F+1],ze=v[F+2],Qe=v[F+3],(qe&192)===128&&(ze&192)===128&&(Qe&192)===128&&(Te=(O&15)<<18|(qe&63)<<12|(ze&63)<<6|Qe&63,Te>65535&&Te<1114112&&($=Te))}}$===null?($=65533,fe=1):$>65535&&($-=65536,T.push($>>>10&1023|55296),$=56320|$&1023),T.push($),F+=fe}return Fe(T)}const me=4096;function Fe(v){const g=v.length;if(g<=me)return String.fromCharCode.apply(String,v);let b="",T=0;for(;T<g;)b+=String.fromCharCode.apply(String,v.slice(T,T+=me));return b}function xe(v,g,b){let T="";b=Math.min(v.length,b);for(let F=g;F<b;++F)T+=String.fromCharCode(v[F]&127);return T}function Le(v,g,b){let T="";b=Math.min(v.length,b);for(let F=g;F<b;++F)T+=String.fromCharCode(v[F]);return T}function Oe(v,g,b){const T=v.length;(!g||g<0)&&(g=0),(!b||b<0||b>T)&&(b=T);let F="";for(let O=g;O<b;++O)F+=_i[v[O]];return F}function Je(v,g,b){const T=v.slice(g,b);let F="";for(let O=0;O<T.length-1;O+=2)F+=String.fromCharCode(T[O]+T[O+1]*256);return F}a.prototype.slice=function(g,b){const T=this.length;g=~~g,b=b===void 0?T:~~b,g<0?(g+=T,g<0&&(g=0)):g>T&&(g=T),b<0?(b+=T,b<0&&(b=0)):b>T&&(b=T),b<g&&(b=g);const F=this.subarray(g,b);return Object.setPrototypeOf(F,a.prototype),F};function Ce(v,g,b){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+g>b)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=this[g],O=1,$=0;for(;++$<b&&(O*=256);)F+=this[g+$]*O;return F},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=this[g+--b],O=1;for(;b>0&&(O*=256);)F+=this[g+--b]*O;return F},a.prototype.readUint8=a.prototype.readUInt8=function(g,b){return g=g>>>0,b||Ce(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,b){return g=g>>>0,b||Ce(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,b){return g=g>>>0,b||Ce(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,O=this[++g]+this[++g]*2**8+this[++g]*2**16+T*2**24;return BigInt(F)+(BigInt(O)<<BigInt(32))}),a.prototype.readBigUInt64BE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=b*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],O=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+T;return(BigInt(F)<<BigInt(32))+BigInt(O)}),a.prototype.readIntLE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=this[g],O=1,$=0;for(;++$<b&&(O*=256);)F+=this[g+$]*O;return O*=128,F>=O&&(F-=Math.pow(2,8*b)),F},a.prototype.readIntBE=function(g,b,T){g=g>>>0,b=b>>>0,T||Ce(g,b,this.length);let F=b,O=1,$=this[g+--F];for(;F>0&&(O*=256);)$+=this[g+--F]*O;return O*=128,$>=O&&($-=Math.pow(2,8*b)),$},a.prototype.readInt8=function(g,b){return g=g>>>0,b||Ce(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,b){g=g>>>0,b||Ce(g,2,this.length);const T=this[g]|this[g+1]<<8;return T&32768?T|4294901760:T},a.prototype.readInt16BE=function(g,b){g=g>>>0,b||Ce(g,2,this.length);const T=this[g+1]|this[g]<<8;return T&32768?T|4294901760:T},a.prototype.readInt32LE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(T<<24);return(BigInt(F)<<BigInt(32))+BigInt(b+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Wt(function(g){g=g>>>0,V(g,"offset");const b=this[g],T=this[g+7];(b===void 0||T===void 0)&&W(g,this.length-8);const F=(b<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(F)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+T)}),a.prototype.readFloatLE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),n.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,b){return g=g>>>0,b||Ce(g,4,this.length),n.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,b){return g=g>>>0,b||Ce(g,8,this.length),n.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,b){return g=g>>>0,b||Ce(g,8,this.length),n.read(this,g,!1,52,8)};function ke(v,g,b,T,F,O){if(!a.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>F||g<O)throw new RangeError('"value" argument is out of bounds');if(b+T>v.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,b,T,F){if(g=+g,b=b>>>0,T=T>>>0,!F){const fe=Math.pow(2,8*T)-1;ke(this,g,b,T,fe,0)}let O=1,$=0;for(this[b]=g&255;++$<T&&(O*=256);)this[b+$]=g/O&255;return b+T},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,b,T,F){if(g=+g,b=b>>>0,T=T>>>0,!F){const fe=Math.pow(2,8*T)-1;ke(this,g,b,T,fe,0)}let O=T-1,$=1;for(this[b+O]=g&255;--O>=0&&($*=256);)this[b+O]=g/$&255;return b+T},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,1,255,0),this[b]=g&255,b+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,65535,0),this[b]=g&255,this[b+1]=g>>>8,b+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,65535,0),this[b]=g>>>8,this[b+1]=g&255,b+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,4294967295,0),this[b+3]=g>>>24,this[b+2]=g>>>16,this[b+1]=g>>>8,this[b]=g&255,b+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,4294967295,0),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4};function gt(v,g,b,T,F){A(g,T,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O,O=O>>8,v[b++]=O;let $=Number(g>>BigInt(32)&BigInt(4294967295));return v[b++]=$,$=$>>8,v[b++]=$,$=$>>8,v[b++]=$,$=$>>8,v[b++]=$,b}function $t(v,g,b,T,F){A(g,T,F,v,b,7);let O=Number(g&BigInt(4294967295));v[b+7]=O,O=O>>8,v[b+6]=O,O=O>>8,v[b+5]=O,O=O>>8,v[b+4]=O;let $=Number(g>>BigInt(32)&BigInt(4294967295));return v[b+3]=$,$=$>>8,v[b+2]=$,$=$>>8,v[b+1]=$,$=$>>8,v[b]=$,b+8}a.prototype.writeBigUInt64LE=Wt(function(g,b=0){return gt(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Wt(function(g,b=0){return $t(this,g,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,b,T,F){if(g=+g,b=b>>>0,!F){const qe=Math.pow(2,8*T-1);ke(this,g,b,T,qe-1,-qe)}let O=0,$=1,fe=0;for(this[b]=g&255;++O<T&&($*=256);)g<0&&fe===0&&this[b+O-1]!==0&&(fe=1),this[b+O]=(g/$>>0)-fe&255;return b+T},a.prototype.writeIntBE=function(g,b,T,F){if(g=+g,b=b>>>0,!F){const qe=Math.pow(2,8*T-1);ke(this,g,b,T,qe-1,-qe)}let O=T-1,$=1,fe=0;for(this[b+O]=g&255;--O>=0&&($*=256);)g<0&&fe===0&&this[b+O+1]!==0&&(fe=1),this[b+O]=(g/$>>0)-fe&255;return b+T},a.prototype.writeInt8=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,1,127,-128),g<0&&(g=255+g+1),this[b]=g&255,b+1},a.prototype.writeInt16LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,32767,-32768),this[b]=g&255,this[b+1]=g>>>8,b+2},a.prototype.writeInt16BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,2,32767,-32768),this[b]=g>>>8,this[b+1]=g&255,b+2},a.prototype.writeInt32LE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,2147483647,-2147483648),this[b]=g&255,this[b+1]=g>>>8,this[b+2]=g>>>16,this[b+3]=g>>>24,b+4},a.prototype.writeInt32BE=function(g,b,T){return g=+g,b=b>>>0,T||ke(this,g,b,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[b]=g>>>24,this[b+1]=g>>>16,this[b+2]=g>>>8,this[b+3]=g&255,b+4},a.prototype.writeBigInt64LE=Wt(function(g,b=0){return gt(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Wt(function(g,b=0){return $t(this,g,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(v,g,b,T,F,O){if(b+T>v.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function L(v,g,b,T,F){return g=+g,b=b>>>0,F||Ve(v,g,b,4),n.write(v,g,b,T,23,4),b+4}a.prototype.writeFloatLE=function(g,b,T){return L(this,g,b,!0,T)},a.prototype.writeFloatBE=function(g,b,T){return L(this,g,b,!1,T)};function P(v,g,b,T,F){return g=+g,b=b>>>0,F||Ve(v,g,b,8),n.write(v,g,b,T,52,8),b+8}a.prototype.writeDoubleLE=function(g,b,T){return P(this,g,b,!0,T)},a.prototype.writeDoubleBE=function(g,b,T){return P(this,g,b,!1,T)},a.prototype.copy=function(g,b,T,F){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(T||(T=0),!F&&F!==0&&(F=this.length),b>=g.length&&(b=g.length),b||(b=0),F>0&&F<T&&(F=T),F===T||g.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),g.length-b<F-T&&(F=g.length-b+T);const O=F-T;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,T,F):Uint8Array.prototype.set.call(g,this.subarray(T,F),b),O},a.prototype.fill=function(g,b,T,F){if(typeof g=="string"){if(typeof b=="string"?(F=b,b=0,T=this.length):typeof T=="string"&&(F=T,T=this.length),F!==void 0&&typeof F!="string")throw new TypeError("encoding must be a string");if(typeof F=="string"&&!a.isEncoding(F))throw new TypeError("Unknown encoding: "+F);if(g.length===1){const $=g.charCodeAt(0);(F==="utf8"&&$<128||F==="latin1")&&(g=$)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(b<0||this.length<b||this.length<T)throw new RangeError("Out of range index");if(T<=b)return this;b=b>>>0,T=T===void 0?this.length:T>>>0,g||(g=0);let O;if(typeof g=="number")for(O=b;O<T;++O)this[O]=g;else{const $=a.isBuffer(g)?g:a.from(g,F),fe=$.length;if(fe===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(O=0;O<T-b;++O)this[O+b]=$[O%fe]}return this};const q={};function j(v,g,b){q[v]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${v}]`,this.stack,delete this.name}get code(){return v}set code(F){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:F,writable:!0})}toString(){return`${this.name} [${v}]: ${this.message}`}}}j("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(v,g){return`The "${v}" argument must be of type number. Received type ${typeof g}`},TypeError),j("ERR_OUT_OF_RANGE",function(v,g,b){let T=`The value of "${v}" is out of range.`,F=b;return Number.isInteger(b)&&Math.abs(b)>2**32?F=Y(String(b)):typeof b=="bigint"&&(F=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(F=Y(F)),F+="n"),T+=` It must be ${g}. Received ${F}`,T},RangeError);function Y(v){let g="",b=v.length;const T=v[0]==="-"?1:0;for(;b>=T+4;b-=3)g=`_${v.slice(b-3,b)}${g}`;return`${v.slice(0,b)}${g}`}function C(v,g,b){V(g,"offset"),(v[g]===void 0||v[g+b]===void 0)&&W(g,v.length-(b+1))}function A(v,g,b,T,F,O){if(v>b||v<g){const $=typeof g=="bigint"?"n":"";let fe;throw g===0||g===BigInt(0)?fe=`>= 0${$} and < 2${$} ** ${(O+1)*8}${$}`:fe=`>= -(2${$} ** ${(O+1)*8-1}${$}) and < 2 ** ${(O+1)*8-1}${$}`,new q.ERR_OUT_OF_RANGE("value",fe,v)}C(T,F,O)}function V(v,g){if(typeof v!="number")throw new q.ERR_INVALID_ARG_TYPE(g,"number",v)}function W(v,g,b){throw Math.floor(v)!==v?(V(v,b),new q.ERR_OUT_OF_RANGE("offset","an integer",v)):g<0?new q.ERR_BUFFER_OUT_OF_BOUNDS:new q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${g}`,v)}const ue=/[^+/0-9A-Za-z-_]/g;function te(v){if(v=v.split("=")[0],v=v.trim().replace(ue,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function ce(v,g){g=g||1/0;let b;const T=v.length;let F=null;const O=[];for(let $=0;$<T;++$){if(b=v.charCodeAt($),b>55295&&b<57344){if(!F){if(b>56319){(g-=3)>-1&&O.push(239,191,189);continue}else if($+1===T){(g-=3)>-1&&O.push(239,191,189);continue}F=b;continue}if(b<56320){(g-=3)>-1&&O.push(239,191,189),F=b;continue}b=(F-55296<<10|b-56320)+65536}else F&&(g-=3)>-1&&O.push(239,191,189);if(F=null,b<128){if((g-=1)<0)break;O.push(b)}else if(b<2048){if((g-=2)<0)break;O.push(b>>6|192,b&63|128)}else if(b<65536){if((g-=3)<0)break;O.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((g-=4)<0)break;O.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return O}function qt(v){const g=[];for(let b=0;b<v.length;++b)g.push(v.charCodeAt(b)&255);return g}function Ai(v,g){let b,T,F;const O=[];for(let $=0;$<v.length&&!((g-=2)<0);++$)b=v.charCodeAt($),T=b>>8,F=b%256,O.push(F),O.push(T);return O}function xi(v){return t.toByteArray(te(v))}function Ei(v,g,b,T){let F;for(F=0;F<T&&!(F+b>=g.length||F>=v.length);++F)g[F+b]=v[F];return F}function kt(v,g){return v instanceof g||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===g.name}function Tr(v){return v!==v}const _i=function(){const v="0123456789abcdef",g=new Array(256);for(let b=0;b<16;++b){const T=b*16;for(let F=0;F<16;++F)g[T+F]=v[b]+v[F]}return g}();function Wt(v){return typeof BigInt>"u"?rr:v}function rr(){throw new Error("BigInt not supported")}})(ve);const oA=Ee({__proto__:null,default:Ff(ve)},[ve]),dt={},EM=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"}));class to{async getBufferFromResponse(t){const n=await t.arrayBuffer();return ve.Buffer.from(n)}constructor(t,n={}){this.baseOverrides={},this.url=t;const r=n.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(t,n){let r;try{r=await this.fetchImplementation(t,n)}catch(i){if(`${i}`.includes("Failed to fetch"))console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`),r=await this.fetchImplementation(t,{...n,cache:"reload"});else throw i}return r}async read(t,n=0,r,i=0,o={}){const{headers:s={},signal:a,overrides:u={}}=o;r<1/0?s.range=`bytes=${i}-${i+r}`:r===1/0&&i!==0&&(s.range=`bytes=${i}-`);const l={...this.baseOverrides,...u,headers:{...s,...u.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:a},c=await this.fetch(this.url,l);if(!c.ok)throw new Error(`HTTP ${c.status} ${c.statusText} ${this.url}`);if(c.status===200&&i===0||c.status===206){const f=await this.getBufferFromResponse(c),h=f.copy(t,n,0,Math.min(r,f.length)),d=c.headers.get("content-range"),p=/\/(\d+)$/.exec(d||"");return p!=null&&p[1]&&(this._stat={size:parseInt(p[1],10)}),{bytesRead:h,buffer:t}}throw c.status===200?new Error("${this.url} fetch returned status 200, expected 206"):new Error(`HTTP ${c.status} fetching ${this.url}`)}async readFile(t={}){let n,r;typeof t=="string"?(n=t,r={}):(n=t.encoding,r=t,delete r.encoding);const{headers:i={},signal:o,overrides:s={}}=r,a={headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...s},u=await this.fetch(this.url,a);if(!u)throw new Error("generic-filehandle failed to fetch");if(u.status!==200)throw Object.assign(new Error(`HTTP ${u.status} fetching ${this.url}`),{status:u.status});if(n==="utf8")return u.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(u)}async stat(){if(!this._stat){const t=ve.Buffer.allocUnsafe(10);if(await this.read(t,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function sA(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result!="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)})}function _M(e){const t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new Error("problem reading blob"))},t.onabort=()=>{r(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&typeof t.result=="string"?n(t.result):r(new Error("unknown error reading blob"))},t.readAsText(e)})}class SM{constructor(t){this.blob=t,this.size=t.size}async read(t,n=0,r,i=0){if(!r)return{bytesRead:0,buffer:t};const o=i,s=o+r,a=await sA(this.blob.slice(o,s)),u=ve.Buffer.from(a);return{bytesRead:u.copy(t,n),buffer:u}}async readFile(t){const n=typeof t=="string"?t:t==null?void 0:t.encoding;if(n==="utf8")return _M(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await sA(this.blob);return ve.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function aA(e,t={}){return new to(e,t)}function CM(e,t,n,r={}){if(n!==void 0)return n;if(e!==void 0)return aA(e,r);if(t!==void 0)return new dt(t,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Tl=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:SM,LocalFile:dt,RemoteFile:to,fromUrl:aA,open:CM},Symbol.toStringTag,{value:"Module"}));var mr={};(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(o,s){return Object.prototype.hasOwnProperty.call(o,s)}e.assign=function(o){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var a=s.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var u in a)n(a,u)&&(o[u]=a[u])}}return o},e.shrinkBuf=function(o,s){return o.length===s?o:o.subarray?o.subarray(0,s):(o.length=s,o)};var r={arraySet:function(o,s,a,u,l){if(s.subarray&&o.subarray){o.set(s.subarray(a,a+u),l);return}for(var c=0;c<u;c++)o[l+c]=s[a+c]},flattenChunks:function(o){var s,a,u,l,c,f;for(u=0,s=0,a=o.length;s<a;s++)u+=o[s].length;for(f=new Uint8Array(u),l=0,s=0,a=o.length;s<a;s++)c=o[s],f.set(c,l),l+=c.length;return f}},i={arraySet:function(o,s,a,u,l){for(var c=0;c<u;c++)o[l+c]=s[a+c]},flattenChunks:function(o){return[].concat.apply([],o)}};e.setTyped=function(o){o?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(mr);var Il={},Wn={},fs={},kM=mr,TM=4,lA=0,uA=1,IM=2;function hs(e){for(var t=e.length;--t>=0;)e[t]=0}var BM=0,cA=1,DM=2,RM=3,FM=258,Fp=29,Bl=256,Dl=Bl+1+Fp,ds=30,Mp=19,fA=2*Dl+1,no=15,Pp=16,MM=7,Lp=256,hA=16,dA=17,pA=18,Np=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Pf=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],PM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],gA=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],LM=512,br=new Array((Dl+2)*2);hs(br);var Rl=new Array(ds*2);hs(Rl);var Fl=new Array(LM);hs(Fl);var Ml=new Array(FM-RM+1);hs(Ml);var Op=new Array(Fp);hs(Op);var Lf=new Array(ds);hs(Lf);function zp(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var mA,bA,yA;function Up(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function wA(e){return e<256?Fl[e]:Fl[256+(e>>>7)]}function Pl(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Gt(e,t,n){e.bi_valid>Pp-n?(e.bi_buf|=t<<e.bi_valid&65535,Pl(e,e.bi_buf),e.bi_buf=t>>Pp-e.bi_valid,e.bi_valid+=n-Pp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Zn(e,t,n){Gt(e,n[t*2],n[t*2+1])}function vA(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function NM(e){e.bi_valid===16?(Pl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function OM(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,c,f,h,d,p,m=0;for(h=0;h<=no;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<fA;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=a&&(d=s[c-a]),p=n[c*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}}function AA(e,t,n){var r=new Array(no+1),i=0,o,s;for(o=1;o<=no;o++)r[o]=i=i+n[o-1]<<1;for(s=0;s<=t;s++){var a=e[s*2+1];a!==0&&(e[s*2]=vA(r[a]++,a))}}function zM(){var e,t,n,r,i,o=new Array(no+1);for(n=0,r=0;r<Fp-1;r++)for(Op[r]=n,e=0;e<1<<Np[r];e++)Ml[n++]=r;for(Ml[n-1]=r,i=0,r=0;r<16;r++)for(Lf[r]=i,e=0;e<1<<Pf[r];e++)Fl[i++]=r;for(i>>=7;r<ds;r++)for(Lf[r]=i<<7,e=0;e<1<<Pf[r]-7;e++)Fl[256+i++]=r;for(t=0;t<=no;t++)o[t]=0;for(e=0;e<=143;)br[e*2+1]=8,e++,o[8]++;for(;e<=255;)br[e*2+1]=9,e++,o[9]++;for(;e<=279;)br[e*2+1]=7,e++,o[7]++;for(;e<=287;)br[e*2+1]=8,e++,o[8]++;for(AA(br,Dl+1,o),e=0;e<ds;e++)Rl[e*2+1]=5,Rl[e*2]=vA(e,5);mA=new zp(br,Np,Bl+1,Dl,no),bA=new zp(Rl,Pf,0,ds,no),yA=new zp(new Array(0),PM,0,Mp,MM)}function xA(e){var t;for(t=0;t<Dl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<ds;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Mp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Lp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function EA(e){e.bi_valid>8?Pl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function UM(e,t,n,r){EA(e),Pl(e,n),Pl(e,~n),kM.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function _A(e,t,n,r){var i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function Gp(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&_A(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!_A(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function SA(e,t,n){var r,i,o=0,s,a;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],i=e.pending_buf[e.l_buf+o],o++,r===0?Zn(e,i,t):(s=Ml[i],Zn(e,s+Bl+1,t),a=Np[s],a!==0&&(i-=Op[s],Gt(e,i,a)),r--,s=wA(r),Zn(e,s,n),a=Pf[s],a!==0&&(r-=Lf[s],Gt(e,r,a)));while(o<e.last_lit);Zn(e,Lp,t)}function Hp(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,a,u=-1,l;for(e.heap_len=0,e.heap_max=fA,s=0;s<o;s++)n[s*2]!==0?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):n[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)Gp(e,n,s);l=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Gp(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[l*2]=n[s*2]+n[a*2],e.depth[l]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[s*2+1]=n[a*2+1]=l,e.heap[1]=l++,Gp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],OM(e,t),AA(n,u,e.bl_count)}function CA(e,t,n){var r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)&&(a<l?e.bl_tree[o*2]+=a:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[hA*2]++):a<=10?e.bl_tree[dA*2]++:e.bl_tree[pA*2]++,a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4))}function kA(e,t,n){var r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)){if(a<l)do Zn(e,o,e.bl_tree);while(--a!==0);else o!==0?(o!==i&&(Zn(e,o,e.bl_tree),a--),Zn(e,hA,e.bl_tree),Gt(e,a-3,2)):a<=10?(Zn(e,dA,e.bl_tree),Gt(e,a-3,3)):(Zn(e,pA,e.bl_tree),Gt(e,a-11,7));a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4)}}function GM(e){var t;for(CA(e,e.dyn_ltree,e.l_desc.max_code),CA(e,e.dyn_dtree,e.d_desc.max_code),Hp(e,e.bl_desc),t=Mp-1;t>=3&&e.bl_tree[gA[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function HM(e,t,n,r){var i;for(Gt(e,t-257,5),Gt(e,n-1,5),Gt(e,r-4,4),i=0;i<r;i++)Gt(e,e.bl_tree[gA[i]*2+1],3);kA(e,e.dyn_ltree,t-1),kA(e,e.dyn_dtree,n-1)}function VM(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return lA;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return uA;for(n=32;n<Bl;n++)if(e.dyn_ltree[n*2]!==0)return uA;return lA}var TA=!1;function jM(e){TA||(zM(),TA=!0),e.l_desc=new Up(e.dyn_ltree,mA),e.d_desc=new Up(e.dyn_dtree,bA),e.bl_desc=new Up(e.bl_tree,yA),e.bi_buf=0,e.bi_valid=0,xA(e)}function IA(e,t,n,r){Gt(e,(BM<<1)+(r?1:0),3),UM(e,t,n)}function $M(e){Gt(e,cA<<1,3),Zn(e,Lp,br),NM(e)}function qM(e,t,n,r){var i,o,s=0;e.level>0?(e.strm.data_type===IM&&(e.strm.data_type=VM(e)),Hp(e,e.l_desc),Hp(e,e.d_desc),s=GM(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?IA(e,t,n,r):e.strategy===TM||o===i?(Gt(e,(cA<<1)+(r?1:0),3),SA(e,br,Rl)):(Gt(e,(DM<<1)+(r?1:0),3),HM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),SA(e,e.dyn_ltree,e.dyn_dtree)),xA(e),r&&EA(e)}function WM(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Ml[n]+Bl+1)*2]++,e.dyn_dtree[wA(t)*2]++),e.last_lit===e.lit_bufsize-1}fs._tr_init=jM,fs._tr_stored_block=IA,fs._tr_flush_block=qM,fs._tr_tally=WM,fs._tr_align=$M;function ZM(e,t,n,r){for(var i=e&65535|0,o=e>>>16&65535|0,s=0;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0}var BA=ZM;function YM(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var QM=YM();function XM(e,t,n,r){var i=QM,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^i[(e^t[s])&255];return e^-1}var DA=XM,Vp={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Rt=mr,un=fs,RA=BA,ii=DA,KM=Vp,ro=0,JM=1,eP=3,oi=4,FA=5,Yn=0,MA=1,cn=-2,tP=-3,jp=-5,nP=-1,rP=1,Nf=2,iP=3,oP=4,sP=0,aP=2,Of=8,lP=9,uP=15,cP=8,fP=29,hP=256,$p=hP+1+fP,dP=30,pP=19,gP=2*$p+1,mP=15,pe=3,si=258,kn=si+pe+1,bP=32,zf=42,qp=69,Uf=73,Gf=91,Hf=103,io=113,Ll=666,at=1,Nl=2,oo=3,ps=4,yP=3;function ai(e,t){return e.msg=KM[t],t}function PA(e){return(e<<1)-(e>4?9:0)}function li(e){for(var t=e.length;--t>=0;)e[t]=0}function ui(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Rt.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function yt(e,t){un._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ui(e.strm)}function Ae(e,t){e.pending_buf[e.pending++]=t}function Ol(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function wP(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,Rt.arraySet(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=RA(e.adler,t,i,n):e.state.wrap===2&&(e.adler=ii(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function LA(e,t){var n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-kn?e.strstart-(e.w_size-kn):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+si,d=l[r+s-1],p=l[r+s];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do if(i=t,!(l[i+s]!==p||l[i+s-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=si-(h-r),r=h-si,o>s){if(e.match_start=t,s=o,o>=a)break;d=l[r+s-1],p=l[r+s]}}while((t=f[t&c])>u&&--n!==0);return s<=e.lookahead?s:e.lookahead}function so(e){var t=e.w_size,n,r,i,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-kn)){Rt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);o+=t}if(e.strm.avail_in===0)break;if(r=wP(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=pe)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+pe-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<pe)););}while(e.lookahead<kn&&e.strm.avail_in!==0)}function vP(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(so(e),e.lookahead===0&&t===ro)return at;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,yt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-kn&&(yt(e,!1),e.strm.avail_out===0))return at}return e.insert=0,t===oi?(yt(e,!0),e.strm.avail_out===0?oo:ps):(e.strstart>e.block_start&&(yt(e,!1),e.strm.avail_out===0),at)}function Wp(e,t){for(var n,r;;){if(e.lookahead<kn){if(so(e),e.lookahead<kn&&t===ro)return at;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-kn&&(e.match_length=LA(e,n)),e.match_length>=pe)if(r=un._tr_tally(e,e.strstart-e.match_start,e.match_length-pe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=pe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=un._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(yt(e,!1),e.strm.avail_out===0))return at}return e.insert=e.strstart<pe-1?e.strstart:pe-1,t===oi?(yt(e,!0),e.strm.avail_out===0?oo:ps):e.last_lit&&(yt(e,!1),e.strm.avail_out===0)?at:Nl}function gs(e,t){for(var n,r,i;;){if(e.lookahead<kn){if(so(e),e.lookahead<kn&&t===ro)return at;if(e.lookahead===0)break}if(n=0,e.lookahead>=pe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=pe-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-kn&&(e.match_length=LA(e,n),e.match_length<=5&&(e.strategy===rP||e.match_length===pe&&e.strstart-e.match_start>4096)&&(e.match_length=pe-1)),e.prev_length>=pe&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-pe,r=un._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-pe),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+pe-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=pe-1,e.strstart++,r&&(yt(e,!1),e.strm.avail_out===0))return at}else if(e.match_available){if(r=un._tr_tally(e,0,e.window[e.strstart-1]),r&&yt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return at}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=un._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<pe-1?e.strstart:pe-1,t===oi?(yt(e,!0),e.strm.avail_out===0?oo:ps):e.last_lit&&(yt(e,!1),e.strm.avail_out===0)?at:Nl}function AP(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=si){if(so(e),e.lookahead<=si&&t===ro)return at;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=pe&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+si;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=si-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=pe?(n=un._tr_tally(e,1,e.match_length-pe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=un._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(yt(e,!1),e.strm.avail_out===0))return at}return e.insert=0,t===oi?(yt(e,!0),e.strm.avail_out===0?oo:ps):e.last_lit&&(yt(e,!1),e.strm.avail_out===0)?at:Nl}function xP(e,t){for(var n;;){if(e.lookahead===0&&(so(e),e.lookahead===0)){if(t===ro)return at;break}if(e.match_length=0,n=un._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(yt(e,!1),e.strm.avail_out===0))return at}return e.insert=0,t===oi?(yt(e,!0),e.strm.avail_out===0?oo:ps):e.last_lit&&(yt(e,!1),e.strm.avail_out===0)?at:Nl}function Qn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var ms;ms=[new Qn(0,0,0,0,vP),new Qn(4,4,8,4,Wp),new Qn(4,5,16,8,Wp),new Qn(4,6,32,32,Wp),new Qn(4,4,16,16,gs),new Qn(8,16,32,32,gs),new Qn(8,16,128,128,gs),new Qn(8,32,128,256,gs),new Qn(32,128,258,1024,gs),new Qn(32,258,258,4096,gs)];function EP(e){e.window_size=2*e.w_size,li(e.head),e.max_lazy_match=ms[e.level].max_lazy,e.good_match=ms[e.level].good_length,e.nice_match=ms[e.level].nice_length,e.max_chain_length=ms[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=pe-1,e.match_available=0,e.ins_h=0}function _P(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Of,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Rt.Buf16(gP*2),this.dyn_dtree=new Rt.Buf16((2*dP+1)*2),this.bl_tree=new Rt.Buf16((2*pP+1)*2),li(this.dyn_ltree),li(this.dyn_dtree),li(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Rt.Buf16(mP+1),this.heap=new Rt.Buf16(2*$p+1),li(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Rt.Buf16(2*$p+1),li(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function NA(e){var t;return!e||!e.state?ai(e,cn):(e.total_in=e.total_out=0,e.data_type=aP,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?zf:io,e.adler=t.wrap===2?0:1,t.last_flush=ro,un._tr_init(t),Yn)}function OA(e){var t=NA(e);return t===Yn&&EP(e.state),t}function SP(e,t){return!e||!e.state||e.state.wrap!==2?cn:(e.state.gzhead=t,Yn)}function zA(e,t,n,r,i,o){if(!e)return cn;var s=1;if(t===nP&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>lP||n!==Of||r<8||r>15||t<0||t>9||o<0||o>oP)return ai(e,cn);r===8&&(r=9);var a=new _P;return e.state=a,a.strm=e,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+pe-1)/pe),a.window=new Rt.Buf8(a.w_size*2),a.head=new Rt.Buf16(a.hash_size),a.prev=new Rt.Buf16(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Rt.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=t,a.strategy=o,a.method=n,OA(e)}function CP(e,t){return zA(e,t,Of,uP,cP,sP)}function kP(e,t){var n,r,i,o;if(!e||!e.state||t>FA||t<0)return e?ai(e,cn):cn;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Ll&&t!==oi)return ai(e,e.avail_out===0?jp:cn);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===zf)if(r.wrap===2)e.adler=0,Ae(r,31),Ae(r,139),Ae(r,8),r.gzhead?(Ae(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ae(r,r.gzhead.time&255),Ae(r,r.gzhead.time>>8&255),Ae(r,r.gzhead.time>>16&255),Ae(r,r.gzhead.time>>24&255),Ae(r,r.level===9?2:r.strategy>=Nf||r.level<2?4:0),Ae(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Ae(r,r.gzhead.extra.length&255),Ae(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=ii(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=qp):(Ae(r,0),Ae(r,0),Ae(r,0),Ae(r,0),Ae(r,0),Ae(r,r.level===9?2:r.strategy>=Nf||r.level<2?4:0),Ae(r,yP),r.status=io);else{var s=Of+(r.w_bits-8<<4)<<8,a=-1;r.strategy>=Nf||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,s|=a<<6,r.strstart!==0&&(s|=bP),s+=31-s%31,r.status=io,Ol(r,s),r.strstart!==0&&(Ol(r,e.adler>>>16),Ol(r,e.adler&65535)),e.adler=1}if(r.status===qp)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ii(e.adler,r.pending_buf,r.pending-i,i)),ui(e),i=r.pending,r.pending===r.pending_buf_size));)Ae(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=ii(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Uf)}else r.status=Uf;if(r.status===Uf)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ii(e.adler,r.pending_buf,r.pending-i,i)),ui(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.name.length?o=r.gzhead.name.charCodeAt(r.gzindex++)&255:o=0,Ae(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ii(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.gzindex=0,r.status=Gf)}else r.status=Gf;if(r.status===Gf)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=ii(e.adler,r.pending_buf,r.pending-i,i)),ui(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}r.gzindex<r.gzhead.comment.length?o=r.gzhead.comment.charCodeAt(r.gzindex++)&255:o=0,Ae(r,o)}while(o!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=ii(e.adler,r.pending_buf,r.pending-i,i)),o===0&&(r.status=Hf)}else r.status=Hf;if(r.status===Hf&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&ui(e),r.pending+2<=r.pending_buf_size&&(Ae(r,e.adler&255),Ae(r,e.adler>>8&255),e.adler=0,r.status=io)):r.status=io),r.pending!==0){if(ui(e),e.avail_out===0)return r.last_flush=-1,Yn}else if(e.avail_in===0&&PA(t)<=PA(n)&&t!==oi)return ai(e,jp);if(r.status===Ll&&e.avail_in!==0)return ai(e,jp);if(e.avail_in!==0||r.lookahead!==0||t!==ro&&r.status!==Ll){var u=r.strategy===Nf?xP(r,t):r.strategy===iP?AP(r,t):ms[r.level].func(r,t);if((u===oo||u===ps)&&(r.status=Ll),u===at||u===oo)return e.avail_out===0&&(r.last_flush=-1),Yn;if(u===Nl&&(t===JM?un._tr_align(r):t!==FA&&(un._tr_stored_block(r,0,0,!1),t===eP&&(li(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),ui(e),e.avail_out===0))return r.last_flush=-1,Yn}return t!==oi?Yn:r.wrap<=0?MA:(r.wrap===2?(Ae(r,e.adler&255),Ae(r,e.adler>>8&255),Ae(r,e.adler>>16&255),Ae(r,e.adler>>24&255),Ae(r,e.total_in&255),Ae(r,e.total_in>>8&255),Ae(r,e.total_in>>16&255),Ae(r,e.total_in>>24&255)):(Ol(r,e.adler>>>16),Ol(r,e.adler&65535)),ui(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Yn:MA)}function TP(e){var t;return!e||!e.state?cn:(t=e.state.status,t!==zf&&t!==qp&&t!==Uf&&t!==Gf&&t!==Hf&&t!==io&&t!==Ll?ai(e,cn):(e.state=null,t===io?ai(e,tP):Yn))}function IP(e,t){var n=t.length,r,i,o,s,a,u,l,c;if(!e||!e.state||(r=e.state,s=r.wrap,s===2||s===1&&r.status!==zf||r.lookahead))return cn;for(s===1&&(e.adler=RA(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(s===0&&(li(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new Rt.Buf8(r.w_size),Rt.arraySet(c,t,n-r.w_size,r.w_size,0),t=c,n=r.w_size),a=e.avail_in,u=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,so(r);r.lookahead>=pe;){i=r.strstart,o=r.lookahead-(pe-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+pe-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--o);r.strstart=i,r.lookahead=pe-1,so(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=pe-1,r.match_available=0,e.next_in=u,e.input=l,e.avail_in=a,r.wrap=s,Yn}Wn.deflateInit=CP,Wn.deflateInit2=zA,Wn.deflateReset=OA,Wn.deflateResetKeep=NA,Wn.deflateSetHeader=SP,Wn.deflate=kP,Wn.deflateEnd=TP,Wn.deflateSetDictionary=IP,Wn.deflateInfo="pako deflate (from Nodeca project)";var ao={},Vf=mr,UA=!0,GA=!0;try{String.fromCharCode.apply(null,[0])}catch{UA=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{GA=!1}for(var zl=new Vf.Buf8(256),ci=0;ci<256;ci++)zl[ci]=ci>=252?6:ci>=248?5:ci>=240?4:ci>=224?3:ci>=192?2:1;zl[254]=zl[254]=1,ao.string2buf=function(e){var t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Vf.Buf8(a),o=0,i=0;o<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};function HA(e,t){if(t<65534&&(e.subarray&&GA||!e.subarray&&UA))return String.fromCharCode.apply(null,Vf.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}ao.buf2binstring=function(e){return HA(e,e.length)},ao.binstring2buf=function(e){for(var t=new Vf.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},ao.buf2string=function(e,t){var n,r,i,o,s=t||e.length,a=new Array(s*2);for(r=0,n=0;n<s;){if(i=e[n++],i<128){a[r++]=i;continue}if(o=zl[i],o>4){a[r++]=65533,n+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&n<s;)i=i<<6|e[n++]&63,o--;if(o>1){a[r++]=65533;continue}i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|i&1023)}return HA(a,r)},ao.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+zl[e[n]]>t?n:t};function BP(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var VA=BP,Ul=Wn,Gl=mr,Zp=ao,Yp=Vp,DP=VA,jA=Object.prototype.toString,RP=0,Qp=4,bs=0,$A=1,qA=2,FP=-1,MP=0,PP=8;function lo(e){if(!(this instanceof lo))return new lo(e);this.options=Gl.assign({level:FP,method:PP,chunkSize:16384,windowBits:15,memLevel:8,strategy:MP,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new DP,this.strm.avail_out=0;var n=Ul.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==bs)throw new Error(Yp[n]);if(t.header&&Ul.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=Zp.string2buf(t.dictionary):jA.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ul.deflateSetDictionary(this.strm,r),n!==bs)throw new Error(Yp[n]);this._dict_set=!0}}lo.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?Qp:RP,typeof e=="string"?n.input=Zp.string2buf(e):jA.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new Gl.Buf8(r),n.next_out=0,n.avail_out=r),i=Ul.deflate(n,o),i!==$A&&i!==bs)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(o===Qp||o===qA))&&(this.options.to==="string"?this.onData(Zp.buf2binstring(Gl.shrinkBuf(n.output,n.next_out))):this.onData(Gl.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==$A);return o===Qp?(i=Ul.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===bs):(o===qA&&(this.onEnd(bs),n.avail_out=0),!0)},lo.prototype.onData=function(e){this.chunks.push(e)},lo.prototype.onEnd=function(e){e===bs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Gl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xp(e,t){var n=new lo(t);if(n.push(e,!0),n.err)throw n.msg||Yp[n.err];return n.result}function LP(e,t){return t=t||{},t.raw=!0,Xp(e,t)}function NP(e,t){return t=t||{},t.gzip=!0,Xp(e,t)}Il.Deflate=lo,Il.deflate=Xp,Il.deflateRaw=LP,Il.gzip=NP;var Hl={},Tn={},jf=30,OP=12,zP=function(t,n){var r,i,o,s,a,u,l,c,f,h,d,p,m,y,w,x,S,_,k,B,I,D,M,G,N;r=t.state,i=t.next_in,G=t.input,o=i+(t.avail_in-5),s=t.next_out,N=t.output,a=s-(n-t.avail_out),u=s+(t.avail_out-257),l=r.dmax,c=r.wsize,f=r.whave,h=r.wnext,d=r.window,p=r.hold,m=r.bits,y=r.lencode,w=r.distcode,x=(1<<r.lenbits)-1,S=(1<<r.distbits)-1;e:do{m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=y[p&x];t:for(;;){if(k=_>>>24,p>>>=k,m-=k,k=_>>>16&255,k===0)N[s++]=_&65535;else if(k&16){B=_&65535,k&=15,k&&(m<k&&(p+=G[i++]<<m,m+=8),B+=p&(1<<k)-1,p>>>=k,m-=k),m<15&&(p+=G[i++]<<m,m+=8,p+=G[i++]<<m,m+=8),_=w[p&S];n:for(;;){if(k=_>>>24,p>>>=k,m-=k,k=_>>>16&255,k&16){if(I=_&65535,k&=15,m<k&&(p+=G[i++]<<m,m+=8,m<k&&(p+=G[i++]<<m,m+=8)),I+=p&(1<<k)-1,I>l){t.msg="invalid distance too far back",r.mode=jf;break e}if(p>>>=k,m-=k,k=s-a,I>k){if(k=I-k,k>f&&r.sane){t.msg="invalid distance too far back",r.mode=jf;break e}if(D=0,M=d,h===0){if(D+=c-k,k<B){B-=k;do N[s++]=d[D++];while(--k);D=s-I,M=N}}else if(h<k){if(D+=c+h-k,k-=h,k<B){B-=k;do N[s++]=d[D++];while(--k);if(D=0,h<B){k=h,B-=k;do N[s++]=d[D++];while(--k);D=s-I,M=N}}}else if(D+=h-k,k<B){B-=k;do N[s++]=d[D++];while(--k);D=s-I,M=N}for(;B>2;)N[s++]=M[D++],N[s++]=M[D++],N[s++]=M[D++],B-=3;B&&(N[s++]=M[D++],B>1&&(N[s++]=M[D++]))}else{D=s-I;do N[s++]=N[D++],N[s++]=N[D++],N[s++]=N[D++],B-=3;while(B>2);B&&(N[s++]=N[D++],B>1&&(N[s++]=N[D++]))}}else if(k&64){t.msg="invalid distance code",r.mode=jf;break e}else{_=w[(_&65535)+(p&(1<<k)-1)];continue n}break}}else if(k&64)if(k&32){r.mode=OP;break e}else{t.msg="invalid literal/length code",r.mode=jf;break e}else{_=y[(_&65535)+(p&(1<<k)-1)];continue t}break}}while(i<o&&s<u);B=m>>3,i-=B,m-=B<<3,p&=(1<<m)-1,t.next_in=i,t.next_out=s,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=s<u?257+(u-s):257-(s-u),r.hold=p,r.bits=m},WA=mr,ys=15,ZA=852,YA=592,QA=0,Kp=1,XA=2,UP=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],GP=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],HP=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],VP=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],jP=function(t,n,r,i,o,s,a,u){var l=u.bits,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,x=0,S=0,_,k,B,I,D,M=null,G=0,N,ne=new WA.Buf16(ys+1),ie=new WA.Buf16(ys+1),he=null,me=0,Fe,xe,Le;for(c=0;c<=ys;c++)ne[c]=0;for(f=0;f<i;f++)ne[n[r+f]]++;for(p=l,d=ys;d>=1&&ne[d]===0;d--);if(p>d&&(p=d),d===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,u.bits=1,0;for(h=1;h<d&&ne[h]===0;h++);for(p<h&&(p=h),w=1,c=1;c<=ys;c++)if(w<<=1,w-=ne[c],w<0)return-1;if(w>0&&(t===QA||d!==1))return-1;for(ie[1]=0,c=1;c<ys;c++)ie[c+1]=ie[c]+ne[c];for(f=0;f<i;f++)n[r+f]!==0&&(a[ie[n[r+f]]++]=f);if(t===QA?(M=he=a,N=19):t===Kp?(M=UP,G-=257,he=GP,me-=257,N=256):(M=HP,he=VP,N=-1),S=0,f=0,c=h,D=s,m=p,y=0,B=-1,x=1<<p,I=x-1,t===Kp&&x>ZA||t===XA&&x>YA)return 1;for(;;){Fe=c-y,a[f]<N?(xe=0,Le=a[f]):a[f]>N?(xe=he[me+a[f]],Le=M[G+a[f]]):(xe=96,Le=0),_=1<<c-y,k=1<<m,h=k;do k-=_,o[D+(S>>y)+k]=Fe<<24|xe<<16|Le|0;while(k!==0);for(_=1<<c-1;S&_;)_>>=1;if(_!==0?(S&=_-1,S+=_):S=0,f++,--ne[c]===0){if(c===d)break;c=n[r+a[f]]}if(c>p&&(S&I)!==B){for(y===0&&(y=p),D+=h,m=c-y,w=1<<m;m+y<d&&(w-=ne[m+y],!(w<=0));)m++,w<<=1;if(x+=1<<m,t===Kp&&x>ZA||t===XA&&x>YA)return 1;B=S&I,o[B]=p<<24|m<<16|D-s|0}}return S!==0&&(o[D+S]=c-y<<24|64<<16|0),u.bits=p,0},Xt=mr,Jp=BA,Xn=DA,$P=zP,Vl=jP,qP=0,KA=1,JA=2,e3=4,WP=5,$f=6,uo=0,ZP=1,YP=2,fn=-2,t3=-3,n3=-4,QP=-5,r3=8,i3=1,o3=2,s3=3,a3=4,l3=5,u3=6,c3=7,f3=8,h3=9,d3=10,qf=11,yr=12,eg=13,p3=14,tg=15,g3=16,m3=17,b3=18,y3=19,Wf=20,Zf=21,w3=22,v3=23,A3=24,x3=25,E3=26,ng=27,_3=28,S3=29,Ze=30,C3=31,XP=32,KP=852,JP=592,eL=15,tL=eL;function k3(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function nL(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Xt.Buf16(320),this.work=new Xt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function T3(e){var t;return!e||!e.state?fn:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=i3,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Xt.Buf32(KP),t.distcode=t.distdyn=new Xt.Buf32(JP),t.sane=1,t.back=-1,uo)}function I3(e){var t;return!e||!e.state?fn:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,T3(e))}function B3(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?fn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,I3(e))}function D3(e,t){var n,r;return e?(r=new nL,e.state=r,r.window=null,n=B3(e,t),n!==uo&&(e.state=null),n):fn}function rL(e){return D3(e,tL)}var R3=!0,rg,ig;function iL(e){if(R3){var t;for(rg=new Xt.Buf32(512),ig=new Xt.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Vl(KA,e.lens,0,288,rg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vl(JA,e.lens,0,32,ig,0,e.work,{bits:5}),R3=!1}e.lencode=rg,e.lenbits=9,e.distcode=ig,e.distbits=5}function F3(e,t,n,r){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Xt.Buf8(o.wsize)),r>=o.wsize?(Xt.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),Xt.arraySet(o.window,t,n-r,i,o.wnext),r-=i,r?(Xt.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function oL(e,t){var n,r,i,o,s,a,u,l,c,f,h,d,p,m,y=0,w,x,S,_,k,B,I,D,M=new Xt.Buf8(4),G,N,ne=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return fn;n=e.state,n.mode===yr&&(n.mode=eg),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,f=a,h=u,D=uo;e:for(;;)switch(n.mode){case i3:if(n.wrap===0){n.mode=eg;break}for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&2&&l===35615){n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0),l=0,c=0,n.mode=o3;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ze;break}if((l&15)!==r3){e.msg="unknown compression method",n.mode=Ze;break}if(l>>>=4,c-=4,I=(l&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=Ze;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=l&512?d3:yr,l=0,c=0;break;case o3:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==r3){e.msg="unknown compression method",n.mode=Ze;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ze;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0,n.mode=s3;case s3:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Xn(n.check,M,4,0)),l=0,c=0,n.mode=a3;case a3:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0,n.mode=l3;case l3:if(n.flags&1024){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Xn(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=u3;case u3:if(n.flags&1024&&(d=n.length,d>a&&(d=a),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Xt.arraySet(n.head.extra,r,o,d,I)),n.flags&512&&(n.check=Xn(n.check,r,d,o)),a-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=c3;case c3:if(n.flags&2048){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&(n.check=Xn(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=f3;case f3:if(n.flags&4096){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&(n.check=Xn(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=h3;case h3:if(n.flags&512){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ze;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=yr;break;case d3:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}e.adler=n.check=k3(l),l=0,c=0,n.mode=qf;case qf:if(n.havedict===0)return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,YP;e.adler=n.check=1,n.mode=yr;case yr:if(t===WP||t===$f)break e;case eg:if(n.last){l>>>=c&7,c-=c&7,n.mode=ng;break}for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=p3;break;case 1:if(iL(n),n.mode=Wf,t===$f){l>>>=2,c-=2;break e}break;case 2:n.mode=m3;break;case 3:e.msg="invalid block type",n.mode=Ze}l>>>=2,c-=2;break;case p3:for(l>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ze;break}if(n.length=l&65535,l=0,c=0,n.mode=tg,t===$f)break e;case tg:n.mode=g3;case g3:if(d=n.length,d){if(d>a&&(d=a),d>u&&(d=u),d===0)break e;Xt.arraySet(i,r,o,d,s),a-=d,o+=d,u-=d,s+=d,n.length-=d;break}n.mode=yr;break;case m3:for(;c<14;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ze;break}n.have=0,n.mode=b3;case b3:for(;n.have<n.ncode;){for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.lens[ne[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[ne[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=Vl(qP,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Ze;break}n.have=0,n.mode=y3;case y3:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,x=y>>>16&255,S=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Ze;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ze;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Ze)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ze;break}if(n.lenbits=9,G={bits:n.lenbits},D=Vl(KA,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Ze;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=Vl(JA,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Ze;break}if(n.mode=Wf,t===$f)break e;case Wf:n.mode=Zf;case Zf:if(a>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,$P(e,h),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,n.mode===yr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,x=y>>>16&255,S=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(x&&!(x&240)){for(_=w,k=x,B=S;y=n.lencode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,x=y>>>16&255,S=y&65535,!(_+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,x===0){n.mode=E3;break}if(x&32){n.back=-1,n.mode=yr;break}if(x&64){e.msg="invalid literal/length code",n.mode=Ze;break}n.extra=x&15,n.mode=w3;case w3:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=v3;case v3:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,x=y>>>16&255,S=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(!(x&240)){for(_=w,k=x,B=S;y=n.distcode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,x=y>>>16&255,S=y&65535,!(_+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,x&64){e.msg="invalid distance code",n.mode=Ze;break}n.offset=S,n.extra=x&15,n.mode=A3;case A3:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ze;break}n.mode=x3;case x3:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ze;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=s-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[s++]=m[p++];while(--d);n.length===0&&(n.mode=Zf);break;case E3:if(u===0)break e;i[s++]=n.length,u--,n.mode=Zf;break;case ng:if(n.wrap){for(;c<32;){if(a===0)break e;a--,l|=r[o++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,s-h):Jp(n.check,i,h,s-h)),h=u,(n.flags?l:k3(l))!==n.check){e.msg="incorrect data check",n.mode=Ze;break}l=0,c=0}n.mode=_3;case _3:if(n.wrap&&n.flags){for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ze;break}l=0,c=0}n.mode=S3;case S3:D=ZP;break e;case Ze:D=t3;break e;case C3:return n3;case XP:default:return fn}return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Ze&&(n.mode<ng||t!==e3))&&F3(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&&h&&(e.adler=n.check=n.flags?Xn(n.check,i,h,e.next_out-h):Jp(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===yr?128:0)+(n.mode===Wf||n.mode===tg?256:0),(f===0&&h===0||t===e3)&&D===uo&&(D=QP),D}function sL(e){if(!e||!e.state)return fn;var t=e.state;return t.window&&(t.window=null),e.state=null,uo}function aL(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?fn:(n.head=t,t.done=!1,uo)}function lL(e,t){var n=t.length,r,i,o;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==qf)?fn:r.mode===qf&&(i=1,i=Jp(i,t,n,0),i!==r.check)?t3:(o=F3(e,t,n,n),o?(r.mode=C3,n3):(r.havedict=1,uo))}Tn.inflateReset=I3,Tn.inflateReset2=B3,Tn.inflateResetKeep=T3,Tn.inflateInit=rL,Tn.inflateInit2=D3,Tn.inflate=oL,Tn.inflateEnd=sL,Tn.inflateGetHeader=aL,Tn.inflateSetDictionary=lL,Tn.inflateInfo="pako inflate (from Nodeca project)";var M3={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};function uL(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var cL=uL,ws=Tn,jl=mr,Yf=ao,tt=M3,og=Vp,fL=VA,hL=cL,P3=Object.prototype.toString;function co(e){if(!(this instanceof co))return new co(e);this.options=jl.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new fL,this.strm.avail_out=0;var n=ws.inflateInit2(this.strm,t.windowBits);if(n!==tt.Z_OK)throw new Error(og[n]);if(this.header=new hL,ws.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Yf.string2buf(t.dictionary):P3.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ws.inflateSetDictionary(this.strm,t.dictionary),n!==tt.Z_OK)))throw new Error(og[n])}co.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,s,a,u,l,c=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?tt.Z_FINISH:tt.Z_NO_FLUSH,typeof e=="string"?n.input=Yf.binstring2buf(e):P3.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new jl.Buf8(r),n.next_out=0,n.avail_out=r),o=ws.inflate(n,tt.Z_NO_FLUSH),o===tt.Z_NEED_DICT&&i&&(o=ws.inflateSetDictionary(this.strm,i)),o===tt.Z_BUF_ERROR&&c===!0&&(o=tt.Z_OK,c=!1),o!==tt.Z_STREAM_END&&o!==tt.Z_OK)return this.onEnd(o),this.ended=!0,!1;n.next_out&&(n.avail_out===0||o===tt.Z_STREAM_END||n.avail_in===0&&(s===tt.Z_FINISH||s===tt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=Yf.utf8border(n.output,n.next_out),u=n.next_out-a,l=Yf.buf2string(n.output,a),n.next_out=u,n.avail_out=r-u,u&&jl.arraySet(n.output,n.output,a,u,0),this.onData(l)):this.onData(jl.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(c=!0)}while((n.avail_in>0||n.avail_out===0)&&o!==tt.Z_STREAM_END);return o===tt.Z_STREAM_END&&(s=tt.Z_FINISH),s===tt.Z_FINISH?(o=ws.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===tt.Z_OK):(s===tt.Z_SYNC_FLUSH&&(this.onEnd(tt.Z_OK),n.avail_out=0),!0)},co.prototype.onData=function(e){this.chunks.push(e)},co.prototype.onEnd=function(e){e===tt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=jl.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function sg(e,t){var n=new co(t);if(n.push(e,!0),n.err)throw n.msg||og[n.err];return n.result}function dL(e,t){return t=t||{},t.raw=!0,sg(e,t)}Hl.Inflate=co,Hl.inflate=sg,Hl.inflateRaw=dL,Hl.ungzip=sg;var pL=mr.assign,gL=Il,mL=Hl,bL=M3,L3={};pL(L3,gL,mL,bL);var Qf=L3;async function fi(e){try{let t,n=0,r=0;const i=[];let o=0,s;do{const u=e.subarray(n);if(s=new Qf.Inflate,{strm:t}=s,s.push(u,Qf.Z_SYNC_FLUSH),s.err)throw new Error(s.msg);n+=t.next_in,i[r]=s.result,o+=i[r].length,r+=1}while(t.avail_in);const a=new Uint8Array(o);for(let u=0,l=0;u<i.length;u++)a.set(i[u],l),l+=i[u].length;return ve.Buffer.from(a)}catch(t){throw`${t}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function N3(e,t){try{let n;const{minv:r,maxv:i}=t;let o=r.blockPosition,s=r.dataPosition;const a=[],u=[],l=[];let c=0,f=0;do{const p=e.subarray(o-r.blockPosition),m=new Qf.Inflate;if({strm:n}=m,m.push(p,Qf.Z_SYNC_FLUSH),m.err)throw new Error(m.msg);const y=m.result;a.push(y);let w=y.length;u.push(o),l.push(s),a.length===1&&r.dataPosition&&(a[0]=a[0].subarray(r.dataPosition),w=a[0].length);const x=o;if(o+=n.next_in,s+=w,x>=i.blockPosition){a[f]=a[f].subarray(0,i.blockPosition===r.blockPosition?i.dataPosition-r.dataPosition+1:i.dataPosition+1),u.push(o),l.push(s),c+=a[f].length;break}c+=a[f].length,f++}while(n.avail_in);const h=new Uint8Array(c);for(let p=0,m=0;p<a.length;p++)h.set(a[p],m),m+=a[p].length;return{buffer:ve.Buffer.from(h),cpositions:u,dpositions:l}}catch(n){throw`${n}`.match(/incorrect header check/)?new Error("problem decompressing block: incorrect gzip header check"):n}}var yL=Ge,hn=null;try{hn=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Ge(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Ge.prototype.__isLong__,Object.defineProperty(Ge.prototype,"__isLong__",{value:!0});function Ht(e){return(e&&e.__isLong__)===!0}Ge.isLong=Ht;var O3={},z3={};function fo(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=z3[e],r)?r:(n=He(e,(e|0)<0?-1:0,!0),i&&(z3[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=O3[e],r)?r:(n=He(e,e<0?-1:0,!1),i&&(O3[e]=n),n))}Ge.fromInt=fo;function dn(e,t){if(isNaN(e))return t?ho:pn;if(t){if(e<0)return ho;if(e>=G3)return q3}else{if(e<=-H3)return Vt;if(e+1>=H3)return $3}return e<0?dn(-e,t).neg():He(e%vs|0,e/vs|0,t)}Ge.fromNumber=dn;function He(e,t,n){return new Ge(e,t,n)}Ge.fromBits=He;var Xf=Math.pow;function ag(e,t,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return pn;if(typeof t=="number"?(n=t,t=!1):t=!!t,n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return ag(e.substring(1),t,n).neg();for(var i=dn(Xf(n,8)),o=pn,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),u=parseInt(e.substring(s,s+a),n);if(a<8){var l=dn(Xf(n,a));o=o.mul(l).add(dn(u))}else o=o.mul(i),o=o.add(dn(u))}return o.unsigned=t,o}Ge.fromString=ag;function In(e,t){return typeof e=="number"?dn(e,t):typeof e=="string"?ag(e,t):He(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Ge.fromValue=In;var U3=65536,wL=1<<24,vs=U3*U3,G3=vs*vs,H3=G3/2,V3=fo(wL),pn=fo(0);Ge.ZERO=pn;var ho=fo(0,!0);Ge.UZERO=ho;var As=fo(1);Ge.ONE=As;var j3=fo(1,!0);Ge.UONE=j3;var lg=fo(-1);Ge.NEG_ONE=lg;var $3=He(-1,2147483647,!1);Ge.MAX_VALUE=$3;var q3=He(-1,-1,!0);Ge.MAX_UNSIGNED_VALUE=q3;var Vt=He(0,-2147483648,!1);Ge.MIN_VALUE=Vt;var Q=Ge.prototype;Q.toInt=function(){return this.unsigned?this.low>>>0:this.low},Q.toNumber=function(){return this.unsigned?(this.high>>>0)*vs+(this.low>>>0):this.high*vs+(this.low>>>0)},Q.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(Vt)){var n=dn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=dn(Xf(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),l=s.sub(u.mul(o)).toInt()>>>0,c=l.toString(t);if(s=u,s.isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},Q.getHighBits=function(){return this.high},Q.getHighBitsUnsigned=function(){return this.high>>>0},Q.getLowBits=function(){return this.low},Q.getLowBitsUnsigned=function(){return this.low>>>0},Q.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Vt)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1},Q.isZero=function(){return this.high===0&&this.low===0},Q.eqz=Q.isZero,Q.isNegative=function(){return!this.unsigned&&this.high<0},Q.isPositive=function(){return this.unsigned||this.high>=0},Q.isOdd=function(){return(this.low&1)===1},Q.isEven=function(){return(this.low&1)===0},Q.equals=function(t){return Ht(t)||(t=In(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low},Q.eq=Q.equals,Q.notEquals=function(t){return!this.eq(t)},Q.neq=Q.notEquals,Q.ne=Q.notEquals,Q.lessThan=function(t){return this.comp(t)<0},Q.lt=Q.lessThan,Q.lessThanOrEqual=function(t){return this.comp(t)<=0},Q.lte=Q.lessThanOrEqual,Q.le=Q.lessThanOrEqual,Q.greaterThan=function(t){return this.comp(t)>0},Q.gt=Q.greaterThan,Q.greaterThanOrEqual=function(t){return this.comp(t)>=0},Q.gte=Q.greaterThanOrEqual,Q.ge=Q.greaterThanOrEqual,Q.compare=function(t){if(Ht(t)||(t=In(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},Q.comp=Q.compare,Q.negate=function(){return!this.unsigned&&this.eq(Vt)?Vt:this.not().add(As)},Q.neg=Q.negate,Q.add=function(t){Ht(t)||(t=In(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,o=this.low&65535,s=t.high>>>16,a=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,f=0,h=0,d=0;return d+=o+l,h+=d>>>16,d&=65535,h+=i+u,f+=h>>>16,h&=65535,f+=r+a,c+=f>>>16,f&=65535,c+=n+s,c&=65535,He(h<<16|d,c<<16|f,this.unsigned)},Q.subtract=function(t){return Ht(t)||(t=In(t)),this.add(t.neg())},Q.sub=Q.subtract,Q.multiply=function(t){if(this.isZero())return pn;if(Ht(t)||(t=In(t)),hn){var n=hn.mul(this.low,this.high,t.low,t.high);return He(n,hn.get_high(),this.unsigned)}if(t.isZero())return pn;if(this.eq(Vt))return t.isOdd()?Vt:pn;if(t.eq(Vt))return this.isOdd()?Vt:pn;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(V3)&&t.lt(V3))return dn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,o=this.low>>>16,s=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,f=0,h=0,d=0,p=0;return p+=s*c,d+=p>>>16,p&=65535,d+=o*c,h+=d>>>16,d&=65535,d+=s*l,h+=d>>>16,d&=65535,h+=i*c,f+=h>>>16,h&=65535,h+=o*l,f+=h>>>16,h&=65535,h+=s*u,f+=h>>>16,h&=65535,f+=r*c+i*l+o*u+s*a,f&=65535,He(d<<16|p,f<<16|h,this.unsigned)},Q.mul=Q.multiply,Q.divide=function(t){if(Ht(t)||(t=In(t)),t.isZero())throw Error("division by zero");if(hn){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?hn.div_u:hn.div_s)(this.low,this.high,t.low,t.high);return He(n,hn.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?ho:pn;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return ho;if(t.gt(this.shru(1)))return j3;o=ho}else{if(this.eq(Vt)){if(t.eq(As)||t.eq(lg))return Vt;if(t.eq(Vt))return As;var s=this.shr(1);return r=s.div(t).shl(1),r.eq(pn)?t.isNegative()?As:lg:(i=this.sub(t.mul(r)),o=r.add(i.div(t)),o)}else if(t.eq(Vt))return this.unsigned?ho:pn;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=pn}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:Xf(2,a-48),l=dn(r),c=l.mul(t);c.isNegative()||c.gt(i);)r-=u,l=dn(r,this.unsigned),c=l.mul(t);l.isZero()&&(l=As),o=o.add(l),i=i.sub(c)}return o},Q.div=Q.divide,Q.modulo=function(t){if(Ht(t)||(t=In(t)),hn){var n=(this.unsigned?hn.rem_u:hn.rem_s)(this.low,this.high,t.low,t.high);return He(n,hn.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},Q.mod=Q.modulo,Q.rem=Q.modulo,Q.not=function(){return He(~this.low,~this.high,this.unsigned)},Q.and=function(t){return Ht(t)||(t=In(t)),He(this.low&t.low,this.high&t.high,this.unsigned)},Q.or=function(t){return Ht(t)||(t=In(t)),He(this.low|t.low,this.high|t.high,this.unsigned)},Q.xor=function(t){return Ht(t)||(t=In(t)),He(this.low^t.low,this.high^t.high,this.unsigned)},Q.shiftLeft=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?He(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):He(0,this.low<<t-32,this.unsigned)},Q.shl=Q.shiftLeft,Q.shiftRight=function(t){return Ht(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?He(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):He(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},Q.shr=Q.shiftRight,Q.shiftRightUnsigned=function(t){if(Ht(t)&&(t=t.toInt()),t&=63,t===0)return this;var n=this.high;if(t<32){var r=this.low;return He(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?He(n,0,this.unsigned):He(n>>>t-32,0,this.unsigned)},Q.shru=Q.shiftRightUnsigned,Q.shr_u=Q.shiftRightUnsigned,Q.toSigned=function(){return this.unsigned?He(this.low,this.high,!1):this},Q.toUnsigned=function(){return this.unsigned?this:He(this.low,this.high,!0)},Q.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},Q.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]},Q.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]},Ge.fromBytes=function(t,n,r){return r?Ge.fromBytesLE(t,n):Ge.fromBytesBE(t,n)},Ge.fromBytesLE=function(t,n){return new Ge(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)},Ge.fromBytesBE=function(t,n){return new Ge(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};const Kf=Ff(yL),Jf=1;class vL{constructor({filehandle:t,path:n}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(t,n=0,r=!0){const i=Kf.fromBytesLE(t.slice(n,n+8),r);if(i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return i.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let t=ve.Buffer.allocUnsafe(8);await this.filehandle.read(t,0,8,0);const n=this._readLongWithOverflow(t,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const i=8*2*n;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");t=ve.Buffer.allocUnsafe(i),await this.filehandle.read(t,0,i,8);for(let o=0;o<n;o+=1){const s=this._readLongWithOverflow(t,o*16),a=this._readLongWithOverflow(t,o*16+8);r[o+1]=[s,a]}return r}async getLastBlock(){const t=await this._getIndex();if(t.length)return t[t.length-1]}async getRelevantBlocksForRead(t,n){const r=n+t;if(t===0)return[];const i=await this._getIndex(),o=[],s=(h,d)=>{const p=h[Jf],m=d?d[Jf]:1/0;return p<=n&&m>n?0:p<n?-1:1};let a=0,u=i.length-1,l=Math.floor(i.length/2),c=s(i[l],i[l+1]);for(;c!==0;)c>0?u=l-1:c<0&&(a=l+1),l=Math.ceil((u-a)/2)+a,c=s(i[l],i[l+1]);o.push(i[l]);let f=l+1;for(;f<i.length&&(o.push(i[f]),!(i[f][Jf]>=r));f+=1);return o[o.length-1][Jf]<r&&o.push([]),o}}class W3{constructor({filehandle:t,path:n,gziFilehandle:r,gziPath:i}){if(t)this.filehandle=t;else if(n)this.filehandle=new dt(n);else throw new TypeError("either filehandle or path must be defined");if(!r&&!i&&!n)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new vL({filehandle:r,path:!r&&!i&&n?i:`${n}.gzi`})}async stat(){const t=await this.filehandle.stat();return Object.assign(t,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,t]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=ve.Buffer.allocUnsafe(4),{bytesRead:i}=await this.filehandle.read(r,0,4,n-28-4);if(i!==4)throw new Error("read error");const o=r.readUInt32LE(0);return t+o}async _readAndUncompressBlock(t,[n],[r]){let i=r;i||(i=(await this.filehandle.stat()).size);const o=i-n;return await this.filehandle.read(t,0,o,n),await fi(t.slice(0,o))}async read(t,n,r,i){const o=await this.gzi.getRelevantBlocksForRead(r,i),s=ve.Buffer.allocUnsafe(32768*2);let a=n,u=0;for(let l=0;l<o.length-1;l+=1){const c=await this._readAndUncompressBlock(s,o[l],o[l+1]),[,f]=o[l],h=f>=i?0:i-f,d=Math.min(i+r,f+c.length)-f;h>=0&&h<c.length&&(c.copy(t,a,h,d),a+=d-h,u+=d-h)}return{bytesRead:u,buffer:t}}}function Z3(e,t){return e.offset+e.lineBytes*Math.floor(t/e.lineLength)+t%e.lineLength}async function AL(e,t){const n=await e.readFile(t);if(!(n&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,i;const o=n.toString("utf8").split(/\r?\n/).filter(s=>/\S/.test(s)).map(s=>s.split(" ")).filter(s=>s[0]!=="").map(s=>((!i||i.name!==s[0])&&(i={name:s[0],id:r},r+=1),{id:i.id,name:s[0],length:+s[1],start:0,end:+s[1],offset:+s[2],lineLength:+s[3],lineBytes:+s[4]}));return{name:Object.fromEntries(o.map(s=>[s.name,s])),id:Object.fromEntries(o.map(s=>[s.id,s]))}}class Y3{constructor({fasta:t,fai:n,path:r,faiPath:i}){if(t)this.fasta=t;else if(r)this.fasta=new dt(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(i)this.fai=new dt(i);else if(r)this.fai=new dt(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(t){return this.indexes||(this.indexes=AL(this.fai,t)),this.indexes}async getSequenceNames(t){return Object.keys((await this._getIndexes(t)).name)}async getSequenceSizes(t){const n={},r=await this._getIndexes(t),i=Object.values(r.id);for(let o=0;o<i.length;o+=1)n[i[o].name]=i[o].length;return n}async getSequenceSize(t,n){var r;return(r=(await this._getIndexes(n)).name[t])===null||r===void 0?void 0:r.length}async hasReferenceSequence(t,n){return!!(await this._getIndexes(n)).name[t]}async getResiduesById(t,n,r,i){const o=(await this._getIndexes(i)).id[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getResiduesByName(t,n,r,i){const o=(await this._getIndexes(i)).name[t];if(o)return this._fetchFromIndexEntry(o,n,r,i)}async getSequence(t,n,r,i){return this.getResiduesByName(t,n,r,i)}async _fetchFromIndexEntry(t,n=0,r,i){let o=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((o===void 0||o>t.length)&&(o=t.length),n>=o)return"";const s=Z3(t,n),a=Z3(t,o)-s,u=Buffer.allocUnsafe(a);return await this.fasta.read(u,0,a,s,i),u.toString("utf8").replace(/\s+/g,"")}}class xL extends Y3{constructor({fasta:t,path:n,fai:r,faiPath:i,gzi:o,gziPath:s}){super({fasta:t,path:n,fai:r,faiPath:i}),t&&o?this.fasta=new W3({filehandle:t,gziFilehandle:o}):n&&s&&(this.fasta=new W3({path:n,gziPath:s}))}}function Q3(e){return e.split(">").filter(t=>/\S/.test(t)).map(t=>{const[n,...r]=t.split(`
605
+ `),[i,...o]=n.split(" "),s=r.join("").replace(/\s/g,"");return{id:i,description:o.join(" "),sequence:s}})}class EL{constructor({fasta:t,path:n}){if(t)this.fasta=t;else if(n)this.fasta=new dt(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const i=r.toString("utf8");return Q3(i)})}async fetch(t,n,r){const o=(await this.data).find(a=>a.id===t),s=r-n;if(!o)throw new Error(`no sequence with id ${t} exists`);return o.sequence.substr(n,s)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const _L=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:xL,FetchableSmallFasta:EL,IndexedFasta:Y3,parseSmallFasta:Q3},Symbol.toStringTag,{value:"Module"})),eh=BigInt(32);function SL(e,t,n){const r=+!!n,i=+!n;return BigInt(e.getInt32(t,n)*i+e.getInt32(t+4,n)*r)<<eh|BigInt(e.getUint32(t,n)*r+e.getUint32(t+4,n)*i)}function CL(e,t,n){const r=e.getUint32(t,n),i=e.getUint32(t+4,n),o=+!!n,s=+!n;return BigInt(r*s+i*o)<<eh|BigInt(r*o+i*s)}function kL(e,t,n,r){const i=Number(n>>eh),o=Number(n&BigInt(4294967295));r?(e.setInt32(t+4,i,r),e.setUint32(t,o,r)):(e.setInt32(t,i,r),e.setUint32(t+4,o,r))}function TL(e,t,n,r){const i=Number(n>>eh),o=Number(n&BigInt(4294967295));r?(e.setUint32(t+4,i,r),e.setUint32(t,o,r)):(e.setUint32(t,i,r),e.setUint32(t+4,o,r))}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return SL(this,e,t)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(e,t){return CL(this,e,t)}),"setBigInt64"in DataView||(DataView.prototype.setBigInt64=function(e,t,n){kL(this,e,t,n)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,n){TL(this,e,t,n)});class IL{constructor(t,n){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=n}generateVariable(t){const n=[...this.scopes[this.scopes.length-1]];return t&&n.push(t),n.join(".")}generateOption(t){switch(typeof t){case"number":return t.toString();case"string":return this.generateVariable(t);case"function":return`${this.addImport(t)}.call(${this.generateVariable()}, vars)`}}generateError(t){this.pushCode(`throw new Error(${t});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(t){this.code+=t+`
606
+ `}pushPath(t){t&&this.scopes[this.scopes.length-1].push(t)}popPath(t){t&&this.scopes[this.scopes.length-1].pop()}pushScope(t){this.scopes.push([t])}popScope(){this.scopes.pop()}addImport(t){if(!this.importPath)return`(${t})`;let n=this.reverseImports.get(t);return n||(n=this.imports.push(t)-1,this.reverseImports.set(t,n)),`${this.importPath}[${n}]`}addReference(t){this.references.has(t)||this.references.set(t,{resolved:!1,requested:!1})}markResolved(t){const n=this.references.get(t);n&&(n.resolved=!0)}markRequested(t){t.forEach(n=>{const r=this.references.get(n);r&&(r.requested=!0)})}getUnresolvedReferences(){return Array.from(this.references).filter(([t,n])=>!n.resolved&&!n.requested).map(([t,n])=>t)}}const Bn=new Map,po="___parser_",Dn={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},th={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},nh={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};let Re=class Pn{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new Pn}primitiveGenerateN(t,n){const r=th[t],i=nh[t];n.pushCode(`${n.generateVariable(this.varName)} = dataView.get${r}(offset, ${i});`),n.pushCode(`offset += ${Dn[t]};`)}primitiveN(t,n,r){return this.setNextParser(t,n,r)}useThisEndian(t){return t+this.endian.toLowerCase()}uint8(t,n={}){return this.primitiveN("uint8",t,n)}uint16(t,n={}){return this.primitiveN(this.useThisEndian("uint16"),t,n)}uint16le(t,n={}){return this.primitiveN("uint16le",t,n)}uint16be(t,n={}){return this.primitiveN("uint16be",t,n)}uint32(t,n={}){return this.primitiveN(this.useThisEndian("uint32"),t,n)}uint32le(t,n={}){return this.primitiveN("uint32le",t,n)}uint32be(t,n={}){return this.primitiveN("uint32be",t,n)}int8(t,n={}){return this.primitiveN("int8",t,n)}int16(t,n={}){return this.primitiveN(this.useThisEndian("int16"),t,n)}int16le(t,n={}){return this.primitiveN("int16le",t,n)}int16be(t,n={}){return this.primitiveN("int16be",t,n)}int32(t,n={}){return this.primitiveN(this.useThisEndian("int32"),t,n)}int32le(t,n={}){return this.primitiveN("int32le",t,n)}int32be(t,n={}){return this.primitiveN("int32be",t,n)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),t,n)}int64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",t,n)}int64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",t,n)}uint64(t,n={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),t,n)}uint64be(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",t,n)}uint64le(t,n={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",t,n)}floatle(t,n={}){return this.primitiveN("floatle",t,n)}floatbe(t,n={}){return this.primitiveN("floatbe",t,n)}doublele(t,n={}){return this.primitiveN("doublele",t,n)}doublebe(t,n={}){return this.primitiveN("doublebe",t,n)}bitN(t,n,r){return r.length=t,this.setNextParser("bit",n,r)}bit1(t,n={}){return this.bitN(1,t,n)}bit2(t,n={}){return this.bitN(2,t,n)}bit3(t,n={}){return this.bitN(3,t,n)}bit4(t,n={}){return this.bitN(4,t,n)}bit5(t,n={}){return this.bitN(5,t,n)}bit6(t,n={}){return this.bitN(6,t,n)}bit7(t,n={}){return this.bitN(7,t,n)}bit8(t,n={}){return this.bitN(8,t,n)}bit9(t,n={}){return this.bitN(9,t,n)}bit10(t,n={}){return this.bitN(10,t,n)}bit11(t,n={}){return this.bitN(11,t,n)}bit12(t,n={}){return this.bitN(12,t,n)}bit13(t,n={}){return this.bitN(13,t,n)}bit14(t,n={}){return this.bitN(14,t,n)}bit15(t,n={}){return this.bitN(15,t,n)}bit16(t,n={}){return this.bitN(16,t,n)}bit17(t,n={}){return this.bitN(17,t,n)}bit18(t,n={}){return this.bitN(18,t,n)}bit19(t,n={}){return this.bitN(19,t,n)}bit20(t,n={}){return this.bitN(20,t,n)}bit21(t,n={}){return this.bitN(21,t,n)}bit22(t,n={}){return this.bitN(22,t,n)}bit23(t,n={}){return this.bitN(23,t,n)}bit24(t,n={}){return this.bitN(24,t,n)}bit25(t,n={}){return this.bitN(25,t,n)}bit26(t,n={}){return this.bitN(26,t,n)}bit27(t,n={}){return this.bitN(27,t,n)}bit28(t,n={}){return this.bitN(28,t,n)}bit29(t,n={}){return this.bitN(29,t,n)}bit30(t,n={}){return this.bitN(30,t,n)}bit31(t,n={}){return this.bitN(31,t,n)}bit32(t,n={}){return this.bitN(32,t,n)}namely(t){return Bn.set(t,this),this.alias=t,this}skip(t,n={}){return this.seek(t,n)}seek(t,n={}){if(n.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:t})}string(t,n){if(!n.zeroTerminated&&!n.length&&!n.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((n.zeroTerminated||n.length)&&n.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(n.stripNull&&!(n.length||n.greedy))throw new Error("length or greedy must be defined if stripNull is enabled.");return n.encoding=n.encoding||"utf8",this.setNextParser("string",t,n)}buffer(t,n){if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",t,n)}wrapped(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.wrapper||!n.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!n.length&&!n.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",t,n)}array(t,n){if(!n.readUntil&&!n.length&&!n.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!n.type)throw new Error("type is required for array.");if(typeof n.type=="string"&&!Bn.has(n.type)&&!(n.type in Dn))throw new Error(`Array element type "${n.type}" is unkown.`);return this.setNextParser("array",t,n)}choice(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n)throw new Error("tag and choices are are required for choice.");if(!n.tag)throw new Error("tag is requird for choice.");if(!n.choices)throw new Error("choices is required for choice.");for(const r in n.choices){const i=parseInt(r,10),o=n.choices[i];if(isNaN(i))throw new Error(`Choice key "${r}" is not a number.`);if(typeof o=="string"&&!Bn.has(o)&&!(o in Dn))throw new Error(`Choice type "${o}" is unkown.`)}return this.setNextParser("choice",t,n)}nest(t,n){if(typeof n!="object"&&typeof t=="object"&&(n=t,t=""),!n||!n.type)throw new Error("type is required for nest.");if(!(n.type instanceof Pn)&&!Bn.has(n.type))throw new Error("type must be a known parser name or a Parser object.");if(!(n.type instanceof Pn)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,n)}pointer(t,n){if(!n.offset)throw new Error("offset is required for pointer.");if(!n.type)throw new Error("type is required for pointer.");if(typeof n.type=="string"&&!(n.type in Dn)&&!Bn.has(n.type))throw new Error(`Pointer type "${n.type}" is unkown.`);return this.setNextParser("pointer",t,n)}saveOffset(t,n={}){return this.setNextParser("saveOffset",t,n)}endianness(t){switch(t.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(t){return this.endianness(t)}useContextVars(t=!0){return this.useContextVariables=t,this}create(t){if(!(t instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=t,this}getContext(t){const n=new IL(t,this.useContextVariables);return n.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(n),n.pushCode(`return ${po+this.alias}(0).result;`)):this.addRawCode(n),n}getCode(){return this.getContext("imports").code}addRawCode(t){t.pushCode("var offset = 0;"),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("vars.$parent = null;"),t.pushCode("vars.$root = vars;"),this.generate(t),this.resolveReferences(t),t.pushCode("delete vars.$parent;"),t.pushCode("delete vars.$root;"),t.pushCode("return vars;")}addAliasedCode(t){return t.pushCode(`function ${po+this.alias}(offset, context) {`),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),t.pushCode("vars = Object.assign(vars, ctx);"),this.generate(t),t.markResolved(this.alias),this.resolveReferences(t),t.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),t.pushCode("return { offset: offset, result: vars };"),t.pushCode("}"),t}resolveReferences(t){const n=t.getUnresolvedReferences();t.markRequested(n),n.forEach(r=>{var i;(i=Bn.get(r))===null||i===void 0||i.addAliasedCode(t)})}compile(){const t="imports",n=this.getContext(t);this.compiled=new Function(t,"TextDecoder",`return function (buffer, constructorFn) { ${n.code} };`)(n.imports,TextDecoder)}sizeOf(){let t=NaN;if(Object.keys(Dn).indexOf(this.type)>=0)t=Dn[this.type];else if(this.type==="string"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="buffer"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="array"&&typeof this.options.length=="number"){let n=NaN;typeof this.options.type=="string"?n=Dn[this.options.type]:this.options.type instanceof Pn&&(n=this.options.type.sizeOf()),t=this.options.length*n}else this.type==="seek"?t=this.options.length:this.type==="nest"?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}parse(t){return this.compiled||this.compile(),this.compiled(t,this.constructorFn)}setNextParser(t,n,r){const i=new Pn;return i.type=t,i.varName=n,i.options=r,i.endian=this.endian,this.head?this.head.next=i:this.next=i,this.head=i,this}generate(t){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,t);break;case"bit":this.generateBit(t);break;case"string":this.generateString(t);break;case"buffer":this.generateBuffer(t);break;case"seek":this.generateSeek(t);break;case"nest":this.generateNest(t);break;case"array":this.generateArray(t);break;case"choice":this.generateChoice(t);break;case"pointer":this.generatePointer(t);break;case"saveOffset":this.generateSaveOffset(t);break;case"wrapper":this.generateWrapper(t);break}this.type!=="bit"&&this.generateAssert(t)}const n=t.generateVariable(this.varName);return this.options.formatter&&this.type!=="bit"&&this.generateFormatter(t,n,this.options.formatter),this.generateNext(t)}generateAssert(t){if(!this.options.assert)return;const n=t.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=t.addImport(this.options.assert);t.pushCode(`if (!${r}.call(vars, ${n})) {`)}break;case"number":t.pushCode(`if (${this.options.assert} !== ${n}) {`);break;case"string":t.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${n}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}t.generateError(`"Assertion error: ${n} is " + ${JSON.stringify(this.options.assert.toString())}`),t.pushCode("}")}generateNext(t){return this.next&&(t=this.next.generate(t)),t}generateBit(t){const n=JSON.parse(JSON.stringify(this));if(n.options=this.options,n.generateAssert=this.generateAssert.bind(this),n.generateFormatter=this.generateFormatter.bind(this),n.varName=t.generateVariable(n.varName),t.bitFields.push(n),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const r=t.generateTmpVariable();t.pushCode(`var ${r} = 0;`);const i=(c=0)=>{let f=0;for(let h=c;h<t.bitFields.length;h++){const d=t.bitFields[h].options.length;if(f+d>32)break;f+=d}return f},o=c=>(c<=8?(t.pushCode(`${r} = dataView.getUint8(offset);`),c=8):c<=16?(t.pushCode(`${r} = dataView.getUint16(offset);`),c=16):c<=24?(t.pushCode(`${r} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),c=24):(t.pushCode(`${r} = dataView.getUint32(offset);`),c=32),t.pushCode(`offset += ${c/8};`),c);let s=0;const a=this.endian==="be";let u=0,l=0;t.bitFields.forEach((c,f)=>{let h=c.options.length;if(h>l){if(l){const m=-1>>>32-l;t.pushCode(`${c.varName} = (${r} & 0x${m.toString(16)}) << ${h-l};`),h-=l}s=0,l=u=o(i(f)-l)}const d=a?u-s-h:s,p=-1>>>32-h;t.pushCode(`${c.varName} ${h<c.options.length?"|=":"="} ${r} >> ${d} & 0x${p.toString(16)};`),c.options.length===32&&t.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(t),c.options.formatter&&c.generateFormatter(t,c.varName,c.options.formatter),s+=h,l-=h}),t.bitFields=[]}}generateSeek(t){const n=t.generateOption(this.options.length);t.pushCode(`offset += ${n};`)}generateString(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable(),i=this.options.encoding,o=i.toLowerCase()==="hex",s='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const a=this.options.length;t.pushCode(`var ${r} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${a});`);const u=`offset - ${r} < ${a} ? offset - 1 : offset`;t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, ${u}), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const a=t.generateOption(this.options.length);t.pushCode(o?`${n} = Array.from(buffer.subarray(offset, offset + ${a}), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(offset, offset + ${a}));`),t.pushCode(`offset += ${a};`)}else this.options.zeroTerminated?(t.pushCode(`var ${r} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, offset - 1), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${r} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(o?`${n} = Array.from(buffer.subarray(${r}, offset), ${s}).join('');`:`${n} = new TextDecoder('${i}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&t.pushCode(`${n} = ${n}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const n=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const r=this.options.readUntil,i=t.generateTmpVariable(),o=t.generateTmpVariable();t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${o} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${o} = dataView.getUint8(offset);`);const s=t.addImport(r);t.pushCode(`if (${s}.call(${t.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${i}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const r=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${r});`),t.pushCode(`offset += ${r};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`)}generateArray(t){const n=t.generateOption(this.options.length),r=t.generateOption(this.options.lengthInBytes),i=this.options.type,o=t.generateTmpVariable(),s=t.generateVariable(this.varName),a=t.generateTmpVariable(),u=this.options.key,l=typeof u=="string";if(l?t.pushCode(`${s} = {};`):t.pushCode(`${s} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):r!==void 0?t.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):t.pushCode(`for (var ${o} = ${n}; ${o} > 0; ${o}--) {`),typeof i=="string")if(Bn.get(i)){const c=t.generateTmpVariable();if(t.pushCode(`var ${c} = ${po+i}(offset, {`),t.useContextVariables){const f=t.generateVariable();t.pushCode(`$parent: ${f},`),t.pushCode(`$root: ${f}.$root,`),!this.options.readUntil&&r===void 0&&t.pushCode(`$index: ${n} - ${o},`)}t.pushCode("});"),t.pushCode(`var ${a} = ${c}.result; offset = ${c}.offset;`),i!==this.alias&&t.addReference(i)}else{const c=th[i],f=nh[i];t.pushCode(`var ${a} = dataView.get${c}(offset, ${f});`),t.pushCode(`offset += ${Dn[i]};`)}else if(i instanceof Pn){t.pushCode(`var ${a} = {};`);const c=t.generateVariable();t.pushScope(a),t.useContextVariables&&(t.pushCode(`${a}.$parent = ${c};`),t.pushCode(`${a}.$root = ${c}.$root;`),!this.options.readUntil&&r===void 0&&t.pushCode(`${a}.$index = ${n} - ${o};`)),i.generate(t),t.useContextVariables&&(t.pushCode(`delete ${a}.$parent;`),t.pushCode(`delete ${a}.$root;`),t.pushCode(`delete ${a}.$index;`)),t.popScope()}if(l?t.pushCode(`${s}[${a}.${u}] = ${a};`):t.pushCode(`${s}.push(${a});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const c=this.options.readUntil,f=t.addImport(c);t.pushCode(`while (!${f}.call(${t.generateVariable()}, ${a}, buffer.subarray(offset)));`)}}generateChoiceCase(t,n,r){if(typeof r=="string"){const i=t.generateVariable(this.varName);if(Bn.has(r)){const o=t.generateTmpVariable();t.pushCode(`var ${o} = ${po+r}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${i}.$parent,`),t.pushCode(`$root: ${i}.$root,`)),t.pushCode("});"),t.pushCode(`${i} = ${o}.result; offset = ${o}.offset;`),r!==this.alias&&t.addReference(r)}else{const o=th[r],s=nh[r];t.pushCode(`${i} = dataView.get${o}(offset, ${s});`),t.pushCode(`offset += ${Dn[r]}`)}}else r instanceof Pn&&(t.pushPath(n),r.generate(t),t.popPath(n))}generateChoice(t){const n=t.generateOption(this.options.tag),r=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const i=t.generateVariable();t.pushCode(`${r}.$parent = ${i};`),t.pushCode(`${r}.$root = ${i}.$root;`)}t.pushCode(`switch(${n}) {`);for(const i in this.options.choices){const o=parseInt(i,10),s=this.options.choices[o];t.pushCode(`case ${o}:`),this.generateChoiceCase(t,this.varName,s),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${n} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}generateNest(t){const n=t.generateVariable(this.varName);if(this.options.type instanceof Pn){if(this.varName&&(t.pushCode(`${n} = {};`),t.useContextVariables)){const r=t.generateVariable();t.pushCode(`${n}.$parent = ${r};`),t.pushCode(`${n}.$root = ${r}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode(`delete ${n}.$parent;`),t.pushCode(`delete ${n}.$root;`))}else if(Bn.has(this.options.type)){const r=t.generateTmpVariable();if(t.pushCode(`var ${r} = ${po+this.options.type}(offset, {`),t.useContextVariables){const i=t.generateVariable();t.pushCode(`$parent: ${i},`),t.pushCode(`$root: ${i}.$root,`)}t.pushCode("});"),t.pushCode(`${n} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}}generateWrapper(t){const n=t.generateVariable(this.varName),r=t.generateTmpVariable();if(typeof this.options.readUntil=="function"){const u=this.options.readUntil,l=t.generateTmpVariable(),c=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${c} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${c} = dataView.getUint8(offset);`);const f=t.addImport(u);t.pushCode(`if (${f}.call(${t.generateVariable()}, ${c}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const u=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${u});`),t.pushCode(`offset += ${u};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`);const i=t.generateTmpVariable(),o=t.generateTmpVariable(),s=t.generateTmpVariable(),a=t.addImport(this.options.wrapper);if(t.pushCode(`${r} = ${a}.call(this, ${r}).subarray(0);`),t.pushCode(`var ${i} = buffer;`),t.pushCode(`var ${o} = offset;`),t.pushCode(`var ${s} = dataView;`),t.pushCode(`buffer = ${r};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof Pn)this.varName&&t.pushCode(`${n} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(Bn.has(this.options.type)){const u=t.generateTmpVariable();t.pushCode(`var ${u} = ${po+this.options.type}(0);`),t.pushCode(`${n} = ${u}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${i};`),t.pushCode(`dataView = ${s};`),t.pushCode(`offset = ${o};`)}generateFormatter(t,n,r){if(typeof r=="function"){const i=t.addImport(r);t.pushCode(`${n} = ${i}.call(${t.generateVariable()}, ${n});`)}}generatePointer(t){const n=this.options.type,r=t.generateOption(this.options.offset),i=t.generateTmpVariable(),o=t.generateVariable(this.varName);if(t.pushCode(`var ${i} = offset;`),t.pushCode(`offset = ${r};`),this.options.type instanceof Pn){if(t.pushCode(`${o} = {};`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`${o}.$parent = ${s};`),t.pushCode(`${o}.$root = ${s}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${o}.$parent;`),t.pushCode(`delete ${o}.$root;`))}else if(Bn.has(this.options.type)){const s=t.generateTmpVariable();if(t.pushCode(`var ${s} = ${po+this.options.type}(offset, {`),t.useContextVariables){const a=t.generateVariable();t.pushCode(`$parent: ${a},`),t.pushCode(`$root: ${a}.$root,`)}t.pushCode("});"),t.pushCode(`${o} = ${s}.result; offset = ${s}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(Dn).indexOf(this.options.type)>=0){const s=th[n],a=nh[n];t.pushCode(`${o} = dataView.get${s}(offset, ${a});`),t.pushCode(`offset += ${Dn[n]};`)}t.pushCode(`offset = ${i};`)}generateSaveOffset(t){const n=t.generateVariable(this.varName);t.pushCode(`${n} = offset`)}};var X3={},ug={},go={},$l={};Object.defineProperty($l,"__esModule",{value:!0});function cg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fg(e,t,n){return t&&BL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hg(e,t)}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xs(e)}function hg(e,t){return hg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hg(e,t)}function RL(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ql(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FL(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ql(e)}function ML(e){var t=RL();return function(){var r=xs(e),i;if(t){var o=xs(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return FL(this,i)}}function PL(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=xs(e),e!==null););return e}function rh(){return typeof Reflect<"u"&&Reflect.get?rh=Reflect.get.bind():rh=function(t,n,r){var i=PL(t,n);if(i){var o=Object.getOwnPropertyDescriptor(i,n);return o.get?o.get.call(arguments.length<3?t:r):o.value}},rh.apply(this,arguments)}var K3=function(){function e(){cg(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return fg(e,[{key:"addEventListener",value:function(n,r,i){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push({callback:r,options:i})}},{key:"removeEventListener",value:function(n,r){if(n in this.listeners){for(var i=this.listeners[n],o=0,s=i.length;o<s;o++)if(i[o].callback===r){i.splice(o,1);return}}}},{key:"dispatchEvent",value:function(n){if(n.type in this.listeners){for(var r=this.listeners[n.type],i=r.slice(),o=0,s=i.length;o<s;o++){var a=i[o];try{a.callback.call(this,n)}catch(u){Promise.resolve().then(function(){throw u})}a.options&&a.options.once&&this.removeEventListener(n.type,a.callback)}return!n.defaultPrevented}}}]),e}(),dg=function(e){DL(n,e);var t=ML(n);function n(){var r;return cg(this,n),r=t.call(this),r.listeners||K3.call(ql(r)),Object.defineProperty(ql(r),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(ql(r),"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(ql(r),"reason",{value:void 0,writable:!0,configurable:!0}),r}return fg(n,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(i){i.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,i)),rh(xs(n.prototype),"dispatchEvent",this).call(this,i)}}]),n}(K3),J3=function(){function e(){cg(this,e),Object.defineProperty(this,"signal",{value:new dg,writable:!0,configurable:!0})}return fg(e,[{key:"abort",value:function(n){var r;try{r=new Event("abort")}catch{typeof document<"u"?document.createEvent?(r=document.createEvent("Event"),r.initEvent("abort",!1,!1)):(r=document.createEventObject(),r.type="abort"):r={type:"abort",bubbles:!1,cancelable:!1}}var i=n;if(i===void 0)if(typeof document>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch{i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(r)}},{key:"toString",value:function(){return"[object AbortController]"}}]),e}();typeof Symbol<"u"&&Symbol.toStringTag&&(J3.prototype[Symbol.toStringTag]="AbortController",dg.prototype[Symbol.toStringTag]="AbortSignal");function LL(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function NL(e){typeof e=="function"&&(e={fetch:e});var t=e,n=t.fetch,r=t.Request,i=r===void 0?n.Request:r,o=t.AbortController,s=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,a=s===void 0?!1:s;if(!LL({fetch:n,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:a}))return{fetch:n,Request:u};var u=i;(u&&!u.prototype.hasOwnProperty("signal")||a)&&(u=function(h,d){var p;d&&d.signal&&(p=d.signal,delete d.signal);var m=new i(h,d);return p&&Object.defineProperty(m,"signal",{writable:!1,enumerable:!1,configurable:!0,value:p}),m},u.prototype=i.prototype);var l=n,c=function(h,d){var p=u&&u.prototype.isPrototypeOf(h)?h.signal:d?d.signal:void 0;if(p){var m;try{m=new DOMException("Aborted","AbortError")}catch{m=new Error("Aborted"),m.name="AbortError"}if(p.aborted)return Promise.reject(m);var y=new Promise(function(w,x){p.addEventListener("abort",function(){return x(m)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([y,l(h,d)])}return l(h,d)};return{fetch:c,Request:u}}$l.AbortController=J3,$l.AbortSignal=dg,$l.abortableFetch=NL,Object.defineProperty(go,"__esModule",{value:!0}),go.AbortSignal=go.AbortController=void 0;const ex=$l;var ih=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")};let OL=typeof ih().AbortController>"u"?ex.AbortController:ih().AbortController;go.AbortController=OL;let zL=typeof ih().AbortController>"u"?ex.AbortSignal:ih().AbortSignal;go.AbortSignal=zL;var pg={};Object.defineProperty(pg,"__esModule",{value:!0});const UL=go;class GL{}class HL{constructor(){this.signals=new Set,this.abortController=new UL.AbortController}addSignal(t=new GL){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(t),t.aborted?this.handleAborted(t):typeof t.addEventListener=="function"&&t.addEventListener("abort",()=>{this.handleAborted(t)})}handleAborted(t){this.signals.delete(t),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}pg.default=HL;var gg={};Object.defineProperty(gg,"__esModule",{value:!0});class VL{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t,this.callbacks.forEach(n=>{n(t)})}}gg.default=VL;var tx=Rf&&Rf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ug,"__esModule",{value:!0});const jL=go,$L=tx(pg),qL=tx(gg);class oh{constructor({fill:t,cache:n}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,n){this.cache.get(t)===n&&this.cache.delete(t)}fill(t,n,r,i){const o=new $L.default,s=new qL.default;s.addCallback(i);const a={aborter:o,promise:this.fillCallback(n,o.signal,u=>{s.callback(u)}),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(r),a.aborter.signal.addEventListener("abort",()=>{a.settled||this.evict(t,a)}),a.promise.then(()=>{a.settled=!0},()=>{a.settled=!0,this.evict(t,a)}).catch(u=>{throw console.error(u),u}),this.cache.set(t,a)}static checkSinglePromise(t,n){function r(){if(n&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then(i=>(r(),i),i=>{throw r(),i})}has(t){return this.cache.has(t)}get(t,n,r,i){if(!r&&n instanceof jL.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,n,r,i)):o.settled?o.promise:(o.aborter.addSignal(r),o.statusReporter.addCallback(i),oh.checkSinglePromise(o.promise,r)):(this.fill(t,n,r,i),oh.checkSinglePromise(this.cache.get(t).promise,r))}delete(t){const n=this.cache.get(t);n&&(n.settled||n.aborter.abort(),this.cache.delete(t))}clear(){const t=this.cache.keys();let n=0;for(let r=t.next();!r.done;r=t.next())this.delete(r.value),n+=1;return n}}ug.default=oh;var WL=Rf&&Rf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X3,"__esModule",{value:!0});const ZL=WL(ug);var sh=X3.default=ZL.default;class YL{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,n){this.cache.set(t,n),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const n=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,n),n}}set(t,n){return this.cache.has(t)?this.cache.set(t,n):this._set(t,n),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){const n=this.cache.delete(t);return n&&this._size--,this.oldCache.delete(t)||n}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[n]=t;this.cache.has(n)||(yield t)}}get size(){let t=0;for(const n of this.oldCache.keys())this.cache.has(n)||t++;return this._size+t}}var QL=YL;const ah=Ff(QL);class Es{constructor(t){this.ranges=t}get min(){return this.ranges[0].min}get max(){return this.ranges[this.ranges.length-1].max}contains(t){for(const n of this.ranges)if(n.min<=t&&n.max>=t)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(t=>new Es([{min:t.min,max:t.max}]))}toString(){return this.ranges.map(t=>`[${t.min}-${t.max}]`).join(",")}union(t){const n=[...this.getRanges(),...t.getRanges()].sort((o,s)=>o.min<s.min?-1:o.min>s.min?1:o.max<s.max?-1:s.max>o.max?1:0),r=[];let i=n[0];for(let o=1;o<n.length;o+=1){const s=n[o];s.min>i.max+1?(r.push(i),i=s):s.max>i.max&&(i=new Es([{min:i.min,max:s.max}]))}return r.push(i),r.length===1?r[0]:new Es(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const XL=4,nx=0,rx=1,KL=2;function _s(e){let t=e.length;for(;--t>=0;)e[t]=0}const JL=0,ix=1,eN=2,tN=3,nN=258,mg=29,Wl=256,Zl=Wl+1+mg,Ss=30,bg=19,ox=2*Zl+1,mo=15,yg=16,rN=7,wg=256,sx=16,ax=17,lx=18,vg=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),lh=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),iN=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ux=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),oN=512,wr=new Array((Zl+2)*2);_s(wr);const Yl=new Array(Ss*2);_s(Yl);const Ql=new Array(oN);_s(Ql);const Xl=new Array(nN-tN+1);_s(Xl);const Ag=new Array(mg);_s(Ag);const uh=new Array(Ss);_s(uh);function xg(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let cx,fx,hx;function Eg(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const dx=e=>e<256?Ql[e]:Ql[256+(e>>>7)],Kl=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},jt=(e,t,n)=>{e.bi_valid>yg-n?(e.bi_buf|=t<<e.bi_valid&65535,Kl(e,e.bi_buf),e.bi_buf=t>>yg-e.bi_valid,e.bi_valid+=n-yg):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},Kn=(e,t,n)=>{jt(e,n[t*2],n[t*2+1])},px=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},sN=e=>{e.bi_valid===16?(Kl(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},aN=(e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,u=t.stat_desc.max_length;let l,c,f,h,d,p,m=0;for(h=0;h<=mo;h++)e.bl_count[h]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<ox;l++)c=e.heap[l],h=n[n[c*2+1]*2+1]+1,h>u&&(h=u,m++),n[c*2+1]=h,!(c>r)&&(e.bl_count[h]++,d=0,c>=a&&(d=s[c-a]),p=n[c*2],e.opt_len+=p*(h+d),o&&(e.static_len+=p*(i[c*2+1]+d)));if(m!==0){do{for(h=u-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[u]--,m-=2}while(m>0);for(h=u;h!==0;h--)for(c=e.bl_count[h];c!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==h&&(e.opt_len+=(h-n[f*2+1])*n[f*2],n[f*2+1]=h),c--)}},gx=(e,t,n)=>{const r=new Array(mo+1);let i=0,o,s;for(o=1;o<=mo;o++)i=i+n[o-1]<<1,r[o]=i;for(s=0;s<=t;s++){let a=e[s*2+1];a!==0&&(e[s*2]=px(r[a]++,a))}},lN=()=>{let e,t,n,r,i;const o=new Array(mo+1);for(n=0,r=0;r<mg-1;r++)for(Ag[r]=n,e=0;e<1<<vg[r];e++)Xl[n++]=r;for(Xl[n-1]=r,i=0,r=0;r<16;r++)for(uh[r]=i,e=0;e<1<<lh[r];e++)Ql[i++]=r;for(i>>=7;r<Ss;r++)for(uh[r]=i<<7,e=0;e<1<<lh[r]-7;e++)Ql[256+i++]=r;for(t=0;t<=mo;t++)o[t]=0;for(e=0;e<=143;)wr[e*2+1]=8,e++,o[8]++;for(;e<=255;)wr[e*2+1]=9,e++,o[9]++;for(;e<=279;)wr[e*2+1]=7,e++,o[7]++;for(;e<=287;)wr[e*2+1]=8,e++,o[8]++;for(gx(wr,Zl+1,o),e=0;e<Ss;e++)Yl[e*2+1]=5,Yl[e*2]=px(e,5);cx=new xg(wr,vg,Wl+1,Zl,mo),fx=new xg(Yl,lh,0,Ss,mo),hx=new xg(new Array(0),iN,0,bg,rN)},mx=e=>{let t;for(t=0;t<Zl;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ss;t++)e.dyn_dtree[t*2]=0;for(t=0;t<bg;t++)e.bl_tree[t*2]=0;e.dyn_ltree[wg*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},bx=e=>{e.bi_valid>8?Kl(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},yx=(e,t,n,r)=>{const i=t*2,o=n*2;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},_g=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&yx(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!yx(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},wx=(e,t,n)=>{let r,i,o=0,s,a;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Kn(e,i,t):(s=Xl[i],Kn(e,s+Wl+1,t),a=vg[s],a!==0&&(i-=Ag[s],jt(e,i,a)),r--,s=dx(r),Kn(e,s,n),a=lh[s],a!==0&&(r-=uh[s],jt(e,r,a)));while(o<e.sym_next);Kn(e,wg,t)},Sg=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let s,a,u=-1,l;for(e.heap_len=0,e.heap_max=ox,s=0;s<o;s++)n[s*2]!==0?(e.heap[++e.heap_len]=u=s,e.depth[s]=0):n[s*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=u,s=e.heap_len>>1;s>=1;s--)_g(e,n,s);l=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],_g(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[l*2]=n[s*2]+n[a*2],e.depth[l]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[s*2+1]=n[a*2+1]=l,e.heap[1]=l++,_g(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],aN(e,t),gx(n,u,e.bl_count)},vx=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)&&(a<l?e.bl_tree[o*2]+=a:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[sx*2]++):a<=10?e.bl_tree[ax*2]++:e.bl_tree[lx*2]++,a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4))},Ax=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],a=0,u=7,l=4;for(s===0&&(u=138,l=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++a<u&&o===s)){if(a<l)do Kn(e,o,e.bl_tree);while(--a!==0);else o!==0?(o!==i&&(Kn(e,o,e.bl_tree),a--),Kn(e,sx,e.bl_tree),jt(e,a-3,2)):a<=10?(Kn(e,ax,e.bl_tree),jt(e,a-3,3)):(Kn(e,lx,e.bl_tree),jt(e,a-11,7));a=0,i=o,s===0?(u=138,l=3):o===s?(u=6,l=3):(u=7,l=4)}},uN=e=>{let t;for(vx(e,e.dyn_ltree,e.l_desc.max_code),vx(e,e.dyn_dtree,e.d_desc.max_code),Sg(e,e.bl_desc),t=bg-1;t>=3&&e.bl_tree[ux[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},cN=(e,t,n,r)=>{let i;for(jt(e,t-257,5),jt(e,n-1,5),jt(e,r-4,4),i=0;i<r;i++)jt(e,e.bl_tree[ux[i]*2+1],3);Ax(e,e.dyn_ltree,t-1),Ax(e,e.dyn_dtree,n-1)},fN=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return nx;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return rx;for(n=32;n<Wl;n++)if(e.dyn_ltree[n*2]!==0)return rx;return nx};let xx=!1;const hN=e=>{xx||(lN(),xx=!0),e.l_desc=new Eg(e.dyn_ltree,cx),e.d_desc=new Eg(e.dyn_dtree,fx),e.bl_desc=new Eg(e.bl_tree,hx),e.bi_buf=0,e.bi_valid=0,mx(e)},Ex=(e,t,n,r)=>{jt(e,(JL<<1)+(r?1:0),3),bx(e),Kl(e,n),Kl(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},dN=e=>{jt(e,ix<<1,3),Kn(e,wg,wr),sN(e)},pN=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===KL&&(e.strm.data_type=fN(e)),Sg(e,e.l_desc),Sg(e,e.d_desc),s=uN(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Ex(e,t,n,r):e.strategy===XL||o===i?(jt(e,(ix<<1)+(r?1:0),3),wx(e,wr,Yl)):(jt(e,(eN<<1)+(r?1:0),3),cN(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),wx(e,e.dyn_ltree,e.dyn_dtree)),mx(e),r&&bx(e)},gN=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Xl[n]+Wl+1)*2]++,e.dyn_dtree[dx(t)*2]++),e.sym_next===e.sym_end);var mN=hN,bN=Ex,yN=pN,wN=gN,vN=dN,AN={_tr_init:mN,_tr_stored_block:bN,_tr_flush_block:yN,_tr_tally:wN,_tr_align:vN},Jl=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0};const xN=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},EN=new Uint32Array(xN());var pt=(e,t,n,r)=>{const i=EN,o=r+n;e^=-1;for(let s=r;s<o;s++)e=e>>>8^i[(e^t[s])&255];return e^-1},Cs={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},eu={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:_N,_tr_stored_block:Cg,_tr_flush_block:SN,_tr_tally:hi,_tr_align:CN}=AN,{Z_NO_FLUSH:di,Z_PARTIAL_FLUSH:kN,Z_FULL_FLUSH:TN,Z_FINISH:gn,Z_BLOCK:_x,Z_OK:wt,Z_STREAM_END:Sx,Z_STREAM_ERROR:Jn,Z_DATA_ERROR:IN,Z_BUF_ERROR:kg,Z_DEFAULT_COMPRESSION:BN,Z_FILTERED:DN,Z_HUFFMAN_ONLY:ch,Z_RLE:RN,Z_FIXED:FN,Z_DEFAULT_STRATEGY:MN,Z_UNKNOWN:PN,Z_DEFLATED:fh}=eu,LN=9,NN=15,ON=8,Tg=256+1+29,zN=30,UN=19,GN=2*Tg+1,HN=15,ge=3,pi=258,er=pi+ge+1,VN=32,ks=42,Ig=57,Bg=69,Dg=73,Rg=91,Fg=103,bo=113,tu=666,Ft=1,Ts=2,yo=3,Is=4,jN=3,wo=(e,t)=>(e.msg=Cs[t],t),Cx=e=>e*2-(e>4?9:0),gi=e=>{let t=e.length;for(;--t>=0;)e[t]=0},$N=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)};let mi=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Kt=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Jt=(e,t)=>{SN(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Kt(e.strm)},_e=(e,t)=>{e.pending_buf[e.pending++]=t},nu=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Mg=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Jl(e.adler,t,i,n):e.state.wrap===2&&(e.adler=pt(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},kx=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,a=e.nice_match;const u=e.strstart>e.w_size-er?e.strstart-(e.w_size-er):0,l=e.window,c=e.w_mask,f=e.prev,h=e.strstart+pi;let d=l[r+s-1],p=l[r+s];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do if(i=t,!(l[i+s]!==p||l[i+s-1]!==d||l[i]!==l[r]||l[++i]!==l[r+1])){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<h);if(o=pi-(h-r),r=h-pi,o>s){if(e.match_start=t,s=o,o>=a)break;d=l[r+s-1],p=l[r+s]}}while((t=f[t&c])>u&&--n!==0);return s<=e.lookahead?s:e.lookahead},Bs=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-er)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),$N(e),r+=t),e.strm.avail_in===0)break;if(n=Mg(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ge)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=mi(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=mi(e,e.ins_h,e.window[i+ge-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<ge)););}while(e.lookahead<er&&e.strm.avail_in!==0)},Tx=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,s=0,a=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_out<o||(o=e.strm.avail_out-o,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r<n&&(r===0&&t!==gn||t===di||r!==i+e.strm.avail_in)))break;s=t===gn&&r===i+e.strm.avail_in?1:0,Cg(e,0,0,s),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Kt(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Mg(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(s===0);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?Is:t!==di&&t!==gn&&e.strm.avail_in===0&&e.strstart===e.block_start?Ts:(o=e.window_size-e.strstart,e.strm.avail_in>o&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Mg(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water<e.strstart&&(e.high_water=e.strstart),o=e.bi_valid+42>>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===gn)&&t!==di&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,s=t===gn&&e.strm.avail_in===0&&r===i?1:0,Cg(e,e.block_start,r,s),e.block_start+=r,Kt(e.strm)),s?yo:Ft)},Pg=(e,t)=>{let n,r;for(;;){if(e.lookahead<er){if(Bs(e),e.lookahead<er&&t===di)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=ge&&(e.ins_h=mi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-er&&(e.match_length=kx(e,n)),e.match_length>=ge)if(r=hi(e,e.strstart-e.match_start,e.match_length-ge),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ge){e.match_length--;do e.strstart++,e.ins_h=mi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=mi(e,e.ins_h,e.window[e.strstart+1]);else r=hi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=e.strstart<ge-1?e.strstart:ge-1,t===gn?(Jt(e,!0),e.strm.avail_out===0?yo:Is):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ts},Ds=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<er){if(Bs(e),e.lookahead<er&&t===di)return Ft;if(e.lookahead===0)break}if(n=0,e.lookahead>=ge&&(e.ins_h=mi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ge-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-er&&(e.match_length=kx(e,n),e.match_length<=5&&(e.strategy===DN||e.match_length===ge&&e.strstart-e.match_start>4096)&&(e.match_length=ge-1)),e.prev_length>=ge&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ge,r=hi(e,e.strstart-1-e.prev_match,e.prev_length-ge),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=mi(e,e.ins_h,e.window[e.strstart+ge-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=ge-1,e.strstart++,r&&(Jt(e,!1),e.strm.avail_out===0))return Ft}else if(e.match_available){if(r=hi(e,0,e.window[e.strstart-1]),r&&Jt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ft}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=hi(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ge-1?e.strstart:ge-1,t===gn?(Jt(e,!0),e.strm.avail_out===0?yo:Is):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ts},qN=(e,t)=>{let n,r,i,o;const s=e.window;for(;;){if(e.lookahead<=pi){if(Bs(e),e.lookahead<=pi&&t===di)return Ft;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=ge&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+pi;do;while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=pi-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ge?(n=hi(e,1,e.match_length-ge),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=hi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===gn?(Jt(e,!0),e.strm.avail_out===0?yo:Is):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ts},WN=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Bs(e),e.lookahead===0)){if(t===di)return Ft;break}if(e.match_length=0,n=hi(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Jt(e,!1),e.strm.avail_out===0))return Ft}return e.insert=0,t===gn?(Jt(e,!0),e.strm.avail_out===0?yo:Is):e.sym_next&&(Jt(e,!1),e.strm.avail_out===0)?Ft:Ts};function tr(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const ru=[new tr(0,0,0,0,Tx),new tr(4,4,8,4,Pg),new tr(4,5,16,8,Pg),new tr(4,6,32,32,Pg),new tr(4,4,16,16,Ds),new tr(8,16,32,32,Ds),new tr(8,16,128,128,Ds),new tr(8,32,128,256,Ds),new tr(32,128,258,1024,Ds),new tr(32,258,258,4096,Ds)],ZN=e=>{e.window_size=2*e.w_size,gi(e.head),e.max_lazy_match=ru[e.level].max_lazy,e.good_match=ru[e.level].good_length,e.nice_match=ru[e.level].nice_length,e.max_chain_length=ru[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ge-1,e.match_available=0,e.ins_h=0};function YN(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=fh,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(GN*2),this.dyn_dtree=new Uint16Array((2*zN+1)*2),this.bl_tree=new Uint16Array((2*UN+1)*2),gi(this.dyn_ltree),gi(this.dyn_dtree),gi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(HN+1),this.heap=new Uint16Array(2*Tg+1),gi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Tg+1),gi(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const iu=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ks&&t.status!==Ig&&t.status!==Bg&&t.status!==Dg&&t.status!==Rg&&t.status!==Fg&&t.status!==bo&&t.status!==tu?1:0},Ix=e=>{if(iu(e))return wo(e,Jn);e.total_in=e.total_out=0,e.data_type=PN;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Ig:t.wrap?ks:bo,e.adler=t.wrap===2?0:1,t.last_flush=-2,_N(t),wt},Bx=e=>{const t=Ix(e);return t===wt&&ZN(e.state),t},QN=(e,t)=>iu(e)||e.state.wrap!==2?Jn:(e.state.gzhead=t,wt),Dx=(e,t,n,r,i,o)=>{if(!e)return Jn;let s=1;if(t===BN&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>LN||n!==fh||r<8||r>15||t<0||t>9||o<0||o>FN||r===8&&s!==1)return wo(e,Jn);r===8&&(r=9);const a=new YN;return e.state=a,a.strm=e,a.status=ks,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+ge-1)/ge),a.window=new Uint8Array(a.w_size*2),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=(a.lit_bufsize-1)*3,a.level=t,a.strategy=o,a.method=n,Bx(e)},XN=(e,t)=>Dx(e,t,fh,NN,ON,MN),KN=(e,t)=>{if(iu(e)||t>_x||t<0)return e?wo(e,Jn):Jn;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===tu&&t!==gn)return wo(e,e.avail_out===0?kg:Jn);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Kt(e),e.avail_out===0)return n.last_flush=-1,wt}else if(e.avail_in===0&&Cx(t)<=Cx(r)&&t!==gn)return wo(e,kg);if(n.status===tu&&e.avail_in!==0)return wo(e,kg);if(n.status===ks&&n.wrap===0&&(n.status=bo),n.status===ks){let i=fh+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=ch||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=VN),i+=31-i%31,nu(n,i),n.strstart!==0&&(nu(n,e.adler>>>16),nu(n,e.adler&65535)),e.adler=1,n.status=bo,Kt(e),n.pending!==0)return n.last_flush=-1,wt}if(n.status===Ig){if(e.adler=0,_e(n,31),_e(n,139),_e(n,8),n.gzhead)_e(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),_e(n,n.gzhead.time&255),_e(n,n.gzhead.time>>8&255),_e(n,n.gzhead.time>>16&255),_e(n,n.gzhead.time>>24&255),_e(n,n.level===9?2:n.strategy>=ch||n.level<2?4:0),_e(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(_e(n,n.gzhead.extra.length&255),_e(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=pt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Bg;else if(_e(n,0),_e(n,0),_e(n,0),_e(n,0),_e(n,0),_e(n,n.level===9?2:n.strategy>=ch||n.level<2?4:0),_e(n,jN),n.status=bo,Kt(e),n.pending!==0)return n.last_flush=-1,wt}if(n.status===Bg){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,Kt(e),n.pending!==0)return n.last_flush=-1,wt;i=0,o-=a}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Dg}if(n.status===Dg){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Kt(e),n.pending!==0)return n.last_flush=-1,wt;i=0}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,_e(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Rg}if(n.status===Rg){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i)),Kt(e),n.pending!==0)return n.last_flush=-1,wt;i=0}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,_e(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pt(e.adler,n.pending_buf,n.pending-i,i))}n.status=Fg}if(n.status===Fg){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Kt(e),n.pending!==0))return n.last_flush=-1,wt;_e(n,e.adler&255),_e(n,e.adler>>8&255),e.adler=0}if(n.status=bo,Kt(e),n.pending!==0)return n.last_flush=-1,wt}if(e.avail_in!==0||n.lookahead!==0||t!==di&&n.status!==tu){let i=n.level===0?Tx(n,t):n.strategy===ch?WN(n,t):n.strategy===RN?qN(n,t):ru[n.level].func(n,t);if((i===yo||i===Is)&&(n.status=tu),i===Ft||i===yo)return e.avail_out===0&&(n.last_flush=-1),wt;if(i===Ts&&(t===kN?CN(n):t!==_x&&(Cg(n,0,0,!1),t===TN&&(gi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Kt(e),e.avail_out===0))return n.last_flush=-1,wt}return t!==gn?wt:n.wrap<=0?Sx:(n.wrap===2?(_e(n,e.adler&255),_e(n,e.adler>>8&255),_e(n,e.adler>>16&255),_e(n,e.adler>>24&255),_e(n,e.total_in&255),_e(n,e.total_in>>8&255),_e(n,e.total_in>>16&255),_e(n,e.total_in>>24&255)):(nu(n,e.adler>>>16),nu(n,e.adler&65535)),Kt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?wt:Sx)},JN=e=>{if(iu(e))return Jn;const t=e.state.status;return e.state=null,t===bo?wo(e,IN):wt},eO=(e,t)=>{let n=t.length;if(iu(e))return Jn;const r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==ks||r.lookahead)return Jn;if(i===1&&(e.adler=Jl(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(gi(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}const o=e.avail_in,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Bs(r);r.lookahead>=ge;){let u=r.strstart,l=r.lookahead-(ge-1);do r.ins_h=mi(r,r.ins_h,r.window[u+ge-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--l);r.strstart=u,r.lookahead=ge-1,Bs(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ge-1,r.match_available=0,e.next_in=s,e.input=a,e.avail_in=o,r.wrap=i,wt};var tO=XN,nO=Dx,rO=Bx,iO=Ix,oO=QN,sO=KN,aO=JN,lO=eO,uO="pako deflate (from Nodeca project)",ou={deflateInit:tO,deflateInit2:nO,deflateReset:rO,deflateResetKeep:iO,deflateSetHeader:oO,deflate:sO,deflateEnd:aO,deflateSetDictionary:lO,deflateInfo:uO};const cO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var fO=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)cO(n,r)&&(e[r]=n[r])}}return e},hO=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let s=e[r];n.set(s,i),i+=s.length}return n},hh={assign:fO,flattenChunks:hO};let Rx=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Rx=!1}const su=new Uint8Array(256);for(let e=0;e<256;e++)su[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;su[254]=su[254]=1;var dO=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),o=0,i=0;o<a;i++)n=e.charCodeAt(i),(n&64512)===55296&&i+1<s&&(r=e.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const pO=(e,t)=>{if(t<65534&&e.subarray&&Rx)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var gO=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i;const o=new Array(n*2);for(i=0,r=0;r<n;){let s=e[r++];if(s<128){o[i++]=s;continue}let a=su[s];if(a>4){o[i++]=65533,r+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&r<n;)s=s<<6|e[r++]&63,a--;if(a>1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return pO(o,i)},mO=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+su[e[n]]>t?n:t},au={string2buf:dO,buf2string:gO,utf8border:mO};function bO(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Fx=bO;const Mx=Object.prototype.toString,{Z_NO_FLUSH:yO,Z_SYNC_FLUSH:wO,Z_FULL_FLUSH:vO,Z_FINISH:AO,Z_OK:dh,Z_STREAM_END:xO,Z_DEFAULT_COMPRESSION:EO,Z_DEFAULT_STRATEGY:_O,Z_DEFLATED:SO}=eu;function Lg(e){this.options=hh.assign({level:EO,method:SO,chunkSize:16384,windowBits:15,memLevel:8,strategy:_O},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Fx,this.strm.avail_out=0;let n=ou.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==dh)throw new Error(Cs[n]);if(t.header&&ou.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=au.string2buf(t.dictionary):Mx.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=ou.deflateSetDictionary(this.strm,r),n!==dh)throw new Error(Cs[n]);this._dict_set=!0}}Lg.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?AO:yO,typeof e=="string"?n.input=au.string2buf(e):Mx.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===wO||o===vO)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=ou.deflate(n,o),i===xO)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=ou.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===dh;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},Lg.prototype.onData=function(e){this.chunks.push(e)},Lg.prototype.onEnd=function(e){e===dh&&(this.result=hh.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};const ph=16209,CO=16191;var kO=function(t,n){let r,i,o,s,a,u,l,c,f,h,d,p,m,y,w,x,S,_,k,B,I,D,M,G;const N=t.state;r=t.next_in,M=t.input,i=r+(t.avail_in-5),o=t.next_out,G=t.output,s=o-(n-t.avail_out),a=o+(t.avail_out-257),u=N.dmax,l=N.wsize,c=N.whave,f=N.wnext,h=N.window,d=N.hold,p=N.bits,m=N.lencode,y=N.distcode,w=(1<<N.lenbits)-1,x=(1<<N.distbits)-1;e:do{p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=m[d&w];t:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_===0)G[o++]=S&65535;else if(_&16){k=S&65535,_&=15,_&&(p<_&&(d+=M[r++]<<p,p+=8),k+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=M[r++]<<p,p+=8,d+=M[r++]<<p,p+=8),S=y[d&x];n:for(;;){if(_=S>>>24,d>>>=_,p-=_,_=S>>>16&255,_&16){if(B=S&65535,_&=15,p<_&&(d+=M[r++]<<p,p+=8,p<_&&(d+=M[r++]<<p,p+=8)),B+=d&(1<<_)-1,B>u){t.msg="invalid distance too far back",N.mode=ph;break e}if(d>>>=_,p-=_,_=o-s,B>_){if(_=B-_,_>c&&N.sane){t.msg="invalid distance too far back",N.mode=ph;break e}if(I=0,D=h,f===0){if(I+=l-_,_<k){k-=_;do G[o++]=h[I++];while(--_);I=o-B,D=G}}else if(f<_){if(I+=l+f-_,_-=f,_<k){k-=_;do G[o++]=h[I++];while(--_);if(I=0,f<k){_=f,k-=_;do G[o++]=h[I++];while(--_);I=o-B,D=G}}}else if(I+=f-_,_<k){k-=_;do G[o++]=h[I++];while(--_);I=o-B,D=G}for(;k>2;)G[o++]=D[I++],G[o++]=D[I++],G[o++]=D[I++],k-=3;k&&(G[o++]=D[I++],k>1&&(G[o++]=D[I++]))}else{I=o-B;do G[o++]=G[I++],G[o++]=G[I++],G[o++]=G[I++],k-=3;while(k>2);k&&(G[o++]=G[I++],k>1&&(G[o++]=G[I++]))}}else if(_&64){t.msg="invalid distance code",N.mode=ph;break e}else{S=y[(S&65535)+(d&(1<<_)-1)];continue n}break}}else if(_&64)if(_&32){N.mode=CO;break e}else{t.msg="invalid literal/length code",N.mode=ph;break e}else{S=m[(S&65535)+(d&(1<<_)-1)];continue t}break}}while(r<i&&o<a);k=p>>3,r-=k,p-=k<<3,d&=(1<<p)-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?5+(i-r):5-(r-i),t.avail_out=o<a?257+(a-o):257-(o-a),N.hold=d,N.bits=p};const Rs=15,Px=852,Lx=592,Nx=0,Ng=1,Ox=2,TO=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),IO=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),BO=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),DO=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var lu=(e,t,n,r,i,o,s,a)=>{const u=a.bits;let l=0,c=0,f=0,h=0,d=0,p=0,m=0,y=0,w=0,x=0,S,_,k,B,I,D=null,M;const G=new Uint16Array(Rs+1),N=new Uint16Array(Rs+1);let ne=null,ie,he,me;for(l=0;l<=Rs;l++)G[l]=0;for(c=0;c<r;c++)G[t[n+c]]++;for(d=u,h=Rs;h>=1&&G[h]===0;h--);if(d>h&&(d=h),h===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<h&&G[f]===0;f++);for(d<f&&(d=f),y=1,l=1;l<=Rs;l++)if(y<<=1,y-=G[l],y<0)return-1;if(y>0&&(e===Nx||h!==1))return-1;for(N[1]=0,l=1;l<Rs;l++)N[l+1]=N[l]+G[l];for(c=0;c<r;c++)t[n+c]!==0&&(s[N[t[n+c]]++]=c);if(e===Nx?(D=ne=s,M=20):e===Ng?(D=TO,ne=IO,M=257):(D=BO,ne=DO,M=0),x=0,c=0,l=f,I=o,p=d,m=0,k=-1,w=1<<d,B=w-1,e===Ng&&w>Px||e===Ox&&w>Lx)return 1;for(;;){ie=l-m,s[c]+1<M?(he=0,me=s[c]):s[c]>=M?(he=ne[s[c]-M],me=D[s[c]-M]):(he=96,me=0),S=1<<l-m,_=1<<p,f=_;do _-=S,i[I+(x>>m)+_]=ie<<24|he<<16|me|0;while(_!==0);for(S=1<<l-1;x&S;)S>>=1;if(S!==0?(x&=S-1,x+=S):x=0,c++,--G[l]===0){if(l===h)break;l=t[n+s[c]]}if(l>d&&(x&B)!==k){for(m===0&&(m=d),I+=f,p=l-m,y=1<<p;p+m<h&&(y-=G[p+m],!(y<=0));)p++,y<<=1;if(w+=1<<p,e===Ng&&w>Px||e===Ox&&w>Lx)return 1;k=x&B,i[k]=d<<24|p<<16|I-o|0}}return x!==0&&(i[I+x]=l-m<<24|64<<16|0),a.bits=d,0};const RO=0,zx=1,Ux=2,{Z_FINISH:Gx,Z_BLOCK:FO,Z_TREES:gh,Z_OK:vo,Z_STREAM_END:MO,Z_NEED_DICT:PO,Z_STREAM_ERROR:mn,Z_DATA_ERROR:Hx,Z_MEM_ERROR:Vx,Z_BUF_ERROR:LO,Z_DEFLATED:jx}=eu,mh=16180,$x=16181,qx=16182,Wx=16183,Zx=16184,Yx=16185,Qx=16186,Xx=16187,Kx=16188,Jx=16189,bh=16190,vr=16191,Og=16192,eE=16193,zg=16194,tE=16195,nE=16196,rE=16197,iE=16198,yh=16199,wh=16200,oE=16201,sE=16202,aE=16203,lE=16204,uE=16205,Ug=16206,cE=16207,fE=16208,Ye=16209,hE=16210,dE=16211,NO=852,OO=592,zO=15,pE=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function UO(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ao=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<mh||t.mode>dE?1:0},gE=e=>{if(Ao(e))return mn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=mh,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(NO),t.distcode=t.distdyn=new Int32Array(OO),t.sane=1,t.back=-1,vo},mE=e=>{if(Ao(e))return mn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,gE(e)},bE=(e,t)=>{let n;if(Ao(e))return mn;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?mn:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,mE(e))},yE=(e,t)=>{if(!e)return mn;const n=new UO;e.state=n,n.strm=e,n.window=null,n.mode=mh;const r=bE(e,t);return r!==vo&&(e.state=null),r},GO=e=>yE(e,zO);let wE=!0,Gg,Hg;const HO=e=>{if(wE){Gg=new Int32Array(512),Hg=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(lu(zx,e.lens,0,288,Gg,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;lu(Ux,e.lens,0,32,Hg,0,e.work,{bits:5}),wE=!1}e.lencode=Gg,e.lenbits=9,e.distcode=Hg,e.distbits=5},vE=(e,t,n,r)=>{let i;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},VO=(e,t)=>{let n,r,i,o,s,a,u,l,c,f,h,d,p,m,y=0,w,x,S,_,k,B,I,D;const M=new Uint8Array(4);let G,N;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ao(e)||!e.output||!e.input&&e.avail_in!==0)return mn;n=e.state,n.mode===vr&&(n.mode=Og),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,f=a,h=u,D=vo;e:for(;;)switch(n.mode){case mh:if(n.wrap===0){n.mode=Og;break}for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0),l=0,c=0,n.mode=$x;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Ye;break}if((l&15)!==jx){e.msg="unknown compression method",n.mode=Ye;break}if(l>>>=4,c-=4,I=(l&15)+8,n.wbits===0&&(n.wbits=I),I>15||I>n.wbits){e.msg="invalid window size",n.mode=Ye;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?Jx:vr,l=0,c=0;break;case $x:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.flags=l,(n.flags&255)!==jx){e.msg="unknown compression method",n.mode=Ye;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ye;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0,n.mode=qx;case qx:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=pt(n.check,M,4,0)),l=0,c=0,n.mode=Wx;case Wx:for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0,n.mode=Zx;case Zx:if(n.flags&1024){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(M[0]=l&255,M[1]=l>>>8&255,n.check=pt(n.check,M,2,0)),l=0,c=0}else n.head&&(n.head.extra=null);n.mode=Yx;case Yx:if(n.flags&1024&&(d=n.length,d>a&&(d=a),d&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),I)),n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,o)),a-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Qx;case Qx:if(n.flags&2048){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Xx;case Xx:if(n.flags&4096){if(a===0)break e;d=0;do I=r[o+d++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=pt(n.check,r,d,o)),a-=d,o+=d,I)break e}else n.head&&(n.head.comment=null);n.mode=Kx;case Kx:if(n.flags&512){for(;c<16;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ye;break}l=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=vr;break;case Jx:for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}e.adler=n.check=pE(l),l=0,c=0,n.mode=bh;case bh:if(n.havedict===0)return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,PO;e.adler=n.check=1,n.mode=vr;case vr:if(t===FO||t===gh)break e;case Og:if(n.last){l>>>=c&7,c-=c&7,n.mode=Ug;break}for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}switch(n.last=l&1,l>>>=1,c-=1,l&3){case 0:n.mode=eE;break;case 1:if(HO(n),n.mode=yh,t===gh){l>>>=2,c-=2;break e}break;case 2:n.mode=nE;break;case 3:e.msg="invalid block type",n.mode=Ye}l>>>=2,c-=2;break;case eE:for(l>>>=c&7,c-=c&7;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ye;break}if(n.length=l&65535,l=0,c=0,n.mode=zg,t===gh)break e;case zg:n.mode=tE;case tE:if(d=n.length,d){if(d>a&&(d=a),d>u&&(d=u),d===0)break e;i.set(r.subarray(o,o+d),s),a-=d,o+=d,u-=d,s+=d,n.length-=d;break}n.mode=vr;break;case nE:for(;c<14;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.nlen=(l&31)+257,l>>>=5,c-=5,n.ndist=(l&31)+1,l>>>=5,c-=5,n.ncode=(l&15)+4,l>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ye;break}n.have=0,n.mode=rE;case rE:for(;n.have<n.ncode;){for(;c<3;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.lens[ne[n.have++]]=l&7,l>>>=3,c-=3}for(;n.have<19;)n.lens[ne[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},D=lu(RO,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid code lengths set",n.mode=Ye;break}n.have=0,n.mode=iE;case iE:for(;n.have<n.nlen+n.ndist;){for(;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,x=y>>>16&255,S=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(S<16)l>>>=w,c-=w,n.lens[n.have++]=S;else{if(S===16){for(N=w+2;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(l>>>=w,c-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Ye;break}I=n.lens[n.have-1],d=3+(l&3),l>>>=2,c-=2}else if(S===17){for(N=w+3;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=3+(l&7),l>>>=3,c-=3}else{for(N=w+7;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,I=0,d=11+(l&127),l>>>=7,c-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ye;break}for(;d--;)n.lens[n.have++]=I}}if(n.mode===Ye)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ye;break}if(n.lenbits=9,G={bits:n.lenbits},D=lu(zx,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,D){e.msg="invalid literal/lengths set",n.mode=Ye;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},D=lu(Ux,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,D){e.msg="invalid distances set",n.mode=Ye;break}if(n.mode=yh,t===gh)break e;case yh:n.mode=wh;case wh:if(a>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,kO(e,h),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,c=n.bits,n.mode===vr&&(n.back=-1);break}for(n.back=0;y=n.lencode[l&(1<<n.lenbits)-1],w=y>>>24,x=y>>>16&255,S=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(x&&!(x&240)){for(_=w,k=x,B=S;y=n.lencode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,x=y>>>16&255,S=y&65535,!(_+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,n.length=S,x===0){n.mode=uE;break}if(x&32){n.back=-1,n.mode=vr;break}if(x&64){e.msg="invalid literal/length code",n.mode=Ye;break}n.extra=x&15,n.mode=oE;case oE:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=sE;case sE:for(;y=n.distcode[l&(1<<n.distbits)-1],w=y>>>24,x=y>>>16&255,S=y&65535,!(w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(!(x&240)){for(_=w,k=x,B=S;y=n.distcode[B+((l&(1<<_+k)-1)>>_)],w=y>>>24,x=y>>>16&255,S=y&65535,!(_+w<=c);){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}l>>>=_,c-=_,n.back+=_}if(l>>>=w,c-=w,n.back+=w,x&64){e.msg="invalid distance code",n.mode=Ye;break}n.offset=S,n.extra=x&15,n.mode=aE;case aE:if(n.extra){for(N=n.extra;c<N;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ye;break}n.mode=lE;case lE:if(u===0)break e;if(d=h-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ye;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),m=n.window}else m=i,p=s-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[s++]=m[p++];while(--d);n.length===0&&(n.mode=wh);break;case uE:if(u===0)break e;i[s++]=n.length,u--,n.mode=wh;break;case Ug:if(n.wrap){for(;c<32;){if(a===0)break e;a--,l|=r[o++]<<c,c+=8}if(h-=u,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,s-h):Jl(n.check,i,h,s-h)),h=u,n.wrap&4&&(n.flags?l:pE(l))!==n.check){e.msg="incorrect data check",n.mode=Ye;break}l=0,c=0}n.mode=cE;case cE:if(n.wrap&&n.flags){for(;c<32;){if(a===0)break e;a--,l+=r[o++]<<c,c+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ye;break}l=0,c=0}n.mode=fE;case fE:D=MO;break e;case Ye:D=Hx;break e;case hE:return Vx;case dE:default:return mn}return e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Ye&&(n.mode<Ug||t!==Gx))&&vE(e,e.output,e.next_out,h-e.avail_out),f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,n.total+=h,n.wrap&4&&h&&(e.adler=n.check=n.flags?pt(n.check,i,h,e.next_out-h):Jl(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===vr?128:0)+(n.mode===yh||n.mode===zg?256:0),(f===0&&h===0||t===Gx)&&D===vo&&(D=LO),D},jO=e=>{if(Ao(e))return mn;let t=e.state;return t.window&&(t.window=null),e.state=null,vo},$O=(e,t)=>{if(Ao(e))return mn;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,vo):mn},qO=(e,t)=>{const n=t.length;let r,i,o;return Ao(e)||(r=e.state,r.wrap!==0&&r.mode!==bh)?mn:r.mode===bh&&(i=1,i=Jl(i,t,n,0),i!==r.check)?Hx:(o=vE(e,t,n,n),o?(r.mode=hE,Vx):(r.havedict=1,vo))};var WO=mE,ZO=bE,YO=gE,QO=GO,XO=yE,KO=VO,JO=jO,ez=$O,tz=qO,nz="pako inflate (from Nodeca project)",Ar={inflateReset:WO,inflateReset2:ZO,inflateResetKeep:YO,inflateInit:QO,inflateInit2:XO,inflate:KO,inflateEnd:JO,inflateGetHeader:ez,inflateSetDictionary:tz,inflateInfo:nz};function rz(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var iz=rz;const AE=Object.prototype.toString,{Z_NO_FLUSH:oz,Z_FINISH:sz,Z_OK:uu,Z_STREAM_END:Vg,Z_NEED_DICT:jg,Z_STREAM_ERROR:az,Z_DATA_ERROR:xE,Z_MEM_ERROR:lz}=eu;function cu(e){this.options=hh.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Fx,this.strm.avail_out=0;let n=Ar.inflateInit2(this.strm,t.windowBits);if(n!==uu)throw new Error(Cs[n]);if(this.header=new iz,Ar.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=au.string2buf(t.dictionary):AE.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ar.inflateSetDictionary(this.strm,t.dictionary),n!==uu)))throw new Error(Cs[n])}cu.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?sz:oz,AE.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Ar.inflate(n,s),o===jg&&i&&(o=Ar.inflateSetDictionary(n,i),o===uu?o=Ar.inflate(n,s):o===xE&&(o=jg));n.avail_in>0&&o===Vg&&n.state.wrap>0&&e[n.next_in]!==0;)Ar.inflateReset(n),o=Ar.inflate(n,s);switch(o){case az:case xE:case jg:case lz:return this.onEnd(o),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||o===Vg))if(this.options.to==="string"){let u=au.utf8border(n.output,n.next_out),l=n.next_out-u,c=au.buf2string(n.output,u);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(u,u+l),0),this.onData(c)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===uu&&a===0)){if(o===Vg)return o=Ar.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},cu.prototype.onData=function(e){this.chunks.push(e)},cu.prototype.onEnd=function(e){e===uu&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=hh.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function $g(e,t){const n=new cu(t);if(n.push(e),n.err)throw n.msg||Cs[n.err];return n.result}function uz(e,t){return t=t||{},t.raw=!0,$g(e,t)}var cz=cu,fz=$g,hz=uz,dz=$g,pz=eu,gz={Inflate:cz,inflate:fz,inflateRaw:hz,ungzip:dz,constants:pz};const{Inflate:bH,inflate:yH,inflateRaw:mz,ungzip:wH}=gz;var bz=mz;function yz(e){return bz(e.subarray(2))}let wz=class extends Error{constructor(t){super(t),this.code="ERR_ABORTED"}};function vz(e){e.sort((i,o)=>Number(i.offset)-Number(o.offset));const t=[];let n,r;for(const i of e)n&&r&&Number(i.offset)-r<=2e3?(n.length=BigInt(Number(n.length)+Number(i.length)-r+Number(i.offset)),n.blocks.push(i)):t.push(n={blocks:[i],length:i.length,offset:i.offset}),r=Number(n.offset)+Number(n.length);return t}function vh(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new wz("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}const Az=1,xz=2,Ez=3;function qg(e,t,n,r){return e<r&&t>=n}function _z(e){const t=e?"big":"little",n=new Re().endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),r=new Re().endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:new Re().endianess(t).array("blocksToFetch",{length:"cnt",type:new Re().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:new Re().array("recurOffsets",{length:"cnt",type:new Re().endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),i=new Re().endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:new Re().endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:{[Ez]:new Re().array("items",{length:"itemCount",type:new Re().floatle("score")}),[xz]:new Re().array("items",{length:"itemCount",type:new Re().endianess(t).int32("start").floatle("score")}),[Az]:new Re().array("items",{length:"itemCount",type:new Re().endianess(t).int32("start").int32("end").floatle("score")})}}),bigBedParser:i,summaryParser:n,leafParser:r}}class EE{constructor(t,n,r,i,o,s){if(this.bbi=t,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=i,this.isCompressed=o,this.blockType=s,this.featureCache=new sh({cache:new ah({maxSize:1e3}),fill:async(u,l)=>{const c=Number(u.length),f=Number(u.offset),{buffer:h}=await this.bbi.read(ve.Buffer.alloc(c),0,c,f,{signal:l});return h}}),!(r>=0))throw new Error("invalid cirTreeOffset!");const a=_z(i);this.leafParser=a.leafParser,this.bigBedParser=a.bigBedParser}async readWigData(t,n,r,i,o){try{const{refsByName:s,bbi:a,cirTreeOffset:u,isBigEndian:l}=this,c=s[t];c===void 0&&i.complete();const f={chrId:c,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=a.read(ve.Buffer.alloc(48),0,48,Number(u),o));const{buffer:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],m=0;const y=(_,k,B)=>{try{const I=_.subarray(k),D=this.leafParser.parse(I);if(D.blocksToFetch&&(p=p.concat(D.blocksToFetch.filter(M=>w(M)).map(M=>({offset:M.blockOffset,length:M.blockSize})))),D.recurOffsets){const M=D.recurOffsets.filter(G=>w(G)).map(G=>Number(G.blockOffset));M.length>0&&S(M,B+1)}}catch(I){i.error(I)}},w=_=>{const{startChrom:k,startBase:B,endChrom:I,endBase:D}=_;return(k<c||k===c&&B<=r)&&(I>c||I===c&&D>=n)},x=async(_,k,B)=>{try{const I=k.max-k.min,D=k.min,M=await this.featureCache.get(`${I}_${D}`,{length:I,offset:D},o==null?void 0:o.signal);for(const G of _)k.contains(G)&&(y(M,G-D,B),m-=1,m===0&&this.readFeatures(i,p,{...o,request:f}).catch(N=>i.error(N)))}catch(I){i.error(I)}},S=(_,k)=>{try{m+=_.length;const B=4+Number(d)*32;let I=new Es([{min:_[0],max:_[0]+B}]);for(let D=1;D<_.length;D+=1){const M=new Es([{min:_[D],max:_[D]+B}]);I=I.union(M)}I.getRanges().map(D=>x(_,D,k))}catch(B){i.error(B)}};return S([Number(u)+48],1)}catch(s){i.error(s)}}parseSummaryBlock(t,n,r){const i=[];let o=n;const s=new DataView(t.buffer,t.byteOffset,t.length);for(;o<t.byteLength;){const a=s.getUint32(o,!0);o+=4;const u=s.getUint32(o,!0);o+=4;const l=s.getUint32(o,!0);o+=4;const c=s.getUint32(o,!0);o+=4;const f=s.getFloat32(o,!0);o+=4;const h=s.getFloat32(o,!0);o+=4;const d=s.getFloat32(o,!0);o+=4,o+=4,(!r||a===r.chrId&&qg(u,l,r.start,r.end))&&i.push({start:u,end:l,maxScore:h,minScore:f,summary:!0,score:d/(c||1)})}return i}parseBigBedBlock(t,n,r,i){const o=[];let s=n;for(;s<t.byteLength;){const a=this.bigBedParser.parse(t.subarray(s));a.uniqueId=`bb-${r+s}`,o.push(a),s+=a.offset}return i?o.filter(a=>qg(a.start,a.end,i.start,i.end)):o}parseBigWigBlock(t,n,r){const i=t.subarray(n),o=new DataView(i.buffer,i.byteOffset,i.length);let s=0;s+=4;const a=o.getInt32(s,!0);s+=8;const u=o.getUint32(s,!0);s+=4;const l=o.getUint32(s,!0);s+=4;const c=o.getUint8(s);s+=2;const f=o.getUint16(s,!0);s+=2;const h=new Array(f);switch(c){case 1:{for(let d=0;d<f;d++){const p=o.getInt32(s,!0);s+=4;const m=o.getInt32(s,!0);s+=4;const y=o.getFloat32(s,!0);s+=4,h[d]={start:p,end:m,score:y}}break}case 2:{for(let d=0;d<f;d++){const p=o.getInt32(s,!0);s+=4;const m=o.getFloat32(s,!0);s+=4,h[d]={score:m,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=o.getFloat32(s,!0);s+=4;const m=a+d*u;h[d]={score:p,start:m,end:m+l}}break}}return r?h.filter(d=>qg(d.start,d.end,r.start,r.end)):h}async readFeatures(t,n,r={}){try{const{blockType:i,isCompressed:o}=this,{signal:s,request:a}=r,u=vz(n);vh(s),await Promise.all(u.map(async l=>{vh(s);const{length:c,offset:f}=l,h=await this.featureCache.get(`${c}_${f}`,l,s);for(const d of l.blocks){vh(s);let p=Number(d.offset)-Number(l.offset),m=h;switch(o&&(m=yz(h.subarray(p)),p=0),vh(s),i){case"summary":{t.next(this.parseSummaryBlock(m,p,a));break}case"bigwig":{t.next(this.parseBigWigBlock(m,p,a));break}case"bigbed":{t.next(this.parseBigBedBlock(m,p,Number(d.offset)*256,a));break}default:console.warn(`Don't know what to do with ${i}`)}}})),t.complete()}catch(i){t.error(i)}}}var Wg=function(e,t){return Wg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Wg(e,t)};function Zg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Sz(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(c){try{l(r.next(c))}catch(f){s(f)}}function u(c){try{l(r.throw(c))}catch(f){s(f)}}function l(c){c.done?o(c.value):i(c.value).then(a,u)}l((r=r.apply(e,t||[])).next())})}function _E(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(c){return u([l,c])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(c){l=[6,c],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function fu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yg(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function Qg(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Fs(e){return this instanceof Fs?(this.v=e,this):new Fs(e)}function Cz(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(h){r[h]&&(i[h]=function(d){return new Promise(function(p,m){o.push([h,d,p,m])>1||a(h,d)})})}function a(h,d){try{u(r[h](d))}catch(p){f(o[0][3],p)}}function u(h){h.value instanceof Fs?Promise.resolve(h.value.v).then(l,c):f(o[0][2],h)}function l(h){a("next",h)}function c(h){a("throw",h)}function f(h,d){h(d),o.shift(),o.length&&a(o[0][0],o[0][1])}}function kz(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof fu=="function"?fu(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,u){s=e[o](s),i(a,u,s.done,s.value)})}}function i(o,s,a,u){Promise.resolve(u).then(function(l){o({value:l,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function lt(e){return typeof e=="function"}function SE(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Xg=SE(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
607
607
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
608
- `):"",this.name="UnsubscriptionError",this.errors=n}});function IE(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Wg=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=fu(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(lt(c))try{c()}catch(m){o=m instanceof qg?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=fu(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{DE(p)}catch(m){o=o??[],m instanceof qg?o=$g($g([],jg(o)),jg(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new qg(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)DE(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&IE(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&IE(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Wg.EMPTY;function BE(e){return e instanceof Wg||e&&"closed"in e&&lt(e.remove)&&lt(e.add)&&lt(e.unsubscribe)}function DE(e){lt(e)?e():e.unsubscribe()}var RE={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},FE={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$g([e,t],jg(n)))},clearTimeout:function(e){var t=FE.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ME(e){FE.setTimeout(function(){throw e})}function PE(){}function Iz(e){e()}var Zg=function(e){Vg(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,BE(n)&&n.add(r)):r.destination=Fz,r}return t.create=function(n,r,i){return new wh(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Wg),Bz=Function.prototype.bind;function Yg(e,t){return Bz.call(e,t)}var Dz=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){vh(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){vh(r)}else vh(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){vh(n)}},e}(),wh=function(e){Vg(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(lt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&RE.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Yg(n.next,s),error:n.error&&Yg(n.error,s),complete:n.complete&&Yg(n.complete,s)}):a=n}return o.destination=new Dz(a),o}return t}(Zg);function vh(e){ME(e)}function Rz(e){throw e}var Fz={closed:!0,next:PE,error:Rz,complete:PE},Qg=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function LE(e){return e}function Mz(e){return e.length===0?LE:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var mn=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=Lz(t)?t:new wh(t,n,r);return Iz(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=NE(n),new n(function(i,o){var a=new wh({next:function(s){try{t(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Qg]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Mz(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=NE(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function NE(e){var t;return(t=e??RE.Promise)!==null&&t!==void 0?t:Promise}function Pz(e){return e&&lt(e.next)&&lt(e.error)&&lt(e.complete)}function Lz(e){return e&&e instanceof Zg||Pz(e)&&BE(e)}function Nz(e){return lt(e==null?void 0:e.lift)}function Ma(e){return function(t){if(Nz(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function hu(e,t,n,r,i){return new Oz(e,t,n,r,i)}var Oz=function(e){Vg(t,e);function t(n,r,i,o,a,s){var u=e.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:e.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,u}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(Zg),zz=new mn(function(e){return e.complete()});function Uz(e){return e&&lt(e.schedule)}function OE(e){return e[e.length-1]}function Gz(e){return Uz(OE(e))?e.pop():void 0}function Hz(e,t){return typeof OE(e)=="number"?e.pop():t}var zE=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function UE(e){return lt(e==null?void 0:e.then)}function GE(e){return lt(e[Qg])}function HE(e){return Symbol.asyncIterator&&lt(e==null?void 0:e[Symbol.asyncIterator])}function VE(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Vz(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jE=Vz();function $E(e){return lt(e==null?void 0:e[jE])}function qE(e){return kz(this,arguments,function(){var n,r,i,o;return kE(this,function(a){switch(a.label){case 0:n=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Fa(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Fa(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Fa(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function WE(e){return lt(e==null?void 0:e.getReader)}function Pa(e){if(e instanceof mn)return e;if(e!=null){if(GE(e))return jz(e);if(zE(e))return $z(e);if(UE(e))return qz(e);if(HE(e))return ZE(e);if($E(e))return Wz(e);if(WE(e))return Zz(e)}throw VE(e)}function jz(e){return new mn(function(t){var n=e[Qg]();if(lt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $z(e){return new mn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function qz(e){return new mn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,ME)})}function Wz(e){return new mn(function(t){var n,r;try{for(var i=fu(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ZE(e){return new mn(function(t){Yz(e,t).catch(function(n){return t.error(n)})})}function Zz(e){return ZE(qE(e))}function Yz(e,t){var n,r,i,o;return Cz(this,void 0,void 0,function(){var a,s;return kE(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=Tz(e),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function wi(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function YE(e,t){return t===void 0&&(t=0),Ma(function(n,r){n.subscribe(hu(r,function(i){return wi(r,e,function(){return r.next(i)},t)},function(){return wi(r,e,function(){return r.complete()},t)},function(i){return wi(r,e,function(){return r.error(i)},t)}))})}function QE(e,t){return t===void 0&&(t=0),Ma(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Qz(e,t){return Pa(e).pipe(QE(t),YE(t))}function Xz(e,t){return Pa(e).pipe(QE(t),YE(t))}function Kz(e,t){return new mn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Jz(e,t){return new mn(function(n){var r;return wi(n,t,function(){r=e[jE](),wi(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return lt(r==null?void 0:r.return)&&r.return()}})}function XE(e,t){if(!e)throw new Error("Iterable cannot be null");return new mn(function(n){wi(n,t,function(){var r=e[Symbol.asyncIterator]();wi(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function eU(e,t){return XE(qE(e),t)}function tU(e,t){if(e!=null){if(GE(e))return Qz(e,t);if(zE(e))return Kz(e,t);if(UE(e))return Xz(e,t);if(HE(e))return XE(e,t);if($E(e))return Jz(e,t);if(WE(e))return eU(e,t)}throw VE(e)}function nU(e,t){return t?tU(e,t):Pa(e)}var rU=TE(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function KE(e,t){var n=typeof t=="object";return new Promise(function(r,i){var o=new wh({next:function(a){r(a),o.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new rU)}});e.subscribe(o)})}function JE(e,t){return Ma(function(n,r){var i=0;n.subscribe(hu(r,function(o){r.next(e.call(t,o,i++))}))})}function iU(e,t,n,r,i,o,a,s){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&t.complete()},d=function(m){return l<r?p(m):u.push(m)},p=function(m){o&&t.next(m),l++;var y=!1;Pa(n(m,c++)).subscribe(hu(t,function(w){i==null||i(w),o?d(w):t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var A=u.shift();a?wi(t,a,function(){return p(A)}):p(A)};u.length&&l<r;)w();h()}catch(A){t.error(A)}}))};return e.subscribe(hu(t,d,function(){f=!0,h()})),function(){s==null||s()}}function e4(e,t,n){return n===void 0&&(n=1/0),lt(t)?e4(function(r,i){return JE(function(o,a){return t(r,o,i,a)})(Pa(e(r,i)))},n):(typeof t=="number"&&(n=t),Ma(function(r,i){return iU(r,i,e,n)}))}function oU(e){return e===void 0&&(e=1/0),e4(LE,e)}function aU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Gz(e),r=Hz(e,1/0),i=e;return i.length?i.length===1?Pa(i[0]):oU(r)(nU(i,n)):zz}function sU(e,t,n,r,i){return function(o,a){var s=n,u=t,l=0;o.subscribe(hu(a,function(c){var f=l++;u=s?e(u,c,f):(s=!0,c),r&&a.next(u)},i&&function(){s&&a.next(u),a.complete()}))}}function t4(e,t){return Ma(sU(e,t,arguments.length>=2,!1,!0))}var lU=function(e,t){return e.push(t),e};function uU(){return Ma(function(e,t){t4(lU,[])(e).subscribe(t)})}const n4=-2003829722,Xg=-2021002517;function cU(e){return new TextDecoder().decode(e)}function r4(e){const t=e?"big":"little",n=new Re().endianess(t).int32("magic").uint16("version").uint16("numZoomLevels").uint64("chromTreeOffset").uint64("unzoomedDataOffset").uint64("unzoomedIndexOffset").uint16("fieldCount").uint16("definedFieldCount").uint64("asOffset").uint64("totalSummaryOffset").uint32("uncompressBufSize").uint64("extHeaderOffset").array("zoomLevels",{length:"numZoomLevels",type:new Re().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Re().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Re().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),o=new Re().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:o}}class i4{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=a=>a,path:i,url:o}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(o)this.bbi=new no(o);else if(i)this.bbi=new dt(i);else throw new Error("no file given")}async _getHeader(t){const n=await this._getMainHeader(t),r=await this._readChromTree(n,t);return{...n,...r}}async _getMainHeader(t,n=2e3){const{buffer:r}=await this.bbi.read(be.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),o=r4(i),a=o.headerParser.parse(r),{magic:s,asOffset:u,totalSummaryOffset:l}=a;if(a.fileType=s===Xg?"bigbed":"bigwig",u>n||l>n)return this._getMainHeader(t,n*2);if(u){const c=Number(a.asOffset);a.autoSql=cU(r.subarray(c,r.indexOf(0,c)))}if(a.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(a.totalSummaryOffset){const c=r.subarray(Number(a.totalSummaryOffset)),f=o.totalSummaryParser.parse(c);a.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...a,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===n4||n===Xg)return!1;if(n=t.readInt32BE(0),n===n4||n===Xg)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",o=[],a={};let s=Number(t.unzoomedDataOffset);const u=Number(t.chromTreeOffset);for(;s%4!==0;)s+=1;const l=s-u,{buffer:c}=await this.bbi.read(be.Buffer.alloc(l),0,l,Number(u),n),f=r4(r),{keySize:h}=f.chromTreeParser.parse(c),d=new Re().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Re().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),m=32,y=async w=>{let A=w;if(A>=c.length)throw new Error("reading beyond end of buffer");const S=f.isLeafNode.parse(c.subarray(A)),{isLeafNode:_,cnt:k}=S;if(A+=S.offset,_)for(let B=0;B<k;B+=1){const I=d.parse(c.subarray(A));A+=I.offset;const{key:D,refId:M,refSize:G}=I,N={name:D,id:M,length:G};a[this.renameRefSeqs(D)]=M,o[M]=N}else{const B=[];for(let I=0;I<k;I+=1){const D=p.parse(c.subarray(A)),{childOffset:M}=D;A+=D.offset,B.push(y(Number(M)-Number(u)))}await Promise.all(B)}};return await y(m),{refsByName:a,refsByNumber:o}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:o,fileType:a}=await this.getHeader(t);return new CE(this.bbi,r,n,o,i>0,a)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const o=this.renameRefSeqs(t);let a;const{basesPerSpan:s,scale:u}=i||{};return s?a=await this.getView(1/s,i):u?a=await this.getView(u,i):a=await this.getView(1,i),new mn(l=>{a.readWigData(o,n,r,l,i)})}async getFeatures(t,n,r,i){const o=await this.getFeatureStream(t,n,r,i);return(await KE(o.pipe(uU()))).flat()}}class fU extends i4{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:o,isBigEndian:a,uncompressBufSize:s}=await this.getHeader(n),u=1/t;let l=r.length;o||(l-=1);for(let c=l;c>=0;c-=1){const f=r[c];if(f&&f.reductionLevel<=2*u){const h=Number(f.indexOffset);return new CE(this.bbi,i,h,a,s>0,"summary")}}return this.getUnzoomedView(n)}}function hU(e){return e.filter(t=>!!t)}class dU extends i4{constructor(){super(...arguments),this.readIndicesCache=new ih({cache:new oh({maxSize:1}),fill:(t,n)=>this._readIndices({...t,signal:n})})}readIndices(t={}){const{signal:n,...r}=t;return this.readIndicesCache.get(JSON.stringify(r),t,n)}async getView(t,n){return this.getUnzoomedView(n)}async _readIndices(t){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(t),{buffer:i}=await this.bbi.read(be.Buffer.alloc(64),0,64,Number(n)),o=r?"big":"little",a=new Re().endianess(o).uint16("size").uint16("count").uint64("offset").parse(i),{count:s,offset:u}=a;if(s===0)return[];const l=20,c=l*s,{buffer:f}=await this.bbi.read(be.Buffer.alloc(c),0,c,Number(u)),h=new Re().endianess(o).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<s;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const o=i.map(async a=>{const{offset:s,field:u}=a,{buffer:l}=await this.bbi.read(be.Buffer.alloc(32),0,32,Number(s),n),c=r?"big":"little",f=new Re().endianess(c).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),m=new Re().endianess(c).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Re().array("leafkeys",{length:"cnt",type:new Re().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Re().array("keys",{length:"cnt",type:new Re().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async A=>{const S=Number(A),_=4+h*(d+p),{buffer:k}=await this.bbi.read(be.Buffer.alloc(_),0,_,S,n),B=m.parse(k);if(B.leafkeys){let I;for(let D=0;D<B.leafkeys.length;D+=1){const{key:M}=B.leafkeys[D];if(t.localeCompare(M)<0&&I)return y(I);I=B.leafkeys[D].offset}return y(I)}for(let I=0;I<B.keys.length;I+=1)if(B.keys[I].key===t)return{...B.keys[I],field:u}},w=32;return y(Number(s)+w)});return hU(await Promise.all(o))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),o=r.map(s=>new mn(u=>{i.readFeatures(u,[s],n)}).pipe(t4((u,l)=>u.concat(l)),JE(u=>{for(const l of u)l.field=s.field;return u})));return(await KE(aU(...o))).filter(s=>{var u;return((u=s.rest)===null||u===void 0?void 0:u.split(" ")[(s.field||0)-3])===t})}}const o4=Object.freeze(Object.defineProperty({__proto__:null,BigBed:dU,BigWig:fU},Symbol.toStringTag,{value:"Module"}));function pU(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function La(e,t,n,r){this.message=e,this.expected=t,this.found=n,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,La)}pU(La,Error),La.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var c="",f;for(f=0;f<l.parts.length;f++)c+=l.parts[f]instanceof Array?o(l.parts[f][0])+"-"+o(l.parts[f][1]):o(l.parts[f]);return"["+(l.inverted?"^":"")+c+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function o(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function a(l){return n[l.type](l)}function s(l){var c=new Array(l.length),f,h;for(f=0;f<l.length;f++)c[f]=a(l[f]);if(c.sort(),c.length>0){for(f=1,h=1;f<c.length;f++)c[f-1]!==c[f]&&(c[h]=c[f],h++);c.length=h}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function u(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+s(e)+" but "+u(t)+" found."};function gU(e,t){t=t!==void 0?t:{};var n={},r={declaration:I_},i=I_,o="(",a=Ne("(",!1),s=")",u=Ne(")",!1),l=function(E,U,K,J){return{type:E,name:U,comment:K,fields:J}},c="simple",f=Ne("simple",!1),h="object",d=Ne("object",!1),p="table",m=Ne("table",!1),y="auto",w=Ne("auto",!1),A="primary",S=Ne("primary",!1),_="index",k=Ne("index",!1),B="unique",I=Ne("unique",!1),D=function(E,U){return U},M=function(E,U){return E.name&&U.unshift(E),U},G="#",N=Ne("#",!1),ne=";",ie=Ne(";",!1),he=function(E,U,K){return{type:E,name:U,comment:K}},me="[",Fe=Ne("[",!1),Ae="]",Le=Ne("]",!1),Oe=function(E,U,K,J){return{type:E,size:U,name:K,comment:J}},Je=function(E,U,K,J){return{type:E,vals:U,name:K,comment:J}},Ce=",",ke=Ne(",",!1),gt=function(E,U){return U.unshift(E),U},$t="int",He=Ne("int",!1),L="uint",P=Ne("uint",!1),q="short",j=Ne("short",!1),Y="ushort",C=Ne("ushort",!1),x="byte",V=Ne("byte",!1),W="ubyte",ue=Ne("ubyte",!1),te="float",ce=Ne("float",!1),qt="char",Si=Ne("char",!1),Ci="string",ki=Ne("string",!1),kt="lstring",Tr=Ne("lstring",!1),Ti="enum",Wt=Ne("enum",!1),rr="double",v=Ne("double",!1),g="bigint",b=Ne("bigint",!1),T="set",F=Ne("set",!1),O=function(E,U){return E+" "+U},$=/^[a-zA-Z_]/,fe=Qu([["a","z"],["A","Z"],"_"],!1,!1),$e=/^[a-zA-Z0-9_]/,ze=Qu([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Qe=function(E){return S_()},Te=/^[^\n\r]/,v_=Qu([`
609
- `,"\r"],!0,!1),PG=function(E){return E.join("").replace(/^"/,"").replace(/"$/,"")},LG=C_("integer"),x_=/^[0-9]/,A_=Qu([["0","9"]],!1,!1),NG=function(){return parseInt(S_(),10)},OG=C_("whitespace"),E_=/^[ \t\n\r]/,__=Qu([" "," ",`
610
- `,"\r"],!1,!1),R=0,Mt=0,Vh=[{line:1,column:1}],ir=0,Fm=[],oe=0,jh;if("startRule"in t){if(!(t.startRule in r))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=r[t.startRule]}function S_(){return e.substring(Mt,R)}function Ne(E,U){return{type:"literal",text:E,ignoreCase:U}}function Qu(E,U,K){return{type:"class",parts:E,inverted:U,ignoreCase:K}}function zG(){return{type:"end"}}function C_(E){return{type:"other",description:E}}function k_(E){var U=Vh[E],K;if(U)return U;for(K=E-1;!Vh[K];)K--;for(U=Vh[K],U={line:U.line,column:U.column};K<E;)e.charCodeAt(K)===10?(U.line++,U.column=1):U.column++,K++;return Vh[E]=U,U}function T_(E,U){var K=k_(E),J=k_(U);return{start:{offset:E,line:K.line,column:K.column},end:{offset:U,line:J.line,column:J.column}}}function ae(E){R<ir||(R>ir&&(ir=R,Fm=[]),Fm.push(E))}function UG(E,U,K){return new La(La.buildMessage(E,U),E,U,K)}function I_(){var E,U,K,J,re,Ve,Xe,wn,Ii,Ir,Bi,Br,Di,Dr;return E=R,U=ye(),U!==n?(K=B_(),K!==n?(J=ye(),J!==n?(re=D_(),re!==n?(Ve=ye(),Ve!==n?(Xe=$h(),Xe!==n?(wn=ye(),wn!==n?(e.charCodeAt(R)===40?(Ii=o,R++):(Ii=n,oe===0&&ae(a)),Ii!==n?(Ir=ye(),Ir!==n?(Bi=GG(),Bi!==n?(Br=ye(),Br!==n?(e.charCodeAt(R)===41?(Di=s,R++):(Di=n,oe===0&&ae(u)),Di!==n?(Dr=ye(),Dr!==n?(Mt=E,U=l(K,re,Xe,Bi),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E}function B_(){var E;return e.substr(R,6)===c?(E=c,R+=6):(E=n,oe===0&&ae(f)),E===n&&(e.substr(R,6)===h?(E=h,R+=6):(E=n,oe===0&&ae(d)),E===n&&(e.substr(R,5)===p?(E=p,R+=5):(E=n,oe===0&&ae(m)))),E}function D_(){var E,U,K,J;return E=Fn(),E===n&&(E=R,U=Fn(),U!==n?(K=R_(),K!==n?(U=[U,K],E=U):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=Fn(),U!==n?(e.substr(R,4)===y?(K=y,R+=4):(K=n,oe===0&&ae(w)),K!==n?(U=[U,K],E=U):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=Fn(),U!==n?(K=R_(),K!==n?(e.substr(R,4)===y?(J=y,R+=4):(J=n,oe===0&&ae(w)),J!==n?(U=[U,K,J],E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)))),E}function R_(){var E;return e.substr(R,7)===A?(E=A,R+=7):(E=n,oe===0&&ae(S)),E===n&&(e.substr(R,5)===_?(E=_,R+=5):(E=n,oe===0&&ae(k)),E===n&&(e.substr(R,6)===B?(E=B,R+=6):(E=n,oe===0&&ae(I)))),E}function $h(){var E;return E=F_(),E===n&&(E=ye()),E}function GG(){var E,U,K,J,re,Ve,Xe;if(E=R,U=Mm(),U!==n)if(K=ye(),K!==n){for(J=[],re=R,Ve=ye(),Ve!==n?(Xe=Mm(),Xe!==n?(Mt=re,Ve=D(U,Xe),re=Ve):(R=re,re=n)):(R=re,re=n);re!==n;)J.push(re),re=R,Ve=ye(),Ve!==n?(Xe=Mm(),Xe!==n?(Mt=re,Ve=D(U,Xe),re=Ve):(R=re,re=n)):(R=re,re=n);J!==n?(re=ye(),re!==n?(Mt=E,U=M(U,J),E=U):(R=E,E=n)):(R=E,E=n)}else R=E,E=n;else R=E,E=n;return E}function HG(){var E;return e.charCodeAt(R)===35?(E=G,R++):(E=n,oe===0&&ae(N)),E}function VG(){var E,U,K,J,re;return E=R,U=ye(),U!==n?(K=HG(),K!==n?(J=F_(),J!==n?(re=ye(),re!==n?(U=[U,K,J,re],E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E}function Mm(){var E,U,K,J,re,Ve,Xe,wn,Ii,Ir,Bi,Br,Di,Dr;return E=R,U=Pm(),U!==n?(K=ye(),K!==n?(J=Fn(),J!==n?(re=ye(),re!==n?(e.charCodeAt(R)===59?(Ve=ne,R++):(Ve=n,oe===0&&ae(ie)),Ve!==n?(Xe=ye(),Xe!==n?(wn=$h(),wn!==n?(Mt=E,U=he(U,J,wn),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=Pm(),U!==n?(K=ye(),K!==n?(e.charCodeAt(R)===91?(J=me,R++):(J=n,oe===0&&ae(Fe)),J!==n?(re=ye(),re!==n?(Ve=$G(),Ve!==n?(Xe=ye(),Xe!==n?(e.charCodeAt(R)===93?(wn=Ae,R++):(wn=n,oe===0&&ae(Le)),wn!==n?(Ii=ye(),Ii!==n?(Ir=Fn(),Ir!==n?(Bi=ye(),Bi!==n?(e.charCodeAt(R)===59?(Br=ne,R++):(Br=n,oe===0&&ae(ie)),Br!==n?(Di=ye(),Di!==n?(Dr=$h(),Dr!==n?(Mt=E,U=Oe(U,Ve,Ir,Dr),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=Pm(),U!==n?(K=ye(),K!==n?(e.charCodeAt(R)===40?(J=o,R++):(J=n,oe===0&&ae(a)),J!==n?(re=ye(),re!==n?(Ve=jG(),Ve!==n?(Xe=ye(),Xe!==n?(e.charCodeAt(R)===41?(wn=s,R++):(wn=n,oe===0&&ae(u)),wn!==n?(Ii=ye(),Ii!==n?(Ir=Fn(),Ir!==n?(Bi=ye(),Bi!==n?(e.charCodeAt(R)===59?(Br=ne,R++):(Br=n,oe===0&&ae(ie)),Br!==n?(Di=ye(),Di!==n?(Dr=$h(),Dr!==n?(Mt=E,U=Je(U,Ve,Ir,Dr),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E===n&&(E=VG()))),E}function jG(){var E,U,K,J,re,Ve,Xe;if(E=R,U=Fn(),U!==n){for(K=[],J=R,e.charCodeAt(R)===44?(re=Ce,R++):(re=n,oe===0&&ae(ke)),re!==n?(Ve=ye(),Ve!==n?(Xe=Fn(),Xe!==n?(Mt=J,re=D(U,Xe),J=re):(R=J,J=n)):(R=J,J=n)):(R=J,J=n);J!==n;)K.push(J),J=R,e.charCodeAt(R)===44?(re=Ce,R++):(re=n,oe===0&&ae(ke)),re!==n?(Ve=ye(),Ve!==n?(Xe=Fn(),Xe!==n?(Mt=J,re=D(U,Xe),J=re):(R=J,J=n)):(R=J,J=n)):(R=J,J=n);K!==n?(Mt=E,U=gt(U,K),E=U):(R=E,E=n)}else R=E,E=n;return E}function Pm(){var E,U,K,J;return e.substr(R,3)===$t?(E=$t,R+=3):(E=n,oe===0&&ae(He)),E===n&&(e.substr(R,4)===L?(E=L,R+=4):(E=n,oe===0&&ae(P)),E===n&&(e.substr(R,5)===q?(E=q,R+=5):(E=n,oe===0&&ae(j)),E===n&&(e.substr(R,6)===Y?(E=Y,R+=6):(E=n,oe===0&&ae(C)),E===n&&(e.substr(R,4)===x?(E=x,R+=4):(E=n,oe===0&&ae(V)),E===n&&(e.substr(R,5)===W?(E=W,R+=5):(E=n,oe===0&&ae(ue)),E===n&&(e.substr(R,5)===te?(E=te,R+=5):(E=n,oe===0&&ae(ce)),E===n&&(e.substr(R,4)===qt?(E=qt,R+=4):(E=n,oe===0&&ae(Si)),E===n&&(e.substr(R,6)===Ci?(E=Ci,R+=6):(E=n,oe===0&&ae(ki)),E===n&&(e.substr(R,7)===kt?(E=kt,R+=7):(E=n,oe===0&&ae(Tr)),E===n&&(e.substr(R,4)===Ti?(E=Ti,R+=4):(E=n,oe===0&&ae(Wt)),E===n&&(e.substr(R,6)===rr?(E=rr,R+=6):(E=n,oe===0&&ae(v)),E===n&&(e.substr(R,6)===g?(E=g,R+=6):(E=n,oe===0&&ae(b)),E===n&&(e.substr(R,3)===T?(E=T,R+=3):(E=n,oe===0&&ae(F)),E===n&&(E=R,U=B_(),U!==n?(K=ye(),K!==n?(J=D_(),J!==n?(Mt=E,U=O(U,J),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n))))))))))))))),E}function $G(){var E;return E=qG(),E===n&&(E=Fn()),E}function Fn(){var E,U,K,J,re;if(E=R,U=R,$.test(e.charAt(R))?(K=e.charAt(R),R++):(K=n,oe===0&&ae(fe)),K!==n){for(J=[],$e.test(e.charAt(R))?(re=e.charAt(R),R++):(re=n,oe===0&&ae(ze));re!==n;)J.push(re),$e.test(e.charAt(R))?(re=e.charAt(R),R++):(re=n,oe===0&&ae(ze));J!==n?(K=[K,J],U=K):(R=U,U=n)}else R=U,U=n;return U!==n&&(Mt=E,U=Qe()),E=U,E}function F_(){var E,U,K;for(E=R,U=[],Te.test(e.charAt(R))?(K=e.charAt(R),R++):(K=n,oe===0&&ae(v_));K!==n;)U.push(K),Te.test(e.charAt(R))?(K=e.charAt(R),R++):(K=n,oe===0&&ae(v_));return U!==n&&(Mt=E,U=PG(U)),E=U,E}function qG(){var E,U,K,J;if(oe++,E=R,U=ye(),U!==n){if(K=[],x_.test(e.charAt(R))?(J=e.charAt(R),R++):(J=n,oe===0&&ae(A_)),J!==n)for(;J!==n;)K.push(J),x_.test(e.charAt(R))?(J=e.charAt(R),R++):(J=n,oe===0&&ae(A_));else K=n;K!==n?(Mt=E,U=NG(),E=U):(R=E,E=n)}else R=E,E=n;return oe--,E===n&&(U=n,oe===0&&ae(LG)),E}function ye(){var E,U;for(oe++,E=[],E_.test(e.charAt(R))?(U=e.charAt(R),R++):(U=n,oe===0&&ae(__));U!==n;)E.push(U),E_.test(e.charAt(R))?(U=e.charAt(R),R++):(U=n,oe===0&&ae(__));return oe--,E===n&&(U=n,oe===0&&ae(OG)),E}if(jh=i(),jh!==n&&R===e.length)return jh;throw jh!==n&&R<e.length&&ae(zG()),UG(Fm,ir<e.length?e.charAt(ir):null,ir<e.length?T_(ir,ir+1):T_(ir,ir))}var a4={SyntaxError:La,parse:gU};const mU=kl(a4),Kg=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
608
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function CE(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Kg=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=fu(s),u=a.next();!u.done;u=a.next()){var l=u.value;l.remove(this)}}catch(m){t={error:m}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var c=this.initialTeardown;if(lt(c))try{c()}catch(m){o=m instanceof Xg?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=fu(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{TE(p)}catch(m){o=o??[],m instanceof Xg?o=Qg(Qg([],Yg(o)),Yg(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Xg(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)TE(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&CE(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&CE(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Kg.EMPTY;function kE(e){return e instanceof Kg||e&&"closed"in e&&lt(e.remove)&&lt(e.add)&&lt(e.unsubscribe)}function TE(e){lt(e)?e():e.unsubscribe()}var IE={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},BE={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Qg([e,t],Yg(n)))},clearTimeout:function(e){var t=BE.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function DE(e){BE.setTimeout(function(){throw e})}function RE(){}function Tz(e){e()}var Jg=function(e){Zg(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,kE(n)&&n.add(r)):r.destination=Rz,r}return t.create=function(n,r,i){return new Ah(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Kg),Iz=Function.prototype.bind;function em(e,t){return Iz.call(e,t)}var Bz=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){xh(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){xh(r)}else xh(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){xh(n)}},e}(),Ah=function(e){Zg(t,e);function t(n,r,i){var o=e.call(this)||this,s;if(lt(n)||!n)s={next:n??void 0,error:r??void 0,complete:i??void 0};else{var a;o&&IE.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},s={next:n.next&&em(n.next,a),error:n.error&&em(n.error,a),complete:n.complete&&em(n.complete,a)}):s=n}return o.destination=new Bz(s),o}return t}(Jg);function xh(e){DE(e)}function Dz(e){throw e}var Rz={closed:!0,next:RE,error:Dz,complete:RE},tm=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function FE(e){return e}function Fz(e){return e.length===0?FE:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var bn=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=Pz(t)?t:new Ah(t,n,r);return Tz(function(){var s=i,a=s.operator,u=s.source;o.add(a?a.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=ME(n),new n(function(i,o){var s=new Ah({next:function(a){try{t(a)}catch(u){o(u),s.unsubscribe()}},error:o,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[tm]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Fz(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=ME(t),new t(function(r,i){var o;n.subscribe(function(s){return o=s},function(s){return i(s)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function ME(e){var t;return(t=e??IE.Promise)!==null&&t!==void 0?t:Promise}function Mz(e){return e&&lt(e.next)&&lt(e.error)&&lt(e.complete)}function Pz(e){return e&&e instanceof Jg||Mz(e)&&kE(e)}function Lz(e){return lt(e==null?void 0:e.lift)}function Ms(e){return function(t){if(Lz(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function hu(e,t,n,r,i){return new Nz(e,t,n,r,i)}var Nz=function(e){Zg(t,e);function t(n,r,i,o,s,a){var u=e.call(this,n)||this;return u.onFinalize=s,u.shouldUnsubscribe=a,u._next=r?function(l){try{r(l)}catch(c){n.error(c)}}:e.prototype._next,u._error=o?function(l){try{o(l)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._complete,u}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(Jg),Oz=new bn(function(e){return e.complete()});function zz(e){return e&&lt(e.schedule)}function PE(e){return e[e.length-1]}function Uz(e){return zz(PE(e))?e.pop():void 0}function Gz(e,t){return typeof PE(e)=="number"?e.pop():t}var LE=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function NE(e){return lt(e==null?void 0:e.then)}function OE(e){return lt(e[tm])}function zE(e){return Symbol.asyncIterator&&lt(e==null?void 0:e[Symbol.asyncIterator])}function UE(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Hz(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var GE=Hz();function HE(e){return lt(e==null?void 0:e[GE])}function VE(e){return Cz(this,arguments,function(){var n,r,i,o;return _E(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Fs(n.read())];case 3:return r=s.sent(),i=r.value,o=r.done,o?[4,Fs(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Fs(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function jE(e){return lt(e==null?void 0:e.getReader)}function Ps(e){if(e instanceof bn)return e;if(e!=null){if(OE(e))return Vz(e);if(LE(e))return jz(e);if(NE(e))return $z(e);if(zE(e))return $E(e);if(HE(e))return qz(e);if(jE(e))return Wz(e)}throw UE(e)}function Vz(e){return new bn(function(t){var n=e[tm]();if(lt(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function jz(e){return new bn(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function $z(e){return new bn(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,DE)})}function qz(e){return new bn(function(t){var n,r;try{for(var i=fu(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function $E(e){return new bn(function(t){Zz(e,t).catch(function(n){return t.error(n)})})}function Wz(e){return $E(VE(e))}function Zz(e,t){var n,r,i,o;return Sz(this,void 0,void 0,function(){var s,a;return _E(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=kz(e),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=u.sent(),i={error:a},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function xo(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function qE(e,t){return t===void 0&&(t=0),Ms(function(n,r){n.subscribe(hu(r,function(i){return xo(r,e,function(){return r.next(i)},t)},function(){return xo(r,e,function(){return r.complete()},t)},function(i){return xo(r,e,function(){return r.error(i)},t)}))})}function WE(e,t){return t===void 0&&(t=0),Ms(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Yz(e,t){return Ps(e).pipe(WE(t),qE(t))}function Qz(e,t){return Ps(e).pipe(WE(t),qE(t))}function Xz(e,t){return new bn(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Kz(e,t){return new bn(function(n){var r;return xo(n,t,function(){r=e[GE](),xo(n,t,function(){var i,o,s;try{i=r.next(),o=i.value,s=i.done}catch(a){n.error(a);return}s?n.complete():n.next(o)},0,!0)}),function(){return lt(r==null?void 0:r.return)&&r.return()}})}function ZE(e,t){if(!e)throw new Error("Iterable cannot be null");return new bn(function(n){xo(n,t,function(){var r=e[Symbol.asyncIterator]();xo(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Jz(e,t){return ZE(VE(e),t)}function eU(e,t){if(e!=null){if(OE(e))return Yz(e,t);if(LE(e))return Xz(e,t);if(NE(e))return Qz(e,t);if(zE(e))return ZE(e,t);if(HE(e))return Kz(e,t);if(jE(e))return Jz(e,t)}throw UE(e)}function tU(e,t){return t?eU(e,t):Ps(e)}var nU=SE(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function YE(e,t){return new Promise(function(n,r){var i=new Ah({next:function(o){n(o),i.unsubscribe()},error:r,complete:function(){r(new nU)}});e.subscribe(i)})}function QE(e,t){return Ms(function(n,r){var i=0;n.subscribe(hu(r,function(o){r.next(e.call(t,o,i++))}))})}function rU(e,t,n,r,i,o,s,a){var u=[],l=0,c=0,f=!1,h=function(){f&&!u.length&&!l&&t.complete()},d=function(m){return l<r?p(m):u.push(m)},p=function(m){l++;var y=!1;Ps(n(m,c++)).subscribe(hu(t,function(w){t.next(w)},function(){y=!0},void 0,function(){if(y)try{l--;for(var w=function(){var x=u.shift();s||p(x)};u.length&&l<r;)w();h()}catch(x){t.error(x)}}))};return e.subscribe(hu(t,d,function(){f=!0,h()})),function(){}}function XE(e,t,n){return n===void 0&&(n=1/0),lt(t)?XE(function(r,i){return QE(function(o,s){return t(r,o,i,s)})(Ps(e(r,i)))},n):(typeof t=="number"&&(n=t),Ms(function(r,i){return rU(r,i,e,n)}))}function iU(e){return e===void 0&&(e=1/0),XE(FE,e)}function oU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Uz(e),r=Gz(e,1/0),i=e;return i.length?i.length===1?Ps(i[0]):iU(r)(tU(i,n)):Oz}function sU(e,t,n,r,i){return function(o,s){var a=n,u=t,l=0;o.subscribe(hu(s,function(c){var f=l++;u=a?e(u,c,f):(a=!0,c)},function(){a&&s.next(u),s.complete()}))}}function KE(e,t){return Ms(sU(e,t,arguments.length>=2,!1,!0))}var aU=function(e,t){return e.push(t),e};function lU(){return Ms(function(e,t){KE(aU,[])(e).subscribe(t)})}const JE=-2003829722,nm=-2021002517;function uU(e){return new TextDecoder().decode(e)}function e4(e){const t=e?"big":"little",n=new Re().endianess(t).int32("magic").uint16("version").uint16("numZoomLevels").uint64("chromTreeOffset").uint64("unzoomedDataOffset").uint64("unzoomedIndexOffset").uint16("fieldCount").uint16("definedFieldCount").uint64("asOffset").uint64("totalSummaryOffset").uint32("uncompressBufSize").uint64("extHeaderOffset").array("zoomLevels",{length:"numZoomLevels",type:new Re().endianess(t).uint32("reductionLevel").uint32("reserved").uint64("dataOffset").uint64("indexOffset")}),r=new Re().endianess(t).uint64("basesCovered").doublele("scoreMin").doublele("scoreMax").doublele("scoreSum").doublele("scoreSumSquares"),i=new Re().endianess(t).uint32("magic").uint32("blockSize").uint32("keySize").uint32("valSize").uint64("itemCount"),o=new Re().endianess(t).uint8("isLeafNode").skip(1).uint16("cnt").saveOffset("offset");return{chromTreeParser:i,totalSummaryParser:r,headerParser:n,isLeafNode:o}}class t4{getHeader(t){return this.headerP||(this.headerP=this._getHeader(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(t){const{filehandle:n,renameRefSeqs:r=s=>s,path:i,url:o}=t;if(this.renameRefSeqs=r,n)this.bbi=n;else if(o)this.bbi=new to(o);else if(i)this.bbi=new dt(i);else throw new Error("no file given")}async _getHeader(t){const n=await this._getMainHeader(t),r=await this._readChromTree(n,t);return{...n,...r}}async _getMainHeader(t,n=2e3){const{buffer:r}=await this.bbi.read(ve.Buffer.alloc(n),0,n,0,t),i=this._isBigEndian(r),o=e4(i),s=o.headerParser.parse(r),{magic:a,asOffset:u,totalSummaryOffset:l}=s;if(s.fileType=a===nm?"bigbed":"bigwig",u>n||l>n)return this._getMainHeader(t,n*2);if(u){const c=Number(s.asOffset);s.autoSql=uU(r.subarray(c,r.indexOf(0,c)))}if(s.totalSummaryOffset>n-8*5)return this._getMainHeader(t,n*2);if(s.totalSummaryOffset){const c=r.subarray(Number(s.totalSummaryOffset)),f=o.totalSummaryParser.parse(c);s.totalSummary={...f,basesCovered:Number(f.basesCovered)}}return{...s,isBigEndian:i}}_isBigEndian(t){let n=t.readInt32LE(0);if(n===JE||n===nm)return!1;if(n=t.readInt32BE(0),n===JE||n===nm)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(t,n){const r=t.isBigEndian,i=r?"big":"little",o=[],s={};let a=Number(t.unzoomedDataOffset);const u=Number(t.chromTreeOffset);for(;a%4!==0;)a+=1;const l=a-u,{buffer:c}=await this.bbi.read(ve.Buffer.alloc(l),0,l,Number(u),n),f=e4(r),{keySize:h}=f.chromTreeParser.parse(c),d=new Re().endianess(i).string("key",{stripNull:!0,length:h}).uint32("refId").uint32("refSize").saveOffset("offset"),p=new Re().endianess(i).skip(h).uint64("childOffset").saveOffset("offset"),m=32,y=async w=>{let x=w;if(x>=c.length)throw new Error("reading beyond end of buffer");const S=f.isLeafNode.parse(c.subarray(x)),{isLeafNode:_,cnt:k}=S;if(x+=S.offset,_)for(let B=0;B<k;B+=1){const I=d.parse(c.subarray(x));x+=I.offset;const{key:D,refId:M,refSize:G}=I,N={name:D,id:M,length:G};s[this.renameRefSeqs(D)]=M,o[M]=N}else{const B=[];for(let I=0;I<k;I+=1){const D=p.parse(c.subarray(x)),{childOffset:M}=D;x+=D.offset,B.push(y(Number(M)-Number(u)))}await Promise.all(B)}};return await y(m),{refsByName:s,refsByNumber:o}}async getUnzoomedView(t){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:i,isBigEndian:o,fileType:s}=await this.getHeader(t);return new EE(this.bbi,r,n,o,i>0,s)}async getFeatureStream(t,n,r,i){await this.getHeader(i);const o=this.renameRefSeqs(t);let s;const{basesPerSpan:a,scale:u}=i||{};return a?s=await this.getView(1/a,i):u?s=await this.getView(u,i):s=await this.getView(1,i),new bn(l=>{s.readWigData(o,n,r,l,i)})}async getFeatures(t,n,r,i){const o=await this.getFeatureStream(t,n,r,i);return(await YE(o.pipe(lU()))).flat()}}class cU extends t4{async getView(t,n){const{zoomLevels:r,refsByName:i,fileSize:o,isBigEndian:s,uncompressBufSize:a}=await this.getHeader(n),u=1/t;let l=r.length;o||(l-=1);for(let c=l;c>=0;c-=1){const f=r[c];if(f&&f.reductionLevel<=2*u){const h=Number(f.indexOffset);return new EE(this.bbi,i,h,s,a>0,"summary")}}return this.getUnzoomedView(n)}}function fU(e){return e.filter(t=>!!t)}class hU extends t4{constructor(){super(...arguments),this.readIndicesCache=new sh({cache:new ah({maxSize:1}),fill:(t,n)=>this._readIndices({...t,signal:n})})}readIndices(t={}){const{signal:n,...r}=t;return this.readIndicesCache.get(JSON.stringify(r),t,n)}async getView(t,n){return this.getUnzoomedView(n)}async _readIndices(t){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(t),{buffer:i}=await this.bbi.read(ve.Buffer.alloc(64),0,64,Number(n)),o=r?"big":"little",s=new Re().endianess(o).uint16("size").uint16("count").uint64("offset").parse(i),{count:a,offset:u}=s;if(a===0)return[];const l=20,c=l*a,{buffer:f}=await this.bbi.read(ve.Buffer.alloc(c),0,c,Number(u)),h=new Re().endianess(o).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),d=[];for(let p=0;p<a;p+=1)d.push(h.parse(f.subarray(p*l)));return d}async searchExtraIndexBlocks(t,n={}){const{isBigEndian:r}=await this.getHeader(n),i=await this.readIndices(n);if(i.length===0)return[];const o=i.map(async s=>{const{offset:a,field:u}=s,{buffer:l}=await this.bbi.read(ve.Buffer.alloc(32),0,32,Number(a),n),c=r?"big":"little",f=new Re().endianess(c).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),{blockSize:h,keySize:d,valSize:p}=f.parse(l),m=new Re().endianess(c).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:new Re().array("leafkeys",{length:"cnt",type:new Re().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset")}),1:new Re().array("keys",{length:"cnt",type:new Re().endianess(c).string("key",{length:d,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),y=async x=>{const S=Number(x),_=4+h*(d+p),{buffer:k}=await this.bbi.read(ve.Buffer.alloc(_),0,_,S,n),B=m.parse(k);if(B.leafkeys){let I;for(let D=0;D<B.leafkeys.length;D+=1){const{key:M}=B.leafkeys[D];if(t.localeCompare(M)<0&&I)return y(I);I=B.leafkeys[D].offset}return y(I)}for(let I=0;I<B.keys.length;I+=1)if(B.keys[I].key===t)return{...B.keys[I],field:u}};return y(Number(a)+32)});return fU(await Promise.all(o))}async searchExtraIndex(t,n={}){const r=await this.searchExtraIndexBlocks(t,n);if(r.length===0)return[];const i=await this.getUnzoomedView(n),o=r.map(a=>new bn(u=>{i.readFeatures(u,[a],n)}).pipe(KE((u,l)=>u.concat(l)),QE(u=>{for(const l of u)l.field=a.field;return u})));return(await YE(oU(...o))).filter(a=>{var u;return((u=a.rest)===null||u===void 0?void 0:u.split(" ")[(a.field||0)-3])===t})}}const n4=Object.freeze(Object.defineProperty({__proto__:null,BigBed:hU,BigWig:cU},Symbol.toStringTag,{value:"Module"}));function dU(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}function Ls(e,t,n,r){this.message=e,this.expected=t,this.found=n,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ls)}dU(Ls,Error),Ls.buildMessage=function(e,t){var n={literal:function(l){return'"'+i(l.text)+'"'},class:function(l){var c="",f;for(f=0;f<l.parts.length;f++)c+=l.parts[f]instanceof Array?o(l.parts[f][0])+"-"+o(l.parts[f][1]):o(l.parts[f]);return"["+(l.inverted?"^":"")+c+"]"},any:function(l){return"any character"},end:function(l){return"end of input"},other:function(l){return l.description}};function r(l){return l.charCodeAt(0).toString(16).toUpperCase()}function i(l){return l.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function o(l){return l.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(c){return"\\x0"+r(c)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(c){return"\\x"+r(c)})}function s(l){return n[l.type](l)}function a(l){var c=new Array(l.length),f,h;for(f=0;f<l.length;f++)c[f]=s(l[f]);if(c.sort(),c.length>0){for(f=1,h=1;f<c.length;f++)c[f-1]!==c[f]&&(c[h]=c[f],h++);c.length=h}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function u(l){return l?'"'+i(l)+'"':"end of input"}return"Expected "+a(e)+" but "+u(t)+" found."};function pU(e,t){t=t!==void 0?t:{};var n={},r={declaration:C_},i=C_,o="(",s=Ne("(",!1),a=")",u=Ne(")",!1),l=function(E,U,K,J){return{type:E,name:U,comment:K,fields:J}},c="simple",f=Ne("simple",!1),h="object",d=Ne("object",!1),p="table",m=Ne("table",!1),y="auto",w=Ne("auto",!1),x="primary",S=Ne("primary",!1),_="index",k=Ne("index",!1),B="unique",I=Ne("unique",!1),D=function(E,U){return U},M=function(E,U){return E.name&&U.unshift(E),U},G="#",N=Ne("#",!1),ne=";",ie=Ne(";",!1),he=function(E,U,K){return{type:E,name:U,comment:K}},me="[",Fe=Ne("[",!1),xe="]",Le=Ne("]",!1),Oe=function(E,U,K,J){return{type:E,size:U,name:K,comment:J}},Je=function(E,U,K,J){return{type:E,vals:U,name:K,comment:J}},Ce=",",ke=Ne(",",!1),gt=function(E,U){return U.unshift(E),U},$t="int",Ve=Ne("int",!1),L="uint",P=Ne("uint",!1),q="short",j=Ne("short",!1),Y="ushort",C=Ne("ushort",!1),A="byte",V=Ne("byte",!1),W="ubyte",ue=Ne("ubyte",!1),te="float",ce=Ne("float",!1),qt="char",Ai=Ne("char",!1),xi="string",Ei=Ne("string",!1),kt="lstring",Tr=Ne("lstring",!1),_i="enum",Wt=Ne("enum",!1),rr="double",v=Ne("double",!1),g="bigint",b=Ne("bigint",!1),T="set",F=Ne("set",!1),O=function(E,U){return E+" "+U},$=/^[a-zA-Z_]/,fe=Xu([["a","z"],["A","Z"],"_"],!1,!1),qe=/^[a-zA-Z0-9_]/,ze=Xu([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Qe=function(E){return x_()},Te=/^[^\n\r]/,b_=Xu([`
609
+ `,"\r"],!0,!1),LG=function(E){return E.join("").replace(/^"/,"").replace(/"$/,"")},NG=E_("integer"),y_=/^[0-9]/,w_=Xu([["0","9"]],!1,!1),OG=function(){return parseInt(x_(),10)},zG=E_("whitespace"),v_=/^[ \t\n\r]/,A_=Xu([" "," ",`
610
+ `,"\r"],!1,!1),R=0,Mt=0,$h=[{line:1,column:1}],ir=0,Nm=[],oe=0,qh;if("startRule"in t){if(!(t.startRule in r))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=r[t.startRule]}function x_(){return e.substring(Mt,R)}function Ne(E,U){return{type:"literal",text:E,ignoreCase:U}}function Xu(E,U,K){return{type:"class",parts:E,inverted:U,ignoreCase:K}}function UG(){return{type:"end"}}function E_(E){return{type:"other",description:E}}function __(E){var U=$h[E],K;if(U)return U;for(K=E-1;!$h[K];)K--;for(U=$h[K],U={line:U.line,column:U.column};K<E;)e.charCodeAt(K)===10?(U.line++,U.column=1):U.column++,K++;return $h[E]=U,U}function S_(E,U){var K=__(E),J=__(U);return{start:{offset:E,line:K.line,column:K.column},end:{offset:U,line:J.line,column:J.column}}}function se(E){R<ir||(R>ir&&(ir=R,Nm=[]),Nm.push(E))}function GG(E,U,K){return new Ls(Ls.buildMessage(E,U),E,U,K)}function C_(){var E,U,K,J,re,je,Xe,vn,Si,Ir,Ci,Br,ki,Dr;return E=R,U=be(),U!==n?(K=k_(),K!==n?(J=be(),J!==n?(re=T_(),re!==n?(je=be(),je!==n?(Xe=Wh(),Xe!==n?(vn=be(),vn!==n?(e.charCodeAt(R)===40?(Si=o,R++):(Si=n,oe===0&&se(s)),Si!==n?(Ir=be(),Ir!==n?(Ci=HG(),Ci!==n?(Br=be(),Br!==n?(e.charCodeAt(R)===41?(ki=a,R++):(ki=n,oe===0&&se(u)),ki!==n?(Dr=be(),Dr!==n?(Mt=E,U=l(K,re,Xe,Ci),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E}function k_(){var E;return e.substr(R,6)===c?(E=c,R+=6):(E=n,oe===0&&se(f)),E===n&&(e.substr(R,6)===h?(E=h,R+=6):(E=n,oe===0&&se(d)),E===n&&(e.substr(R,5)===p?(E=p,R+=5):(E=n,oe===0&&se(m)))),E}function T_(){var E,U,K,J;return E=Mn(),E===n&&(E=R,U=Mn(),U!==n?(K=I_(),K!==n?(U=[U,K],E=U):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=Mn(),U!==n?(e.substr(R,4)===y?(K=y,R+=4):(K=n,oe===0&&se(w)),K!==n?(U=[U,K],E=U):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=Mn(),U!==n?(K=I_(),K!==n?(e.substr(R,4)===y?(J=y,R+=4):(J=n,oe===0&&se(w)),J!==n?(U=[U,K,J],E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)))),E}function I_(){var E;return e.substr(R,7)===x?(E=x,R+=7):(E=n,oe===0&&se(S)),E===n&&(e.substr(R,5)===_?(E=_,R+=5):(E=n,oe===0&&se(k)),E===n&&(e.substr(R,6)===B?(E=B,R+=6):(E=n,oe===0&&se(I)))),E}function Wh(){var E;return E=B_(),E===n&&(E=be()),E}function HG(){var E,U,K,J,re,je,Xe;if(E=R,U=Om(),U!==n)if(K=be(),K!==n){for(J=[],re=R,je=be(),je!==n?(Xe=Om(),Xe!==n?(Mt=re,je=D(U,Xe),re=je):(R=re,re=n)):(R=re,re=n);re!==n;)J.push(re),re=R,je=be(),je!==n?(Xe=Om(),Xe!==n?(Mt=re,je=D(U,Xe),re=je):(R=re,re=n)):(R=re,re=n);J!==n?(re=be(),re!==n?(Mt=E,U=M(U,J),E=U):(R=E,E=n)):(R=E,E=n)}else R=E,E=n;else R=E,E=n;return E}function VG(){var E;return e.charCodeAt(R)===35?(E=G,R++):(E=n,oe===0&&se(N)),E}function jG(){var E,U,K,J,re;return E=R,U=be(),U!==n?(K=VG(),K!==n?(J=B_(),J!==n?(re=be(),re!==n?(U=[U,K,J,re],E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E}function Om(){var E,U,K,J,re,je,Xe,vn,Si,Ir,Ci,Br,ki,Dr;return E=R,U=zm(),U!==n?(K=be(),K!==n?(J=Mn(),J!==n?(re=be(),re!==n?(e.charCodeAt(R)===59?(je=ne,R++):(je=n,oe===0&&se(ie)),je!==n?(Xe=be(),Xe!==n?(vn=Wh(),vn!==n?(Mt=E,U=he(U,J,vn),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=zm(),U!==n?(K=be(),K!==n?(e.charCodeAt(R)===91?(J=me,R++):(J=n,oe===0&&se(Fe)),J!==n?(re=be(),re!==n?(je=qG(),je!==n?(Xe=be(),Xe!==n?(e.charCodeAt(R)===93?(vn=xe,R++):(vn=n,oe===0&&se(Le)),vn!==n?(Si=be(),Si!==n?(Ir=Mn(),Ir!==n?(Ci=be(),Ci!==n?(e.charCodeAt(R)===59?(Br=ne,R++):(Br=n,oe===0&&se(ie)),Br!==n?(ki=be(),ki!==n?(Dr=Wh(),Dr!==n?(Mt=E,U=Oe(U,je,Ir,Dr),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E===n&&(E=R,U=zm(),U!==n?(K=be(),K!==n?(e.charCodeAt(R)===40?(J=o,R++):(J=n,oe===0&&se(s)),J!==n?(re=be(),re!==n?(je=$G(),je!==n?(Xe=be(),Xe!==n?(e.charCodeAt(R)===41?(vn=a,R++):(vn=n,oe===0&&se(u)),vn!==n?(Si=be(),Si!==n?(Ir=Mn(),Ir!==n?(Ci=be(),Ci!==n?(e.charCodeAt(R)===59?(Br=ne,R++):(Br=n,oe===0&&se(ie)),Br!==n?(ki=be(),ki!==n?(Dr=Wh(),Dr!==n?(Mt=E,U=Je(U,je,Ir,Dr),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n)):(R=E,E=n),E===n&&(E=jG()))),E}function $G(){var E,U,K,J,re,je,Xe;if(E=R,U=Mn(),U!==n){for(K=[],J=R,e.charCodeAt(R)===44?(re=Ce,R++):(re=n,oe===0&&se(ke)),re!==n?(je=be(),je!==n?(Xe=Mn(),Xe!==n?(Mt=J,re=D(U,Xe),J=re):(R=J,J=n)):(R=J,J=n)):(R=J,J=n);J!==n;)K.push(J),J=R,e.charCodeAt(R)===44?(re=Ce,R++):(re=n,oe===0&&se(ke)),re!==n?(je=be(),je!==n?(Xe=Mn(),Xe!==n?(Mt=J,re=D(U,Xe),J=re):(R=J,J=n)):(R=J,J=n)):(R=J,J=n);K!==n?(Mt=E,U=gt(U,K),E=U):(R=E,E=n)}else R=E,E=n;return E}function zm(){var E,U,K,J;return e.substr(R,3)===$t?(E=$t,R+=3):(E=n,oe===0&&se(Ve)),E===n&&(e.substr(R,4)===L?(E=L,R+=4):(E=n,oe===0&&se(P)),E===n&&(e.substr(R,5)===q?(E=q,R+=5):(E=n,oe===0&&se(j)),E===n&&(e.substr(R,6)===Y?(E=Y,R+=6):(E=n,oe===0&&se(C)),E===n&&(e.substr(R,4)===A?(E=A,R+=4):(E=n,oe===0&&se(V)),E===n&&(e.substr(R,5)===W?(E=W,R+=5):(E=n,oe===0&&se(ue)),E===n&&(e.substr(R,5)===te?(E=te,R+=5):(E=n,oe===0&&se(ce)),E===n&&(e.substr(R,4)===qt?(E=qt,R+=4):(E=n,oe===0&&se(Ai)),E===n&&(e.substr(R,6)===xi?(E=xi,R+=6):(E=n,oe===0&&se(Ei)),E===n&&(e.substr(R,7)===kt?(E=kt,R+=7):(E=n,oe===0&&se(Tr)),E===n&&(e.substr(R,4)===_i?(E=_i,R+=4):(E=n,oe===0&&se(Wt)),E===n&&(e.substr(R,6)===rr?(E=rr,R+=6):(E=n,oe===0&&se(v)),E===n&&(e.substr(R,6)===g?(E=g,R+=6):(E=n,oe===0&&se(b)),E===n&&(e.substr(R,3)===T?(E=T,R+=3):(E=n,oe===0&&se(F)),E===n&&(E=R,U=k_(),U!==n?(K=be(),K!==n?(J=T_(),J!==n?(Mt=E,U=O(U,J),E=U):(R=E,E=n)):(R=E,E=n)):(R=E,E=n))))))))))))))),E}function qG(){var E;return E=WG(),E===n&&(E=Mn()),E}function Mn(){var E,U,K,J,re;if(E=R,U=R,$.test(e.charAt(R))?(K=e.charAt(R),R++):(K=n,oe===0&&se(fe)),K!==n){for(J=[],qe.test(e.charAt(R))?(re=e.charAt(R),R++):(re=n,oe===0&&se(ze));re!==n;)J.push(re),qe.test(e.charAt(R))?(re=e.charAt(R),R++):(re=n,oe===0&&se(ze));J!==n?(K=[K,J],U=K):(R=U,U=n)}else R=U,U=n;return U!==n&&(Mt=E,U=Qe()),E=U,E}function B_(){var E,U,K;for(E=R,U=[],Te.test(e.charAt(R))?(K=e.charAt(R),R++):(K=n,oe===0&&se(b_));K!==n;)U.push(K),Te.test(e.charAt(R))?(K=e.charAt(R),R++):(K=n,oe===0&&se(b_));return U!==n&&(Mt=E,U=LG(U)),E=U,E}function WG(){var E,U,K,J;if(oe++,E=R,U=be(),U!==n){if(K=[],y_.test(e.charAt(R))?(J=e.charAt(R),R++):(J=n,oe===0&&se(w_)),J!==n)for(;J!==n;)K.push(J),y_.test(e.charAt(R))?(J=e.charAt(R),R++):(J=n,oe===0&&se(w_));else K=n;K!==n?(Mt=E,U=OG(),E=U):(R=E,E=n)}else R=E,E=n;return oe--,E===n&&(U=n,oe===0&&se(NG)),E}function be(){var E,U;for(oe++,E=[],v_.test(e.charAt(R))?(U=e.charAt(R),R++):(U=n,oe===0&&se(A_));U!==n;)E.push(U),v_.test(e.charAt(R))?(U=e.charAt(R),R++):(U=n,oe===0&&se(A_));return oe--,E===n&&(U=n,oe===0&&se(zG)),E}if(qh=i(),qh!==n&&R===e.length)return qh;throw qh!==n&&R<e.length&&se(UG()),GG(Nm,ir<e.length?e.charAt(ir):null,ir<e.length?S_(ir,ir+1):S_(ir,ir))}var r4={SyntaxError:Ls,parse:pU};const gU=Ff(r4),rm=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
611
611
  "bigChain pairwise alignment"
612
612
  (
613
613
  string chrom; "Reference sequence chromosome or scaffold"
@@ -766,17 +766,16 @@ chrM 16299`};function TR(e){if(!(e in lv))throw new Error(`Unknown assembly: ${e
766
766
  float score; "Floating point score."
767
767
  char[1] leftStatus; "Gap/break annotation for preceding block"
768
768
  char[1] rightStatus; "Gap/break annotation for following block"
769
- )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,a4.parse(t.trim())]));function Jg(e){const t=["uint","int","float","long"];return{...e,fields:e.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&t.includes(n.type),isNumeric:!n.size&&t.includes(n.type)}))}}const bU={".":0,"-":-1,"+":1};function yU(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&((t=e[10])===null||t===void 0?void 0:t.split(",").filter(n=>!!n).length)===parseInt(e[9],10)}class wU{constructor(t={}){if(t.autoSql)this.autoSql=Jg(mU.parse(t.autoSql));else if(t.type){if(!Kg[t.type])throw new Error("Type not found");this.autoSql=Jg(Kg[t.type])}else this.autoSql=Jg(Kg.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,o=Array.isArray(t)?t:t.split(" ");let a={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&yU(o))for(let s=0;s<r.fields.length;s++){const u=r.fields[s];let l=o[s];const{isNumeric:c,isArray:f,arrayIsNumeric:h,name:d}=u;if(l==null)break;if(l!=="."){if(c){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(p=>Number(p))));a[d]=l}}else{const s=["chrom","chromStart","chromEnd","name"];a=Object.fromEntries(o.map((u,l)=>[s[l]||"field"+l,u])),a.chromStart=+a.chromStart,a.chromEnd=+a.chromEnd,Number.isNaN(Number.parseFloat(a.field4))||(a.score=+a.field4,delete a.field4),(a.field5==="+"||a.field5==="-")&&(a.strand=a.field5,delete a.field5)}return i&&(a.uniqueId=i),a.strand=bU[a.strand]||0,a.chrom=decodeURIComponent(a.chrom),a}}const vU=Object.freeze(Object.defineProperty({__proto__:null,default:wU},Symbol.toStringTag,{value:"Module"}));let s4=class{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}};function Na(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new s4(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}let l4=class{constructor(t,n,r,i){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}};function xU(e){return new Promise(t=>setTimeout(t,e))}function AU(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function EU(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new Error("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}function _U(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function SU(e={}){return"aborted"in e?{signal:e}:e}function u4(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,o)=>{const a=i.minv.blockPosition-o.minv.blockPosition;return a===0?i.minv.dataPosition-o.minv.dataPosition:a});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):_U(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function c4(e,t){return{lineCount:AU(Qf.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function xh(e,t){return e?e.compareTo(t)>0?t:e:t}function CU(e,t=n=>n){let n=0,r=0;const i=[],o={};for(let a=0;a<e.length;a+=1)if(!e[a]){if(r<a){let s=e.toString("utf8",r,a);s=t(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}let f4=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const kU=21578050;function TU(e,t){return e-e%t}function IU(e,t){return e-e%t+t}function BU(e,t){return t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class Oa extends f4{async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async _parse(t){const n=await this.filehandle.readFile(t);if(n.readUInt32LE(0)!==kU)throw new Error("Not a BAI file");const r=n.readInt32LE(4),o=((1<<(5+1)*3)-1)/7;let a=8,s;const u=new Array(r);for(let l=0;l<r;l++){const c=n.readInt32LE(a);let f;a+=4;const h={};for(let m=0;m<c;m+=1){const y=n.readUInt32LE(a);if(a+=4,y===o+1)a+=4,f=c4(n,a+16),a+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(a);a+=4;const A=new Array(w);for(let S=0;S<w;S++){const _=Na(n,a);a+=8;const k=Na(n,a);a+=8,s=xh(s,_),A[S]=new l4(_,k,y)}h[y]=A}}}const d=n.readInt32LE(a);a+=4;const p=new Array(d);for(let m=0;m<d;m++){const y=Na(n,a);a+=8,s=xh(s,y),p[m]=y}u[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:s,maxBlockSize:65536,indices:u,refCount:r}}async indexCov(t,n,r,i={}){const a=n!==void 0,u=(await this.parse(i)).indices[t];if(!u)return[];const{linearIndex:l=[],stats:c}=u;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:IU(r,16384),h=n===void 0?0:TU(n,16384),d=a?new Array((f-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let m=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<f/16384;y++,w++)d[w]={score:l[y+1].blockPosition-m,start:y*16384,end:y*16384+16384},m=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((c==null?void 0:c.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.indices[t];if(!a)return[];const s=BU(n,r),u=[];for(const[d,p]of s)for(let m=d;m<=p;m++)if(a.binIndex[m]){const y=a.binIndex[m];for(const w of y)u.push(w)}const l=a.linearIndex.length;let c;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=a.linearIndex[d];p&&(!c||p.compareTo(c)<0)&&(c=p)}return u4(u,c)}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}var vi=be.Buffer,em=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(em=new Int32Array(em));function h4(e){if(vi.isBuffer(e))return e;var t=typeof vi.alloc=="function"&&typeof vi.from=="function";if(typeof e=="number")return t?vi.alloc(e):new vi(e);if(typeof e=="string")return t?vi.from(e):new vi(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function DU(e){var t=h4(4);return t.writeInt32BE(e,0),t}function tm(e,t){e=h4(e),vi.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~~t^-1,r=0;r<e.length;r++)n=em[(n^e[r])&255]^n>>>8;return n^-1}function nm(){return DU(tm.apply(null,arguments))}nm.signed=function(){return tm.apply(null,arguments)},nm.unsigned=function(){return tm.apply(null,arguments)>>>0};var RU=nm;const FU=kl(RU),MU=21582659,PU=38359875;function LU(e,t){return e*2**t}function d4(e,t){return Math.floor(e/2**t)}let Ah=class extends f4{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),u=s?String.fromCharCode(s):"",l=t.readInt32LE(n+20),c=t.readInt32LE(n+24);return{columnNumbers:a,coordinateType:i,metaValue:s,metaChar:u,skipLines:l,format:o,formatFlags:r,...CU(t.subarray(n+28,n+28+c),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await hi(n);let i;if(r.readUInt32LE(0)===MU)i=1;else if(r.readUInt32LE(0)===PU)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const o=r.readInt32LE(12),a=o>=30?this.parseAuxData(r,16):void 0,s=r.readInt32LE(16+o);let u=16+o+4,l;const c=new Array(s);for(let f=0;f<s;f++){const h=r.readInt32LE(u);u+=4;const d={};let p;for(let m=0;m<h;m++){const y=r.readUInt32LE(u);if(u+=4,y>this.maxBinNumber)p=c4(r,u+28),u+=28+16;else{l=xh(l,Na(r,u)),u+=8;const w=r.readInt32LE(u);u+=4;const A=new Array(w);for(let S=0;S<w;S+=1){const _=Na(r,u);u+=8;const k=Na(r,u);u+=8,l=xh(l,_),A[S]=new l4(_,k,y)}d[y]=A}}c[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:c,refCount:s,csi:!0,maxBlockSize:65536,...a}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),a=o==null?void 0:o.indices[t];if(!a)return[];const s=this.reg2bins(n,r);if(s.length===0)return[];const u=[];for(const[l,c]of s)for(let f=l;f<=c;f++)if(a.binIndex[f]){const h=a.binIndex[f];for(const d of h)u.push(d)}return u4(u,new s4(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=LU(1,r*3),r+=1){const s=i+d4(t,o),u=i+d4(n,o);if(u-s+a.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);a.push([s,u])}return a}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const bn={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},p4="=ACMGRSVTWYHKDBN".split(""),du="MIDNSHP=X???????".split("");class g4{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:o}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(o+4),this.data.start=i.readInt32LE(o+8),this.flags=(i.readInt32LE(o+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))r[0]!=="_"&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),o=n[i];return n[i]=!0,!o})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const o=this.bytes.end;let a;for(;i<o&&a!==t;){const s=String.fromCharCode(n[i],n[i+1]);a=s.toLowerCase();const u=String.fromCharCode(n[i+2]);i+=3;let l;switch(u){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=o;){const c=n[i++];if(c===0)break;l+=String.fromCharCode(c)}break}case"B":{l="";const c=n[i++],f=String.fromCharCode(c),h=n.readInt32LE(i);if(i+=4,f==="i")if(s==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),m=p>>4,y=du[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(s==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),m=p>>4,y=du[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${u}', tags may be incomplete`),l=void 0,i=o}if(this._tagOffset=i,this._tagList.push(s),a===t)return l;this.data[a]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&bn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&bn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&bn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&bn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&bn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&bn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&bn.BAM_FREAD1)}isRead2(){return!!(this.flags&bn.BAM_FREAD2)}isSecondary(){return!!(this.flags&bn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&bn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&bn.BAM_FDUP)}isSupplementary(){return!!(this.flags&bn.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const o=this.get("seq_length");let a="",s=0,u=t.readInt32LE(i),l=u>>4,c=du[u&15];if(c==="S"&&l===o)return i+=4,u=t.readInt32LE(i),l=u>>4,c=du[u&15],c!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)u=t.readInt32LE(i),l=u>>4,c=du[u&15],a+=l+c,c!=="H"&&c!=="S"&&c!=="I"&&(s+=l),i+=4;return this.data.length_on_ref=s,a}_flags(){}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),o=this.get("seq_length");let a="",s=0;for(let u=0;u<i;++u){const l=t[r+u];a+=p4[(l&240)>>4],s++,s<o&&(a+=p4[l&15],s++)}return a}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const o=[];return this.template_length()>0?(o[0]=t,o[1]=r,o[2]=n,o[3]=i):(o[2]=t,o[3]=r,o[0]=n,o[1]=i),o.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.charAt(0)==="_"||n==="bytes"||(t[n]=this[n]);return t}}function m4(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...o]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:o.map(a=>{const[s,u]=a.split(":",2);return{tag:s,value:u}})})}return n}const b4=21840194,y4=65536;async function NU(e){let t=[];for await(const n of e)t=t.concat(n);return t}class OU{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}class w4{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:o,baiUrl:a,csiPath:s,csiFilehandle:u,csiUrl:l,htsget:c,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new ih({cache:new oh({maxSize:50}),fill:async(d,p)=>{const{chunk:m,opts:y}=d,{data:w,cpositions:A,dpositions:S}=await this._readChunk({chunk:m,opts:{...y,signal:p}});return this.readBamFeatures(w,A,S,m)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new dt(n);else if(r)this.bam=new no(r);else if(c)this.htsget=!0,this.bam=new OU;else throw new Error("unable to initialize bam");if(u)this.index=new Ah({filehandle:u});else if(s)this.index=new Ah({filehandle:new dt(s)});else if(l)this.index=new Ah({filehandle:new no(l)});else if(o)this.index=new Oa({filehandle:o});else if(i)this.index=new Oa({filehandle:new dt(i)});else if(a)this.index=new Oa({filehandle:new no(a)});else if(n)this.index=new Oa({filehandle:new dt(`${n}.bai`)});else if(r)this.index=new Oa({filehandle:new no(`${r}.bai`)});else if(c)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=SU(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let o;if(i){const c=i+y4,f=await this.bam.read(be.Buffer.alloc(c),0,c,0,n);if(!f.bytesRead)throw new Error("Error reading header");o=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else o=await this.bam.readFile(n);const a=await hi(o);if(a.readInt32LE(0)!==b4)throw new Error("Not a BAM file");const s=a.readInt32LE(4);this.header=a.toString("utf8",8,8+s);const{chrToIndex:u,indexToChr:l}=await this._readRefSeqs(s+8,65535,n);return this.chrToIndex=u,this.indexToChr=l,m4(this.header)}getHeader(t){return this.headerP||(this.headerP=this.getHeaderPre(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}async getHeaderText(t={}){return await this.getHeader(t),this.header}async _readRefSeqs(t,n,r){if(t>n)return this._readRefSeqs(t,n*2,r);const i=n+y4,{bytesRead:o,buffer:a}=await this.bam.read(be.Buffer.alloc(i),0,n,0,r);if(!o)throw new Error("Error reading refseqs from header");const s=await hi(a.subarray(0,Math.min(o,n))),u=s.readInt32LE(t);let l=t+4;const c={},f=[];for(let h=0;h<u;h+=1){const d=s.readInt32LE(l),p=this.renameRefSeq(s.toString("utf8",l+4,l+4+d-1)),m=s.readInt32LE(l+d+4);if(c[p]=h,f.push({refName:p,length:m}),l=l+8+d,l>s.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:c,indexToChr:f}}async getRecordsForRange(t,n,r,i){return NU(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var o;await this.getHeader(i);const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(a===void 0||!this.index)yield[];else{const s=await this.index.blocksForRange(a,n-1,r,i);yield*this._fetchChunkFeatures(s,a,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,o={}){const{viewAsPairs:a}=o,s=[];let u=!1;for(const l of t){const c=await this.featureCache.get(l.toString(),{chunk:l,opts:o},o.signal),f=[];for(const h of c)if(h.seq_id()===n)if(h.get("start")>=i){u=!0;break}else h.get("end")>=r&&f.push(h);if(s.push(f),yield f,u)break}EU(o.signal),a&&(yield this.fetchPairs(n,s,o))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:o=2e5}=r,a={},s={};n.map(h=>{const d={};for(const p of h){const m=p.name(),y=p.id();d[m]||(d[m]=0),d[m]++,s[y]=1}for(const[p,m]of Object.entries(d))m===1&&(a[p]=!0)});const u=[];n.map(h=>{for(const d of h){const p=d.name(),m=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&a[p]&&(i||w===t&&Math.abs(m-y)<o)&&u.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,c=await Promise.all(u);for(const h of c.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:m,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const A of await this.readBamFeatures(d,p,m,y))a[A.get("name")]&&!s[A.id()]&&w.push(A);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:o}=await this.bam.read(be.Buffer.alloc(n),0,n,t,r);return o.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:o,dpositions:a}=await zA(r,t);return{data:i,cpositions:o,dpositions:a,chunk:t}}async readBamFeatures(t,n,r,i){let o=0;const a=[];let s=0,u=+Date.now();for(;o+4<t.length;){const l=t.readInt32LE(o),c=o+4+l-1;if(r){for(;o+i.minv.dataPosition>=r[s++];);s--}if(c<t.length){const f=new g4({bytes:{byteArray:t,start:o,end:c},fileOffset:n.length>0?n[s]*256+(o-r[s])+i.minv.dataPosition+1:FU.signed(t.slice(o,c))});a.push(f),this.yieldThreadTime&&+Date.now()-u>this.yieldThreadTime&&(await xU(1),u=+Date.now())}o=c+1}return a}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const o=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return o===void 0?[]:this.index.indexCov(o,n,r)}async blocksForRange(t,n,r,i){var o;if(!this.index)return[];await this.index.parse();const a=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];return a===void 0?[]:this.index.blocksForRange(a,n,r,i)}}async function v4(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:o}=r;if(i.startsWith("data:"))return be.Buffer.from(i.split(",")[1],"base64");{const{referer:a,...s}=o,u=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...s}});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${i}: ${await u.text()}`);return be.Buffer.from(await u.arrayBuffer())}}));return be.Buffer.concat(await Promise.all(n.map(r=>hi(r))))}class zU extends w4{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var o;const s=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,u=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(u===void 0)yield[];else{const l=await fetch(s,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${s}: ${await l.text()}`);const c=await l.json(),f=await v4(c.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],u,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),o=await v4(i.htsget.urls,t);if(o.readInt32LE(0)!==b4)throw new Error("Not a BAM file");const a=o.readInt32LE(4),s=o.toString("utf8",8,8+a),u=m4(s),l=[],c={},f=u.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",m=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(m=+y.value);c[p]=h,l[h]={refName:p,length:m}}return this.chrToIndex=c,this.indexToChr=l,u}}const UU=Object.freeze(Object.defineProperty({__proto__:null,BAI:Oa,BamFile:w4,BamRecord:g4,CSI:Ah,HtsgetFile:zU},Symbol.toStringTag,{value:"Module"}));function x4(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class GU extends Error{}function za(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new GU("aborted");throw t.code="ERR_ABORTED",t}}}function HU(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function A4(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,o){const a=i.minv.blockPosition-o.minv.blockPosition;return a!==0?a:i.minv.dataPosition-o.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):HU(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class rm{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}}function Ua(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new rm(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}class Eh{constructor(t,n,r,i=void 0){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class E4{constructor({filehandle:t,renameRefSeqs:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}async getMetadata(t={}){const{indices:n,...r}=await this.parse(t);return r}_findFirstData(t,n){return t?t.compareTo(n)>0?n:t:n}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}const VU=21578324,_4=14;function jU(e,t){return e+=1,t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class _h extends E4{async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:a}=r.indices[i];return a?a.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await hi(n);if(za(t.signal),r.readUInt32LE(0)!==VU)throw new Error("Not a TBI file");const i=r.readInt32LE(4),o=r.readInt32LE(8),a=o&65536?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[o&15];if(!u)throw new Error(`invalid Tabix preset format flags ${o}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},c=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=c?String.fromCharCode(c):null,m=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:A}=this._parseNameBytes(r.slice(36,36+y));let S=36+y,_;return{indices:new Array(i).fill(0).map(()=>{const B=r.readInt32LE(S);S+=4;const I={};let D;for(let N=0;N<B;N+=1){const ne=r.readUInt32LE(S);if(S+=4,ne>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(ne===h+1){const ie=r.readInt32LE(S);S+=4,ie===2&&(D=this.parsePseudoBin(r,S)),S+=16*ie}else{const ie=r.readInt32LE(S);S+=4;const he=new Array(ie);for(let me=0;me<ie;me+=1){const Fe=Ua(r,S),Ae=Ua(r,S+8);S+=16,_=this._findFirstData(_,Fe),he[me]=new Eh(Fe,Ae,ne)}I[ne]=he}}const M=r.readInt32LE(S);S+=4;const G=new Array(M);for(let N=0;N<M;N+=1)G[N]=Ua(r,S),S+=8,_=this._findFirstData(_,G[N]);return{binIndex:I,linearIndex:G,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:m,firstDataLine:_,columnNumbers:l,coordinateType:a,format:u,refIdToName:A,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:x4(Qf.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.refNameToId[t],s=o.indices[a];if(!s)return[];(s.linearIndex.length?s.linearIndex[n>>_4>=s.linearIndex.length?s.linearIndex.length-1:n>>_4]:new rm(0,0))||console.warn("querying outside of possible tabix range");const l=jU(n,r),c=[];for(const[m,y]of l)for(let w=m;w<=y;w++)if(s.binIndex[w])for(const A of s.binIndex[w])c.push(new Eh(A.minv,A.maxv,w));const f=s.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let m=d;m<=p;++m){const y=s.linearIndex[m];y&&(!h||y.compareTo(h)<0)&&(h=y)}return A4(c,h)}}const $U=21582659,qU=38359875;function WU(e,t){return e*2**t}function S4(e,t){return Math.floor(e/2**t)}class im extends E4{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:a}=r.indices[i];return a?a.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},s=t.readInt32LE(n+16),u=s?String.fromCharCode(s):null,l=t.readInt32LE(n+20),c=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+c));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:u,columnNumbers:a,format:o,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let a=0;a<t.length;a+=1)if(!t[a]){if(r<a){let s=t.toString("utf8",r,a);s=this.renameRefSeq(s),i[n]=s,o[s]=n}r=a+1,n+=1}return{refNameToId:o,refIdToName:i}}async _parse(t={}){const n=await hi(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===$U)r=1;else if(n.readUInt32LE(0)===qU)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),o=n.readInt32LE(12),a=o&&o>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},s=n.readInt32LE(16+o);let u,l=16+o+4;const c=new Array(s).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const m=n.readUInt32LE(l);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=4+8+4+16+16;else{const y=Ua(n,l+4);u=this._findFirstData(u,y);const w=n.readInt32LE(l+12);l+=16;const A=new Array(w);for(let S=0;S<w;S+=1){const _=Ua(n,l),k=Ua(n,l+8);l+=16,A[S]=new Eh(_,k,m)}h[m]=A}}return{binIndex:h,stats:d}});return{...a,csi:!0,refCount:s,maxBlockSize:65536,firstDataLine:u,csiVersion:r,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:x4(Qf.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const a=o.refNameToId[t],s=o.indices[a];if(!s)return[];const u=this.reg2bins(n,r),l=[];for(const[c,f]of u)for(let h=c;h<=f;h++)if(s.binIndex[h])for(const d of s.binIndex[h])l.push(new Eh(d.minv,d.maxv,h));return A4(l,new rm(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const a=[];for(;r<=this.depth;o-=3,i+=WU(1,r*3),r+=1){const s=i+S4(t,o),u=i+S4(n,o);if(u-s+a.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);a.push([s,u])}return a}}const om=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ZU(e){return new Promise(t=>setTimeout(t,e))}class YU{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:o,csiFilehandle:a,yieldTime:s=500,chunkSizeLimit:u=5e7,renameRefSeqs:l=f=>f,chunkCacheSize:c=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new dt(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new _h({filehandle:i,renameRefSeqs:l});else if(a)this.index=new im({filehandle:a,renameRefSeqs:l});else if(r)this.index=new _h({filehandle:new dt(r),renameRefSeqs:l});else if(o)this.index=new im({filehandle:new dt(o),renameRefSeqs:l});else if(t)this.index=new _h({filehandle:new dt(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=u,this.renameRefSeq=l,this.yieldTime=s,this.chunkCache=new ih({cache:new oh({maxSize:Math.floor(c/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var o;let a,s={},u;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?u=i:(s=i,u=i.lineCallback,a=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!u)throw new TypeError("line callback must be provided");const l=await this.index.getMetadata(s);za(a);const c=n??0,f=r??l.maxRefLength;if(!(c<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===f)return;const h=await this.index.blocksForRange(t,c,f,s);za(a);for(const p of h){const m=p.fetchedSize();if(m>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${m.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let d=Date.now();for(const p of h){let m;const{buffer:y,cpositions:w,dpositions:A}=await this.chunkCache.get(p.toString(),p,a);za(a);let S=0,_=0;for(;S<y.length;){const k=y.indexOf(`
770
- `,S);if(k===-1)break;const B=y.slice(S,k),I=(o=om==null?void 0:om.decode(B))!==null&&o!==void 0?o:B.toString();if(A){for(;S+p.minv.dataPosition>=A[_++];);_--}const{startCoordinate:D,overlaps:M}=this.checkLine(l,t,c,f,I);if(m!==void 0&&D!==void 0&&m>D)throw new Error(`Lines not sorted by start coordinate (${m} > ${D}), this file is not usable with Tabix.`);if(m=D,M)u(I.trim(),w[_]*256+(S-A[_])+p.minv.dataPosition+1);else if(D!==void 0&&D>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),za(a),await ZU(1)),S=k+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);za(t.signal);const o=((n==null?void 0:n.blockPosition)||0)+i,a=await this._readRegion(0,o,t),s=await hi(a);if(r){let u=-1;const l=`
771
- `.charCodeAt(0),c=r.charCodeAt(0);for(let f=0;f<s.length&&!(f===u+1&&s[f]!==c);f+=1)s[f]===l&&(u=f);return s.slice(0,u+1)}return s}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,o){const{columnNumbers:a,metaChar:s,coordinateType:u,format:l}=t;if(s&&o.startsWith(s))return{overlaps:!1};let{ref:c,start:f,end:h}=a;c||(c=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(c,f,h);let p=1,m=0,y="",w=-1/0;for(let A=0;A<o.length+1;A+=1)if(o[A]===" "||A===o.length){if(p===c){if(this.renameRefSeq(o.slice(m,A))!==n)return{overlaps:!1}}else if(p===f){if(w=parseInt(o.slice(m,A),10),u==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===f)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=o.slice(m,A);else if(p===h&&(l==="VCF"?this._getVcfEnd(w,y,o.slice(m,A)):parseInt(o.slice(m,A),10))<=r)return{overlaps:!1};if(m=A+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const o=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!o){let a=";";for(let s=0;s<r.length;s+=1){if(a===";"&&r.slice(s,s+4)==="END="){let u=r.indexOf(";",s);u===-1&&(u=r.length),i=parseInt(r.slice(s+4,u),10);break}a=r[s]}}else if(o)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=be.Buffer.alloc(n),{bytesRead:o,buffer:a}=await this.filehandle.read(i,0,n,t,r);return a.slice(0,o)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return zA(r,t)}}const QU=Object.freeze(Object.defineProperty({__proto__:null,CSI:im,TBI:_h,TabixIndexedFile:YU},Symbol.toStringTag,{value:"Module"}));var am={exports:{}},Ga=typeof Reflect=="object"?Reflect:null,C4=Ga&&typeof Ga.apply=="function"?Ga.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},Sh;Ga&&typeof Ga.ownKeys=="function"?Sh=Ga.ownKeys:Object.getOwnPropertySymbols?Sh=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Sh=function(t){return Object.getOwnPropertyNames(t)};function XU(e){console&&console.warn&&console.warn(e)}var k4=Number.isNaN||function(t){return t!==t};function Pe(){Pe.init.call(this)}am.exports=Pe,am.exports.once=tG,Pe.EventEmitter=Pe,Pe.prototype._events=void 0,Pe.prototype._eventsCount=0,Pe.prototype._maxListeners=void 0;var T4=10;function Ch(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Pe,"defaultMaxListeners",{enumerable:!0,get:function(){return T4},set:function(e){if(typeof e!="number"||e<0||k4(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");T4=e}}),Pe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Pe.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||k4(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function I4(e){return e._maxListeners===void 0?Pe.defaultMaxListeners:e._maxListeners}Pe.prototype.getMaxListeners=function(){return I4(this)},Pe.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")C4(u,this,n);else for(var l=u.length,c=M4(u,l),r=0;r<l;++r)C4(c[r],this,n);return!0};function B4(e,t,n,r){var i,o,a;if(Ch(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),a===void 0)a=o[t]=n,++e._eventsCount;else if(typeof a=="function"?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),i=I4(e),i>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,XU(s)}return e}Pe.prototype.addListener=function(t,n){return B4(this,t,n,!1)},Pe.prototype.on=Pe.prototype.addListener,Pe.prototype.prependListener=function(t,n){return B4(this,t,n,!0)};function KU(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function D4(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=KU.bind(r);return i.listener=n,r.wrapFn=i,i}Pe.prototype.once=function(t,n){return Ch(n),this.on(t,D4(this,t,n)),this},Pe.prototype.prependOnceListener=function(t,n){return Ch(n),this.prependListener(t,D4(this,t,n)),this},Pe.prototype.removeListener=function(t,n){var r,i,o,a,s;if(Ch(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===n||r[a].listener===n){s=r[a].listener,o=a;break}if(o<0)return this;o===0?r.shift():JU(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||n)}return this},Pe.prototype.off=Pe.prototype.removeListener,Pe.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function R4(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?eG(i):M4(i,i.length)}Pe.prototype.listeners=function(t){return R4(this,t,!0)},Pe.prototype.rawListeners=function(t){return R4(this,t,!1)},Pe.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):F4.call(e,t)},Pe.prototype.listenerCount=F4;function F4(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Pe.prototype.eventNames=function(){return this._eventsCount>0?Sh(this._events):[]};function M4(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function JU(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function eG(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function tG(e,t){return new Promise(function(n,r){function i(a){e.removeListener(t,o),r(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}P4(e,t,o,{once:!0}),t!=="error"&&nG(e,i,{once:!0})})}function nG(e,t,n){typeof e.on=="function"&&P4(e,"error",t,n)}function P4(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var sm=am.exports,lm={exports:{}};typeof Object.create=="function"?lm.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:lm.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var Ha=lm.exports,um,L4;function N4(){return L4||(L4=1,um=sm.EventEmitter),um}const O4=gM(_M);var cm,z4;function rG(){if(z4)return cm;z4=1;function e(p,m){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);m&&(w=w.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?e(Object(y),!0).forEach(function(w){n(p,w,y[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(w){Object.defineProperty(p,w,Object.getOwnPropertyDescriptor(y,w))})}return p}function n(p,m,y){return m=a(m),m in p?Object.defineProperty(p,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[m]=y,p}function r(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function i(p,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,a(w.key),w)}}function o(p,m,y){return m&&i(p.prototype,m),y&&i(p,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function a(p){var m=s(p,"string");return typeof m=="symbol"?m:String(m)}function s(p,m){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,m||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var u=be,l=u.Buffer,c=O4,f=c.inspect,h=f&&f.custom||"inspect";function d(p,m,y){l.prototype.copy.call(p,m,y)}return cm=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(y){var w={data:y,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,A=""+w.data;w=w.next;)A+=y+w.data;return A}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),A=this.head,S=0;A;)d(A.data,w,S),S+=A.data.length,A=A.next;return w}},{key:"consume",value:function(y,w){var A;return y<this.head.data.length?(A=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?A=this.shift():A=w?this._getString(y):this._getBuffer(y),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,A=1,S=w.data;for(y-=S.length;w=w.next;){var _=w.data,k=y>_.length?_.length:y;if(k===_.length?S+=_:S+=_.slice(0,y),y-=k,y===0){k===_.length?(++A,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(k));break}++A}return this.length-=A,S}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),A=this.head,S=1;for(A.data.copy(w),y-=A.data.length;A=A.next;){var _=A.data,k=y>_.length?_.length:y;if(_.copy(w,w.length-y,0,k),y-=k,y===0){k===_.length?(++S,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=_.slice(k));break}++S}return this.length-=S,w}},{key:h,value:function(y,w){return f(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),cm}var fm,U4;function G4(){if(U4)return fm;U4=1;function e(a,s){var u=this,l=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return l||c?(s?s(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,a)):process.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(f){!s&&f?u._writableState?u._writableState.errorEmitted?process.nextTick(n,u):(u._writableState.errorEmitted=!0,process.nextTick(t,u,f)):process.nextTick(t,u,f):s?(process.nextTick(n,u),s(f)):process.nextTick(n,u)}),this)}function t(a,s){i(a,s),n(a)}function n(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,s){a.emit("error",s)}function o(a,s){var u=a._readableState,l=a._writableState;u&&u.autoDestroy||l&&l.autoDestroy?a.destroy(s):a.emit("error",s)}return fm={destroy:e,undestroy:r,errorOrDestroy:o},fm}var hm={},H4;function Va(){if(H4)return hm;H4=1;function e(s,u){s.prototype=Object.create(u.prototype),s.prototype.constructor=s,s.__proto__=u}var t={};function n(s,u,l){l||(l=Error);function c(h,d,p){return typeof u=="string"?u:u(h,d,p)}var f=function(h){e(d,h);function d(p,m,y){return h.call(this,c(p,m,y))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=s,t[s]=f}function r(s,u){if(Array.isArray(s)){var l=s.length;return s=s.map(function(c){return String(c)}),l>2?"one of ".concat(u," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(u," ").concat(s[0]," or ").concat(s[1]):"of ".concat(u," ").concat(s[0])}else return"of ".concat(u," ").concat(String(s))}function i(s,u,l){return s.substr(!l||l<0?0:+l,u.length)===u}function o(s,u,l){return(l===void 0||l>s.length)&&(l=s.length),s.substring(l-u.length,l)===u}function a(s,u,l){return typeof l!="number"&&(l=0),l+u.length>s.length?!1:s.indexOf(u,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,u){return'The value "'+u+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,u,l){var c;typeof u=="string"&&i(u,"not ")?(c="must not be",u=u.replace(/^not /,"")):c="must be";var f;if(o(s," argument"))f="The ".concat(s," ").concat(c," ").concat(r(u,"type"));else{var h=a(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(c," ").concat(r(u,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),hm.codes=t,hm}var dm,V4;function j4(){if(V4)return dm;V4=1;var e=Va().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function n(r,i,o,a){var s=t(i,a,o);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=a?o:"highWaterMark";throw new e(u,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return dm={getHighWaterMark:n},dm}var pm,$4;function iG(){if($4)return pm;$4=1,pm=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return o}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return pm}var gm,q4;function W4(){if(q4)return gm;q4=1,gm=D;function e(L){var P=this;this.next=null,this.entry=null,this.finish=function(){He(P,L)}}var t;D.WritableState=B;var n={deprecate:iG()},r=N4(),i=be.Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(L){return i.from(L)}function s(L){return i.isBuffer(L)||L instanceof o}var u=G4(),l=j4(),c=l.getHighWaterMark,f=Va().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;Ha(D,r);function k(){}function B(L,P,q){t=t||ja(),L=L||{},typeof q!="boolean"&&(q=P instanceof t),this.objectMode=!!L.objectMode,q&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=c(this,L,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=L.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){Fe(P,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}B.prototype.getBuffer=function(){for(var P=this.bufferedRequest,q=[];P;)q.push(P),P=P.next;return q},function(){try{Object.defineProperty(B.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(P){return I.call(this,P)?!0:this!==D?!1:P&&P._writableState instanceof B}})):I=function(P){return P instanceof this};function D(L){t=t||ja();var P=this instanceof t;if(!P&&!I.call(D,this))return new D(L);this._writableState=new B(L,this,P),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),r.call(this)}D.prototype.pipe=function(){_(this,new m)};function M(L,P){var q=new A;_(L,q),process.nextTick(P,q)}function G(L,P,q,j){var Y;return q===null?Y=new w:typeof q!="string"&&!P.objectMode&&(Y=new h("chunk",["string","Buffer"],q)),Y?(_(L,Y),process.nextTick(j,Y),!1):!0}D.prototype.write=function(L,P,q){var j=this._writableState,Y=!1,C=!j.objectMode&&s(L);return C&&!i.isBuffer(L)&&(L=a(L)),typeof P=="function"&&(q=P,P=null),C?P="buffer":P||(P=j.defaultEncoding),typeof q!="function"&&(q=k),j.ending?M(this,q):(C||G(this,j,L,q))&&(j.pendingcb++,Y=ne(this,j,C,L,P,q)),Y},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&Oe(this,L))},D.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new S(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,P,q){return!L.objectMode&&L.decodeStrings!==!1&&typeof P=="string"&&(P=i.from(P,q)),P}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ne(L,P,q,j,Y,C){if(!q){var x=N(P,j,Y);j!==x&&(q=!0,Y="buffer",j=x)}var V=P.objectMode?1:j.length;P.length+=V;var W=P.length<P.highWaterMark;if(W||(P.needDrain=!0),P.writing||P.corked){var ue=P.lastBufferedRequest;P.lastBufferedRequest={chunk:j,encoding:Y,isBuf:q,callback:C,next:null},ue?ue.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else ie(L,P,!1,V,j,Y,C);return W}function ie(L,P,q,j,Y,C,x){P.writelen=j,P.writecb=x,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new y("write")):q?L._writev(Y,P.onwrite):L._write(Y,C,P.onwrite),P.sync=!1}function he(L,P,q,j,Y){--P.pendingcb,q?(process.nextTick(Y,j),process.nextTick(gt,L,P),L._writableState.errorEmitted=!0,_(L,j)):(Y(j),L._writableState.errorEmitted=!0,_(L,j),gt(L,P))}function me(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Fe(L,P){var q=L._writableState,j=q.sync,Y=q.writecb;if(typeof Y!="function")throw new p;if(me(q),P)he(L,q,j,P,Y);else{var C=Je(q)||L.destroyed;!C&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&Oe(L,q),j?process.nextTick(Ae,L,q,C,Y):Ae(L,q,C,Y)}}function Ae(L,P,q,j){q||Le(L,P),P.pendingcb--,j(),gt(L,P)}function Le(L,P){P.length===0&&P.needDrain&&(P.needDrain=!1,L.emit("drain"))}function Oe(L,P){P.bufferProcessing=!0;var q=P.bufferedRequest;if(L._writev&&q&&q.next){var j=P.bufferedRequestCount,Y=new Array(j),C=P.corkedRequestsFree;C.entry=q;for(var x=0,V=!0;q;)Y[x]=q,q.isBuf||(V=!1),q=q.next,x+=1;Y.allBuffers=V,ie(L,P,!0,P.length,Y,"",C.finish),P.pendingcb++,P.lastBufferedRequest=null,C.next?(P.corkedRequestsFree=C.next,C.next=null):P.corkedRequestsFree=new e(P),P.bufferedRequestCount=0}else{for(;q;){var W=q.chunk,ue=q.encoding,te=q.callback,ce=P.objectMode?1:W.length;if(ie(L,P,!1,ce,W,ue,te),q=q.next,P.bufferedRequestCount--,P.writing)break}q===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=q,P.bufferProcessing=!1}D.prototype._write=function(L,P,q){q(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(L,P,q){var j=this._writableState;return typeof L=="function"?(q=L,L=null,P=null):typeof P=="function"&&(q=P,P=null),L!=null&&this.write(L,P),j.corked&&(j.corked=1,this.uncork()),j.ending||$t(this,j,q),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Je(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function Ce(L,P){L._final(function(q){P.pendingcb--,q&&_(L,q),P.prefinished=!0,L.emit("prefinish"),gt(L,P)})}function ke(L,P){!P.prefinished&&!P.finalCalled&&(typeof L._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,process.nextTick(Ce,L,P)):(P.prefinished=!0,L.emit("prefinish")))}function gt(L,P){var q=Je(P);if(q&&(ke(L,P),P.pendingcb===0&&(P.finished=!0,L.emit("finish"),P.autoDestroy))){var j=L._readableState;(!j||j.autoDestroy&&j.endEmitted)&&L.destroy()}return q}function $t(L,P,q){P.ending=!0,gt(L,P),q&&(P.finished?process.nextTick(q):L.once("finish",q)),P.ended=!0,L.writable=!1}function He(L,P,q){var j=L.entry;for(L.entry=null;j;){var Y=j.callback;P.pendingcb--,Y(q),j=j.next}P.corkedRequestsFree.next=L}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),D.prototype.destroy=u.destroy,D.prototype._undestroy=u.undestroy,D.prototype._destroy=function(L,P){P(L)},gm}var mm,Z4;function ja(){if(Z4)return mm;Z4=1;var e=Object.keys||function(l){var c=[];for(var f in l)c.push(f);return c};mm=a;var t=e_(),n=W4();Ha(a,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=n.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(u,this)}function u(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),mm}var bm={},ym={exports:{}};(function(e,t){var n=be,r=n.Buffer;function i(a,s){for(var u in a)s[u]=a[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(a,s,u){return r(a,s,u)}i(r,o),o.from=function(a,s,u){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,s,u)},o.alloc=function(a,s,u){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return s!==void 0?typeof u=="string"?l.fill(s,u):l.fill(s):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(a)}})(ym,ym.exports);var oG=ym.exports,wm=oG.Buffer,Y4=wm.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function aG(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function sG(e){var t=aG(e);if(typeof t!="string"&&(wm.isEncoding===Y4||!Y4(e)))throw new Error("Unknown encoding: "+e);return t||e}var lG=bm.StringDecoder=pu;function pu(e){this.encoding=sG(e);var t;switch(this.encoding){case"utf16le":this.text=pG,this.end=gG,t=4;break;case"utf8":this.fillLast=fG,t=4;break;case"base64":this.text=mG,this.end=bG,t=3;break;default:this.write=yG,this.end=wG;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=wm.allocUnsafe(t)}pu.prototype.write=function(e){if(e.length===0)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},pu.prototype.end=dG,pu.prototype.text=hG,pu.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function vm(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function uG(e,t,n){var r=t.length-1;if(r<n)return 0;var i=vm(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=vm(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=vm(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function cG(e,t,n){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function fG(e){var t=this.lastTotal-this.lastNeed,n=cG(this,e);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function hG(e,t){var n=uG(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function dG(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function pG(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function gG(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function mG(e,t){var n=(e.length-t)%3;return n===0?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function bG(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function yG(e){return e.toString(this.encoding)}function wG(e){return e&&e.length?this.write(e):""}var xm,Q4;function Am(){if(Q4)return xm;Q4=1;var e=Va().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];o.apply(this,u)}}}function n(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,s){if(typeof a=="function")return i(o,null,a);a||(a={}),s=t(s||n);var u=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,c=function(){o.writable||h()},f=o._writableState&&o._writableState.finished,h=function(){l=!1,f=!0,u||s.call(o)},d=o._readableState&&o._readableState.endEmitted,p=function(){u=!1,d=!0,l||s.call(o)},m=function(S){s.call(o,S)},y=function(){var S;if(u&&!d)return(!o._readableState||!o._readableState.ended)&&(S=new e),s.call(o,S);if(l&&!f)return(!o._writableState||!o._writableState.ended)&&(S=new e),s.call(o,S)},w=function(){o.req.on("finish",h)};return r(o)?(o.on("complete",h),o.on("abort",y),o.req?w():o.on("request",w)):l&&!o._writableState&&(o.on("end",c),o.on("close",c)),o.on("end",p),o.on("finish",h),a.error!==!1&&o.on("error",m),o.on("close",y),function(){o.removeListener("complete",h),o.removeListener("abort",y),o.removeListener("request",w),o.req&&o.req.removeListener("finish",h),o.removeListener("end",c),o.removeListener("close",c),o.removeListener("finish",h),o.removeListener("end",p),o.removeListener("error",m),o.removeListener("close",y)}}return xm=i,xm}var Em,X4;function vG(){if(X4)return Em;X4=1;var e;function t(S,_,k){return _=n(_),_ in S?Object.defineProperty(S,_,{value:k,enumerable:!0,configurable:!0,writable:!0}):S[_]=k,S}function n(S){var _=r(S,"string");return typeof _=="symbol"?_:String(_)}function r(S,_){if(typeof S!="object"||S===null)return S;var k=S[Symbol.toPrimitive];if(k!==void 0){var B=k.call(S,_||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(S)}var i=Am(),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function h(S,_){return{value:S,done:_}}function d(S){var _=S[o];if(_!==null){var k=S[f].read();k!==null&&(S[l]=null,S[o]=null,S[a]=null,_(h(k,!1)))}}function p(S){process.nextTick(d,S)}function m(S,_){return function(k,B){S.then(function(){if(_[u]){k(h(void 0,!0));return}_[c](k,B)},B)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var _=this,k=this[s];if(k!==null)return Promise.reject(k);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,G){process.nextTick(function(){_[s]?G(_[s]):M(h(void 0,!0))})});var B=this[l],I;if(B)I=new Promise(m(B,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));I=new Promise(this[c])}return this[l]=I,I}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(k,B){_[f].destroy(null,function(I){if(I){B(I);return}k(h(void 0,!0))})})}),e),y),A=function(_){var k,B=Object.create(w,(k={},t(k,f,{value:_,writable:!0}),t(k,o,{value:null,writable:!0}),t(k,a,{value:null,writable:!0}),t(k,s,{value:null,writable:!0}),t(k,u,{value:_._readableState.endEmitted,writable:!0}),t(k,c,{value:function(D,M){var G=B[f].read();G?(B[l]=null,B[o]=null,B[a]=null,D(h(G,!1))):(B[o]=D,B[a]=M)},writable:!0}),k));return B[l]=null,i(_,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=B[a];D!==null&&(B[l]=null,B[o]=null,B[a]=null,D(I)),B[s]=I;return}var M=B[o];M!==null&&(B[l]=null,B[o]=null,B[a]=null,M(h(void 0,!0))),B[u]=!0}),_.on("readable",p.bind(null,B)),B};return Em=A,Em}var _m,K4;function xG(){return K4||(K4=1,_m=function(){throw new Error("Readable.from is not available in the browser")}),_m}var Sm,J4;function e_(){if(J4)return Sm;J4=1,Sm=M;var e;M.ReadableState=D,sm.EventEmitter;var t=function(x,V){return x.listeners(V).length},n=N4(),r=be.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(C){return r.from(C)}function a(C){return r.isBuffer(C)||C instanceof i}var s=O4,u;s&&s.debuglog?u=s.debuglog("stream"):u=function(){};var l=rG(),c=G4(),f=j4(),h=f.getHighWaterMark,d=Va().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,S,_;Ha(M,n);var k=c.errorOrDestroy,B=["error","close","destroy","pause","resume"];function I(C,x,V){if(typeof C.prependListener=="function")return C.prependListener(x,V);!C._events||!C._events[x]?C.on(x,V):Array.isArray(C._events[x])?C._events[x].unshift(V):C._events[x]=[V,C._events[x]]}function D(C,x,V){e=e||ja(),C=C||{},typeof V!="boolean"&&(V=x instanceof e),this.objectMode=!!C.objectMode,V&&(this.objectMode=this.objectMode||!!C.readableObjectMode),this.highWaterMark=h(this,C,"readableHighWaterMark",V),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.destroyed=!1,this.defaultEncoding=C.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,C.encoding&&(A||(A=bm.StringDecoder),this.decoder=new A(C.encoding),this.encoding=C.encoding)}function M(C){if(e=e||ja(),!(this instanceof M))return new M(C);var x=this instanceof e;this._readableState=new D(C,this,x),this.readable=!0,C&&(typeof C.read=="function"&&(this._read=C.read),typeof C.destroy=="function"&&(this._destroy=C.destroy)),n.call(this)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),M.prototype.destroy=c.destroy,M.prototype._undestroy=c.undestroy,M.prototype._destroy=function(C,x){x(C)},M.prototype.push=function(C,x){var V=this._readableState,W;return V.objectMode?W=!0:typeof C=="string"&&(x=x||V.defaultEncoding,x!==V.encoding&&(C=r.from(C,x),x=""),W=!0),G(this,C,x,!1,W)},M.prototype.unshift=function(C){return G(this,C,null,!0,!1)};function G(C,x,V,W,ue){u("readableAddChunk",x);var te=C._readableState;if(x===null)te.reading=!1,Fe(C,te);else{var ce;if(ue||(ce=ne(te,x)),ce)k(C,ce);else if(te.objectMode||x&&x.length>0)if(typeof x!="string"&&!te.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=o(x)),W)te.endEmitted?k(C,new w):N(C,te,x,!0);else if(te.ended)k(C,new m);else{if(te.destroyed)return!1;te.reading=!1,te.decoder&&!V?(x=te.decoder.write(x),te.objectMode||x.length!==0?N(C,te,x,!1):Oe(C,te)):N(C,te,x,!1)}else W||(te.reading=!1,Oe(C,te))}return!te.ended&&(te.length<te.highWaterMark||te.length===0)}function N(C,x,V,W){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,C.emit("data",V)):(x.length+=x.objectMode?1:V.length,W?x.buffer.unshift(V):x.buffer.push(V),x.needReadable&&Ae(C)),Oe(C,x)}function ne(C,x){var V;return!a(x)&&typeof x!="string"&&x!==void 0&&!C.objectMode&&(V=new p("chunk",["string","Buffer","Uint8Array"],x)),V}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(C){A||(A=bm.StringDecoder);var x=new A(C);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var V=this._readableState.buffer.head,W="";V!==null;)W+=x.write(V.data),V=V.next;return this._readableState.buffer.clear(),W!==""&&this._readableState.buffer.push(W),this._readableState.length=W.length,this};var ie=1073741824;function he(C){return C>=ie?C=ie:(C--,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C++),C}function me(C,x){return C<=0||x.length===0&&x.ended?0:x.objectMode?1:C!==C?x.flowing&&x.length?x.buffer.head.data.length:x.length:(C>x.highWaterMark&&(x.highWaterMark=he(C)),C<=x.length?C:x.ended?x.length:(x.needReadable=!0,0))}M.prototype.read=function(C){u("read",C),C=parseInt(C,10);var x=this._readableState,V=C;if(C!==0&&(x.emittedReadable=!1),C===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return u("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?q(this):Ae(this),null;if(C=me(C,x),C===0&&x.ended)return x.length===0&&q(this),null;var W=x.needReadable;u("need readable",W),(x.length===0||x.length-C<x.highWaterMark)&&(W=!0,u("length less than watermark",W)),x.ended||x.reading?(W=!1,u("reading or ended",W)):W&&(u("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(C=me(V,x)));var ue;return C>0?ue=P(C,x):ue=null,ue===null?(x.needReadable=x.length<=x.highWaterMark,C=0):(x.length-=C,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),V!==C&&x.ended&&q(this)),ue!==null&&this.emit("data",ue),ue};function Fe(C,x){if(u("onEofChunk"),!x.ended){if(x.decoder){var V=x.decoder.end();V&&V.length&&(x.buffer.push(V),x.length+=x.objectMode?1:V.length)}x.ended=!0,x.sync?Ae(C):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,Le(C)))}}function Ae(C){var x=C._readableState;u("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(u("emitReadable",x.flowing),x.emittedReadable=!0,process.nextTick(Le,C))}function Le(C){var x=C._readableState;u("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(C.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,L(C)}function Oe(C,x){x.readingMore||(x.readingMore=!0,process.nextTick(Je,C,x))}function Je(C,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var V=x.length;if(u("maybeReadMore read 0"),C.read(0),V===x.length)break}x.readingMore=!1}M.prototype._read=function(C){k(this,new y("_read()"))},M.prototype.pipe=function(C,x){var V=this,W=this._readableState;switch(W.pipesCount){case 0:W.pipes=C;break;case 1:W.pipes=[W.pipes,C];break;default:W.pipes.push(C);break}W.pipesCount+=1,u("pipe count=%d opts=%j",W.pipesCount,x);var ue=(!x||x.end!==!1)&&C!==process.stdout&&C!==process.stderr,te=ue?qt:rr;W.endEmitted?process.nextTick(te):V.once("end",te),C.on("unpipe",ce);function ce(v,g){u("onunpipe"),v===V&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,ki())}function qt(){u("onend"),C.end()}var Si=Ce(V);C.on("drain",Si);var Ci=!1;function ki(){u("cleanup"),C.removeListener("close",Ti),C.removeListener("finish",Wt),C.removeListener("drain",Si),C.removeListener("error",Tr),C.removeListener("unpipe",ce),V.removeListener("end",qt),V.removeListener("end",rr),V.removeListener("data",kt),Ci=!0,W.awaitDrain&&(!C._writableState||C._writableState.needDrain)&&Si()}V.on("data",kt);function kt(v){u("ondata");var g=C.write(v);u("dest.write",g),g===!1&&((W.pipesCount===1&&W.pipes===C||W.pipesCount>1&&Y(W.pipes,C)!==-1)&&!Ci&&(u("false write response, pause",W.awaitDrain),W.awaitDrain++),V.pause())}function Tr(v){u("onerror",v),rr(),C.removeListener("error",Tr),t(C,"error")===0&&k(C,v)}I(C,"error",Tr);function Ti(){C.removeListener("finish",Wt),rr()}C.once("close",Ti);function Wt(){u("onfinish"),C.removeListener("close",Ti),rr()}C.once("finish",Wt);function rr(){u("unpipe"),V.unpipe(C)}return C.emit("pipe",V),W.flowing||(u("pipe resume"),V.resume()),C};function Ce(C){return function(){var V=C._readableState;u("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&t(C,"data")&&(V.flowing=!0,L(C))}}M.prototype.unpipe=function(C){var x=this._readableState,V={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return C&&C!==x.pipes?this:(C||(C=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,C&&C.emit("unpipe",this,V),this);if(!C){var W=x.pipes,ue=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var te=0;te<ue;te++)W[te].emit("unpipe",this,{hasUnpiped:!1});return this}var ce=Y(x.pipes,C);return ce===-1?this:(x.pipes.splice(ce,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),C.emit("unpipe",this,V),this)},M.prototype.on=function(C,x){var V=n.prototype.on.call(this,C,x),W=this._readableState;return C==="data"?(W.readableListening=this.listenerCount("readable")>0,W.flowing!==!1&&this.resume()):C==="readable"&&!W.endEmitted&&!W.readableListening&&(W.readableListening=W.needReadable=!0,W.flowing=!1,W.emittedReadable=!1,u("on readable",W.length,W.reading),W.length?Ae(this):W.reading||process.nextTick(gt,this)),V},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(C,x){var V=n.prototype.removeListener.call(this,C,x);return C==="readable"&&process.nextTick(ke,this),V},M.prototype.removeAllListeners=function(C){var x=n.prototype.removeAllListeners.apply(this,arguments);return(C==="readable"||C===void 0)&&process.nextTick(ke,this),x};function ke(C){var x=C._readableState;x.readableListening=C.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:C.listenerCount("data")>0&&C.resume()}function gt(C){u("readable nexttick read 0"),C.read(0)}M.prototype.resume=function(){var C=this._readableState;return C.flowing||(u("resume"),C.flowing=!C.readableListening,$t(this,C)),C.paused=!1,this};function $t(C,x){x.resumeScheduled||(x.resumeScheduled=!0,process.nextTick(He,C,x))}function He(C,x){u("resume",x.reading),x.reading||C.read(0),x.resumeScheduled=!1,C.emit("resume"),L(C),x.flowing&&!x.reading&&C.read(0)}M.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(C){var x=C._readableState;for(u("flow",x.flowing);x.flowing&&C.read()!==null;);}M.prototype.wrap=function(C){var x=this,V=this._readableState,W=!1;C.on("end",function(){if(u("wrapped end"),V.decoder&&!V.ended){var ce=V.decoder.end();ce&&ce.length&&x.push(ce)}x.push(null)}),C.on("data",function(ce){if(u("wrapped data"),V.decoder&&(ce=V.decoder.write(ce)),!(V.objectMode&&ce==null)&&!(!V.objectMode&&(!ce||!ce.length))){var qt=x.push(ce);qt||(W=!0,C.pause())}});for(var ue in C)this[ue]===void 0&&typeof C[ue]=="function"&&(this[ue]=function(qt){return function(){return C[qt].apply(C,arguments)}}(ue));for(var te=0;te<B.length;te++)C.on(B[te],this.emit.bind(this,B[te]));return this._read=function(ce){u("wrapped _read",ce),W&&(W=!1,C.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=vG()),S(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),M._fromList=P,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function P(C,x){if(x.length===0)return null;var V;return x.objectMode?V=x.buffer.shift():!C||C>=x.length?(x.decoder?V=x.buffer.join(""):x.buffer.length===1?V=x.buffer.first():V=x.buffer.concat(x.length),x.buffer.clear()):V=x.buffer.consume(C,x.decoder),V}function q(C){var x=C._readableState;u("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,process.nextTick(j,x,C))}function j(C,x){if(u("endReadableNT",C.endEmitted,C.length),!C.endEmitted&&C.length===0&&(C.endEmitted=!0,x.readable=!1,x.emit("end"),C.autoDestroy)){var V=x._writableState;(!V||V.autoDestroy&&V.finished)&&x.destroy()}}typeof Symbol=="function"&&(M.from=function(C,x){return _===void 0&&(_=xG()),_(M,C,x)});function Y(C,x){for(var V=0,W=C.length;V<W;V++)if(C[V]===x)return V;return-1}return Sm}var Cm,t_;function n_(){if(t_)return Cm;t_=1,Cm=s;var e=Va().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,o=ja();Ha(s,o);function a(c,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(c);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(c){if(!(this instanceof s))return new s(c);o.call(this,c),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function u(){var c=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(c,f,h)}):l(this,null,null)}s.prototype.push=function(c,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,c,f)},s.prototype._transform=function(c,f,h){h(new t("_transform()"))},s.prototype._write=function(c,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=c,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(c){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(c,f){o.prototype._destroy.call(this,c,function(h){f(h)})};function l(c,f,h){if(f)return c.emit("error",f);if(h!=null&&c.push(h),c._writableState.length)throw new i;if(c._transformState.transforming)throw new r;return c.push(null)}return Cm}var km,r_;function AG(){if(r_)return km;r_=1,km=t;var e=n_();Ha(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},km}var Tm,i_;function EG(){if(i_)return Tm;i_=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=Va().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function a(h){return h.setHeader&&typeof h.abort=="function"}function s(h,d,p,m){m=t(m);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=Am()),e(h,{readable:d,writable:p},function(A){if(A)return m(A);y=!0,m()});var w=!1;return function(A){if(!y&&!w){if(w=!0,a(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();m(A||new i("pipe"))}}}function u(h){h()}function l(h,d){return h.pipe(d)}function c(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var m=c(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(A,S){var _=S<d.length-1,k=S>0;return s(A,_,k,function(B){y||(y=B),B&&w.forEach(u),!_&&(w.forEach(u),m(y))})});return d.reduce(l)}return Tm=f,Tm}var o_=yn,Im=sm.EventEmitter,_G=Ha;_G(yn,Im),yn.Readable=e_(),yn.Writable=W4(),yn.Duplex=ja(),yn.Transform=n_(),yn.PassThrough=AG(),yn.finished=Am(),yn.pipeline=EG(),yn.Stream=yn;function yn(){Im.call(this)}yn.prototype.pipe=function(e,t){var n=this;function r(c){e.writable&&e.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",a),n.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(c){if(l(),Im.listenerCount(this,"error")===0)throw c}n.on("error",u),e.on("error",u);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",a),n.removeListener("close",s),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function gu(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function a_(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function mu(e){return a_(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function Ar(e){return a_(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function s_(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(o=>o.trim()).map(gu))}),t}function l_(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&gu(t[0]),source:t[1]&&gu(t[1]),type:t[2]&&gu(t[2]),start:t[3]===null?null:parseInt(t[3],10),end:t[4]===null?null:parseInt(t[4],10),score:t[5]===null?null:parseFloat(t[5]),strand:t[6],phase:t[7],attributes:t[8]===null?null:s_(t[8])}}function u_(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const o=r.split(/\s+/,3);return{...i,seq_id:o[0],start:o[1]&&o[1].replace(/\D/g,""),end:o[2]&&o[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[o,a]=r.split(/\s+/,2);return{...i,source:o,buildName:a}}return i}function c_(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=mu(r.toString()):Array.isArray(r)?i=r.map(mu).join(","):i=mu(r),t.push(`${mu(n)}=${i}`)}),t.length?t.join(";"):"."}function SG(e,t){const n=e.attributes===null||e.attributes===void 0?".":c_(e.attributes),i=`${[e.seq_id===null?".":Ar(e.seq_id),e.source===null?".":Ar(e.source),e.type===null?".":Ar(e.type),e.start===null?".":Ar(e.start),e.end===null?".":Ar(e.end),e.score===null?".":Ar(e.score),e.strand===null?".":Ar(e.strand),e.phase===null?".":Ar(e.phase),n].join(" ")}
772
- `;return t[i]?"":(t[i]=!0,i)}function kh(e,t){if(Array.isArray(e))return e.map(r=>kh(r,t)).join("");const n=[SG(e,t)];return CG(e)&&n.push(...e.child_features.map(r=>kh(r,t)),...e.derived_features.map(r=>kh(r,t))),n.join("")}function f_(e){return kh(e,{})}function h_(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
773
- `,t}function d_(e){return`# ${e.comment}
774
- `}function Bm(e){return`>${e.id}${e.description?` ${e.description}`:""}
769
+ )`},Symbol.toStringTag,{value:"Module"}))).map(([e,t])=>[e,r4.parse(t.trim())]));function im(e){const t=new Set(["uint","int","float","long"]);return{...e,fields:e.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&t.has(n.type),isNumeric:!n.size&&t.has(n.type)})).filter(n=>!!n.name)}}const mU={".":0,"-":-1,"+":1};function bU(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&((t=e[10])===null||t===void 0?void 0:t.split(",").filter(n=>!!n).length)===parseInt(e[9],10)}class yU{constructor(t={}){if(t.autoSql)this.autoSql=im(gU.parse(t.autoSql));else if(t.type){if(!rm[t.type])throw new Error("Type not found");this.autoSql=im(rm[t.type])}else this.autoSql=im(rm.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(t,n={}){const{autoSql:r}=this,{uniqueId:i}=n,o=Array.isArray(t)?t:t.split(" ");let s={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&bU(o))for(let a=0;a<r.fields.length;a++){const u=r.fields[a];let l=o[a];const{isNumeric:c,isArray:f,arrayIsNumeric:h,name:d}=u;if(l==null)break;if(l!=="."){if(c){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),h&&(l=l.map(Number)));s[d]=l}}else{const a=["chrom","chromStart","chromEnd","name"];s=Object.fromEntries(o.map((u,l)=>[a[l]||"field"+l,u])),s.chromStart=+s.chromStart,s.chromEnd=+s.chromEnd,Number.isNaN(Number.parseFloat(s.field4))||(s.score=+s.field4,delete s.field4),(s.field5==="+"||s.field5==="-")&&(s.strand=s.field5,delete s.field5)}return i&&(s.uniqueId=i),s.strand=mU[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const wU=Object.freeze(Object.defineProperty({__proto__:null,default:yU},Symbol.toStringTag,{value:"Module"}));let i4=class{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}};function Ns(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new i4(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}let o4=class{constructor(t,n,r,i){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv.toString()}..${this.maxv.toString()} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}};function vU(e){return new Promise(t=>setTimeout(t,e))}function AU(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}function xU(e){if(e&&e.aborted)if(typeof DOMException>"u"){const t=new Error("aborted");throw t.code="ERR_ABORTED",t}else throw new DOMException("aborted","AbortError")}function EU(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function _U(e={}){return"aborted"in e?{signal:e}:e}function s4(e,t){const n=[];let r;if(e.length===0)return e;e.sort((i,o)=>{const s=i.minv.blockPosition-o.minv.blockPosition;return s===0?i.minv.dataPosition-o.minv.dataPosition:s});for(const i of e)(!t||i.maxv.compareTo(t)>0)&&(r===void 0?(n.push(i),r=i):EU(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i));return n}function a4(e,t){return{lineCount:AU(Kf.fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function Eh(e,t){return e?e.compareTo(t)>0?t:e:t}function SU(e,t=n=>n){let n=0,r=0;const i=[],o={};for(let s=0;s<e.length;s+=1)if(!e[s]){if(r<s){let a=e.toString("utf8",r,s);a=t(a),i[n]=a,o[a]=n}r=s+1,n+=1}return{refNameToId:o,refIdToName:i}}let l4=class{constructor({filehandle:t,renameRefSeq:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}};const CU=21578050;function kU(e,t){return e-e%t}function TU(e,t){return e-e%t+t}function IU(e,t){return t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class Os extends l4{async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async _parse(t){const n=await this.filehandle.readFile(t);if(n.readUInt32LE(0)!==CU)throw new Error("Not a BAI file");const r=n.readInt32LE(4),o=((1<<(5+1)*3)-1)/7;let s=8,a;const u=new Array(r);for(let l=0;l<r;l++){const c=n.readInt32LE(s);let f;s+=4;const h={};for(let m=0;m<c;m+=1){const y=n.readUInt32LE(s);if(s+=4,y===o+1)s+=4,f=a4(n,s+16),s+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=n.readInt32LE(s);s+=4;const x=new Array(w);for(let S=0;S<w;S++){const _=Ns(n,s);s+=8;const k=Ns(n,s);s+=8,a=Eh(a,_),x[S]=new o4(_,k,y)}h[y]=x}}}const d=n.readInt32LE(s);s+=4;const p=new Array(d);for(let m=0;m<d;m++){const y=Ns(n,s);s+=8,a=Eh(a,y),p[m]=y}u[l]={binIndex:h,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:a,maxBlockSize:65536,indices:u,refCount:r}}async indexCov(t,n,r,i={}){const s=n!==void 0,u=(await this.parse(i)).indices[t];if(!u)return[];const{linearIndex:l=[],stats:c}=u;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:TU(r,16384),h=n===void 0?0:kU(n,16384),d=s?new Array((f-h)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let m=l[h/16384].blockPosition;for(let y=h/16384,w=0;y<f/16384;y++,w++)d[w]={score:l[y+1].blockPosition-m,start:y*16384,end:y*16384+16384},m=l[y+1].blockPosition;return d.map(y=>({...y,score:y.score*((c==null?void 0:c.lineCount)||0)/p}))}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const s=o.indices[t];if(!s)return[];const a=IU(n,r),u=[];for(const[d,p]of a)for(let m=d;m<=p;m++)if(s.binIndex[m]){const y=s.binIndex[m];for(const w of y)u.push(w)}const l=s.linearIndex.length;let c;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=s.linearIndex[d];p&&(!c||p.compareTo(c)<0)&&(c=p)}return s4(u,c)}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}function BU(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const DU=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function u4(e){if(Buffer.isBuffer(e))return e;if(typeof e=="number")return Buffer.alloc(e);if(typeof e=="string")return Buffer.from(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function RU(e){const t=u4(4);return t.writeInt32BE(e,0),t}function om(e,t){e=u4(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let n=~~t^-1;for(var r=0;r<e.length;r++)n=DU[(n^e[r])&255]^n>>>8;return n^-1}function sm(){return RU(om.apply(null,arguments))}sm.signed=function(){return om.apply(null,arguments)},sm.unsigned=function(){return om.apply(null,arguments)>>>0};var FU=sm;const MU=BU(FU),PU=21582659,LU=38359875;function NU(e,t){return e*2**t}function c4(e,t){return Math.floor(e/2**t)}let _h=class extends l4{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n){var r,i;return((i=(r=(await this.parse(n)).indices[t])===null||r===void 0?void 0:r.stats)===null||i===void 0?void 0:i.lineCount)||0}async indexCov(){return[]}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},a=t.readInt32LE(n+16),u=a?String.fromCharCode(a):"",l=t.readInt32LE(n+20),c=t.readInt32LE(n+24);return{columnNumbers:s,coordinateType:i,metaValue:a,metaChar:u,skipLines:l,format:o,formatFlags:r,...SU(t.subarray(n+28,n+28+c),this.renameRefSeq)}}async _parse(t){const n=await this.filehandle.readFile(t),r=await fi(n);let i;if(r.readUInt32LE(0)===PU)i=1;else if(r.readUInt32LE(0)===LU)i=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const o=r.readInt32LE(12),s=o>=30?this.parseAuxData(r,16):void 0,a=r.readInt32LE(16+o);let u=16+o+4,l;const c=new Array(a);for(let f=0;f<a;f++){const h=r.readInt32LE(u);u+=4;const d={};let p;for(let m=0;m<h;m++){const y=r.readUInt32LE(u);if(u+=4,y>this.maxBinNumber)p=a4(r,u+28),u+=44;else{l=Eh(l,Ns(r,u)),u+=8;const w=r.readInt32LE(u);u+=4;const x=new Array(w);for(let S=0;S<w;S+=1){const _=Ns(r,u);u+=8;const k=Ns(r,u);u+=8,l=Eh(l,_),x[S]=new o4(_,k,y)}d[y]=x}}c[f]={binIndex:d,stats:p}}return{csiVersion:i,firstDataLine:l,indices:c,refCount:a,csi:!0,maxBlockSize:65536,...s}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i),s=o==null?void 0:o.indices[t];if(!s)return[];const a=this.reg2bins(n,r);if(a.length===0)return[];const u=[];for(const[l,c]of a)for(let f=l;f<=c;f++)if(s.binIndex[f]){const h=s.binIndex[f];for(const d of h)u.push(d)}return s4(u,new i4(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;o-=3,i+=NU(1,r*3),r+=1){const a=i+c4(t,o),u=i+c4(n,o);if(u-a+s.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([a,u])}return s}async parse(t={}){return this.setupP||(this.setupP=this._parse(t).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}};const yn={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},f4="=ACMGRSVTWYHKDBN".split(""),du="MIDNSHP=X???????".split("");class h4{constructor(t){this.data={},this._tagList=[],this._allTagsParsed=!1;const{bytes:n,fileOffset:r}=t,{byteArray:i,start:o}=n;this.data={},this.bytes=n,this._id=r,this._refID=i.readInt32LE(o+4),this.data.start=i.readInt32LE(o+8),this.flags=(i.readInt32LE(o+16)&4294901760)>>16}get(t){return this[t]?this.data[t]?this.data[t]:(this.data[t]=this[t](),this.data[t]):this._get(t.toLowerCase())}end(){return this.get("start")+this.get("length_on_ref")}seq_id(){return this._refID}_get(t){return t in this.data?this.data[t]:(this.data[t]=this._parseTag(t),this.data[t])}_tags(){this._parseAllTags();let t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(const r of Object.keys(this.data))!r.startsWith("_")&&r!=="next_seq_id"&&t.push(r);const n={};return t.filter(r=>{if(r in this.data&&this.data[r]===void 0||r==="CG"||r==="cg")return!1;const i=r.toLowerCase(),o=n[i];return n[i]=!0,!o})}parent(){}children(){return this.get("subfeatures")}id(){return this._id}mq(){const t=(this.get("_bin_mq_nl")&65280)>>8;return t===255?void 0:t}score(){return this.get("mq")}qual(){var t;return(t=this.qualRaw())===null||t===void 0?void 0:t.join(" ")}qualRaw(){if(this.isSegmentUnmapped())return;const{start:t,byteArray:n}=this.bytes,r=t+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes"),i=this.get("seq_length");return n.subarray(r,r+i)}strand(){return this.isReverseComplemented()?-1:1}multi_segment_next_segment_strand(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}name(){return this.get("_read_name")}_read_name(){const t=this.get("_l_read_name"),{byteArray:n,start:r}=this.bytes;return n.toString("ascii",r+36,r+36+t-1)}_parseTag(t){if(this._allTagsParsed)return;const{byteArray:n,start:r}=this.bytes;let i=this._tagOffset||r+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4+this.get("_seq_bytes")+this.get("seq_length");const o=this.bytes.end;let s;for(;i<o&&s!==t;){const a=String.fromCharCode(n[i],n[i+1]);s=a.toLowerCase();const u=String.fromCharCode(n[i+2]);i+=3;let l;switch(u){case"A":{l=String.fromCharCode(n[i]),i+=1;break}case"i":{l=n.readInt32LE(i),i+=4;break}case"I":{l=n.readUInt32LE(i),i+=4;break}case"c":{l=n.readInt8(i),i+=1;break}case"C":{l=n.readUInt8(i),i+=1;break}case"s":{l=n.readInt16LE(i),i+=2;break}case"S":{l=n.readUInt16LE(i),i+=2;break}case"f":{l=n.readFloatLE(i),i+=4;break}case"Z":case"H":{for(l="";i<=o;){const c=n[i++];if(c===0)break;l+=String.fromCharCode(c)}break}case"B":{l="";const c=n[i++],f=String.fromCharCode(c),h=n.readInt32LE(i);if(i+=4,f==="i")if(a==="CG")for(let d=0;d<h;d++){const p=n.readInt32LE(i),m=p>>4,y=du[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="I")if(a==="CG")for(let d=0;d<h;d++){const p=n.readUInt32LE(i),m=p>>4,y=du[p&15];l+=m+y,i+=4}else for(let d=0;d<h;d++)l+=n.readUInt32LE(i),d+1<h&&(l+=","),i+=4;if(f==="s")for(let d=0;d<h;d++)l+=n.readInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="S")for(let d=0;d<h;d++)l+=n.readUInt16LE(i),d+1<h&&(l+=","),i+=2;if(f==="c")for(let d=0;d<h;d++)l+=n.readInt8(i),d+1<h&&(l+=","),i+=1;if(f==="C")for(let d=0;d<h;d++)l+=n.readUInt8(i),d+1<h&&(l+=","),i+=1;if(f==="f")for(let d=0;d<h;d++)l+=n.readFloatLE(i),d+1<h&&(l+=","),i+=4;break}default:console.warn(`Unknown BAM tag type '${u}', tags may be incomplete`),l=void 0,i=o}if(this._tagOffset=i,this._tagList.push(a),s===t)return l;this.data[s]=l}this._allTagsParsed=!0}_parseAllTags(){this._parseTag("")}_parseCigar(t){return t.match(/\d+\D/g).map(n=>[n.match(/\D/)[0].toUpperCase(),Number.parseInt(n,10)])}isPaired(){return!!(this.flags&yn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&yn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&yn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&yn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&yn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&yn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&yn.BAM_FREAD1)}isRead2(){return!!(this.flags&yn.BAM_FREAD2)}isSecondary(){return!!(this.flags&yn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&yn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&yn.BAM_FDUP)}isSupplementary(){return!!(this.flags&yn.BAM_FSUPPLEMENTARY)}cigar(){if(this.isSegmentUnmapped())return;const{byteArray:t,start:n}=this.bytes,r=this.get("_n_cigar_op");let i=n+36+this.get("_l_read_name");const o=this.get("seq_length");let s="",a=0,u=t.readInt32LE(i),l=u>>4,c=du[u&15];if(c==="S"&&l===o)return i+=4,u=t.readInt32LE(i),l=u>>4,c=du[u&15],c!=="N"&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(let f=0;f<r;++f)u=t.readInt32LE(i),l=u>>4,c=du[u&15],s+=l+c,c!=="H"&&c!=="S"&&c!=="I"&&(a+=l),i+=4;return this.data.length_on_ref=a,s}length_on_ref(){return this.data.length_on_ref?this.data.length_on_ref:(this.get("cigar"),this.data.length_on_ref)}_n_cigar_op(){return this.get("_flag_nc")&65535}_l_read_name(){return this.get("_bin_mq_nl")&255}_seq_bytes(){return this.get("seq_length")+1>>1}getReadBases(){return this.seq()}seq(){const{byteArray:t,start:n}=this.bytes,r=n+36+this.get("_l_read_name")+this.get("_n_cigar_op")*4,i=this.get("_seq_bytes"),o=this.get("seq_length");let s="",a=0;for(let u=0;u<i;++u){const l=t[r+u];s+=f4[(l&240)>>4],a++,a<o&&(s+=f4[l&15],a++)}return s}getPairOrientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this._refID===this._next_refid()){const t=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const o=[];return this.template_length()>0?(o[0]=t,o[1]=r,o[2]=n,o[3]=i):(o[2]=t,o[3]=r,o[0]=n,o[1]=i),o.join("")}return""}_bin_mq_nl(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}_flag_nc(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}seq_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}_next_refid(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}_next_pos(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}template_length(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const t={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(t[n]=this[n]);return t}}function d4(e){const t=e.split(/\r?\n/),n=[];for(const r of t){const[i,...o]=r.split(/\t/);i&&n.push({tag:i.slice(1),data:o.map(s=>{const a=s.indexOf(":"),u=s.slice(0,a),l=s.slice(a+1);return{tag:u,value:l}})})}return n}const p4=21840194,g4=65536;async function OU(e){let t=[];for await(const n of e)t=t.concat(n);return t}class zU{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}class m4{constructor({bamFilehandle:t,bamPath:n,bamUrl:r,baiPath:i,baiFilehandle:o,baiUrl:s,csiPath:a,csiFilehandle:u,csiUrl:l,htsget:c,yieldThreadTime:f=100,renameRefSeqs:h=d=>d}){if(this.htsget=!1,this.featureCache=new sh({cache:new ah({maxSize:50}),fill:async(d,p)=>{const{chunk:m,opts:y}=d,{data:w,cpositions:x,dpositions:S}=await this._readChunk({chunk:m,opts:{...y,signal:p}});return this.readBamFeatures(w,x,S,m)}}),this.renameRefSeq=h,t)this.bam=t;else if(n)this.bam=new dt(n);else if(r)this.bam=new to(r);else if(c)this.htsget=!0,this.bam=new zU;else throw new Error("unable to initialize bam");if(u)this.index=new _h({filehandle:u});else if(a)this.index=new _h({filehandle:new dt(a)});else if(l)this.index=new _h({filehandle:new to(l)});else if(o)this.index=new Os({filehandle:o});else if(i)this.index=new Os({filehandle:new dt(i)});else if(s)this.index=new Os({filehandle:new to(s)});else if(n)this.index=new Os({filehandle:new dt(`${n}.bai`)});else if(r)this.index=new Os({filehandle:new to(`${r}.bai`)});else if(c)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(t){const n=_U(t);if(!this.index)return;const r=await this.index.parse(n),i=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let o;if(i){const c=i+g4,f=await this.bam.read(ve.Buffer.alloc(c),0,c,0,n);if(!f.bytesRead)throw new Error("Error reading header");o=f.buffer.subarray(0,Math.min(f.bytesRead,i))}else o=await this.bam.readFile(n);const s=await fi(o);if(s.readInt32LE(0)!==p4)throw new Error("Not a BAM file");const a=s.readInt32LE(4);this.header=s.toString("utf8",8,8+a);const{chrToIndex:u,indexToChr:l}=await this._readRefSeqs(a+8,65535,n);return this.chrToIndex=u,this.indexToChr=l,d4(this.header)}getHeader(t){return this.headerP||(this.headerP=this.getHeaderPre(t).catch(n=>{throw this.headerP=void 0,n})),this.headerP}async getHeaderText(t={}){return await this.getHeader(t),this.header}async _readRefSeqs(t,n,r){if(t>n)return this._readRefSeqs(t,n*2,r);const i=n+g4,{bytesRead:o,buffer:s}=await this.bam.read(ve.Buffer.alloc(i),0,n,0,r);if(!o)throw new Error("Error reading refseqs from header");const a=await fi(s.subarray(0,Math.min(o,n))),u=a.readInt32LE(t);let l=t+4;const c={},f=[];for(let h=0;h<u;h+=1){const d=a.readInt32LE(l),p=this.renameRefSeq(a.toString("utf8",l+4,l+4+d-1)),m=a.readInt32LE(l+d+4);if(c[p]=h,f.push({refName:p,length:m}),l=l+8+d,l>a.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(t,n*2,r)}return{chrToIndex:c,indexToChr:f}}async getRecordsForRange(t,n,r,i){return OU(this.streamRecordsForRange(t,n,r,i))}async*streamRecordsForRange(t,n,r,i){var o;await this.getHeader(i);const s=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(s===void 0||!this.index)yield[];else{const a=await this.index.blocksForRange(s,n-1,r,i);yield*this._fetchChunkFeatures(a,s,n,r,i)}}async*_fetchChunkFeatures(t,n,r,i,o={}){const{viewAsPairs:s}=o,a=[];let u=!1;for(const l of t){const c=await this.featureCache.get(l.toString(),{chunk:l,opts:o},o.signal),f=[];for(const h of c)if(h.seq_id()===n)if(h.get("start")>=i){u=!0;break}else h.get("end")>=r&&f.push(h);if(a.push(f),yield f,u)break}xU(o.signal),s&&(yield this.fetchPairs(n,a,o))}async fetchPairs(t,n,r){const{pairAcrossChr:i,maxInsertSize:o=2e5}=r,s={},a={};n.map(h=>{const d={};for(const p of h){const m=p.name(),y=p.id();d[m]||(d[m]=0),d[m]++,a[y]=1}for(const[p,m]of Object.entries(d))m===1&&(s[p]=!0)});const u=[];n.map(h=>{for(const d of h){const p=d.name(),m=d.get("start"),y=d._next_pos(),w=d._next_refid();this.index&&s[p]&&(i||w===t&&Math.abs(m-y)<o)&&u.push(this.index.blocksForRange(w,y,y+1,r))}});const l=new Map,c=await Promise.all(u);for(const h of c.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:m,chunk:y}=await this._readChunk({chunk:h,opts:r}),w=[];for(const x of await this.readBamFeatures(d,p,m,y))s[x.get("name")]&&!a[x.id()]&&w.push(x);return w}))).flat()}async _readRegion(t,n,r={}){const{bytesRead:i,buffer:o}=await this.bam.read(ve.Buffer.alloc(n),0,n,t,r);return o.subarray(0,Math.min(i,n))}async _readChunk({chunk:t,opts:n}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n),{buffer:i,cpositions:o,dpositions:s}=await N3(r,t);return{data:i,cpositions:o,dpositions:s,chunk:t}}async readBamFeatures(t,n,r,i){let o=0;const s=[];let a=0,u=+Date.now();for(;o+4<t.length;){const l=t.readInt32LE(o),c=o+4+l-1;if(r){for(;o+i.minv.dataPosition>=r[a++];);a--}if(c<t.length){const f=new h4({bytes:{byteArray:t,start:o,end:c},fileOffset:n.length>0?n[a]*256+(o-r[a])+i.minv.dataPosition+1:MU.signed(t.slice(o,c))});s.push(f),this.yieldThreadTime&&+Date.now()-u>this.yieldThreadTime&&(await vU(1),u=+Date.now())}o=c+1}return s}async hasRefSeq(t){var n,r;const i=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return i===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(i)}async lineCount(t){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[t];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(t,n,r){var i;if(!this.index)return[];await this.index.parse();const o=(i=this.chrToIndex)===null||i===void 0?void 0:i[t];return o===void 0?[]:this.index.indexCov(o,n,r)}async blocksForRange(t,n,r,i){var o;if(!this.index)return[];await this.index.parse();const s=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];return s===void 0?[]:this.index.blocksForRange(s,n,r,i)}}async function b4(e,t){const n=await Promise.all(e.map(async r=>{const{url:i,headers:o}=r;if(i.startsWith("data:"))return ve.Buffer.from(i.split(",")[1],"base64");{const{referer:s,...a}=o,u=await fetch(i,{...t,headers:{...t==null?void 0:t.headers,...a}});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${i}: ${await u.text()}`);return ve.Buffer.from(await u.arrayBuffer())}}));return ve.Buffer.concat(await Promise.all(n.map(r=>fi(r))))}class UU extends m4{constructor(t){super({htsget:!0}),this.baseUrl=t.baseUrl,this.trackId=t.trackId}async*streamRecordsForRange(t,n,r,i){var o;const a=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${t}&start=${n}&end=${r}&format=BAM`,u=(o=this.chrToIndex)===null||o===void 0?void 0:o[t];if(u===void 0)yield[];else{const l=await fetch(a,{...i});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${a}: ${await l.text()}`);const c=await l.json(),f=await b4(c.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${t}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${t}_${n}_${r}`}}],u,n,r,i)}}async _readChunk({chunk:t}){if(!t.buffer)throw new Error("expected chunk.buffer in htsget");return{data:t.buffer,cpositions:[],dpositions:[],chunk:t}}async getHeader(t={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,t);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const i=await r.json(),o=await b4(i.htsget.urls,t);if(o.readInt32LE(0)!==p4)throw new Error("Not a BAM file");const s=o.readInt32LE(4),a=o.toString("utf8",8,8+s),u=d4(a),l=[],c={},f=u.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",m=0;for(const y of d.data)y.tag==="SN"?p=y.value:y.tag==="LN"&&(m=+y.value);c[p]=h,l[h]={refName:p,length:m}}return this.chrToIndex=c,this.indexToChr=l,u}}const GU=Object.freeze(Object.defineProperty({__proto__:null,BAI:Os,BamFile:m4,BamRecord:h4,CSI:_h,HtsgetFile:UU},Symbol.toStringTag,{value:"Module"}));function y4(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}class HU extends Error{}function zs(e){if(e&&e.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const t=new HU("aborted");throw t.code="ERR_ABORTED",t}}}function VU(e,t){return t.minv.blockPosition-e.maxv.blockPosition<65e3&&t.maxv.blockPosition-e.minv.blockPosition<5e6}function w4(e,t){const n=[];let r=null;return e.length===0?e:(e.sort(function(i,o){const s=i.minv.blockPosition-o.minv.blockPosition;return s!==0?s:i.minv.dataPosition-o.minv.dataPosition}),e.forEach(i=>{(!t||i.maxv.compareTo(t)>0)&&(r===null?(n.push(i),r=i):VU(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(n.push(i),r=i))}),n)}class am{constructor(t,n){this.blockPosition=t,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}static min(...t){let n,r=0;for(;!n;r+=1)n=t[r];for(;r<t.length;r+=1)n.compareTo(t[r])>0&&(n=t[r]);return n}}function Us(e,t=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new am(e[t+7]*1099511627776+e[t+6]*4294967296+e[t+5]*16777216+e[t+4]*65536+e[t+3]*256+e[t+2],e[t+1]<<8|e[t])}class Sh{constructor(t,n,r,i=void 0){this.minv=t,this.maxv=n,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(t){return this.minv.compareTo(t.minv)||this.maxv.compareTo(t.maxv)||this.bin-t.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class v4{constructor({filehandle:t,renameRefSeqs:n=r=>r}){this.filehandle=t,this.renameRefSeq=n}async getMetadata(t={}){const{indices:n,...r}=await this.parse(t);return r}_findFirstData(t,n){return t?t.compareTo(n)>0?n:t:n}async parse(t={}){return this.parseP||(this.parseP=this._parse(t).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(t,n={}){var r;return!!(!((r=(await this.parse(n)).indices[t])===null||r===void 0)&&r.binIndex)}}const jU=21578324,A4=14;function $U(e,t){return e+=1,t-=1,[[0,0],[1+(e>>26),1+(t>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}class Ch extends v4{async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:s}=r.indices[i];return s?s.lineCount:-1}async _parse(t={}){const n=await this.filehandle.readFile(t),r=await fi(n);if(zs(t.signal),r.readUInt32LE(0)!==jU)throw new Error("Not a TBI file");const i=r.readInt32LE(4),o=r.readInt32LE(8),s=o&65536?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[o&15];if(!u)throw new Error(`invalid Tabix preset format flags ${o}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},c=r.readInt32LE(24),f=5,h=((1<<(f+1)*3)-1)/7,d=2**(14+f*3),p=c?String.fromCharCode(c):null,m=r.readInt32LE(28),y=r.readInt32LE(32),{refNameToId:w,refIdToName:x}=this._parseNameBytes(r.slice(36,36+y));let S=36+y,_;return{indices:new Array(i).fill(0).map(()=>{const B=r.readInt32LE(S);S+=4;const I={};let D;for(let N=0;N<B;N+=1){const ne=r.readUInt32LE(S);if(S+=4,ne>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(ne===h+1){const ie=r.readInt32LE(S);S+=4,ie===2&&(D=this.parsePseudoBin(r,S)),S+=16*ie}else{const ie=r.readInt32LE(S);S+=4;const he=new Array(ie);for(let me=0;me<ie;me+=1){const Fe=Us(r,S),xe=Us(r,S+8);S+=16,_=this._findFirstData(_,Fe),he[me]=new Sh(Fe,xe,ne)}I[ne]=he}}const M=r.readInt32LE(S);S+=4;const G=new Array(M);for(let N=0;N<M;N+=1)G[N]=Us(r,S),S+=8,_=this._findFirstData(_,G[N]);return{binIndex:I,linearIndex:G,stats:D}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:m,firstDataLine:_,columnNumbers:l,coordinateType:s,format:u,refIdToName:x,refNameToId:w,maxBlockSize:65536}}parsePseudoBin(t,n){return{lineCount:y4(Kf.fromBytesLE(t.slice(n+16,n+24),!0))}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let a=t.toString("utf8",r,s);a=this.renameRefSeq(a),i[n]=a,o[a]=n}r=s+1,n+=1}return{refNameToId:o,refIdToName:i}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const s=o.refNameToId[t],a=o.indices[s];if(!a)return[];(a.linearIndex.length?a.linearIndex[n>>A4>=a.linearIndex.length?a.linearIndex.length-1:n>>A4]:new am(0,0))||console.warn("querying outside of possible tabix range");const l=$U(n,r),c=[];for(const[m,y]of l)for(let w=m;w<=y;w++)if(a.binIndex[w])for(const x of a.binIndex[w])c.push(new Sh(x.minv,x.maxv,w));const f=a.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let m=d;m<=p;++m){const y=a.linearIndex[m];y&&(!h||y.compareTo(h)<0)&&(h=y)}return w4(c,h)}}const qU=21582659,WU=38359875;function ZU(e,t){return e*2**t}function x4(e,t){return Math.floor(e/2**t)}class lm extends v4{constructor(t){super(t),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(t,n={}){const r=await this.parse(n);if(!r)return-1;const i=r.refNameToId[t];if(!r.indices[i])return-1;const{stats:s}=r.indices[i];return s?s.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(t,n){const r=t.readInt32LE(n),i=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:t.readInt32LE(n+4),start:t.readInt32LE(n+8),end:t.readInt32LE(n+12)},a=t.readInt32LE(n+16),u=a?String.fromCharCode(a):null,l=t.readInt32LE(n+20),c=t.readInt32LE(n+24),{refIdToName:f,refNameToId:h}=this._parseNameBytes(t.slice(n+28,n+28+c));return{refIdToName:f,refNameToId:h,skipLines:l,metaChar:u,columnNumbers:s,format:o,coordinateType:i}}_parseNameBytes(t){let n=0,r=0;const i=[],o={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let a=t.toString("utf8",r,s);a=this.renameRefSeq(a),i[n]=a,o[a]=n}r=s+1,n+=1}return{refNameToId:o,refIdToName:i}}async _parse(t={}){const n=await fi(await this.filehandle.readFile(t));let r;if(n.readUInt32LE(0)===qU)r=1;else if(n.readUInt32LE(0)===WU)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=2**(this.minShift+this.depth*3),o=n.readInt32LE(12),s=o&&o>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},a=n.readInt32LE(16+o);let u,l=16+o+4;const c=new Array(a).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const h={};let d;for(let p=0;p<f;p+=1){const m=n.readUInt32LE(l);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=48;else{const y=Us(n,l+4);u=this._findFirstData(u,y);const w=n.readInt32LE(l+12);l+=16;const x=new Array(w);for(let S=0;S<w;S+=1){const _=Us(n,l),k=Us(n,l+8);l+=16,x[S]=new Sh(_,k,m)}h[m]=x}}return{binIndex:h,stats:d}});return{...s,csi:!0,refCount:a,maxBlockSize:65536,firstDataLine:u,csiVersion:r,indices:c,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:i}}parsePseudoBin(t,n){return{lineCount:y4(Kf.fromBytesLE(t.slice(n+28,n+36),!0))}}async blocksForRange(t,n,r,i={}){n<0&&(n=0);const o=await this.parse(i);if(!o)return[];const s=o.refNameToId[t],a=o.indices[s];if(!a)return[];const u=this.reg2bins(n,r),l=[];for(const[c,f]of u)for(let h=c;h<=f;h++)if(a.binIndex[h])for(const d of a.binIndex[h])l.push(new Sh(d.minv,d.maxv,h));return w4(l,new am(0,0))}reg2bins(t,n){t-=1,t<1&&(t=1),n>2**50&&(n=2**34),n-=1;let r=0,i=0,o=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;o-=3,i+=ZU(1,r*3),r+=1){const a=i+x4(t,o),u=i+x4(n,o);if(u-a+s.length>this.maxBinNumber)throw new Error(`query ${t}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([a,u])}return s}}const um=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function YU(e){return new Promise(t=>setTimeout(t,e))}class QU{constructor({path:t,filehandle:n,tbiPath:r,tbiFilehandle:i,csiPath:o,csiFilehandle:s,yieldTime:a=500,chunkSizeLimit:u=5e7,renameRefSeqs:l=f=>f,chunkCacheSize:c=5*2**20}){if(n)this.filehandle=n;else if(t)this.filehandle=new dt(t);else throw new TypeError("must provide either filehandle or path");if(i)this.index=new Ch({filehandle:i,renameRefSeqs:l});else if(s)this.index=new lm({filehandle:s,renameRefSeqs:l});else if(r)this.index=new Ch({filehandle:new dt(r),renameRefSeqs:l});else if(o)this.index=new lm({filehandle:new dt(o),renameRefSeqs:l});else if(t)this.index=new Ch({filehandle:new dt(`${t}.tbi`),renameRefSeqs:l});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, or csiPath");this.chunkSizeLimit=u,this.renameRefSeq=l,this.yieldTime=a,this.chunkCache=new sh({cache:new ah({maxSize:Math.floor(c/65536)}),fill:(f,h)=>this.readChunk(f,{signal:h})})}async getLines(t,n,r,i){var o;let s,a={},u;if(i===void 0)throw new TypeError("line callback must be provided");if(typeof i=="function"?u=i:(a=i,u=i.lineCallback,s=i.signal),t===void 0)throw new TypeError("must provide a reference sequence name");if(!u)throw new TypeError("line callback must be provided");const l=await this.index.getMetadata(a);zs(s);const c=n??0,f=r??l.maxRefLength;if(!(c<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===f)return;const h=await this.index.blocksForRange(t,c,f,a);zs(s);for(const p of h){const m=p.fetchedSize();if(m>this.chunkSizeLimit)throw new Error(`Too much data. Chunk size ${m.toLocaleString()} bytes exceeds chunkSizeLimit of ${this.chunkSizeLimit.toLocaleString()}.`)}let d=Date.now();for(const p of h){let m;const{buffer:y,cpositions:w,dpositions:x}=await this.chunkCache.get(p.toString(),p,s);zs(s);let S=0,_=0;for(;S<y.length;){const k=y.indexOf(`
770
+ `,S);if(k===-1)break;const B=y.slice(S,k),I=(o=um==null?void 0:um.decode(B))!==null&&o!==void 0?o:B.toString();if(x){for(;S+p.minv.dataPosition>=x[_++];);_--}const{startCoordinate:D,overlaps:M}=this.checkLine(l,t,c,f,I);if(m!==void 0&&D!==void 0&&m>D)throw new Error(`Lines not sorted by start coordinate (${m} > ${D}), this file is not usable with Tabix.`);if(m=D,M)u(I.trim(),w[_]*256+(S-x[_])+p.minv.dataPosition+1);else if(D!==void 0&&D>=f)return;this.yieldTime&&d-Date.now()>this.yieldTime&&(d=Date.now(),zs(s),await YU(1)),S=k+1}}}async getMetadata(t={}){return this.index.getMetadata(t)}async getHeaderBuffer(t={}){const{firstDataLine:n,metaChar:r,maxBlockSize:i}=await this.getMetadata(t);zs(t.signal);const o=((n==null?void 0:n.blockPosition)||0)+i,s=await this._readRegion(0,o,t),a=await fi(s);if(r){let u=-1;const l=10,c=r.charCodeAt(0);for(let f=0;f<a.length&&!(f===u+1&&a[f]!==c);f+=1)a[f]===l&&(u=f);return a.slice(0,u+1)}return a}async getHeader(t={}){return(await this.getHeaderBuffer(t)).toString("utf8")}async getReferenceSequenceNames(t={}){return(await this.getMetadata(t)).refIdToName}checkLine(t,n,r,i,o){const{columnNumbers:s,metaChar:a,coordinateType:u,format:l}=t;if(a&&o.startsWith(a))return{overlaps:!1};let{ref:c,start:f,end:h}=s;c||(c=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(c,f,h);let p=1,m=0,y="",w=-1/0;for(let x=0;x<o.length+1;x+=1)if(o[x]===" "||x===o.length){if(p===c){if(this.renameRefSeq(o.slice(m,x))!==n)return{overlaps:!1}}else if(p===f){if(w=parseInt(o.slice(m,x),10),u==="1-based-closed"&&(w-=1),w>=i)return{startCoordinate:w,overlaps:!1};if((h===0||h===f)&&w+1<=r)return{startCoordinate:w,overlaps:!1}}else if(l==="VCF"&&p===4)y=o.slice(m,x);else if(p===h&&(l==="VCF"?this._getVcfEnd(w,y,o.slice(m,x)):parseInt(o.slice(m,x),10))<=r)return{overlaps:!1};if(m=x+1,p+=1,p>d)break}return{startCoordinate:w,overlaps:!0}}_getVcfEnd(t,n,r){let i=t+n.length;const o=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!o){let s=";";for(let a=0;a<r.length;a+=1){if(s===";"&&r.slice(a,a+4)==="END="){let u=r.indexOf(";",a);u===-1&&(u=r.length),i=parseInt(r.slice(a+4,u),10);break}s=r[a]}}else if(o)return t+1;return i}async lineCount(t,n={}){return this.index.lineCount(t,n)}async _readRegion(t,n,r={}){const i=ve.Buffer.alloc(n),{bytesRead:o,buffer:s}=await this.filehandle.read(i,0,n,t,r);return s.slice(0,o)}async readChunk(t,n={}){const r=await this._readRegion(t.minv.blockPosition,t.fetchedSize(),n);return N3(r,t)}}const XU=Object.freeze(Object.defineProperty({__proto__:null,CSI:lm,TBI:Ch,TabixIndexedFile:QU},Symbol.toStringTag,{value:"Module"}));var cm={exports:{}},Gs=typeof Reflect=="object"?Reflect:null,E4=Gs&&typeof Gs.apply=="function"?Gs.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},kh;Gs&&typeof Gs.ownKeys=="function"?kh=Gs.ownKeys:Object.getOwnPropertySymbols?kh=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:kh=function(t){return Object.getOwnPropertyNames(t)};function KU(e){console&&console.warn&&console.warn(e)}var _4=Number.isNaN||function(t){return t!==t};function Pe(){Pe.init.call(this)}cm.exports=Pe,cm.exports.once=nG,Pe.EventEmitter=Pe,Pe.prototype._events=void 0,Pe.prototype._eventsCount=0,Pe.prototype._maxListeners=void 0;var S4=10;function Th(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Pe,"defaultMaxListeners",{enumerable:!0,get:function(){return S4},set:function(e){if(typeof e!="number"||e<0||_4(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");S4=e}}),Pe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Pe.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||_4(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function C4(e){return e._maxListeners===void 0?Pe.defaultMaxListeners:e._maxListeners}Pe.prototype.getMaxListeners=function(){return C4(this)},Pe.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var s;if(n.length>0&&(s=n[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(u===void 0)return!1;if(typeof u=="function")E4(u,this,n);else for(var l=u.length,c=D4(u,l),r=0;r<l;++r)E4(c[r],this,n);return!0};function k4(e,t,n,r){var i,o,s;if(Th(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s=="function"?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=C4(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,KU(a)}return e}Pe.prototype.addListener=function(t,n){return k4(this,t,n,!1)},Pe.prototype.on=Pe.prototype.addListener,Pe.prototype.prependListener=function(t,n){return k4(this,t,n,!0)};function JU(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function T4(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=JU.bind(r);return i.listener=n,r.wrapFn=i,i}Pe.prototype.once=function(t,n){return Th(n),this.on(t,T4(this,t,n)),this},Pe.prototype.prependOnceListener=function(t,n){return Th(n),this.prependListener(t,T4(this,t,n)),this},Pe.prototype.removeListener=function(t,n){var r,i,o,s,a;if(Th(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){a=r[s].listener,o=s;break}if(o<0)return this;o===0?r.shift():eG(r,o),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,a||n)}return this},Pe.prototype.off=Pe.prototype.removeListener,Pe.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var o=Object.keys(r),s;for(i=0;i<o.length;++i)s=o[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function I4(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?tG(i):D4(i,i.length)}Pe.prototype.listeners=function(t){return I4(this,t,!0)},Pe.prototype.rawListeners=function(t){return I4(this,t,!1)},Pe.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):B4.call(e,t)},Pe.prototype.listenerCount=B4;function B4(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Pe.prototype.eventNames=function(){return this._eventsCount>0?kh(this._events):[]};function D4(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function eG(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function tG(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function nG(e,t){return new Promise(function(n,r){function i(s){e.removeListener(t,o),r(s)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}R4(e,t,o,{once:!0}),t!=="error"&&rG(e,i,{once:!0})})}function rG(e,t,n){typeof e.on=="function"&&R4(e,"error",t,n)}function R4(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var fm=cm.exports,hm={exports:{}};typeof Object.create=="function"?hm.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hm.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}};var Hs=hm.exports,dm,F4;function M4(){return F4||(F4=1,dm=fm.EventEmitter),dm}const P4=pM(EM);var pm,L4;function iG(){if(L4)return pm;L4=1;function e(p,m){var y=Object.keys(p);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(p);m&&(w=w.filter(function(x){return Object.getOwnPropertyDescriptor(p,x).enumerable})),y.push.apply(y,w)}return y}function t(p){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?e(Object(y),!0).forEach(function(w){n(p,w,y[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(w){Object.defineProperty(p,w,Object.getOwnPropertyDescriptor(y,w))})}return p}function n(p,m,y){return m=s(m),m in p?Object.defineProperty(p,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):p[m]=y,p}function r(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function i(p,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(p,s(w.key),w)}}function o(p,m,y){return m&&i(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),p}function s(p){var m=a(p,"string");return typeof m=="symbol"?m:String(m)}function a(p,m){if(typeof p!="object"||p===null)return p;var y=p[Symbol.toPrimitive];if(y!==void 0){var w=y.call(p,m||"default");if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var u=ve,l=u.Buffer,c=P4,f=c.inspect,h=f&&f.custom||"inspect";function d(p,m,y){l.prototype.copy.call(p,m,y)}return pm=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return o(p,[{key:"push",value:function(y){var w={data:y,next:null};this.length>0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(y){var w={data:y,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var w=this.head,x=""+w.data;w=w.next;)x+=y+w.data;return x}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(y>>>0),x=this.head,S=0;x;)d(x.data,w,S),S+=x.data.length,x=x.next;return w}},{key:"consume",value:function(y,w){var x;return y<this.head.data.length?(x=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?x=this.shift():x=w?this._getString(y):this._getBuffer(y),x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var w=this.head,x=1,S=w.data;for(y-=S.length;w=w.next;){var _=w.data,k=y>_.length?_.length:y;if(k===_.length?S+=_:S+=_.slice(0,y),y-=k,y===0){k===_.length?(++x,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(k));break}++x}return this.length-=x,S}},{key:"_getBuffer",value:function(y){var w=l.allocUnsafe(y),x=this.head,S=1;for(x.data.copy(w),y-=x.data.length;x=x.next;){var _=x.data,k=y>_.length?_.length:y;if(_.copy(w,w.length-y,0,k),y-=k,y===0){k===_.length?(++S,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=_.slice(k));break}++S}return this.length-=S,w}},{key:h,value:function(y,w){return f(this,t(t({},w),{},{depth:0,customInspect:!1}))}}]),p}(),pm}var gm,N4;function O4(){if(N4)return gm;N4=1;function e(s,a){var u=this,l=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return l||c?(a?a(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(i,this,s)):process.nextTick(i,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!a&&f?u._writableState?u._writableState.errorEmitted?process.nextTick(n,u):(u._writableState.errorEmitted=!0,process.nextTick(t,u,f)):process.nextTick(t,u,f):a?(process.nextTick(n,u),a(f)):process.nextTick(n,u)}),this)}function t(s,a){i(s,a),n(s)}function n(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(s,a){s.emit("error",a)}function o(s,a){var u=s._readableState,l=s._writableState;u&&u.autoDestroy||l&&l.autoDestroy?s.destroy(a):s.emit("error",a)}return gm={destroy:e,undestroy:r,errorOrDestroy:o},gm}var mm={},z4;function Vs(){if(z4)return mm;z4=1;function e(a,u){a.prototype=Object.create(u.prototype),a.prototype.constructor=a,a.__proto__=u}var t={};function n(a,u,l){l||(l=Error);function c(h,d,p){return typeof u=="string"?u:u(h,d,p)}var f=function(h){e(d,h);function d(p,m,y){return h.call(this,c(p,m,y))||this}return d}(l);f.prototype.name=l.name,f.prototype.code=a,t[a]=f}function r(a,u){if(Array.isArray(a)){var l=a.length;return a=a.map(function(c){return String(c)}),l>2?"one of ".concat(u," ").concat(a.slice(0,l-1).join(", "),", or ")+a[l-1]:l===2?"one of ".concat(u," ").concat(a[0]," or ").concat(a[1]):"of ".concat(u," ").concat(a[0])}else return"of ".concat(u," ").concat(String(a))}function i(a,u,l){return a.substr(0,u.length)===u}function o(a,u,l){return(l===void 0||l>a.length)&&(l=a.length),a.substring(l-u.length,l)===u}function s(a,u,l){return typeof l!="number"&&(l=0),l+u.length>a.length?!1:a.indexOf(u,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(a,u){return'The value "'+u+'" is invalid for option "'+a+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(a,u,l){var c;typeof u=="string"&&i(u,"not ")?(c="must not be",u=u.replace(/^not /,"")):c="must be";var f;if(o(a," argument"))f="The ".concat(a," ").concat(c," ").concat(r(u,"type"));else{var h=s(a,".")?"property":"argument";f='The "'.concat(a,'" ').concat(h," ").concat(c," ").concat(r(u,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),mm.codes=t,mm}var bm,U4;function G4(){if(U4)return bm;U4=1;var e=Vs().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function n(r,i,o,s){var a=t(i,s,o);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var u=s?o:"highWaterMark";throw new e(u,a)}return Math.floor(a)}return r.objectMode?16:16*1024}return bm={getHighWaterMark:n},bm}var ym,H4;function oG(){if(H4)return ym;H4=1,ym=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return o}function t(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return ym}var wm,V4;function j4(){if(V4)return wm;V4=1,wm=D;function e(L){var P=this;this.next=null,this.entry=null,this.finish=function(){Ve(P,L)}}var t;D.WritableState=B;var n={deprecate:oG()},r=M4(),i=ve.Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(L){return i.from(L)}function a(L){return i.isBuffer(L)||L instanceof o}var u=O4(),l=G4(),c=l.getHighWaterMark,f=Vs().codes,h=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,m=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,x=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;Hs(D,r);function k(){}function B(L,P,q){t=t||js(),L=L||{},typeof q!="boolean"&&(q=P instanceof t),this.objectMode=!!L.objectMode,q&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=c(this,L,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=L.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){Fe(P,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}B.prototype.getBuffer=function(){for(var P=this.bufferedRequest,q=[];P;)q.push(P),P=P.next;return q},function(){try{Object.defineProperty(B.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var I;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(I=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(P){return I.call(this,P)?!0:this!==D?!1:P&&P._writableState instanceof B}})):I=function(P){return P instanceof this};function D(L){t=t||js();var P=this instanceof t;if(!P&&!I.call(D,this))return new D(L);this._writableState=new B(L,this,P),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),r.call(this)}D.prototype.pipe=function(){_(this,new m)};function M(L,P){var q=new x;_(L,q),process.nextTick(P,q)}function G(L,P,q,j){var Y;return q===null?Y=new w:typeof q!="string"&&!P.objectMode&&(Y=new h("chunk",["string","Buffer"],q)),Y?(_(L,Y),process.nextTick(j,Y),!1):!0}D.prototype.write=function(L,P,q){var j=this._writableState,Y=!1,C=!j.objectMode&&a(L);return C&&!i.isBuffer(L)&&(L=s(L)),typeof P=="function"&&(q=P,P=null),C?P="buffer":P||(P=j.defaultEncoding),typeof q!="function"&&(q=k),j.ending?M(this,q):(C||G(this,j,L,q))&&(j.pendingcb++,Y=ne(this,j,C,L,P,q)),Y},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&Oe(this,L))},D.prototype.setDefaultEncoding=function(P){if(typeof P=="string"&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new S(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function N(L,P,q){return!L.objectMode&&L.decodeStrings!==!1&&typeof P=="string"&&(P=i.from(P,q)),P}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ne(L,P,q,j,Y,C){if(!q){var A=N(P,j,Y);j!==A&&(q=!0,Y="buffer",j=A)}var V=P.objectMode?1:j.length;P.length+=V;var W=P.length<P.highWaterMark;if(W||(P.needDrain=!0),P.writing||P.corked){var ue=P.lastBufferedRequest;P.lastBufferedRequest={chunk:j,encoding:Y,isBuf:q,callback:C,next:null},ue?ue.next=P.lastBufferedRequest:P.bufferedRequest=P.lastBufferedRequest,P.bufferedRequestCount+=1}else ie(L,P,!1,V,j,Y,C);return W}function ie(L,P,q,j,Y,C,A){P.writelen=j,P.writecb=A,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new y("write")):q?L._writev(Y,P.onwrite):L._write(Y,C,P.onwrite),P.sync=!1}function he(L,P,q,j,Y){--P.pendingcb,q?(process.nextTick(Y,j),process.nextTick(gt,L,P),L._writableState.errorEmitted=!0,_(L,j)):(Y(j),L._writableState.errorEmitted=!0,_(L,j),gt(L,P))}function me(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function Fe(L,P){var q=L._writableState,j=q.sync,Y=q.writecb;if(typeof Y!="function")throw new p;if(me(q),P)he(L,q,j,P,Y);else{var C=Je(q)||L.destroyed;!C&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&Oe(L,q),j?process.nextTick(xe,L,q,C,Y):xe(L,q,C,Y)}}function xe(L,P,q,j){q||Le(L,P),P.pendingcb--,j(),gt(L,P)}function Le(L,P){P.length===0&&P.needDrain&&(P.needDrain=!1,L.emit("drain"))}function Oe(L,P){P.bufferProcessing=!0;var q=P.bufferedRequest;if(L._writev&&q&&q.next){var j=P.bufferedRequestCount,Y=new Array(j),C=P.corkedRequestsFree;C.entry=q;for(var A=0,V=!0;q;)Y[A]=q,q.isBuf||(V=!1),q=q.next,A+=1;Y.allBuffers=V,ie(L,P,!0,P.length,Y,"",C.finish),P.pendingcb++,P.lastBufferedRequest=null,C.next?(P.corkedRequestsFree=C.next,C.next=null):P.corkedRequestsFree=new e(P),P.bufferedRequestCount=0}else{for(;q;){var W=q.chunk,ue=q.encoding,te=q.callback,ce=P.objectMode?1:W.length;if(ie(L,P,!1,ce,W,ue,te),q=q.next,P.bufferedRequestCount--,P.writing)break}q===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=q,P.bufferProcessing=!1}D.prototype._write=function(L,P,q){q(new d("_write()"))},D.prototype._writev=null,D.prototype.end=function(L,P,q){var j=this._writableState;return typeof L=="function"?(q=L,L=null,P=null):typeof P=="function"&&(q=P,P=null),L!=null&&this.write(L,P),j.corked&&(j.corked=1,this.uncork()),j.ending||$t(this,j,q),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Je(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function Ce(L,P){L._final(function(q){P.pendingcb--,q&&_(L,q),P.prefinished=!0,L.emit("prefinish"),gt(L,P)})}function ke(L,P){!P.prefinished&&!P.finalCalled&&(typeof L._final=="function"&&!P.destroyed?(P.pendingcb++,P.finalCalled=!0,process.nextTick(Ce,L,P)):(P.prefinished=!0,L.emit("prefinish")))}function gt(L,P){var q=Je(P);if(q&&(ke(L,P),P.pendingcb===0&&(P.finished=!0,L.emit("finish"),P.autoDestroy))){var j=L._readableState;(!j||j.autoDestroy&&j.endEmitted)&&L.destroy()}return q}function $t(L,P,q){P.ending=!0,gt(L,P),q&&(P.finished?process.nextTick(q):L.once("finish",q)),P.ended=!0,L.writable=!1}function Ve(L,P,q){var j=L.entry;for(L.entry=null;j;){var Y=j.callback;P.pendingcb--,Y(q),j=j.next}P.corkedRequestsFree.next=L}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),D.prototype.destroy=u.destroy,D.prototype._undestroy=u.undestroy,D.prototype._destroy=function(L,P){P(L)},wm}var vm,$4;function js(){if($4)return vm;$4=1;var e=Object.keys||function(l){var c=[];for(var f in l)c.push(f);return c};vm=s;var t=X4(),n=j4();Hs(s,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var o=r[i];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(l){if(!(this instanceof s))return new s(l);t.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(u,this)}function u(l){l.end()}return Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),vm}var Am={},xm={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var n=ve,r=n.Buffer;function i(s,a){for(var u in s)a[u]=s[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=o);function o(s,a,u){return r(s,a,u)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(s,a,u){if(typeof s=="number")throw new TypeError("Argument must not be a number");return r(s,a,u)},o.alloc=function(s,a,u){if(typeof s!="number")throw new TypeError("Argument must be a number");var l=r(s);return a!==void 0?typeof u=="string"?l.fill(a,u):l.fill(a):l.fill(0),l},o.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r(s)},o.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(s)}})(xm,xm.exports);var sG=xm.exports,Em=sG.Buffer,q4=Em.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function aG(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function lG(e){var t=aG(e);if(typeof t!="string"&&(Em.isEncoding===q4||!q4(e)))throw new Error("Unknown encoding: "+e);return t||e}var uG=Am.StringDecoder=pu;function pu(e){this.encoding=lG(e);var t;switch(this.encoding){case"utf16le":this.text=gG,this.end=mG,t=4;break;case"utf8":this.fillLast=hG,t=4;break;case"base64":this.text=bG,this.end=yG,t=3;break;default:this.write=wG,this.end=vG;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Em.allocUnsafe(t)}pu.prototype.write=function(e){if(e.length===0)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},pu.prototype.end=pG,pu.prototype.text=dG,pu.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function _m(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function cG(e,t,n){var r=t.length-1;if(r<n)return 0;var i=_m(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||i===-2?0:(i=_m(t[r]),i>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||i===-2?0:(i=_m(t[r]),i>=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function fG(e,t,n){if((t[0]&192)!==128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"�"}}function hG(e){var t=this.lastTotal-this.lastNeed,n=fG(this,e);if(n!==void 0)return n;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function dG(e,t){var n=cG(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function pG(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function gG(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function mG(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function bG(e,t){var n=(e.length-t)%3;return n===0?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,n===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function yG(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function wG(e){return e.toString(this.encoding)}function vG(e){return e&&e.length?this.write(e):""}var Sm,W4;function Cm(){if(W4)return Sm;W4=1;var e=Vs().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];o.apply(this,u)}}}function n(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,s,a){if(typeof s=="function")return i(o,null,s);s||(s={}),a=t(a||n);var u=s.readable||s.readable!==!1&&o.readable,l=s.writable||s.writable!==!1&&o.writable,c=function(){o.writable||h()},f=o._writableState&&o._writableState.finished,h=function(){l=!1,f=!0,u||a.call(o)},d=o._readableState&&o._readableState.endEmitted,p=function(){u=!1,d=!0,l||a.call(o)},m=function(S){a.call(o,S)},y=function(){var S;if(u&&!d)return(!o._readableState||!o._readableState.ended)&&(S=new e),a.call(o,S);if(l&&!f)return(!o._writableState||!o._writableState.ended)&&(S=new e),a.call(o,S)},w=function(){o.req.on("finish",h)};return r(o)?(o.on("complete",h),o.on("abort",y),o.req?w():o.on("request",w)):l&&!o._writableState&&(o.on("end",c),o.on("close",c)),o.on("end",p),o.on("finish",h),s.error!==!1&&o.on("error",m),o.on("close",y),function(){o.removeListener("complete",h),o.removeListener("abort",y),o.removeListener("request",w),o.req&&o.req.removeListener("finish",h),o.removeListener("end",c),o.removeListener("close",c),o.removeListener("finish",h),o.removeListener("end",p),o.removeListener("error",m),o.removeListener("close",y)}}return Sm=i,Sm}var km,Z4;function AG(){if(Z4)return km;Z4=1;var e;function t(S,_,k){return _=n(_),_ in S?Object.defineProperty(S,_,{value:k,enumerable:!0,configurable:!0,writable:!0}):S[_]=k,S}function n(S){var _=r(S,"string");return typeof _=="symbol"?_:String(_)}function r(S,_){if(typeof S!="object"||S===null)return S;var k=S[Symbol.toPrimitive];if(k!==void 0){var B=k.call(S,_||"default");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(S)}var i=Cm(),o=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),f=Symbol("stream");function h(S,_){return{value:S,done:_}}function d(S){var _=S[o];if(_!==null){var k=S[f].read();k!==null&&(S[l]=null,S[o]=null,S[s]=null,_(h(k,!1)))}}function p(S){process.nextTick(d,S)}function m(S,_){return function(k,B){S.then(function(){if(_[u]){k(h(void 0,!0));return}_[c](k,B)},B)}}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var _=this,k=this[a];if(k!==null)return Promise.reject(k);if(this[u])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(M,G){process.nextTick(function(){_[a]?G(_[a]):M(h(void 0,!0))})});var B=this[l],I;if(B)I=new Promise(m(B,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));I=new Promise(this[c])}return this[l]=I,I}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(k,B){_[f].destroy(null,function(I){if(I){B(I);return}k(h(void 0,!0))})})}),e),y),x=function(_){var k,B=Object.create(w,(k={},t(k,f,{value:_,writable:!0}),t(k,o,{value:null,writable:!0}),t(k,s,{value:null,writable:!0}),t(k,a,{value:null,writable:!0}),t(k,u,{value:_._readableState.endEmitted,writable:!0}),t(k,c,{value:function(D,M){var G=B[f].read();G?(B[l]=null,B[o]=null,B[s]=null,D(h(G,!1))):(B[o]=D,B[s]=M)},writable:!0}),k));return B[l]=null,i(_,function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=B[s];D!==null&&(B[l]=null,B[o]=null,B[s]=null,D(I)),B[a]=I;return}var M=B[o];M!==null&&(B[l]=null,B[o]=null,B[s]=null,M(h(void 0,!0))),B[u]=!0}),_.on("readable",p.bind(null,B)),B};return km=x,km}var Tm,Y4;function xG(){return Y4||(Y4=1,Tm=function(){throw new Error("Readable.from is not available in the browser")}),Tm}var Im,Q4;function X4(){if(Q4)return Im;Q4=1,Im=M;var e;M.ReadableState=D,fm.EventEmitter;var t=function(A,V){return A.listeners(V).length},n=M4(),r=ve.Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(C){return r.from(C)}function s(C){return r.isBuffer(C)||C instanceof i}var a=P4,u;a&&a.debuglog?u=a.debuglog("stream"):u=function(){};var l=iG(),c=O4(),f=G4(),h=f.getHighWaterMark,d=Vs().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_STREAM_PUSH_AFTER_EOF,y=d.ERR_METHOD_NOT_IMPLEMENTED,w=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,S,_;Hs(M,n);var k=c.errorOrDestroy,B=["error","close","destroy","pause","resume"];function I(C,A,V){if(typeof C.prependListener=="function")return C.prependListener(A,V);!C._events||!C._events[A]?C.on(A,V):Array.isArray(C._events[A])?C._events[A].unshift(V):C._events[A]=[V,C._events[A]]}function D(C,A,V){e=e||js(),C=C||{},typeof V!="boolean"&&(V=A instanceof e),this.objectMode=!!C.objectMode,V&&(this.objectMode=this.objectMode||!!C.readableObjectMode),this.highWaterMark=h(this,C,"readableHighWaterMark",V),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=C.emitClose!==!1,this.autoDestroy=!!C.autoDestroy,this.destroyed=!1,this.defaultEncoding=C.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,C.encoding&&(x||(x=Am.StringDecoder),this.decoder=new x(C.encoding),this.encoding=C.encoding)}function M(C){if(e=e||js(),!(this instanceof M))return new M(C);var A=this instanceof e;this._readableState=new D(C,this,A),this.readable=!0,C&&(typeof C.read=="function"&&(this._read=C.read),typeof C.destroy=="function"&&(this._destroy=C.destroy)),n.call(this)}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(A){this._readableState&&(this._readableState.destroyed=A)}}),M.prototype.destroy=c.destroy,M.prototype._undestroy=c.undestroy,M.prototype._destroy=function(C,A){A(C)},M.prototype.push=function(C,A){var V=this._readableState,W;return V.objectMode?W=!0:typeof C=="string"&&(A=A||V.defaultEncoding,A!==V.encoding&&(C=r.from(C,A),A=""),W=!0),G(this,C,A,!1,W)},M.prototype.unshift=function(C){return G(this,C,null,!0,!1)};function G(C,A,V,W,ue){u("readableAddChunk",A);var te=C._readableState;if(A===null)te.reading=!1,Fe(C,te);else{var ce;if(ue||(ce=ne(te,A)),ce)k(C,ce);else if(te.objectMode||A&&A.length>0)if(typeof A!="string"&&!te.objectMode&&Object.getPrototypeOf(A)!==r.prototype&&(A=o(A)),W)te.endEmitted?k(C,new w):N(C,te,A,!0);else if(te.ended)k(C,new m);else{if(te.destroyed)return!1;te.reading=!1,te.decoder&&!V?(A=te.decoder.write(A),te.objectMode||A.length!==0?N(C,te,A,!1):Oe(C,te)):N(C,te,A,!1)}else W||(te.reading=!1,Oe(C,te))}return!te.ended&&(te.length<te.highWaterMark||te.length===0)}function N(C,A,V,W){A.flowing&&A.length===0&&!A.sync?(A.awaitDrain=0,C.emit("data",V)):(A.length+=A.objectMode?1:V.length,W?A.buffer.unshift(V):A.buffer.push(V),A.needReadable&&xe(C)),Oe(C,A)}function ne(C,A){var V;return!s(A)&&typeof A!="string"&&A!==void 0&&!C.objectMode&&(V=new p("chunk",["string","Buffer","Uint8Array"],A)),V}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(C){x||(x=Am.StringDecoder);var A=new x(C);this._readableState.decoder=A,this._readableState.encoding=this._readableState.decoder.encoding;for(var V=this._readableState.buffer.head,W="";V!==null;)W+=A.write(V.data),V=V.next;return this._readableState.buffer.clear(),W!==""&&this._readableState.buffer.push(W),this._readableState.length=W.length,this};var ie=1073741824;function he(C){return C>=ie?C=ie:(C--,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C++),C}function me(C,A){return C<=0||A.length===0&&A.ended?0:A.objectMode?1:C!==C?A.flowing&&A.length?A.buffer.head.data.length:A.length:(C>A.highWaterMark&&(A.highWaterMark=he(C)),C<=A.length?C:A.ended?A.length:(A.needReadable=!0,0))}M.prototype.read=function(C){u("read",C),C=parseInt(C,10);var A=this._readableState,V=C;if(C!==0&&(A.emittedReadable=!1),C===0&&A.needReadable&&((A.highWaterMark!==0?A.length>=A.highWaterMark:A.length>0)||A.ended))return u("read: emitReadable",A.length,A.ended),A.length===0&&A.ended?q(this):xe(this),null;if(C=me(C,A),C===0&&A.ended)return A.length===0&&q(this),null;var W=A.needReadable;u("need readable",W),(A.length===0||A.length-C<A.highWaterMark)&&(W=!0,u("length less than watermark",W)),A.ended||A.reading?(W=!1,u("reading or ended",W)):W&&(u("do read"),A.reading=!0,A.sync=!0,A.length===0&&(A.needReadable=!0),this._read(A.highWaterMark),A.sync=!1,A.reading||(C=me(V,A)));var ue;return C>0?ue=P(C,A):ue=null,ue===null?(A.needReadable=A.length<=A.highWaterMark,C=0):(A.length-=C,A.awaitDrain=0),A.length===0&&(A.ended||(A.needReadable=!0),V!==C&&A.ended&&q(this)),ue!==null&&this.emit("data",ue),ue};function Fe(C,A){if(u("onEofChunk"),!A.ended){if(A.decoder){var V=A.decoder.end();V&&V.length&&(A.buffer.push(V),A.length+=A.objectMode?1:V.length)}A.ended=!0,A.sync?xe(C):(A.needReadable=!1,A.emittedReadable||(A.emittedReadable=!0,Le(C)))}}function xe(C){var A=C._readableState;u("emitReadable",A.needReadable,A.emittedReadable),A.needReadable=!1,A.emittedReadable||(u("emitReadable",A.flowing),A.emittedReadable=!0,process.nextTick(Le,C))}function Le(C){var A=C._readableState;u("emitReadable_",A.destroyed,A.length,A.ended),!A.destroyed&&(A.length||A.ended)&&(C.emit("readable"),A.emittedReadable=!1),A.needReadable=!A.flowing&&!A.ended&&A.length<=A.highWaterMark,L(C)}function Oe(C,A){A.readingMore||(A.readingMore=!0,process.nextTick(Je,C,A))}function Je(C,A){for(;!A.reading&&!A.ended&&(A.length<A.highWaterMark||A.flowing&&A.length===0);){var V=A.length;if(u("maybeReadMore read 0"),C.read(0),V===A.length)break}A.readingMore=!1}M.prototype._read=function(C){k(this,new y("_read()"))},M.prototype.pipe=function(C,A){var V=this,W=this._readableState;switch(W.pipesCount){case 0:W.pipes=C;break;case 1:W.pipes=[W.pipes,C];break;default:W.pipes.push(C);break}W.pipesCount+=1,u("pipe count=%d opts=%j",W.pipesCount,A);var ue=(!A||A.end!==!1)&&C!==process.stdout&&C!==process.stderr,te=ue?qt:rr;W.endEmitted?process.nextTick(te):V.once("end",te),C.on("unpipe",ce);function ce(v,g){u("onunpipe"),v===V&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,Ei())}function qt(){u("onend"),C.end()}var Ai=Ce(V);C.on("drain",Ai);var xi=!1;function Ei(){u("cleanup"),C.removeListener("close",_i),C.removeListener("finish",Wt),C.removeListener("drain",Ai),C.removeListener("error",Tr),C.removeListener("unpipe",ce),V.removeListener("end",qt),V.removeListener("end",rr),V.removeListener("data",kt),xi=!0,W.awaitDrain&&(!C._writableState||C._writableState.needDrain)&&Ai()}V.on("data",kt);function kt(v){u("ondata");var g=C.write(v);u("dest.write",g),g===!1&&((W.pipesCount===1&&W.pipes===C||W.pipesCount>1&&Y(W.pipes,C)!==-1)&&!xi&&(u("false write response, pause",W.awaitDrain),W.awaitDrain++),V.pause())}function Tr(v){u("onerror",v),rr(),C.removeListener("error",Tr),t(C,"error")===0&&k(C,v)}I(C,"error",Tr);function _i(){C.removeListener("finish",Wt),rr()}C.once("close",_i);function Wt(){u("onfinish"),C.removeListener("close",_i),rr()}C.once("finish",Wt);function rr(){u("unpipe"),V.unpipe(C)}return C.emit("pipe",V),W.flowing||(u("pipe resume"),V.resume()),C};function Ce(C){return function(){var V=C._readableState;u("pipeOnDrain",V.awaitDrain),V.awaitDrain&&V.awaitDrain--,V.awaitDrain===0&&t(C,"data")&&(V.flowing=!0,L(C))}}M.prototype.unpipe=function(C){var A=this._readableState,V={hasUnpiped:!1};if(A.pipesCount===0)return this;if(A.pipesCount===1)return C&&C!==A.pipes?this:(C||(C=A.pipes),A.pipes=null,A.pipesCount=0,A.flowing=!1,C&&C.emit("unpipe",this,V),this);if(!C){var W=A.pipes,ue=A.pipesCount;A.pipes=null,A.pipesCount=0,A.flowing=!1;for(var te=0;te<ue;te++)W[te].emit("unpipe",this,{hasUnpiped:!1});return this}var ce=Y(A.pipes,C);return ce===-1?this:(A.pipes.splice(ce,1),A.pipesCount-=1,A.pipesCount===1&&(A.pipes=A.pipes[0]),C.emit("unpipe",this,V),this)},M.prototype.on=function(C,A){var V=n.prototype.on.call(this,C,A),W=this._readableState;return C==="data"?(W.readableListening=this.listenerCount("readable")>0,W.flowing!==!1&&this.resume()):C==="readable"&&!W.endEmitted&&!W.readableListening&&(W.readableListening=W.needReadable=!0,W.flowing=!1,W.emittedReadable=!1,u("on readable",W.length,W.reading),W.length?xe(this):W.reading||process.nextTick(gt,this)),V},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(C,A){var V=n.prototype.removeListener.call(this,C,A);return C==="readable"&&process.nextTick(ke,this),V},M.prototype.removeAllListeners=function(C){var A=n.prototype.removeAllListeners.apply(this,arguments);return(C==="readable"||C===void 0)&&process.nextTick(ke,this),A};function ke(C){var A=C._readableState;A.readableListening=C.listenerCount("readable")>0,A.resumeScheduled&&!A.paused?A.flowing=!0:C.listenerCount("data")>0&&C.resume()}function gt(C){u("readable nexttick read 0"),C.read(0)}M.prototype.resume=function(){var C=this._readableState;return C.flowing||(u("resume"),C.flowing=!C.readableListening,$t(this,C)),C.paused=!1,this};function $t(C,A){A.resumeScheduled||(A.resumeScheduled=!0,process.nextTick(Ve,C,A))}function Ve(C,A){u("resume",A.reading),A.reading||C.read(0),A.resumeScheduled=!1,C.emit("resume"),L(C),A.flowing&&!A.reading&&C.read(0)}M.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(C){var A=C._readableState;for(u("flow",A.flowing);A.flowing&&C.read()!==null;);}M.prototype.wrap=function(C){var A=this,V=this._readableState,W=!1;C.on("end",function(){if(u("wrapped end"),V.decoder&&!V.ended){var ce=V.decoder.end();ce&&ce.length&&A.push(ce)}A.push(null)}),C.on("data",function(ce){if(u("wrapped data"),V.decoder&&(ce=V.decoder.write(ce)),!(V.objectMode&&ce==null)&&!(!V.objectMode&&(!ce||!ce.length))){var qt=A.push(ce);qt||(W=!0,C.pause())}});for(var ue in C)this[ue]===void 0&&typeof C[ue]=="function"&&(this[ue]=function(qt){return function(){return C[qt].apply(C,arguments)}}(ue));for(var te=0;te<B.length;te++)C.on(B[te],this.emit.bind(this,B[te]));return this._read=function(ce){u("wrapped _read",ce),W&&(W=!1,C.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=AG()),S(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(A){this._readableState&&(this._readableState.flowing=A)}}),M._fromList=P,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function P(C,A){if(A.length===0)return null;var V;return A.objectMode?V=A.buffer.shift():!C||C>=A.length?(A.decoder?V=A.buffer.join(""):A.buffer.length===1?V=A.buffer.first():V=A.buffer.concat(A.length),A.buffer.clear()):V=A.buffer.consume(C,A.decoder),V}function q(C){var A=C._readableState;u("endReadable",A.endEmitted),A.endEmitted||(A.ended=!0,process.nextTick(j,A,C))}function j(C,A){if(u("endReadableNT",C.endEmitted,C.length),!C.endEmitted&&C.length===0&&(C.endEmitted=!0,A.readable=!1,A.emit("end"),C.autoDestroy)){var V=A._writableState;(!V||V.autoDestroy&&V.finished)&&A.destroy()}}typeof Symbol=="function"&&(M.from=function(C,A){return _===void 0&&(_=xG()),_(M,C,A)});function Y(C,A){for(var V=0,W=C.length;V<W;V++)if(C[V]===A)return V;return-1}return Im}var Bm,K4;function J4(){if(K4)return Bm;K4=1,Bm=a;var e=Vs().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,o=js();Hs(a,o);function s(c,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(c);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function a(c){if(!(this instanceof a))return new a(c);o.call(this,c),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function u(){var c=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){l(c,f,h)}):l(this,null,null)}a.prototype.push=function(c,f){return this._transformState.needTransform=!1,o.prototype.push.call(this,c,f)},a.prototype._transform=function(c,f,h){h(new t("_transform()"))},a.prototype._write=function(c,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=c,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},a.prototype._read=function(c){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(c,f){o.prototype._destroy.call(this,c,function(h){f(h)})};function l(c,f,h){if(f)return c.emit("error",f);if(h!=null&&c.push(h),c._writableState.length)throw new i;if(c._transformState.transforming)throw new r;return c.push(null)}return Bm}var Dm,e_;function EG(){if(e_)return Dm;e_=1,Dm=t;var e=J4();Hs(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},Dm}var Rm,t_;function _G(){if(t_)return Rm;t_=1;var e;function t(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=Vs().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function s(h){return h.setHeader&&typeof h.abort=="function"}function a(h,d,p,m){m=t(m);var y=!1;h.on("close",function(){y=!0}),e===void 0&&(e=Cm()),e(h,{readable:d,writable:p},function(x){if(x)return m(x);y=!0,m()});var w=!1;return function(x){if(!y&&!w){if(w=!0,s(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();m(x||new i("pipe"))}}}function u(h){h()}function l(h,d){return h.pipe(d)}function c(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var m=c(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var y,w=d.map(function(x,S){var _=S<d.length-1,k=S>0;return a(x,_,k,function(B){y||(y=B),B&&w.forEach(u),!_&&(w.forEach(u),m(y))})});return d.reduce(l)}return Rm=f,Rm}var n_=wn,Fm=fm.EventEmitter,SG=Hs;SG(wn,Fm),wn.Readable=X4(),wn.Writable=j4(),wn.Duplex=js(),wn.Transform=J4(),wn.PassThrough=EG(),wn.finished=Cm(),wn.pipeline=_G(),wn.Stream=wn;function wn(){Fm.call(this)}wn.prototype.pipe=function(e,t){var n=this;function r(c){e.writable&&e.write(c)===!1&&n.pause&&n.pause()}n.on("data",r);function i(){n.readable&&n.resume&&n.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",s),n.on("close",a));var o=!1;function s(){o||(o=!0,e.end())}function a(){o||(o=!0,typeof e.destroy=="function"&&e.destroy())}function u(c){if(l(),Fm.listenerCount(this,"error")===0)throw c}n.on("error",u),e.on("error",u);function l(){n.removeListener("data",r),e.removeListener("drain",i),n.removeListener("end",s),n.removeListener("close",a),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e};function gu(e){return e.replace(/%([0-9A-Fa-f]{2})/g,(t,n)=>String.fromCharCode(parseInt(n,16)))}function r_(e,t){return String(t).replace(e,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function mu(e){return r_(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,e)}function xr(e){return r_(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,e)}function i_(e){if(!(e&&e.length)||e===".")return{};const t={};return e.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let i=t[r[0].trim()];i||(i=[],t[r[0]]=i),i.push(...r[1].split(",").map(o=>o.trim()).map(gu))}),t}function o_(e){const t=e.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:t[0]&&gu(t[0]),source:t[1]&&gu(t[1]),type:t[2]&&gu(t[2]),start:t[3]===null?null:parseInt(t[3],10),end:t[4]===null?null:parseInt(t[4],10),score:t[5]===null?null:parseFloat(t[5]),strand:t[6],phase:t[7],attributes:t[8]===null?null:i_(t[8])}}function s_(e){const t=/^\s*##\s*(\S+)\s*(.*)/.exec(e);if(!t)return null;const[,n]=t;let[,,r]=t;const i={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),i.value=r),n==="sequence-region"){const o=r.split(/\s+/,3);return{...i,seq_id:o[0],start:o[1]&&o[1].replace(/\D/g,""),end:o[2]&&o[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[o,s]=r.split(/\s+/,2);return{...i,source:o,buildName:s}}return i}function a_(e){const t=[];return Object.entries(e).forEach(([n,r])=>{if(!r)return;let i;r.hasOwnProperty("toString")?i=mu(r.toString()):Array.isArray(r)?i=r.map(mu).join(","):i=mu(r),t.push(`${mu(n)}=${i}`)}),t.length?t.join(";"):"."}function CG(e,t){const n=e.attributes===null||e.attributes===void 0?".":a_(e.attributes),i=`${[e.seq_id===null?".":xr(e.seq_id),e.source===null?".":xr(e.source),e.type===null?".":xr(e.type),e.start===null?".":xr(e.start),e.end===null?".":xr(e.end),e.score===null?".":xr(e.score),e.strand===null?".":xr(e.strand),e.phase===null?".":xr(e.phase),n].join(" ")}
771
+ `;return t[i]?"":(t[i]=!0,i)}function Ih(e,t){if(Array.isArray(e))return e.map(r=>Ih(r,t)).join("");const n=[CG(e,t)];return kG(e)&&n.push(...e.child_features.map(r=>Ih(r,t)),...e.derived_features.map(r=>Ih(r,t))),n.join("")}function l_(e){return Ih(e,{})}function u_(e){let t=`##${e.directive}`;return e.value&&(t+=` ${e.value}`),t+=`
772
+ `,t}function c_(e){return`# ${e.comment}
773
+ `}function Mm(e){return`>${e.id}${e.description?` ${e.description}`:""}
775
774
  ${e.sequence}
776
- `}function Th(e){function t(n){return"attributes"in n?f_(n):"directive"in n?h_(n):"sequence"in n?Bm(n):"comment"in n?d_(n):`# (invalid item found during format)
777
- `}return Array.isArray(e)?e.map(t):t(e)}function CG(e){return e.child_features!==void 0&&e.derived_features!==void 0}const kG=Object.freeze(Object.defineProperty({__proto__:null,escape:mu,escapeColumn:Ar,formatAttributes:c_,formatComment:d_,formatDirective:h_,formatFeature:f_,formatItem:Th,formatSequence:Bm,parseAttributes:s_,parseDirective:u_,parseFeature:l_,unescape:gu},Symbol.toStringTag,{value:"Module"})),p_={Parent:"child_features",Derives_from:"derived_features"};class g_{constructor(t){this.seqCallback=t,this.currentSequence=void 0}addLine(t){const n=/^>\s*(\S+)\s*(.*)/.exec(t);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(t)&&(this.currentSequence.sequence+=t.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class m_{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const o=u_(t);o&&(o.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new g_(this.sequenceCallback)):this._emitItem(o))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new g_(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(o=>{delete this._underConstructionById[o],delete this._completedReferences[o]}),r.forEach(o=>{o.child_features&&o.child_features.forEach(a=>n(a)),o.derived_features&&o.derived_features.forEach(a=>n(a))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const a={...l_(t),child_features:[],derived_features:[]},s=((n=a.attributes)===null||n===void 0?void 0:n.ID)||[],u=((r=a.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=a.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!s.length&&!u.length&&!l.length){this._emitItem([a]);return}let c;s.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==a.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${a.type}", "${h[h.length-1].type}"`),h.push(a),c=h):(c=[a],this._enforceBufferSizeLimit(1),!u.length&&!l.length&&this._underConstructionTopLevel.push(c),this._underConstructionById[f]=c,this._resolveReferencesTo(c,f))}),this._resolveReferencesFrom(c||[a],{Parent:u,Derives_from:l},s)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(o,a,s){let u=o[a];u||(u={},o[a]=u);const l=u[s]||!1;return u[s]=!0,l}n.Parent.forEach(o=>{const a=this._underConstructionById[o];if(a){const s=p_.Parent;r.filter(u=>i(this._completedReferences,u,`Parent,${o}`)).length||a.forEach(u=>{u[s].push(t)})}else{let s=this._underConstructionOrphans[o];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=s),s.Parent.push(t)}}),n.Derives_from.forEach(o=>{const a=this._underConstructionById[o];if(a){const s=p_.Derives_from;r.filter(u=>i(this._completedReferences,u,`Derives_from,${o}`)).length||a.forEach(u=>{u[s].push(t)})}else{let s=this._underConstructionOrphans[o];s||(s={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=s),s.Derives_from.push(t)}})}}function Dm(e){process&&process.nextTick?process.nextTick(e):e()}function b_(e){const t={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...e};return e.parseAll&&(t.parseFeatures=!0,t.parseDirectives=!0,t.parseComments=!0,t.parseSequences=!0),t}class TG extends o_.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=b_(t);this.encoding=t.encoding||"utf8",this.decoder=new lG;const r=this.push.bind(this);this.parser=new m_({featureCallback:n.parseFeatures?r:void 0,directiveCallback:n.parseDirectives?r:void 0,commentCallback:n.parseComments?r:void 0,sequenceCallback:n.parseSequences?r:void 0,errorCallback:i=>this.emit("error",i),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(t){t&&this.parser.addLine(t)}_nextText(t){const n=(this.textBuffer+t).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(t,n,r){this._nextText(this.decoder.write(t)),Dm(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),Dm(t)}}function IG(e={}){return new TG(e)}function BG(e,t={}){if(!e)return[];const n=b_(t),r=[],i=r.push.bind(r),o=new m_({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:a=>{throw a}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r}function DG(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(Th).join("");return n.length&&(r+=`##FASTA
778
- `,r+=n.map(Bm).join("")),r}class y_ extends o_.Transform{constructor(t={}){super(Object.assign(t,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=t.minSyncLines||100,this.insertVersionDirective=t.insertVersionDirective||!1}_transform(t,n,r){let i;if(!this.haveWeEmittedData&&this.insertVersionDirective){const o=Array.isArray(t)?t[0]:t;"directive"in o&&o.directive!=="gff-version"&&this.push(`##gff-version 3
775
+ `}function Bh(e){function t(n){return"attributes"in n?l_(n):"directive"in n?u_(n):"sequence"in n?Mm(n):"comment"in n?c_(n):`# (invalid item found during format)
776
+ `}return Array.isArray(e)?e.map(t):t(e)}function kG(e){return e.child_features!==void 0&&e.derived_features!==void 0}const TG=Object.freeze(Object.defineProperty({__proto__:null,escape:mu,escapeColumn:xr,formatAttributes:a_,formatComment:c_,formatDirective:u_,formatFeature:l_,formatItem:Bh,formatSequence:Mm,parseAttributes:i_,parseDirective:s_,parseFeature:o_,unescape:gu},Symbol.toStringTag,{value:"Module"})),f_={Parent:"child_features",Derives_from:"derived_features"};class h_{constructor(t){this.seqCallback=t,this.currentSequence=void 0}addLine(t){const n=/^>\s*(\S+)\s*(.*)/.exec(t);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(t)&&(this.currentSequence.sequence+=t.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class d_{constructor(t){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=t.featureCallback||n,this.endCallback=t.endCallback||n,this.commentCallback=t.commentCallback||n,this.errorCallback=t.errorCallback||n,this.directiveCallback=t.directiveCallback||n,this.sequenceCallback=t.sequenceCallback||n,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=t.bufferSize===void 0?1e3:t.bufferSize}addLine(t){if(this.fastaParser){this.fastaParser.addLine(t);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(t)){this._bufferLine(t);return}const n=/^\s*(#+)(.*)/.exec(t);if(n){const[,r]=n;let[,,i]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const o=s_(t);o&&(o.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new h_(this.sequenceCallback)):this._emitItem(o))}else i=i.replace(/\s*/,""),this._emitItem({comment:i})}else if(!/^\s*$/.test(t))if(/^\s*>/.test(t))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new h_(this.sequenceCallback),this.fastaParser.addLine(t);else{const r=t.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(t){Array.isArray(t)?this.featureCallback(t):"directive"in t?this.directiveCallback(t):"comment"in t&&this.commentCallback(t)}_enforceBufferSizeLimit(t=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(o=>{delete this._underConstructionById[o],delete this._completedReferences[o]}),r.forEach(o=>{o.child_features&&o.child_features.forEach(s=>n(s)),o.derived_features&&o.derived_features.forEach(s=>n(s))}))};for(;this._underConstructionTopLevel.length+t>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(t){var n,r,i;const s={...o_(t),child_features:[],derived_features:[]},a=((n=s.attributes)===null||n===void 0?void 0:n.ID)||[],u=((r=s.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((i=s.attributes)===null||i===void 0?void 0:i.Derives_from)||[];if(!a.length&&!u.length&&!l.length){this._emitItem([s]);return}let c;a.forEach(f=>{const h=this._underConstructionById[f];h?(h[h.length-1].type!==s.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${s.type}", "${h[h.length-1].type}"`),h.push(s),c=h):(c=[s],this._enforceBufferSizeLimit(1),!u.length&&!l.length&&this._underConstructionTopLevel.push(c),this._underConstructionById[f]=c,this._resolveReferencesTo(c,f))}),this._resolveReferencesFrom(c||[s],{Parent:u,Derives_from:l},a)}_resolveReferencesTo(t,n){const r=this._underConstructionOrphans[n];r&&(t.forEach(i=>{i.child_features.push(...r.Parent)}),t.forEach(i=>{i.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(t){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${t}`)}_resolveReferencesFrom(t,n,r){function i(o,s,a){let u=o[s];u||(u={},o[s]=u);const l=u[a]||!1;return u[a]=!0,l}n.Parent.forEach(o=>{const s=this._underConstructionById[o];if(s){const a=f_.Parent;r.filter(u=>i(this._completedReferences,u,`Parent,${o}`)).length||s.forEach(u=>{u[a].push(t)})}else{let a=this._underConstructionOrphans[o];a||(a={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=a),a.Parent.push(t)}}),n.Derives_from.forEach(o=>{const s=this._underConstructionById[o];if(s){const a=f_.Derives_from;r.filter(u=>i(this._completedReferences,u,`Derives_from,${o}`)).length||s.forEach(u=>{u[a].push(t)})}else{let a=this._underConstructionOrphans[o];a||(a={Parent:[],Derives_from:[]},this._underConstructionOrphans[o]=a),a.Derives_from.push(t)}})}}function Pm(e){process&&process.nextTick?process.nextTick(e):e()}function p_(e){const t={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...e};return e.parseAll&&(t.parseFeatures=!0,t.parseDirectives=!0,t.parseComments=!0,t.parseSequences=!0),t}class IG extends n_.Transform{constructor(t={}){super({objectMode:!0}),this.textBuffer="";const n=p_(t);this.encoding=t.encoding||"utf8",this.decoder=new uG;const r=this.push.bind(this);this.parser=new d_({featureCallback:n.parseFeatures?r:void 0,directiveCallback:n.parseDirectives?r:void 0,commentCallback:n.parseComments?r:void 0,sequenceCallback:n.parseSequences?r:void 0,errorCallback:i=>this.emit("error",i),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(t){t&&this.parser.addLine(t)}_nextText(t){const n=(this.textBuffer+t).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(t,n,r){this._nextText(this.decoder.write(t)),Pm(r)}_flush(t){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),Pm(t)}}function BG(e={}){return new IG(e)}function DG(e,t={}){if(!e)return[];const n=p_(t),r=[],i=r.push.bind(r),o=new d_({featureCallback:n.parseFeatures?i:void 0,directiveCallback:n.parseDirectives?i:void 0,commentCallback:n.parseComments?i:void 0,sequenceCallback:n.parseSequences?i:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:s=>{throw s}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r}function RG(e){const t=[],n=[];e.forEach(i=>{"sequence"in i?n.push(i):t.push(i)});let r=t.map(Bh).join("");return n.length&&(r+=`##FASTA
777
+ `,r+=n.map(Mm).join("")),r}class g_ extends n_.Transform{constructor(t={}){super(Object.assign(t,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=t.minSyncLines||100,this.insertVersionDirective=t.insertVersionDirective||!1}_transform(t,n,r){let i;if(!this.haveWeEmittedData&&this.insertVersionDirective){const o=Array.isArray(t)?t[0]:t;"directive"in o&&o.directive!=="gff-version"&&this.push(`##gff-version 3
779
778
  `)}if("sequence"in t&&!this.fastaMode&&(this.push(`##FASTA
780
- `),this.fastaMode=!0),Array.isArray(t)?i=t.map(Th).join(""):i=Th(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
781
- `),this.linesSinceLastSyncMark=0;else{let o=0;for(let a=0;a<i.length;a+=1)i[a]===`
782
- `&&(o+=1);this.linesSinceLastSyncMark+=o}this.haveWeEmittedData=!0,Dm(r)}}function RG(e={}){return new y_(e)}function FG(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,o)=>{e.pipe(new y_(r)).on("end",()=>i(null)).on("error",o).pipe(t)})}const MG=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:IG,parseStringSync:BG,formatSync:DG,formatStream:RG,formatFile:FG,util:kG}},Symbol.toStringTag,{value:"Module"}));de.GenomeSpy=ix,de.embed=dM,de.favIcon=hM,de.html=Ke,de.icon=fM,de.loadSpec=ox,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});
779
+ `),this.fastaMode=!0),Array.isArray(t)?i=t.map(Bh).join(""):i=Bh(t),this.push(i),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
780
+ `),this.linesSinceLastSyncMark=0;else{let o=0;for(let s=0;s<i.length;s+=1)i[s]===`
781
+ `&&(o+=1);this.linesSinceLastSyncMark+=o}this.haveWeEmittedData=!0,Pm(r)}}function FG(e={}){return new g_(e)}function MG(e,t,n={}){const r={insertVersionDirective:!0,...n};return new Promise((i,o)=>{e.pipe(new g_(r)).on("end",()=>i(null)).on("error",o).pipe(t)})}const PG=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:BG,parseStringSync:DG,formatSync:RG,formatStream:FG,formatFile:MG,util:TG}},Symbol.toStringTag,{value:"Module"}));de.GenomeSpy=nA,de.embed=hM,de.favIcon=fM,de.html=Ke,de.icon=cM,de.loadSpec=rA,Object.defineProperty(de,Symbol.toStringTag,{value:"Module"})});