jbrowse-plugin-mafviewer 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/BgzipTaffyAdapter/BgzipTaffyAdapter.d.ts +1 -1
  2. package/dist/BigMafAdapter/BigMafAdapter.d.ts +1 -1
  3. package/dist/BigMafAdapter/BigMafAdapter.js +50 -49
  4. package/dist/BigMafAdapter/BigMafAdapter.js.map +1 -1
  5. package/dist/LinearMafDisplay/components/ColorLegend.d.ts +2 -4
  6. package/dist/LinearMafDisplay/components/ColorLegend.js +2 -3
  7. package/dist/LinearMafDisplay/components/ColorLegend.js.map +1 -1
  8. package/dist/LinearMafDisplay/components/{ReactComponent.d.ts → LinearMafDisplayComponent.d.ts} +1 -1
  9. package/dist/LinearMafDisplay/components/{ReactComponent.js → LinearMafDisplayComponent.js} +2 -2
  10. package/dist/LinearMafDisplay/components/LinearMafDisplayComponent.js.map +1 -0
  11. package/dist/LinearMafDisplay/components/SetRowHeightDialog.js +38 -0
  12. package/dist/LinearMafDisplay/components/SetRowHeightDialog.js.map +1 -0
  13. package/dist/LinearMafDisplay/components/SvgWrapper.d.ts +1 -1
  14. package/dist/LinearMafDisplay/components/SvgWrapper.js.map +1 -1
  15. package/dist/LinearMafDisplay/components/Tree.d.ts +2 -1
  16. package/dist/LinearMafDisplay/components/Tree.js +2 -0
  17. package/dist/LinearMafDisplay/components/Tree.js.map +1 -1
  18. package/dist/LinearMafDisplay/components/YScaleBars.d.ts +1 -1
  19. package/dist/LinearMafDisplay/components/YScaleBars.js +1 -10
  20. package/dist/LinearMafDisplay/components/YScaleBars.js.map +1 -1
  21. package/dist/LinearMafDisplay/index.js +1 -1
  22. package/dist/LinearMafDisplay/index.js.map +1 -1
  23. package/dist/LinearMafDisplay/stateModel.d.ts +20 -19
  24. package/dist/LinearMafDisplay/stateModel.js +42 -7
  25. package/dist/LinearMafDisplay/stateModel.js.map +1 -1
  26. package/dist/LinearMafDisplay/types.d.ts +5 -3
  27. package/dist/LinearMafDisplay/types.js +1 -15
  28. package/dist/LinearMafDisplay/types.js.map +1 -1
  29. package/dist/LinearMafDisplay/util.d.ts +4 -0
  30. package/dist/LinearMafDisplay/util.js +16 -0
  31. package/dist/LinearMafDisplay/util.js.map +1 -0
  32. package/dist/LinearMafRenderer/LinearMafRenderer.d.ts +4 -4
  33. package/dist/LinearMafRenderer/LinearMafRenderer.js +8 -10
  34. package/dist/LinearMafRenderer/LinearMafRenderer.js.map +1 -1
  35. package/dist/LinearMafRenderer/makeImageData.js +18 -16
  36. package/dist/LinearMafRenderer/makeImageData.js.map +1 -1
  37. package/dist/MafAddTrackWorkflow/index.js +0 -1
  38. package/dist/MafAddTrackWorkflow/index.js.map +1 -1
  39. package/dist/MafTabixAdapter/MafTabixAdapter.d.ts +1 -1
  40. package/dist/MafTabixAdapter/MafTabixAdapter.js +6 -7
  41. package/dist/MafTabixAdapter/MafTabixAdapter.js.map +1 -1
  42. package/dist/MafTabixAdapter/configSchema.js +29 -1
  43. package/dist/MafTabixAdapter/configSchema.js.map +1 -1
  44. package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +7 -20
  45. package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +4 -4
  46. package/dist/util.d.ts +2 -2
  47. package/dist/util.js +5 -1
  48. package/dist/util.js.map +1 -1
  49. package/package.json +10 -10
  50. package/src/BigMafAdapter/BigMafAdapter.ts +52 -49
  51. package/src/LinearMafDisplay/components/ColorLegend.tsx +11 -7
  52. package/src/LinearMafDisplay/components/{ReactComponent.tsx → LinearMafDisplayComponent.tsx} +2 -2
  53. package/src/LinearMafDisplay/components/SetRowHeightDialog.tsx +83 -0
  54. package/src/LinearMafDisplay/components/SvgWrapper.tsx +1 -2
  55. package/src/LinearMafDisplay/components/Tree.tsx +5 -1
  56. package/src/LinearMafDisplay/components/YScaleBars.tsx +3 -21
  57. package/src/LinearMafDisplay/index.ts +1 -1
  58. package/src/LinearMafDisplay/stateModel.ts +49 -18
  59. package/src/LinearMafDisplay/types.ts +4 -24
  60. package/src/LinearMafDisplay/util.ts +27 -0
  61. package/src/LinearMafRenderer/LinearMafRenderer.ts +9 -14
  62. package/src/LinearMafRenderer/makeImageData.ts +18 -17
  63. package/src/MafAddTrackWorkflow/index.ts +0 -1
  64. package/src/MafTabixAdapter/MafTabixAdapter.ts +9 -7
  65. package/src/MafTabixAdapter/configSchema.ts +29 -1
  66. package/src/util.ts +6 -2
  67. package/dist/LinearMafDisplay/components/ReactComponent.js.map +0 -1
  68. package/dist/LinearMafDisplay/components/SetRowHeight.js +0 -36
  69. package/dist/LinearMafDisplay/components/SetRowHeight.js.map +0 -1
  70. package/src/LinearMafDisplay/components/SetRowHeight.tsx +0 -83
  71. /package/dist/LinearMafDisplay/components/{SetRowHeight.d.ts → SetRowHeightDialog.d.ts} +0 -0
@@ -1,13 +1,12 @@
1
- "use strict";var JBrowsePluginMafViewer=(()=>{var PM=Object.create;var ls=Object.defineProperty;var RM=Object.getOwnPropertyDescriptor;var MM=Object.getOwnPropertyNames;var CM=Object.getPrototypeOf,kM=Object.prototype.hasOwnProperty;var pt=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fp=(e,t)=>{for(var r in t)ls(e,r,{get:t[r],enumerable:!0})},mg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of MM(t))!kM.call(e,i)&&i!==r&&ls(e,i,{get:()=>t[i],enumerable:!(n=RM(t,i))||n.enumerable});return e};var V=(e,t,r)=>(r=e!=null?PM(CM(e)):{},mg(t||!e||!e.__esModule?ls(r,"default",{value:e,enumerable:!0}):r,e)),vg=e=>mg(ls({},"__esModule",{value:!0}),e);var gg=b((vZ,bg)=>{bg.exports=JBrowseExports["@jbrowse/core/Plugin"]});var $r=b((gZ,yg)=>{yg.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var dp=b(()=>{});var mp=b(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});function wg(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}var pp=class{constructor(t,r={}){this.baseOverrides={},this.url=t;let n=r.fetch||globalThis.fetch.bind(globalThis);r.overrides&&(this.baseOverrides=r.overrides),this.fetchImplementation=n}async fetch(t,r){let n;try{n=await this.fetchImplementation(t,r)}catch(i){if(`${i}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`);try{n=await this.fetchImplementation(t,{...r,cache:"reload"})}catch(o){throw new Error(`${wg(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${wg(i)} fetching ${t}`,{cause:i})}return n}async read(t,r,n={}){let{headers:i={},signal:o,overrides:a={}}=n;t<1/0?i.range=`bytes=${r}-${r+t}`:t===1/0&&r!==0&&(i.range=`bytes=${r}-`);let u=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...i,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:o});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(u.status===200&&r===0||u.status===206){let l=await u.arrayBuffer(),s=u.headers.get("content-range"),c=/\/(\d+)$/.exec(s||"");return c?.[1]&&(this._stat={size:parseInt(c[1],10)}),new Uint8Array(l.slice(0,t))}throw u.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(t={}){let r,n;typeof t=="string"?(r=t,n={}):(r=t.encoding,n=t,delete n.encoding);let{headers:i={},signal:o,overrides:a={}}=n,u=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a});if(u.status!==200)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(r==="utf8")return u.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await u.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}};hp.default=pp});var Sg=b(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0})});var Og=b(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var vp=class{constructor(t){this.blob=t,this.size=t.size}async read(t,r=0){if(!t)return new Uint8Array(0);let n=r,i=n+t;return new Uint8Array(await this.blob.slice(n,i).arrayBuffer())}async readFile(t){let r=typeof t=="string"?t:t?.encoding;if(r==="utf8")return this.blob.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}};bp.default=vp});var gp=b(et=>{"use strict";var IM=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jM=et&&et.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&IM(t,e,r)},ya=et&&et.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(et,"__esModule",{value:!0});et.LocalFile=et.RemoteFile=et.BlobFile=void 0;et.open=NM;et.fromUrl=Eg;var FM=ya(dp()),LM=ya(mp());jM(Sg(),et);function Eg(e,t={}){return new LM.default(e,t)}function NM(e,t,r,n={}){if(r!==void 0)return r;if(e!==void 0)return Eg(e,n);if(t!==void 0)return new FM.default(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}var DM=Og();Object.defineProperty(et,"BlobFile",{enumerable:!0,get:function(){return ya(DM).default}});var zM=mp();Object.defineProperty(et,"RemoteFile",{enumerable:!0,get:function(){return ya(zM).default}});var BM=dp();Object.defineProperty(et,"LocalFile",{enumerable:!0,get:function(){return ya(BM).default}})});var Kr=b(ht=>{"use strict";var UM=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function WM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}ht.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)WM(r,n)&&(e[n]=r[n])}}return e};ht.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var HM={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},VM={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};ht.setTyped=function(e){e?(ht.Buf8=Uint8Array,ht.Buf16=Uint16Array,ht.Buf32=Int32Array,ht.assign(ht,HM)):(ht.Buf8=Array,ht.Buf16=Array,ht.Buf32=Array,ht.assign(ht,VM))};ht.setTyped(UM)});var Kg=b(Ji=>{"use strict";var GM=Kr(),$M=4,Ag=0,Tg=1,KM=2;function Zi(e){for(var t=e.length;--t>=0;)e[t]=0}var YM=0,qg=1,ZM=2,JM=3,XM=258,Ep=29,Aa=256,xa=Aa+1+Ep,Yi=30,Ap=19,Ig=2*xa+1,ui=15,_p=16,QM=7,Tp=256,jg=16,Fg=17,Lg=18,Sp=[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],fs=[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],eC=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ng=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],tC=512,Yr=new Array((xa+2)*2);Zi(Yr);var wa=new Array(Yi*2);Zi(wa);var Sa=new Array(tC);Zi(Sa);var Oa=new Array(XM-JM+1);Zi(Oa);var Pp=new Array(Ep);Zi(Pp);var ds=new Array(Yi);Zi(ds);function yp(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var Dg,zg,Bg;function wp(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Ug(e){return e<256?Sa[e]:Sa[256+(e>>>7)]}function Ea(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Et(e,t,r){e.bi_valid>_p-r?(e.bi_buf|=t<<e.bi_valid&65535,Ea(e,e.bi_buf),e.bi_buf=t>>_p-e.bi_valid,e.bi_valid+=r-_p):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Or(e,t,r){Et(e,r[t*2],r[t*2+1])}function Wg(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function rC(e){e.bi_valid===16?(Ea(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 nC(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,l=t.stat_desc.max_length,s,c,d,p,f,h,m=0;for(p=0;p<=ui;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<Ig;s++)c=e.heap[s],p=r[r[c*2+1]*2+1]+1,p>l&&(p=l,m++),r[c*2+1]=p,!(c>n)&&(e.bl_count[p]++,f=0,c>=u&&(f=a[c-u]),h=r[c*2],e.opt_len+=h*(p+f),o&&(e.static_len+=h*(i[c*2+1]+f)));if(m!==0){do{for(p=l-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(p=l;p!==0;p--)for(c=e.bl_count[p];c!==0;)d=e.heap[--s],!(d>n)&&(r[d*2+1]!==p&&(e.opt_len+=(p-r[d*2+1])*r[d*2],r[d*2+1]=p),c--)}}function Hg(e,t,r){var n=new Array(ui+1),i=0,o,a;for(o=1;o<=ui;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var u=e[a*2+1];u!==0&&(e[a*2]=Wg(n[u]++,u))}}function iC(){var e,t,r,n,i,o=new Array(ui+1);for(r=0,n=0;n<Ep-1;n++)for(Pp[n]=r,e=0;e<1<<Sp[n];e++)Oa[r++]=n;for(Oa[r-1]=n,i=0,n=0;n<16;n++)for(ds[n]=i,e=0;e<1<<fs[n];e++)Sa[i++]=n;for(i>>=7;n<Yi;n++)for(ds[n]=i<<7,e=0;e<1<<fs[n]-7;e++)Sa[256+i++]=n;for(t=0;t<=ui;t++)o[t]=0;for(e=0;e<=143;)Yr[e*2+1]=8,e++,o[8]++;for(;e<=255;)Yr[e*2+1]=9,e++,o[9]++;for(;e<=279;)Yr[e*2+1]=7,e++,o[7]++;for(;e<=287;)Yr[e*2+1]=8,e++,o[8]++;for(Hg(Yr,xa+1,o),e=0;e<Yi;e++)wa[e*2+1]=5,wa[e*2]=Wg(e,5);Dg=new yp(Yr,Sp,Aa+1,xa,ui),zg=new yp(wa,fs,0,Yi,ui),Bg=new yp(new Array(0),eC,0,Ap,QM)}function Vg(e){var t;for(t=0;t<xa;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Yi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ap;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Tp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Gg(e){e.bi_valid>8?Ea(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 oC(e,t,r,n){Gg(e),n&&(Ea(e,r),Ea(e,~r)),GM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function Pg(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function xp(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&Pg(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Pg(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function Rg(e,t,r){var n,i,o=0,a,u;if(e.last_lit!==0)do n=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++,n===0?Or(e,i,t):(a=Oa[i],Or(e,a+Aa+1,t),u=Sp[a],u!==0&&(i-=Pp[a],Et(e,i,u)),n--,a=Ug(n),Or(e,a,r),u=fs[a],u!==0&&(n-=ds[a],Et(e,n,u)));while(o<e.last_lit);Or(e,Tp,t)}function Op(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,u,l=-1,s;for(e.heap_len=0,e.heap_max=Ig,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=l<2?++l:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)xp(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],xp(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[s*2]=r[a*2]+r[u*2],e.depth[s]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[a*2+1]=r[u*2+1]=s,e.heap[1]=s++,xp(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],nC(e,t),Hg(r,l,e.bl_count)}function Mg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[jg*2]++):u<=10?e.bl_tree[Fg*2]++:e.bl_tree[Lg*2]++,u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4))}function Cg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)){if(u<s)do Or(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(Or(e,o,e.bl_tree),u--),Or(e,jg,e.bl_tree),Et(e,u-3,2)):u<=10?(Or(e,Fg,e.bl_tree),Et(e,u-3,3)):(Or(e,Lg,e.bl_tree),Et(e,u-11,7));u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4)}}function aC(e){var t;for(Mg(e,e.dyn_ltree,e.l_desc.max_code),Mg(e,e.dyn_dtree,e.d_desc.max_code),Op(e,e.bl_desc),t=Ap-1;t>=3&&e.bl_tree[Ng[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function uC(e,t,r,n){var i;for(Et(e,t-257,5),Et(e,r-1,5),Et(e,n-4,4),i=0;i<n;i++)Et(e,e.bl_tree[Ng[i]*2+1],3);Cg(e,e.dyn_ltree,t-1),Cg(e,e.dyn_dtree,r-1)}function sC(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Ag;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return Tg;for(r=32;r<Aa;r++)if(e.dyn_ltree[r*2]!==0)return Tg;return Ag}var kg=!1;function cC(e){kg||(iC(),kg=!0),e.l_desc=new wp(e.dyn_ltree,Dg),e.d_desc=new wp(e.dyn_dtree,zg),e.bl_desc=new wp(e.bl_tree,Bg),e.bi_buf=0,e.bi_valid=0,Vg(e)}function $g(e,t,r,n){Et(e,(YM<<1)+(n?1:0),3),oC(e,t,r,!0)}function lC(e){Et(e,qg<<1,3),Or(e,Tp,Yr),rC(e)}function fC(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===KM&&(e.strm.data_type=sC(e)),Op(e,e.l_desc),Op(e,e.d_desc),a=aC(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?$g(e,t,r,n):e.strategy===$M||o===i?(Et(e,(qg<<1)+(n?1:0),3),Rg(e,Yr,wa)):(Et(e,(ZM<<1)+(n?1:0),3),uC(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Rg(e,e.dyn_ltree,e.dyn_dtree)),Vg(e),n&&Gg(e)}function dC(e,t,r){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]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Oa[r]+Aa+1)*2]++,e.dyn_dtree[Ug(t)*2]++),e.last_lit===e.lit_bufsize-1}Ji._tr_init=cC;Ji._tr_stored_block=$g;Ji._tr_flush_block=fC;Ji._tr_tally=dC;Ji._tr_align=lC});var Rp=b((TZ,Yg)=>{"use strict";function pC(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}Yg.exports=pC});var Mp=b((PZ,Zg)=>{"use strict";function hC(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var mC=hC();function vC(e,t,r,n){var i=mC,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Zg.exports=vC});var ps=b((RZ,Jg)=>{"use strict";Jg.exports={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"}});var a_=b(Tr=>{"use strict";var mt=Kr(),Bt=Kg(),t_=Rp(),pn=Mp(),bC=ps(),fi=0,gC=1,_C=3,gn=4,Xg=5,Ar=0,Qg=1,Ut=-2,yC=-3,Cp=-5,wC=-1,xC=1,hs=2,SC=3,OC=4,EC=0,AC=2,gs=8,TC=9,PC=15,RC=8,MC=29,CC=256,qp=CC+1+MC,kC=30,qC=19,IC=2*qp+1,jC=15,de=3,vn=258,nr=vn+de+1,FC=32,_s=42,Ip=69,ms=73,vs=91,bs=103,si=113,Pa=666,Ve=1,Ra=2,ci=3,eo=4,LC=3;function bn(e,t){return e.msg=bC[t],t}function e_(e){return(e<<1)-(e>4?9:0)}function mn(e){for(var t=e.length;--t>=0;)e[t]=0}function hn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(mt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function tt(e,t){Bt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,hn(e.strm)}function ve(e,t){e.pending_buf[e.pending++]=t}function Ta(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function NC(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,mt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=t_(e.adler,t,i,r):e.state.wrap===2&&(e.adler=pn(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function r_(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,l=e.strstart>e.w_size-nr?e.strstart-(e.w_size-nr):0,s=e.window,c=e.w_mask,d=e.prev,p=e.strstart+vn,f=s[n+a-1],h=s[n+a];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(s[i+a]!==h||s[i+a-1]!==f||s[i]!==s[n]||s[++i]!==s[n+1])){n+=2,i++;do;while(s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&n<p);if(o=vn-(p-n),n=p-vn,o>a){if(e.match_start=t,a=o,o>=u)break;f=s[n+a-1],h=s[n+a]}}while((t=d[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function li(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-nr)){mt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=NC(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=de)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+de-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<de)););}while(e.lookahead<nr&&e.strm.avail_in!==0)}function DC(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(li(e),e.lookahead===0&&t===fi)return Ve;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,tt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-nr&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?ci:eo):(e.strstart>e.block_start&&(tt(e,!1),e.strm.avail_out===0),Ve)}function kp(e,t){for(var r,n;;){if(e.lookahead<nr){if(li(e),e.lookahead<nr&&t===fi)return Ve;if(e.lookahead===0)break}if(r=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-nr&&(e.match_length=r_(e,r)),e.match_length>=de)if(n=Bt._tr_tally(e,e.strstart-e.match_start,e.match_length-de),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=de){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=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 n=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=e.strstart<de-1?e.strstart:de-1,t===gn?(tt(e,!0),e.strm.avail_out===0?ci:eo):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Ra}function Xi(e,t){for(var r,n,i;;){if(e.lookahead<nr){if(li(e),e.lookahead<nr&&t===fi)return Ve;if(e.lookahead===0)break}if(r=0,e.lookahead>=de&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+de-1])&e.hash_mask,r=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=de-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-nr&&(e.match_length=r_(e,r),e.match_length<=5&&(e.strategy===xC||e.match_length===de&&e.strstart-e.match_start>4096)&&(e.match_length=de-1)),e.prev_length>=de&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-de,n=Bt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-de),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+de-1])&e.hash_mask,r=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=de-1,e.strstart++,n&&(tt(e,!1),e.strm.avail_out===0))return Ve}else if(e.match_available){if(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),n&&tt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ve}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<de-1?e.strstart:de-1,t===gn?(tt(e,!0),e.strm.avail_out===0?ci:eo):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Ra}function zC(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=vn){if(li(e),e.lookahead<=vn&&t===fi)return Ve;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=de&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+vn;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=vn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=de?(r=Bt._tr_tally(e,1,e.match_length-de),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?ci:eo):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Ra}function BC(e,t){for(var r;;){if(e.lookahead===0&&(li(e),e.lookahead===0)){if(t===fi)return Ve;break}if(e.match_length=0,r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(tt(e,!1),e.strm.avail_out===0))return Ve}return e.insert=0,t===gn?(tt(e,!0),e.strm.avail_out===0?ci:eo):e.last_lit&&(tt(e,!1),e.strm.avail_out===0)?Ve:Ra}function Er(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Qi;Qi=[new Er(0,0,0,0,DC),new Er(4,4,8,4,kp),new Er(4,5,16,8,kp),new Er(4,6,32,32,kp),new Er(4,4,16,16,Xi),new Er(8,16,32,32,Xi),new Er(8,16,128,128,Xi),new Er(8,32,128,256,Xi),new Er(32,128,258,1024,Xi),new Er(32,258,258,4096,Xi)];function UC(e){e.window_size=2*e.w_size,mn(e.head),e.max_lazy_match=Qi[e.level].max_lazy,e.good_match=Qi[e.level].good_length,e.nice_match=Qi[e.level].nice_length,e.max_chain_length=Qi[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=de-1,e.match_available=0,e.ins_h=0}function WC(){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=gs,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 mt.Buf16(IC*2),this.dyn_dtree=new mt.Buf16((2*kC+1)*2),this.bl_tree=new mt.Buf16((2*qC+1)*2),mn(this.dyn_ltree),mn(this.dyn_dtree),mn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(jC+1),this.heap=new mt.Buf16(2*qp+1),mn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*qp+1),mn(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 n_(e){var t;return!e||!e.state?bn(e,Ut):(e.total_in=e.total_out=0,e.data_type=AC,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?_s:si,e.adler=t.wrap===2?0:1,t.last_flush=fi,Bt._tr_init(t),Ar)}function i_(e){var t=n_(e);return t===Ar&&UC(e.state),t}function HC(e,t){return!e||!e.state||e.state.wrap!==2?Ut:(e.state.gzhead=t,Ar)}function o_(e,t,r,n,i,o){if(!e)return Ut;var a=1;if(t===wC&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>TC||r!==gs||n<8||n>15||t<0||t>9||o<0||o>OC)return bn(e,Ut);n===8&&(n=9);var u=new WC;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+de-1)/de),u.window=new mt.Buf8(u.w_size*2),u.head=new mt.Buf16(u.hash_size),u.prev=new mt.Buf16(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new mt.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=o,u.method=r,i_(e)}function VC(e,t){return o_(e,t,gs,PC,RC,EC)}function GC(e,t){var r,n,i,o;if(!e||!e.state||t>Xg||t<0)return e?bn(e,Ut):Ut;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Pa&&t!==gn)return bn(e,e.avail_out===0?Cp:Ut);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===_s)if(n.wrap===2)e.adler=0,ve(n,31),ve(n,139),ve(n,8),n.gzhead?(ve(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)),ve(n,n.gzhead.time&255),ve(n,n.gzhead.time>>8&255),ve(n,n.gzhead.time>>16&255),ve(n,n.gzhead.time>>24&255),ve(n,n.level===9?2:n.strategy>=hs||n.level<2?4:0),ve(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(ve(n,n.gzhead.extra.length&255),ve(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=pn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ip):(ve(n,0),ve(n,0),ve(n,0),ve(n,0),ve(n,0),ve(n,n.level===9?2:n.strategy>=hs||n.level<2?4:0),ve(n,LC),n.status=si);else{var a=gs+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=hs||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=FC),a+=31-a%31,n.status=si,Ta(n,a),n.strstart!==0&&(Ta(n,e.adler>>>16),Ta(n,e.adler&65535)),e.adler=1}if(n.status===Ip)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=pn(e.adler,n.pending_buf,n.pending-i,i)),hn(e),i=n.pending,n.pending===n.pending_buf_size));)ve(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=pn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=ms)}else n.status=ms;if(n.status===ms)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=pn(e.adler,n.pending_buf,n.pending-i,i)),hn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,ve(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=vs)}else n.status=vs;if(n.status===vs)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=pn(e.adler,n.pending_buf,n.pending-i,i)),hn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,ve(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=pn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=bs)}else n.status=bs;if(n.status===bs&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&hn(e),n.pending+2<=n.pending_buf_size&&(ve(n,e.adler&255),ve(n,e.adler>>8&255),e.adler=0,n.status=si)):n.status=si),n.pending!==0){if(hn(e),e.avail_out===0)return n.last_flush=-1,Ar}else if(e.avail_in===0&&e_(t)<=e_(r)&&t!==gn)return bn(e,Cp);if(n.status===Pa&&e.avail_in!==0)return bn(e,Cp);if(e.avail_in!==0||n.lookahead!==0||t!==fi&&n.status!==Pa){var l=n.strategy===hs?BC(n,t):n.strategy===SC?zC(n,t):Qi[n.level].func(n,t);if((l===ci||l===eo)&&(n.status=Pa),l===Ve||l===ci)return e.avail_out===0&&(n.last_flush=-1),Ar;if(l===Ra&&(t===gC?Bt._tr_align(n):t!==Xg&&(Bt._tr_stored_block(n,0,0,!1),t===_C&&(mn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),hn(e),e.avail_out===0))return n.last_flush=-1,Ar}return t!==gn?Ar:n.wrap<=0?Qg:(n.wrap===2?(ve(n,e.adler&255),ve(n,e.adler>>8&255),ve(n,e.adler>>16&255),ve(n,e.adler>>24&255),ve(n,e.total_in&255),ve(n,e.total_in>>8&255),ve(n,e.total_in>>16&255),ve(n,e.total_in>>24&255)):(Ta(n,e.adler>>>16),Ta(n,e.adler&65535)),hn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Ar:Qg)}function $C(e){var t;return!e||!e.state?Ut:(t=e.state.status,t!==_s&&t!==Ip&&t!==ms&&t!==vs&&t!==bs&&t!==si&&t!==Pa?bn(e,Ut):(e.state=null,t===si?bn(e,yC):Ar))}function KC(e,t){var r=t.length,n,i,o,a,u,l,s,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==_s||n.lookahead))return Ut;for(a===1&&(e.adler=t_(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(mn(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new mt.Buf8(n.w_size),mt.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),u=e.avail_in,l=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,li(n);n.lookahead>=de;){i=n.strstart,o=n.lookahead-(de-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+de-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=de-1,li(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=de-1,n.match_available=0,e.next_in=l,e.input=s,e.avail_in=u,n.wrap=a,Ar}Tr.deflateInit=VC;Tr.deflateInit2=o_;Tr.deflateReset=i_;Tr.deflateResetKeep=n_;Tr.deflateSetHeader=HC;Tr.deflate=GC;Tr.deflateEnd=$C;Tr.deflateSetDictionary=KC;Tr.deflateInfo="pako deflate (from Nodeca project)"});var jp=b(to=>{"use strict";var ys=Kr(),u_=!0,s_=!0;try{String.fromCharCode.apply(null,[0])}catch{u_=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{s_=!1}var Ma=new ys.Buf8(256);for(Zr=0;Zr<256;Zr++)Ma[Zr]=Zr>=252?6:Zr>=248?5:Zr>=240?4:Zr>=224?3:Zr>=192?2:1;var Zr;Ma[254]=Ma[254]=1;to.string2buf=function(e){var t,r,n,i,o,a=e.length,u=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new ys.Buf8(u),o=0,i=0;o<u;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function c_(e,t){if(t<65534&&(e.subarray&&s_||!e.subarray&&u_))return String.fromCharCode.apply(null,ys.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}to.buf2binstring=function(e){return c_(e,e.length)};to.binstring2buf=function(e){for(var t=new ys.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};to.buf2string=function(e,t){var r,n,i,o,a=t||e.length,u=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){u[n++]=i;continue}if(o=Ma[i],o>4){u[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){u[n++]=65533;continue}i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|i&1023)}return c_(u,n)};to.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Ma[e[r]]>t?r:t}});var Fp=b((kZ,l_)=>{"use strict";function YC(){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}l_.exports=YC});var h_=b(qa=>{"use strict";var Ca=a_(),ka=Kr(),Np=jp(),Dp=ps(),ZC=Fp(),p_=Object.prototype.toString,JC=0,Lp=4,ro=0,f_=1,d_=2,XC=-1,QC=0,ek=8;function di(e){if(!(this instanceof di))return new di(e);this.options=ka.assign({level:XC,method:ek,chunkSize:16384,windowBits:15,memLevel:8,strategy:QC,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 ZC,this.strm.avail_out=0;var r=Ca.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ro)throw new Error(Dp[r]);if(t.header&&Ca.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Np.string2buf(t.dictionary):p_.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Ca.deflateSetDictionary(this.strm,n),r!==ro)throw new Error(Dp[r]);this._dict_set=!0}}di.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?Lp:JC,typeof e=="string"?r.input=Np.string2buf(e):p_.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ka.Buf8(n),r.next_out=0,r.avail_out=n),i=Ca.deflate(r,o),i!==f_&&i!==ro)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Lp||o===d_))&&(this.options.to==="string"?this.onData(Np.buf2binstring(ka.shrinkBuf(r.output,r.next_out))):this.onData(ka.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==f_);return o===Lp?(i=Ca.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ro):(o===d_&&(this.onEnd(ro),r.avail_out=0),!0)};di.prototype.onData=function(e){this.chunks.push(e)};di.prototype.onEnd=function(e){e===ro&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ka.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function zp(e,t){var r=new di(t);if(r.push(e,!0),r.err)throw r.msg||Dp[r.err];return r.result}function tk(e,t){return t=t||{},t.raw=!0,zp(e,t)}function rk(e,t){return t=t||{},t.gzip=!0,zp(e,t)}qa.Deflate=di;qa.deflate=zp;qa.deflateRaw=tk;qa.gzip=rk});var v_=b((IZ,m_)=>{"use strict";var ws=30,nk=12;m_.exports=function(t,r){var n,i,o,a,u,l,s,c,d,p,f,h,m,g,_,w,y,x,O,A,T,R,C,M,P;n=t.state,i=t.next_in,M=t.input,o=i+(t.avail_in-5),a=t.next_out,P=t.output,u=a-(r-t.avail_out),l=a+(t.avail_out-257),s=n.dmax,c=n.wsize,d=n.whave,p=n.wnext,f=n.window,h=n.hold,m=n.bits,g=n.lencode,_=n.distcode,w=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=g[h&w];t:for(;;){if(O=x>>>24,h>>>=O,m-=O,O=x>>>16&255,O===0)P[a++]=x&65535;else if(O&16){A=x&65535,O&=15,O&&(m<O&&(h+=M[i++]<<m,m+=8),A+=h&(1<<O)-1,h>>>=O,m-=O),m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=_[h&y];r:for(;;){if(O=x>>>24,h>>>=O,m-=O,O=x>>>16&255,O&16){if(T=x&65535,O&=15,m<O&&(h+=M[i++]<<m,m+=8,m<O&&(h+=M[i++]<<m,m+=8)),T+=h&(1<<O)-1,T>s){t.msg="invalid distance too far back",n.mode=ws;break e}if(h>>>=O,m-=O,O=a-u,T>O){if(O=T-O,O>d&&n.sane){t.msg="invalid distance too far back",n.mode=ws;break e}if(R=0,C=f,p===0){if(R+=c-O,O<A){A-=O;do P[a++]=f[R++];while(--O);R=a-T,C=P}}else if(p<O){if(R+=c+p-O,O-=p,O<A){A-=O;do P[a++]=f[R++];while(--O);if(R=0,p<A){O=p,A-=O;do P[a++]=f[R++];while(--O);R=a-T,C=P}}}else if(R+=p-O,O<A){A-=O;do P[a++]=f[R++];while(--O);R=a-T,C=P}for(;A>2;)P[a++]=C[R++],P[a++]=C[R++],P[a++]=C[R++],A-=3;A&&(P[a++]=C[R++],A>1&&(P[a++]=C[R++]))}else{R=a-T;do P[a++]=P[R++],P[a++]=P[R++],P[a++]=P[R++],A-=3;while(A>2);A&&(P[a++]=P[R++],A>1&&(P[a++]=P[R++]))}}else if((O&64)===0){x=_[(x&65535)+(h&(1<<O)-1)];continue r}else{t.msg="invalid distance code",n.mode=ws;break e}break}}else if((O&64)===0){x=g[(x&65535)+(h&(1<<O)-1)];continue t}else if(O&32){n.mode=nk;break e}else{t.msg="invalid literal/length code",n.mode=ws;break e}break}}while(i<o&&a<l);A=m>>3,i-=A,m-=A<<3,h&=(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<l?257+(l-a):257-(a-l),n.hold=h,n.bits=m}});var S_=b((jZ,x_)=>{"use strict";var b_=Kr(),no=15,g_=852,__=592,y_=0,Bp=1,w_=2,ik=[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],ok=[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],ak=[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],uk=[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];x_.exports=function(t,r,n,i,o,a,u,l){var s=l.bits,c=0,d=0,p=0,f=0,h=0,m=0,g=0,_=0,w=0,y=0,x,O,A,T,R,C=null,M=0,P,N=new b_.Buf16(no+1),k=new b_.Buf16(no+1),I=null,W=0,j,D,F;for(c=0;c<=no;c++)N[c]=0;for(d=0;d<i;d++)N[r[n+d]]++;for(h=s,f=no;f>=1&&N[f]===0;f--);if(h>f&&(h=f),f===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p<f&&N[p]===0;p++);for(h<p&&(h=p),_=1,c=1;c<=no;c++)if(_<<=1,_-=N[c],_<0)return-1;if(_>0&&(t===y_||f!==1))return-1;for(k[1]=0,c=1;c<no;c++)k[c+1]=k[c]+N[c];for(d=0;d<i;d++)r[n+d]!==0&&(u[k[r[n+d]]++]=d);if(t===y_?(C=I=u,P=19):t===Bp?(C=ik,M-=257,I=ok,W-=257,P=256):(C=ak,I=uk,P=-1),y=0,d=0,c=p,R=a,m=h,g=0,A=-1,w=1<<h,T=w-1,t===Bp&&w>g_||t===w_&&w>__)return 1;for(;;){j=c-g,u[d]<P?(D=0,F=u[d]):u[d]>P?(D=I[W+u[d]],F=C[M+u[d]]):(D=96,F=0),x=1<<c-g,O=1<<m,p=O;do O-=x,o[R+(y>>g)+O]=j<<24|D<<16|F|0;while(O!==0);for(x=1<<c-1;y&x;)x>>=1;if(x!==0?(y&=x-1,y+=x):y=0,d++,--N[c]===0){if(c===f)break;c=r[n+u[d]]}if(c>h&&(y&T)!==A){for(g===0&&(g=h),R+=p,m=c-g,_=1<<m;m+g<f&&(_-=N[m+g],!(_<=0));)m++,_<<=1;if(w+=1<<m,t===Bp&&w>g_||t===w_&&w>__)return 1;A=y&T,o[A]=h<<24|m<<16|R-a|0}}return y!==0&&(o[R+y]=c-g<<24|64<<16|0),l.bits=h,0}});var iy=b(ir=>{"use strict";var Ft=Kr(),$p=Rp(),Pr=Mp(),sk=v_(),Ia=S_(),ck=0,Y_=1,Z_=2,O_=4,lk=5,xs=6,pi=0,fk=1,dk=2,Wt=-2,J_=-3,Kp=-4,pk=-5,E_=8,X_=1,A_=2,T_=3,P_=4,R_=5,M_=6,C_=7,k_=8,q_=9,I_=10,Es=11,Jr=12,Up=13,j_=14,Wp=15,F_=16,L_=17,N_=18,D_=19,Ss=20,Os=21,z_=22,B_=23,U_=24,W_=25,H_=26,Hp=27,V_=28,G_=29,Me=30,Yp=31,hk=32,mk=852,vk=592,bk=15,gk=bk;function $_(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function _k(){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 Ft.Buf16(320),this.work=new Ft.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Q_(e){var t;return!e||!e.state?Wt:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=X_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ft.Buf32(mk),t.distcode=t.distdyn=new Ft.Buf32(vk),t.sane=1,t.back=-1,pi)}function ey(e){var t;return!e||!e.state?Wt:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Q_(e))}function ty(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Wt:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,ey(e))}function ry(e,t){var r,n;return e?(n=new _k,e.state=n,n.window=null,r=ty(e,t),r!==pi&&(e.state=null),r):Wt}function yk(e){return ry(e,gk)}var K_=!0,Vp,Gp;function wk(e){if(K_){var t;for(Vp=new Ft.Buf32(512),Gp=new Ft.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(Ia(Y_,e.lens,0,288,Vp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ia(Z_,e.lens,0,32,Gp,0,e.work,{bits:5}),K_=!1}e.lencode=Vp,e.lenbits=9,e.distcode=Gp,e.distbits=5}function ny(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Ft.Buf8(o.wsize)),n>=o.wsize?(Ft.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),Ft.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(Ft.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function xk(e,t){var r,n,i,o,a,u,l,s,c,d,p,f,h,m,g=0,_,w,y,x,O,A,T,R,C=new Ft.Buf8(4),M,P,N=[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 Wt;r=e.state,r.mode===Jr&&(r.mode=Up),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,d=u,p=l,R=pi;e:for(;;)switch(r.mode){case X_:if(r.wrap===0){r.mode=Up;break}for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.wrap&2&&s===35615){r.check=0,C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0),s=0,c=0,r.mode=A_;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",r.mode=Me;break}if((s&15)!==E_){e.msg="unknown compression method",r.mode=Me;break}if(s>>>=4,c-=4,T=(s&15)+8,r.wbits===0)r.wbits=T;else if(T>r.wbits){e.msg="invalid window size",r.mode=Me;break}r.dmax=1<<T,e.adler=r.check=1,r.mode=s&512?I_:Jr,s=0,c=0;break;case A_:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==E_){e.msg="unknown compression method",r.mode=Me;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Me;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0)),s=0,c=0,r.mode=T_;case T_:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.time=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,C[2]=s>>>16&255,C[3]=s>>>24&255,r.check=Pr(r.check,C,4,0)),s=0,c=0,r.mode=P_;case P_:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0)),s=0,c=0,r.mode=R_;case R_:if(r.flags&1024){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=Pr(r.check,C,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=M_;case M_:if(r.flags&1024&&(f=r.length,f>u&&(f=u),f&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Ft.arraySet(r.head.extra,n,o,f,T)),r.flags&512&&(r.check=Pr(r.check,n,f,o)),u-=f,o+=f,r.length-=f),r.length))break e;r.length=0,r.mode=C_;case C_:if(r.flags&2048){if(u===0)break e;f=0;do T=n[o+f++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T));while(T&&f<u);if(r.flags&512&&(r.check=Pr(r.check,n,f,o)),u-=f,o+=f,T)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=k_;case k_:if(r.flags&4096){if(u===0)break e;f=0;do T=n[o+f++],r.head&&T&&r.length<65536&&(r.head.comment+=String.fromCharCode(T));while(T&&f<u);if(r.flags&512&&(r.check=Pr(r.check,n,f,o)),u-=f,o+=f,T)break e}else r.head&&(r.head.comment=null);r.mode=q_;case q_:if(r.flags&512){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Me;break}s=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Jr;break;case I_:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=$_(s),s=0,c=0,r.mode=Es;case Es:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,dk;e.adler=r.check=1,r.mode=Jr;case Jr:if(t===lk||t===xs)break e;case Up:if(r.last){s>>>=c&7,c-=c&7,r.mode=Hp;break}for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}switch(r.last=s&1,s>>>=1,c-=1,s&3){case 0:r.mode=j_;break;case 1:if(wk(r),r.mode=Ss,t===xs){s>>>=2,c-=2;break e}break;case 2:r.mode=L_;break;case 3:e.msg="invalid block type",r.mode=Me}s>>>=2,c-=2;break;case j_:for(s>>>=c&7,c-=c&7;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Me;break}if(r.length=s&65535,s=0,c=0,r.mode=Wp,t===xs)break e;case Wp:r.mode=F_;case F_:if(f=r.length,f){if(f>u&&(f=u),f>l&&(f=l),f===0)break e;Ft.arraySet(i,n,o,f,a),u-=f,o+=f,l-=f,a+=f,r.length-=f;break}r.mode=Jr;break;case L_:for(;c<14;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.nlen=(s&31)+257,s>>>=5,c-=5,r.ndist=(s&31)+1,s>>>=5,c-=5,r.ncode=(s&15)+4,s>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Me;break}r.have=0,r.mode=N_;case N_:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[N[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},R=Ia(ck,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid code lengths set",r.mode=Me;break}r.have=0,r.mode=D_;case D_:for(;r.have<r.nlen+r.ndist;){for(;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(y<16)s>>>=_,c-=_,r.lens[r.have++]=y;else{if(y===16){for(P=_+2;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=Me;break}T=r.lens[r.have-1],f=3+(s&3),s>>>=2,c-=2}else if(y===17){for(P=_+3;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,T=0,f=3+(s&7),s>>>=3,c-=3}else{for(P=_+7;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,T=0,f=11+(s&127),s>>>=7,c-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Me;break}for(;f--;)r.lens[r.have++]=T}}if(r.mode===Me)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Me;break}if(r.lenbits=9,M={bits:r.lenbits},R=Ia(Y_,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid literal/lengths set",r.mode=Me;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},R=Ia(Z_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,R){e.msg="invalid distances set",r.mode=Me;break}if(r.mode=Ss,t===xs)break e;case Ss:r.mode=Os;case Os:if(u>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,sk(e,p),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,r.mode===Jr&&(r.back=-1);break}for(r.back=0;g=r.lencode[s&(1<<r.lenbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=_,O=w,A=y;g=r.lencode[A+((s&(1<<x+O)-1)>>x)],_=g>>>24,w=g>>>16&255,y=g&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,r.length=y,w===0){r.mode=H_;break}if(w&32){r.back=-1,r.mode=Jr;break}if(w&64){e.msg="invalid literal/length code",r.mode=Me;break}r.extra=w&15,r.mode=z_;case z_:if(r.extra){for(P=r.extra;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=B_;case B_:for(;g=r.distcode[s&(1<<r.distbits)-1],_=g>>>24,w=g>>>16&255,y=g&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((w&240)===0){for(x=_,O=w,A=y;g=r.distcode[A+((s&(1<<x+O)-1)>>x)],_=g>>>24,w=g>>>16&255,y=g&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=Me;break}r.offset=y,r.extra=w&15,r.mode=U_;case U_:if(r.extra){for(P=r.extra;c<P;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Me;break}r.mode=W_;case W_:if(l===0)break e;if(f=p-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Me;break}f>r.wnext?(f-=r.wnext,h=r.wsize-f):h=r.wnext-f,f>r.length&&(f=r.length),m=r.window}else m=i,h=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do i[a++]=m[h++];while(--f);r.length===0&&(r.mode=Os);break;case H_:if(l===0)break e;i[a++]=r.length,l--,r.mode=Os;break;case Hp:if(r.wrap){for(;c<32;){if(u===0)break e;u--,s|=n[o++]<<c,c+=8}if(p-=l,e.total_out+=p,r.total+=p,p&&(e.adler=r.check=r.flags?Pr(r.check,i,p,a-p):$p(r.check,i,p,a-p)),p=l,(r.flags?s:$_(s))!==r.check){e.msg="incorrect data check",r.mode=Me;break}s=0,c=0}r.mode=V_;case V_:if(r.wrap&&r.flags){for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Me;break}s=0,c=0}r.mode=G_;case G_:R=fk;break e;case Me:R=J_;break e;case Yp:return Kp;case hk:default:return Wt}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(r.wsize||p!==e.avail_out&&r.mode<Me&&(r.mode<Hp||t!==O_))&&ny(e,e.output,e.next_out,p-e.avail_out)?(r.mode=Yp,Kp):(d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=r.flags?Pr(r.check,i,p,e.next_out-p):$p(r.check,i,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Jr?128:0)+(r.mode===Ss||r.mode===Wp?256:0),(d===0&&p===0||t===O_)&&R===pi&&(R=pk),R)}function Sk(e){if(!e||!e.state)return Wt;var t=e.state;return t.window&&(t.window=null),e.state=null,pi}function Ok(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Wt:(r.head=t,t.done=!1,pi)}function Ek(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==Es)?Wt:n.mode===Es&&(i=1,i=$p(i,t,r,0),i!==n.check)?J_:(o=ny(e,t,r,r),o?(n.mode=Yp,Kp):(n.havedict=1,pi))}ir.inflateReset=ey;ir.inflateReset2=ty;ir.inflateResetKeep=Q_;ir.inflateInit=yk;ir.inflateInit2=ry;ir.inflate=xk;ir.inflateEnd=Sk;ir.inflateGetHeader=Ok;ir.inflateSetDictionary=Ek;ir.inflateInfo="pako inflate (from Nodeca project)"});var Zp=b((LZ,oy)=>{"use strict";oy.exports={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}});var uy=b((NZ,ay)=>{"use strict";function Ak(){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}ay.exports=Ak});var cy=b(Fa=>{"use strict";var io=iy(),ja=Kr(),As=jp(),Be=Zp(),Jp=ps(),Tk=Fp(),Pk=uy(),sy=Object.prototype.toString;function hi(e){if(!(this instanceof hi))return new hi(e);this.options=ja.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)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Tk,this.strm.avail_out=0;var r=io.inflateInit2(this.strm,t.windowBits);if(r!==Be.Z_OK)throw new Error(Jp[r]);if(this.header=new Pk,io.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=As.string2buf(t.dictionary):sy.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=io.inflateSetDictionary(this.strm,t.dictionary),r!==Be.Z_OK)))throw new Error(Jp[r])}hi.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,u,l,s,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?Be.Z_FINISH:Be.Z_NO_FLUSH,typeof e=="string"?r.input=As.binstring2buf(e):sy.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ja.Buf8(n),r.next_out=0,r.avail_out=n),o=io.inflate(r,Be.Z_NO_FLUSH),o===Be.Z_NEED_DICT&&i&&(o=io.inflateSetDictionary(this.strm,i)),o===Be.Z_BUF_ERROR&&c===!0&&(o=Be.Z_OK,c=!1),o!==Be.Z_STREAM_END&&o!==Be.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===Be.Z_STREAM_END||r.avail_in===0&&(a===Be.Z_FINISH||a===Be.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=As.utf8border(r.output,r.next_out),l=r.next_out-u,s=As.buf2string(r.output,u),r.next_out=l,r.avail_out=n-l,l&&ja.arraySet(r.output,r.output,u,l,0),this.onData(s)):this.onData(ja.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==Be.Z_STREAM_END);return o===Be.Z_STREAM_END&&(a=Be.Z_FINISH),a===Be.Z_FINISH?(o=io.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Be.Z_OK):(a===Be.Z_SYNC_FLUSH&&(this.onEnd(Be.Z_OK),r.avail_out=0),!0)};hi.prototype.onData=function(e){this.chunks.push(e)};hi.prototype.onEnd=function(e){e===Be.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ja.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xp(e,t){var r=new hi(t);if(r.push(e,!0),r.err)throw r.msg||Jp[r.err];return r.result}function Rk(e,t){return t=t||{},t.raw=!0,Xp(e,t)}Fa.Inflate=hi;Fa.inflate=Xp;Fa.inflateRaw=Rk;Fa.ungzip=Xp});var dy=b((zZ,fy)=>{"use strict";var Mk=Kr().assign,Ck=h_(),kk=cy(),qk=Zp(),ly={};Mk(ly,Ck,kk,qk);fy.exports=ly});var Qp=b(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.sum=py;Ts.concatUint8Array=Ik;function py(e){let t=0;for(let r of e)t+=r.length;return t}function Ik(e){let t=new Uint8Array(py(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var eh=b(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.unzip=jk;Rs.unzipChunkSlice=Fk;var Ps=dy(),hy=Qp();async function jk(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new Ps.Inflate,{strm:t}=n,n.push(o,Ps.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,hy.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function Fk(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],l=[],s=[],c=0;do{let d=e.subarray(o-n.blockPosition),p=new Ps.Inflate;if({strm:r}=p,p.push(d,Ps.Z_SYNC_FLUSH),p.err)throw new Error(p.msg);let f=p.result;u.push(f);let h=f.length;l.push(o),s.push(a),u.length===1&&n.dataPosition&&(u[0]=u[0].subarray(n.dataPosition),h=u[0].length);let m=o;if(o+=r.next_in,a+=h,m>=i.blockPosition){u[c]=u[c].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),l.push(o),s.push(a);break}c++}while(r.avail_in);return{buffer:(0,hy.concatUint8Array)(u),cpositions:l,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var my=b(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL=void 0;Rr.longFromBytesToUnsigned=Lk;Rr.TWO_PWR_16_DBL=65536;Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL*Rr.TWO_PWR_16_DBL;function Lk(e,t=0){let r=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;return((e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24)>>>0)*Rr.TWO_PWR_32_DBL+(r>>>0)}});var by=b(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var Nk=gp(),th=my(),Ms=1;function vy(e,t,r){let n=t[Ms],i=r?r[Ms]:1/0;return n<=e&&i>e?0:n<e?-1:1}var rh=class{constructor({filehandle:t,path:r}){if(t)this.filehandle=t;else if(r)this.filehandle=new Nk.LocalFile(r);else throw new TypeError("either filehandle or path must be defined")}_getIndex(){return this.index||(this.index=this._readIndex().catch(t=>{throw this.index=void 0,t})),this.index}async _readIndex(){let t=await this.filehandle.read(8,0),r=(0,th.longFromBytesToUnsigned)(t);if(!r)return[[0,0]];let n=new Array(r+1);n[0]=[0,0];let i=8*2*r;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");let o=await this.filehandle.read(i,8);for(let a=0;a<r;a+=1){let u=(0,th.longFromBytesToUnsigned)(o,a*16),l=(0,th.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,l]}return n}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(t,r){let n=r+t;if(t===0)return[];let i=await this._getIndex(),o=[],a=0,u=i.length-1,l=Math.floor(i.length/2),s=vy(r,i[l],i[l+1]);for(;s!==0;)s>0?u=l-1:s<0&&(a=l+1),l=Math.ceil((u-a)/2)+a,s=vy(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Ms]>=n));c+=1);return o[o.length-1][Ms]<n&&o.push([]),o}};nh.default=rh});var gy=b(La=>{"use strict";var Dk=La&&La.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(La,"__esModule",{value:!0});var zk=gp(),Bk=eh(),Uk=Dk(by()),Wk=Qp(),ih=class{constructor({filehandle:t,path:r,gziFilehandle:n,gziPath:i}){if(t)this.filehandle=t;else if(r)this.filehandle=new zk.LocalFile(r);else throw new TypeError("either filehandle or path must be defined");if(!n&&!i&&!r)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new Uk.default({filehandle:n,path:!n&&!i&&r?i:`${r}.gzi`})}async _readAndUncompressBlock(t,r){let n=r;n||(n=(await this.filehandle.stat()).size);let i=n-t,o=await this.filehandle.read(i,t);return(0,Bk.unzip)(o)}async read(t,r){let n=await this.gzi.getRelevantBlocksForRead(t,r),i=[];for(let o=0;o<n.length-1;o+=1){let a=await this._readAndUncompressBlock(n[o][0],n[o+1][0]),[,u]=n[o],l=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;l>=0&&l<a.length&&i.push(a.subarray(l,s))}return(0,Wk.concatUint8Array)(i)}};La.default=ih});var oh=b(or=>{"use strict";var Hk=or&&or.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Vk=or&&or.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Hk(t,e,r)},Gk=or&&or.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(or,"__esModule",{value:!0});or.BgzfFilehandle=void 0;var $k=gy();Object.defineProperty(or,"BgzfFilehandle",{enumerable:!0,get:function(){return Gk($k).default}});Vk(eh(),or)});var Cs=b(($Z,_y)=>{_y.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var Lt=b((KZ,yy)=>{yy.exports=JBrowseExports["@jbrowse/core/util"]});var sh=b(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var ah=class extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if(typeof this.onEviction=="function")for(let[r,n]of t)this.onEviction(r,n.value)}_deleteIfExpired(t,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(t,r.value),this.delete(t)):!1}_getOrDeleteIfExpired(t,r){if(!this._deleteIfExpired(t,r))return r.value}_getItemValue(t,r){return r.expiry?this._getOrDeleteIfExpired(t,r):r.value}_peek(t,r){let n=r.get(t);return this._getItemValue(t,n)}_set(t,r){this.cache.set(t,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,r){this.oldCache.delete(t),this._set(t,r)}*_entriesAscending(){for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield t)}for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield t)}}get(t){if(this.cache.has(t)){let r=this.cache.get(t);return this._getItemValue(t,r)}if(this.oldCache.has(t)){let r=this.oldCache.get(t);if(!this._deleteIfExpired(t,r))return this._moveToRecent(t,r),r.value}}set(t,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(t)?this.cache.set(t,{value:r,expiry:i}):this._set(t,{value:r,expiry:i})}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):this.oldCache.has(t)?!this._deleteIfExpired(t,this.oldCache.get(t)):!1}peek(t){if(this.cache.has(t))return this._peek(t,this.cache);if(this.oldCache.has(t))return this._peek(t,this.oldCache)}delete(t){let r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-t;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(let[t]of this)yield t}*values(){for(let[,t]of this)yield t}*[Symbol.iterator](){for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield[r,n.value])}for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield[r,n.value])}}*entriesDescending(){let t=[...this.cache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this._deleteIfExpired(i,o)||(yield[i,o.value])}t=[...this.oldCache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this.cache.has(i)||this._deleteIfExpired(i,o)||(yield[i,o.value])}}*entriesAscending(){for(let[t,r]of this._entriesAscending())yield[t,r.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(let r of this.oldCache.keys())this.cache.has(r)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,r=this){for(let[n,i]of this.entriesAscending())t.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};uh.default=ah});var ks=b((ZZ,wy)=>{wy.exports=JBrowseExports["@jbrowse/core/util/io"]});var qs=b((JZ,xy)=>{xy.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var Py=b(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});function Sy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Kk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yk(e,t,r){return t=oo(t),Jk(e,Ty()?Reflect.construct(t,r||[],oo(e).constructor):t.apply(e,r))}function fh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tq(n.key),n)}}function dh(e,t,r){return t&&Oy(e.prototype,t),r&&Oy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ey(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=rq(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){u=!0,o=l},f:function(){try{a||r.return==null||r.return()}finally{if(u)throw o}}}}function ch(){return ch=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=Xk(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},ch.apply(null,arguments)}function oo(e){return oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oo(e)}function Zk(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&&lh(e,t)}function Ty(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ty=function(){return!!e})()}function Jk(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 Kk(e)}function lh(e,t){return lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},lh(e,t)}function Xk(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=oo(e))!==null;);return e}function Qk(e,t,r,n){var i=ch(oo(1&n?e.prototype:e),t,r);return 2&n&&typeof i=="function"?function(o){return i.apply(r,o)}:i}function eq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tq(e){var t=eq(e,"string");return typeof t=="symbol"?t:t+""}function rq(e,t){if(e){if(typeof e=="string")return Sy(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sy(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function nq(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function iq(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var Ay=function(){function e(){fh(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return dh(e,[{key:"addEventListener",value:function(r,n,i){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:i})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var i=this.listeners[r],o=0,a=i.length;o<a;o++)if(i[o].callback===n){i.splice(o,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var i=this.listeners[r.type],o=i.slice(),a=function(){var c=o[u];try{c.callback.call(n,r)}catch(d){Promise.resolve().then(function(){throw d})}c.options&&c.options.once&&n.removeEventListener(r.type,c.callback)},u=0,l=o.length;u<l;u++)a();return!r.defaultPrevented}}}])}(),ph=function(e){function t(){var r;return fh(this,t),r=Yk(this,t),r.listeners||Ay.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return Zk(t,e),dh(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),Qk(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,i=this.reason,o=i===void 0?"Aborted":i;if(n)throw o}}],[{key:"timeout",value:function(n){var i=new Is;return setTimeout(function(){return i.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),i.signal}},{key:"any",value:function(n){var i=new Is;function o(){i.abort(this.reason),a()}function a(){var c=Ey(n),d;try{for(c.s();!(d=c.n()).done;){var p=d.value;p.removeEventListener("abort",o)}}catch(f){c.e(f)}finally{c.f()}}var u=Ey(n),l;try{for(u.s();!(l=u.n()).done;){var s=l.value;if(s.aborted){i.abort(s.reason);break}else s.addEventListener("abort",o)}}catch(c){u.e(c)}finally{u.f()}return i.signal}}])}(Ay),Is=function(){function e(){fh(this,e),Object.defineProperty(this,"signal",{value:new ph,writable:!0,configurable:!0})}return dh(e,[{key:"abort",value:function(r){var n=iq(r),i=nq(n);this.signal.reason=n,this.signal.dispatchEvent(i)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Is.prototype[Symbol.toStringTag]="AbortController",ph.prototype[Symbol.toStringTag]="AbortSignal");function oq(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 aq(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,i=n===void 0?r.Request:n,o=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,u=a===void 0?!1:a;if(!oq({fetch:r,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:u}))return{fetch:r,Request:l};var l=i;(l&&!l.prototype.hasOwnProperty("signal")||u)&&(l=function(p,f){var h;f&&f.signal&&(h=f.signal,delete f.signal);var m=new i(p,f);return h&&Object.defineProperty(m,"signal",{writable:!1,enumerable:!1,configurable:!0,value:h}),m},l.prototype=i.prototype);var s=r,c=function(p,f){var h=l&&l.prototype.isPrototypeOf(p)?p.signal:f?f.signal:void 0;if(h){var m;try{m=new DOMException("Aborted","AbortError")}catch{m=new Error("Aborted"),m.name="AbortError"}if(h.aborted)return Promise.reject(m);var g=new Promise(function(_,w){h.addEventListener("abort",function(){return w(m)},{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([g,s(p,f)])}return s(p,f)};return{fetch:c,Request:l}}Na.AbortController=Is;Na.AbortSignal=ph;Na.abortableFetch=aq});var hh=b(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.AbortSignal=ao.AbortController=void 0;var Ry=Py(),js=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},uq=typeof js().AbortController>"u"?Ry.AbortController:js().AbortController;ao.AbortController=uq;var sq=typeof js().AbortController>"u"?Ry.AbortSignal:js().AbortSignal;ao.AbortSignal=sq});var My=b(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var cq=hh(),mh=class{},vh=class{constructor(){this.signals=new Set,this.abortController=new cq.AbortController}addSignal(t=new mh){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()}};bh.default=vh});var Cy=b(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var gh=class{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t,this.callbacks.forEach(r=>{r(t)})}};_h.default=gh});var qy=b(Da=>{"use strict";var ky=Da&&Da.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Da,"__esModule",{value:!0});var lq=hh(),fq=ky(My()),dq=ky(Cy()),yh=class e{constructor({fill:t,cache:r}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof r!="object")throw new TypeError("must pass a cache object");if(typeof r.get!="function"||typeof r.set!="function"||typeof r.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=r,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,r){this.cache.get(t)===r&&this.cache.delete(t)}fill(t,r,n,i){let o=new fq.default,a=new dq.default;a.addCallback(i);let u={aborter:o,promise:this.fillCallback(r,o.signal,l=>{a.callback(l)}),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};u.aborter.addSignal(n),u.aborter.signal.addEventListener("abort",()=>{u.settled||this.evict(t,u)}),u.promise.then(()=>{u.settled=!0},()=>{u.settled=!0,this.evict(t,u)}).catch(l=>{throw console.error(l),l}),this.cache.set(t,u)}static checkSinglePromise(t,r){function n(){if(r&&r.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then(i=>(n(),i),i=>{throw n(),i})}has(t){return this.cache.has(t)}get(t,r,n,i){if(!n&&r instanceof lq.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");let o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,r,n,i)):o.settled?o.promise:(o.aborter.addSignal(n),o.statusReporter.addCallback(i),e.checkSinglePromise(o.promise,n)):(this.fill(t,r,n,i),e.checkSinglePromise(this.cache.get(t).promise,n))}delete(t){let r=this.cache.get(t);r&&(r.settled||r.aborter.abort(),this.cache.delete(t))}clear(){let t=this.cache.keys(),r=0;for(let n=t.next();!n.done;n=t.next())this.delete(n.value),r+=1;return r}};Da.default=yh});var Iy=b(za=>{"use strict";var pq=za&&za.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(za,"__esModule",{value:!0});var hq=pq(qy());za.default=hq.default});var yn=b((yJ,e0)=>{e0.exports=JBrowseExports["@jbrowse/core/configuration"]});var vt=b((EJ,i0)=>{i0.exports=JBrowseExports["mobx-state-tree"]});var Ye=b((IX,S0)=>{S0.exports=JBrowseExports.react});var Ka=b((jX,O0)=>{O0.exports=JBrowseExports["react/jsx-runtime"]});function Vs(){return typeof window<"u"}function Cr(e){return E0(e)?(e.nodeName||"").toLowerCase():"#document"}function rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(E0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function E0(e){return Vs()?e instanceof Node||e instanceof rt(e).Node:!1}function ye(e){return Vs()?e instanceof Element||e instanceof rt(e).Element:!1}function qe(e){return Vs()?e instanceof HTMLElement||e instanceof rt(e).HTMLElement:!1}function Hs(e){return!Vs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rt(e).ShadowRoot}function po(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function A0(e){return["table","td","th"].includes(Cr(e))}function Ya(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Gs(e){let t=ho(),r=ye(e)?bt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function T0(e){let t=ur(e);for(;qe(t)&&!cr(t);){if(Gs(t))return t;if(Ya(t))return null;t=ur(t)}return null}function ho(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cr(e){return["html","body","#document"].includes(Cr(e))}function bt(e){return rt(e).getComputedStyle(e)}function Za(e){return ye(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ur(e){if(Cr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Hs(e)&&e.host||sr(e);return Hs(t)?t.host:t}function P0(e){let t=ur(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&po(t)?t:P0(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=P0(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=rt(i);if(o){let u=$s(a);return t.concat(a,a.visualViewport||[],po(i)?i:[],u&&r?Tt(u):[])}return t.concat(i,Tt(i,[],r))}function $s(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ja=pt(()=>{});function $t(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function Ne(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&Hs(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ks(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ys(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function Fh(e){return e.mozInputSource===0&&e.isTrusted?!0:jh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zs(e){return Aq()?!1:!jh()&&e.width===0&&e.height===0||jh()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Lh(){return/apple/i.test(navigator.vendor)}function jh(){let e=/android/i;return e.test(Ks())||e.test(Ys())}function R0(){return Ks().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Aq(){return Ys().includes("jsdom/")}function bi(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function M0(e){return"nativeEvent"in e}function C0(e){return e.matches("html,body")}function Ze(e){return e?.ownerDocument||document}function Js(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function lr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Xs(e){return qe(e)&&e.matches(Tq)}function Je(e){e.preventDefault(),e.stopPropagation()}function Nh(e){return e?e.getAttribute("role")==="combobox"&&Xs(e):!1}var Tq,k0=pt(()=>{Ja();Tq="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"});function Qs(e,t,r){return De(e,gt(t,r))}function Pt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function ec(e){return e==="x"?"y":"x"}function tc(e){return e==="y"?"height":"width"}function kr(e){return["top","bottom"].includes(Rt(e))?"y":"x"}function rc(e){return ec(kr(e))}function Bh(e,t,r){r===void 0&&(r=!1);let n=Kt(e),i=rc(e),o=tc(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Qa(a)),[a,Qa(a)]}function I0(e){let t=Qa(e);return[Xa(e),t,Xa(t)]}function Xa(e){return e.replace(/start|end/g,t=>Rq[t])}function Mq(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}function j0(e,t,r,n){let i=Kt(e),o=Mq(Rt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Xa)))),o}function Qa(e){return e.replace(/left|right|bottom|top/g,t=>Pq[t])}function Cq(e){return{top:0,right:0,bottom:0,left:0,...e}}function nc(e){return typeof e!="number"?Cq(e):{top:e,right:e,bottom:e,left:e}}function Qr(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}var Dh,q0,zh,gt,De,gi,xn,fr,Pq,Rq,eu=pt(()=>{Dh=["top","right","bottom","left"],q0=["start","end"],zh=Dh.reduce((e,t)=>e.concat(t,t+"-"+q0[0],t+"-"+q0[1]),[]),gt=Math.min,De=Math.max,gi=Math.round,xn=Math.floor,fr=e=>({x:e,y:e}),Pq={left:"right",right:"left",bottom:"top",top:"bottom"},Rq={start:"end",end:"start"}});var kq,ic,L0,mo,oc,ac,qq,Iq,jq,N0,D0,Fq,Lq,z0,Nq,Dq,zq,Bq,Uq,Wq,Hq,F0,Vq,Gq,$q,Uh,Kq,Yq,tu,B0,U0=pt(()=>{kq=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ic=kq.join(","),L0=typeof Element>"u",mo=L0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oc=!L0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ac=function e(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",a=o||r&&t&&e(t.parentNode);return a},qq=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Iq=function(t,r,n){if(ac(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ic));return r&&mo.call(t,ic)&&i.unshift(t),i=i.filter(n),i},jq=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!ac(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),l=u.length?u:a.children,s=e(l,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var c=mo.call(a,ic);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!ac(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,n);n.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else o.unshift.apply(o,a.children)}}return i},N0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},D0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||qq(t))&&!N0(t)?0:t.tabIndex},Fq=function(t,r){var n=D0(t);return n<0&&r&&!N0(t)?0:n},Lq=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},z0=function(t){return t.tagName==="INPUT"},Nq=function(t){return z0(t)&&t.type==="hidden"},Dq=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},zq=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},Bq=function(t){if(!t.name)return!0;var r=t.form||oc(t),n=function(u){return r.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=zq(i,t.form);return!o||o===t},Uq=function(t){return z0(t)&&t.type==="radio"},Wq=function(t){return Uq(t)&&!Bq(t)},Hq=function(t){var r,n=t&&oc(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,l;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var s,c,d;n=oc(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},F0=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},Vq=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=mo.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(mo.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var l=t.parentElement,s=oc(t);if(l&&!l.shadowRoot&&i(l)===!0)return F0(t);t.assignedSlot?t=t.assignedSlot:!l&&s!==t.ownerDocument?t=s.host:t=l}t=u}if(Hq(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return F0(t);return!1},Gq=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return mo.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},$q=function(t,r){return!(r.disabled||ac(r)||Nq(r)||Vq(r,t)||Dq(r)||Gq(r))},Uh=function(t,r){return!(Wq(r)||D0(r)<0||!$q(t,r))},Kq=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Yq=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,l=Fq(u,a),s=a?e(i.candidates):u;l===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:s})}),n.sort(Lq).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},tu=function(t,r){r=r||{};var n;return r.getShadowRoot?n=jq([t],r.includeContainer,{filter:Uh.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Kq}):n=Iq(t,r.includeContainer,Uh.bind(null,r)),Yq(n)},B0=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return mo.call(t,ic)===!1?!1:Uh(r,t)}});var uc=b((BX,W0)=>{W0.exports=JBrowseExports["react-dom"]});function H0(e,t,r){let{reference:n,floating:i}=e,o=kr(t),a=rc(t),u=tc(a),l=Rt(t),s=o==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[u]/2-i[u]/2,f;switch(l){case"top":f={x:c,y:n.y-i.height};break;case"bottom":f={x:c,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-i.width,y:d};break;default:f={x:n.x,y:n.y}}switch(Kt(t)){case"start":f[a]-=p*(r&&s?-1:1);break;case"end":f[a]+=p*(r&&s?-1:1);break}return f}async function Sn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Pt(t,e),h=nc(f),g=u[p?d==="floating"?"reference":"floating":d],_=Qr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(g)))==null||r?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:l})),w=d==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),x=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},O=Qr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:y,strategy:l}):w);return{top:(_.top-O.top+h.top)/x.y,bottom:(O.bottom-_.bottom+h.bottom)/x.y,left:(_.left-O.left+h.left)/x.x,right:(O.right-_.right+h.right)/x.x}}function Zq(e,t,r){return(e?[...r.filter(i=>Kt(i)===e),...r.filter(i=>Kt(i)!==e)]:r.filter(i=>Rt(i)===i)).filter(i=>e?Kt(i)===e||(t?Xa(i)!==i:!1):!0)}function V0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function G0(e){return Dh.some(t=>e[t]>=0)}function X0(e){let t=gt(...e.map(o=>o.left)),r=gt(...e.map(o=>o.top)),n=De(...e.map(o=>o.right)),i=De(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function Jq(e){let t=e.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;i<t.length;i++){let o=t[i];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Qr(X0(i)))}async function Xq(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Rt(r),u=Kt(r),l=kr(r)==="y",s=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Pt(t,e),{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof h=="number"&&(f=u==="end"?h*-1:h),l?{x:f*c,y:p*s}:{x:p*s,y:f*c}}var $0,K0,Y0,Z0,J0,Q0,ew,tw,rw,nw,iw=pt(()=>{eu();eu();$0=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=H0(s,n,l),p=n,f={},h=0;for(let m=0;m<u.length;m++){let{name:g,fn:_}=u[m],{x:w,y,data:x,reset:O}=await _({x:c,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:f,rects:s,platform:a,elements:{reference:e,floating:t}});c=w??c,d=y??d,f={...f,[g]:{...f[g],...x}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(s=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=H0(s,p,l)),m=-1)}return{x:c,y:d,placement:p,strategy:i,middlewareData:f}};K0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:s,padding:c=0}=Pt(e,t)||{};if(s==null)return{};let d=nc(c),p={x:r,y:n},f=rc(i),h=tc(f),m=await a.getDimensions(s),g=f==="y",_=g?"top":"left",w=g?"bottom":"right",y=g?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],O=p[f]-o.reference[f],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),T=A?A[y]:0;(!T||!await(a.isElement==null?void 0:a.isElement(A)))&&(T=u.floating[y]||o.floating[h]);let R=x/2-O/2,C=T/2-m[h]/2-1,M=gt(d[_],C),P=gt(d[w],C),N=M,k=T-m[h]-P,I=T/2-m[h]/2+R,W=Qs(N,I,k),j=!l.arrow&&Kt(i)!=null&&I!==W&&o.reference[h]/2-(I<N?M:P)-m[h]/2<0,D=j?I<N?I-N:I-k:0;return{[f]:p[f]+D,data:{[f]:W,centerOffset:I-W-D,...j&&{alignmentOffset:D}},reset:j}}});Y0=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:a,placement:u,platform:l,elements:s}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:p=zh,autoAlignment:f=!0,...h}=Pt(e,t),m=d!==void 0||p===zh?Zq(d||null,f,p):p,g=await Sn(t,h),_=((r=a.autoPlacement)==null?void 0:r.index)||0,w=m[_];if(w==null)return{};let y=Bh(w,o,await(l.isRTL==null?void 0:l.isRTL(s.floating)));if(u!==w)return{reset:{placement:m[0]}};let x=[g[Rt(w)],g[y[0]],g[y[1]]],O=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],A=m[_+1];if(A)return{data:{index:_+1,overflows:O},reset:{placement:A}};let T=O.map(M=>{let P=Kt(M.placement);return[M.placement,P&&c?M.overflows.slice(0,2).reduce((N,k)=>N+k,0):M.overflows[0],M.overflows]}).sort((M,P)=>M[1]-P[1]),C=((i=T.filter(M=>M[2].slice(0,Kt(M[0])?2:3).every(P=>P<=0))[0])==null?void 0:i[0])||T[0][0];return C!==u?{data:{index:_+1,overflows:O},reset:{placement:C}}:{}}}},Z0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=Pt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let _=Rt(i),w=kr(u),y=Rt(u)===u,x=await(l.isRTL==null?void 0:l.isRTL(s.floating)),O=p||(y||!m?[Qa(u)]:I0(u)),A=h!=="none";!p&&A&&O.push(...j0(u,m,h,x));let T=[u,...O],R=await Sn(t,g),C=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&C.push(R[_]),d){let I=Bh(i,a,x);C.push(R[I[0]],R[I[1]])}if(M=[...M,{placement:i,overflows:C}],!C.every(I=>I<=0)){var P,N;let I=(((P=o.flip)==null?void 0:P.index)||0)+1,W=T[I];if(W)return{data:{index:I,overflows:M},reset:{placement:W}};let j=(N=M.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!j)switch(f){case"bestFit":{var k;let D=(k=M.filter(F=>{if(A){let z=kr(F.placement);return z===w||z==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((F,z)=>F[1]-z[1])[0])==null?void 0:k[0];D&&(j=D);break}case"initialPlacement":j=u;break}if(i!==j)return{reset:{placement:j}}}return{}}}};J0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Pt(e,t);switch(n){case"referenceHidden":{let o=await Sn(t,{...i,elementContext:"reference"}),a=V0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:G0(a)}}}case"escaped":{let o=await Sn(t,{...i,altBoundary:!0}),a=V0(o,r.floating);return{data:{escapedOffsets:a,escaped:G0(a)}}}default:return{}}}}};Q0=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=t,{padding:u=2,x:l,y:s}=Pt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),d=Jq(c),p=Qr(X0(c)),f=nc(u);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&s!=null)return d.find(g=>l>g.left-f.left&&l<g.right+f.right&&s>g.top-f.top&&s<g.bottom+f.bottom)||p;if(d.length>=2){if(kr(r)==="y"){let M=d[0],P=d[d.length-1],N=Rt(r)==="top",k=M.top,I=P.bottom,W=N?M.left:P.left,j=N?M.right:P.right,D=j-W,F=I-k;return{top:k,bottom:I,left:W,right:j,width:D,height:F,x:W,y:k}}let g=Rt(r)==="left",_=De(...d.map(M=>M.right)),w=gt(...d.map(M=>M.left)),y=d.filter(M=>g?M.left===w:M.right===_),x=y[0].top,O=y[y.length-1].bottom,A=w,T=_,R=T-A,C=O-x;return{top:x,bottom:O,left:A,right:T,width:R,height:C,x:A,y:x}}return p}let m=await o.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};ew=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:u}=t,l=await Xq(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},tw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:g=>{let{x:_,y:w}=g;return{x:_,y:w}}},...l}=Pt(e,t),s={x:r,y:n},c=await Sn(t,l),d=kr(Rt(i)),p=ec(d),f=s[p],h=s[d];if(o){let g=p==="y"?"top":"left",_=p==="y"?"bottom":"right",w=f+c[g],y=f-c[_];f=Qs(w,f,y)}if(a){let g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=h+c[g],y=h-c[_];h=Qs(w,h,y)}let m=u.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[d]:a}}}}}},rw=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=Pt(e,t),c={x:r,y:n},d=kr(i),p=ec(d),f=c[p],h=c[d],m=Pt(u,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=p==="y"?"height":"width",x=o.reference[p]-o.floating[y]+g.mainAxis,O=o.reference[p]+o.reference[y]-g.mainAxis;f<x?f=x:f>O&&(f=O)}if(s){var _,w;let y=p==="y"?"width":"height",x=["top","left"].includes(Rt(i)),O=o.reference[d]-o.floating[y]+(x&&((_=a.offset)==null?void 0:_[d])||0)+(x?0:g.crossAxis),A=o.reference[d]+o.reference[y]+(x?0:((w=a.offset)==null?void 0:w[d])||0)-(x?g.crossAxis:0);h<O?h=O:h>A&&(h=A)}return{[p]:f,[d]:h}}}},nw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:i,rects:o,platform:a,elements:u}=t,{apply:l=()=>{},...s}=Pt(e,t),c=await Sn(t,s),d=Rt(i),p=Kt(i),f=kr(i)==="y",{width:h,height:m}=o.floating,g,_;d==="top"||d==="bottom"?(g=d,_=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(_=d,g=p==="end"?"top":"bottom");let w=m-c.top-c.bottom,y=h-c.left-c.right,x=gt(m-c[g],w),O=gt(h-c[_],y),A=!t.middlewareData.shift,T=x,R=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),A&&!p){let M=De(c.left,0),P=De(c.right,0),N=De(c.top,0),k=De(c.bottom,0);f?R=h-2*(M!==0||P!==0?M+P:De(c.left,c.right)):T=m-2*(N!==0||k!==0?N+k:De(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:T});let C=await a.getDimensions(u.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}});function uw(e){let t=bt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=qe(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=gi(r)!==o||gi(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Hh(e){return ye(e)?e:e.contextElement}function vo(e){let t=Hh(e);if(!qe(t))return fr(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=uw(t),a=(o?gi(r.width):r.width)/n,u=(o?gi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function sw(e){let t=rt(e);return!ho()||!t.visualViewport?Qq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eI(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==rt(e)?!1:t}function _i(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Hh(e),a=fr(1);t&&(n?ye(n)&&(a=vo(n)):a=vo(e));let u=eI(o,r,n)?sw(o):fr(0),l=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){let p=rt(o),f=n&&ye(n)?rt(n):n,h=p,m=$s(h);for(;m&&n&&f!==h;){let g=vo(m),_=m.getBoundingClientRect(),w=bt(m),y=_.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,x=_.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,s*=g.y,c*=g.x,d*=g.y,l+=y,s+=x,h=rt(m),m=$s(h)}}return Qr({width:c,height:d,x:l,y:s})}function Vh(e,t){let r=Za(e).scrollLeft;return t?t.left+r:_i(sr(e)).left+r}function cw(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:Vh(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function tI(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=sr(n),u=t?Ya(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},s=fr(1),c=fr(0),d=qe(n);if((d||!d&&!o)&&((Cr(n)!=="body"||po(a))&&(l=Za(n)),qe(n))){let f=_i(n);s=vo(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}let p=a&&!d&&!o?cw(a,l,!0):fr(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-l.scrollLeft*s.x+c.x+p.x,y:r.y*s.y-l.scrollTop*s.y+c.y+p.y}}function rI(e){return Array.from(e.getClientRects())}function nI(e){let t=sr(e),r=Za(e),n=e.ownerDocument.body,i=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Vh(e),u=-r.scrollTop;return bt(n).direction==="rtl"&&(a+=De(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function iI(e,t){let r=rt(e),n=sr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;let s=ho();(!s||s&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function oI(e,t){let r=_i(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=qe(e)?vo(e):fr(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,s=n*o.y;return{width:a,height:u,x:l,y:s}}function ow(e,t,r){let n;if(t==="viewport")n=iI(e,r);else if(t==="document")n=nI(sr(e));else if(ye(t))n=oI(t,r);else{let i=sw(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Qr(n)}function lw(e,t){let r=ur(e);return r===t||!ye(r)||cr(r)?!1:bt(r).position==="fixed"||lw(r,t)}function aI(e,t){let r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(u=>ye(u)&&Cr(u)!=="body"),i=null,o=bt(e).position==="fixed",a=o?ur(e):e;for(;ye(a)&&!cr(a);){let u=bt(a),l=Gs(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||po(a)&&!l&&lw(e,a))?n=n.filter(c=>c!==a):i=u,a=ur(a)}return t.set(e,n),n}function uI(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Ya(t)?[]:aI(t,this._c):[].concat(r),n],u=a[0],l=a.reduce((s,c)=>{let d=ow(t,c,i);return s.top=De(d.top,s.top),s.right=gt(d.right,s.right),s.bottom=gt(d.bottom,s.bottom),s.left=De(d.left,s.left),s},ow(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function sI(e){let{width:t,height:r}=uw(e);return{width:t,height:r}}function cI(e,t,r){let n=qe(t),i=sr(t),o=r==="fixed",a=_i(e,!0,o,t),u={scrollLeft:0,scrollTop:0},l=fr(0);if(n||!n&&!o)if((Cr(t)!=="body"||po(i))&&(u=Za(t)),n){let p=_i(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=Vh(i));let s=i&&!n&&!o?cw(i,u):fr(0),c=a.left+u.scrollLeft-l.x-s.x,d=a.top+u.scrollTop-l.y-s.y;return{x:c,y:d,width:a.width,height:a.height}}function Wh(e){return bt(e).position==="static"}function aw(e,t){if(!qe(e)||bt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sr(e)===r&&(r=r.ownerDocument.body),r}function fw(e,t){let r=rt(e);if(Ya(e))return r;if(!qe(e)){let i=ur(e);for(;i&&!cr(i);){if(ye(i)&&!Wh(i))return i;i=ur(i)}return r}let n=aw(e,t);for(;n&&A0(n)&&Wh(n);)n=aw(n,t);return n&&cr(n)&&Wh(n)&&!Gs(n)?r:n||T0(e)||r}function fI(e){return bt(e).direction==="rtl"}function dw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dI(e,t){let r=null,n,i=sr(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();let s=e.getBoundingClientRect(),{left:c,top:d,width:p,height:f}=s;if(u||t(),!p||!f)return;let h=xn(d),m=xn(i.clientWidth-(c+p)),g=xn(i.clientHeight-(d+f)),_=xn(c),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-_+"px",threshold:De(0,gt(1,l))||1},x=!0;function O(A){let T=A[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!dw(s,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(O,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,y)}r.observe(e)}return a(!0),o}function Gh(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,s=Hh(e),c=i||o?[...s?Tt(s):[],...Tt(t)]:[];c.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});let d=s&&u?dI(s,r):null,p=-1,f=null;a&&(f=new ResizeObserver(_=>{let[w]=_;w&&w.target===s&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(t)})),r()}),s&&!l&&f.observe(s),f.observe(t));let h,m=l?_i(e):null;l&&g();function g(){let _=_i(e);m&&!dw(m,_)&&r(),m=_,h=requestAnimationFrame(g)}return r(),()=>{var _;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d?.(),(_=f)==null||_.disconnect(),f=null,l&&cancelAnimationFrame(h)}}var Qq,lI,sc,yi,pw,hw,mw,vw,bw,gw,$h,_w,yw,ru,Kh=pt(()=>{iw();eu();Ja();Ja();Qq=fr(0);lI=async function(e){let t=this.getOffsetParent||fw,r=this.getDimensions,n=await r(e.floating);return{reference:cI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};sc={convertOffsetParentRelativeRectToViewportRelativeRect:tI,getDocumentElement:sr,getClippingRect:uI,getOffsetParent:fw,getElementRects:lI,getClientRects:rI,getDimensions:sI,getScale:vo,isElement:ye,isRTL:fI};yi=Sn,pw=ew,hw=Y0,mw=tw,vw=Z0,bw=nw,gw=J0,$h=K0,_w=Q0,yw=rw,ru=(e,t,r)=>{let n=new Map,i={platform:sc,...r},o={...i.platform,_c:n};return $0(e,t,{...i,platform:o})}});function lc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!lc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!lc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Sw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ww(e,t){let r=Sw(e);return Math.round(t*r)/r}function Yh(e){let t=He.useRef(e);return cc(()=>{t.current=e}),t}function Ow(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:l,open:s}=e,[c,d]=He.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=He.useState(n);lc(p,n)||f(n);let[h,m]=He.useState(null),[g,_]=He.useState(null),w=He.useCallback(F=>{F!==A.current&&(A.current=F,m(F))},[]),y=He.useCallback(F=>{F!==T.current&&(T.current=F,_(F))},[]),x=o||h,O=a||g,A=He.useRef(null),T=He.useRef(null),R=He.useRef(c),C=l!=null,M=Yh(l),P=Yh(i),N=Yh(s),k=He.useCallback(()=>{if(!A.current||!T.current)return;let F={placement:t,strategy:r,middleware:p};P.current&&(F.platform=P.current),ru(A.current,T.current,F).then(z=>{let q={...z,isPositioned:N.current!==!1};I.current&&!lc(R.current,q)&&(R.current=q,xw.flushSync(()=>{d(q)}))})},[p,t,r,P,N]);cc(()=>{s===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(F=>({...F,isPositioned:!1})))},[s]);let I=He.useRef(!1);cc(()=>(I.current=!0,()=>{I.current=!1}),[]),cc(()=>{if(x&&(A.current=x),O&&(T.current=O),x&&O){if(M.current)return M.current(x,O,k);k()}},[x,O,k,M,C]);let W=He.useMemo(()=>({reference:A,floating:T,setReference:w,setFloating:y}),[w,y]),j=He.useMemo(()=>({reference:x,floating:O}),[x,O]),D=He.useMemo(()=>{let F={position:r,left:0,top:0};if(!j.floating)return F;let z=ww(j.floating,c.x),q=ww(j.floating,c.y);return u?{...F,transform:"translate("+z+"px, "+q+"px)",...Sw(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:z,top:q}},[r,u,j.floating,c.x,c.y]);return He.useMemo(()=>({...c,update:k,refs:W,elements:j,floatingStyles:D}),[c,k,W,j,D])}var He,fc,xw,cc,pI,dc,Ew,Aw,Tw,Pw,Rw,Mw,Cw,kw,Zh=pt(()=>{Kh();Kh();He=V(Ye(),1),fc=V(Ye(),1),xw=V(uc(),1),cc=typeof document<"u"?fc.useLayoutEffect:fc.useEffect;pI=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?$h({element:n.current,padding:i}).fn(r):{}:n?$h({element:n,padding:i}).fn(r):{}}}},dc=(e,t)=>({...pw(e),options:[e,t]}),Ew=(e,t)=>({...mw(e),options:[e,t]}),Aw=(e,t)=>({...yw(e),options:[e,t]}),Tw=(e,t)=>({...vw(e),options:[e,t]}),Pw=(e,t)=>({...bw(e),options:[e,t]}),Rw=(e,t)=>({...hw(e),options:[e,t]}),Mw=(e,t)=>({...gw(e),options:[e,t]}),Cw=(e,t)=>({..._w(e),options:[e,t]}),kw=(e,t)=>({...pI(e),options:[e,t]})});var P1={};fp(P1,{Composite:()=>bI,CompositeItem:()=>gI,FloatingArrow:()=>xI,FloatingDelayGroup:()=>TI,FloatingFocusManager:()=>NI,FloatingList:()=>s1,FloatingNode:()=>OI,FloatingOverlay:()=>zI,FloatingPortal:()=>jI,FloatingTree:()=>EI,arrow:()=>kw,autoPlacement:()=>Rw,autoUpdate:()=>Gh,computePosition:()=>ru,detectOverflow:()=>yi,flip:()=>Tw,getOverflowAncestors:()=>Tt,hide:()=>Mw,inline:()=>Cw,inner:()=>nj,limitShift:()=>Aw,offset:()=>dc,platform:()=>sc,safePolygon:()=>aj,shift:()=>Ew,size:()=>Pw,useClick:()=>BI,useClientPoint:()=>WI,useDelayGroup:()=>PI,useDelayGroupContext:()=>g1,useDismiss:()=>GI,useFloating:()=>$I,useFloatingNodeId:()=>SI,useFloatingParentNodeId:()=>Ai,useFloatingPortalNode:()=>O1,useFloatingRootContext:()=>A1,useFloatingTree:()=>Ti,useFocus:()=>KI,useHover:()=>AI,useId:()=>So,useInnerOffset:()=>ij,useInteractions:()=>YI,useListItem:()=>c1,useListNavigation:()=>JI,useMergeRefs:()=>_c,useRole:()=>QI,useTransitionStatus:()=>T1,useTransitionStyles:()=>tj,useTypeahead:()=>rj});function _c(e){return E.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}function Ie(e){let t=E.useRef(()=>{});return mI(()=>{t.current=e}),E.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function pc(e,t,r){return Math.floor(e/t)!==r}function _o(e,t){return t<0||t>=e.current.length}function bc(e,t){return nt(e,{disabledIndices:t})}function nm(e,t){return nt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function nt(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t,a=e.current,u=r;do u+=n?-o:o;while(u>=0&&u<=a.length-1&&Si(a,u,i));return u}function n1(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:l,maxIndex:s,prevIndex:c,stopEvent:d=!1}=t,p=c;if(r.key===wo){if(d&&Je(r),c===-1)p=s;else if(p=nt(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<l||p<0)){let f=c%a,h=s%a,m=s-(h-f);h===f?p=s:p=h>f?m:m-a}_o(e,p)&&(p=c)}if(r.key===en&&(d&&Je(r),c===-1?p=l:(p=nt(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(p=nt(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),_o(e,p)&&(p=c)),n==="both"){let f=xn(c/a);r.key===(o?dr:pr)&&(d&&Je(r),c%a!==a-1?(p=nt(e,{startingIndex:c,disabledIndices:u}),i&&pc(p,a,f)&&(p=nt(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(p=nt(e,{startingIndex:c-c%a-1,disabledIndices:u})),pc(p,a,f)&&(p=c)),r.key===(o?pr:dr)&&(d&&Je(r),c%a!==0?(p=nt(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&pc(p,a,f)&&(p=nt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(p=nt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),pc(p,a,f)&&(p=c));let h=xn(s/a)===f;_o(e,p)&&(i&&h?p=r.key===(o?pr:dr)?s:nt(e,{startingIndex:c-c%a-1,disabledIndices:u}):p=c)}return p}function i1(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:l}=o;u>t;let s=!1;for(r&&(i=0);!s;){let c=[];for(let d=0;d<u;d++)for(let p=0;p<l;p++)c.push(i+d+p*t);i%t+u<=t&&c.every(d=>n[d]==null)?(c.forEach(d=>{n[d]=a}),s=!0):i++}}),[...n]}function o1(e,t,r,n,i){if(e===-1)return-1;let o=r.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*n:o;case"br":return r.lastIndexOf(e)}}function a1(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function Si(e,t,r){if(r)return r.includes(t);let n=e[t];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function vI(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function s1(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=E.useState(()=>new Set),a=E.useCallback(s=>{o(c=>new Set(c).add(s))},[]),u=E.useCallback(s=>{o(c=>{let d=new Set(c);return d.delete(s),d})},[]),l=E.useMemo(()=>{let s=new Map;return Array.from(i.keys()).sort(vI).forEach((d,p)=>{s.set(d,p)}),s},[i]);return(0,Ee.jsx)(u1.Provider,{value:E.useMemo(()=>({register:a,unregister:u,map:l,elementsRef:r,labelsRef:n}),[a,u,l,r,n]),children:t})}function c1(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=E.useContext(u1),[u,l]=E.useState(null),s=E.useRef(null),c=E.useCallback(d=>{if(s.current=d,u!==null&&(o.current[u]=d,a)){var p;let f=t!==void 0;a.current[u]=f?t:(p=d?.textContent)!=null?p:null}},[u,o,a,t]);return pe(()=>{let d=s.current;if(d)return r(d),()=>{n(d)}},[r,n]),pe(()=>{let d=s.current?i.get(s.current):null;d!=null&&l(d)},[i]),E.useMemo(()=>({ref:c,index:u??-1}),[u,c])}function l1(e,t){return typeof e=="function"?e(t):e?E.cloneElement(e,t):(0,Ee.jsx)("div",{...t})}function yI(){let[e,t]=E.useState(()=>qw?Iw():void 0);return pe(()=>{e==null&&t(Iw())},[]),E.useEffect(()=>{qw=!0},[]),e}function h1(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(i=>i!==r))||[])}}}function SI(e){let t=So(),r=Ti(),n=Ai(),i=e||n;return pe(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function OI(e){let{children:t,id:r}=e,n=Ai();return(0,Ee.jsx)(m1.Provider,{value:E.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function EI(e){let{children:t}=e,r=E.useRef([]),n=E.useCallback(a=>{r.current=[...r.current,a]},[]),i=E.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),o=E.useState(()=>h1())[0];return(0,Ee.jsx)(v1.Provider,{value:E.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function Ei(e){return"data-floating-ui-"+e}function it(e){let t=(0,xo.useRef)(e);return pe(()=>{t.current=e}),t}function gc(e,t,r){return r&&!bi(r)?0:typeof e=="number"?e:e?.[t]}function AI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:l=0,handleClose:s=null,mouseOnly:c=!1,restMs:d=0,move:p=!0}=t,f=Ti(),h=Ai(),m=it(s),g=it(l),_=it(r),w=E.useRef(),y=E.useRef(-1),x=E.useRef(),O=E.useRef(-1),A=E.useRef(!0),T=E.useRef(!1),R=E.useRef(()=>{}),C=E.useRef(!1),M=E.useCallback(()=>{var D;let F=(D=i.current.openEvent)==null?void 0:D.type;return F?.includes("mouse")&&F!=="mousedown"},[i]);E.useEffect(()=>{if(!u)return;function D(F){let{open:z}=F;z||(clearTimeout(y.current),clearTimeout(O.current),A.current=!0,C.current=!1)}return o.on("openchange",D),()=>{o.off("openchange",D)}},[u,o]),E.useEffect(()=>{if(!u||!m.current||!r)return;function D(z){M()&&n(!1,z,"hover")}let F=Ze(a.floating).documentElement;return F.addEventListener("mouseleave",D),()=>{F.removeEventListener("mouseleave",D)}},[a.floating,r,n,u,m,M]);let P=E.useCallback(function(D,F,z){F===void 0&&(F=!0),z===void 0&&(z="hover");let q=gc(g.current,"close",w.current);q&&!x.current?(clearTimeout(y.current),y.current=window.setTimeout(()=>n(!1,D,z),q)):F&&(clearTimeout(y.current),n(!1,D,z))},[g,n]),N=Ie(()=>{R.current(),x.current=void 0}),k=Ie(()=>{if(T.current){let D=Ze(a.floating).body;D.style.pointerEvents="",D.removeAttribute(jw),T.current=!1}}),I=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);E.useEffect(()=>{if(!u)return;function D(B){if(clearTimeout(y.current),A.current=!1,c&&!bi(w.current)||d>0&&!gc(g.current,"open"))return;let $=gc(g.current,"open",w.current);$?y.current=window.setTimeout(()=>{_.current||n(!0,B,"hover")},$):r||n(!0,B,"hover")}function F(B){if(I())return;R.current();let $=Ze(a.floating);if(clearTimeout(O.current),C.current=!1,m.current&&i.current.floatingContext){r||clearTimeout(y.current),x.current=m.current({...i.current.floatingContext,tree:f,x:B.clientX,y:B.clientY,onClose(){k(),N(),I()||P(B,!0,"safe-polygon")}});let he=x.current;$.addEventListener("mousemove",he),R.current=()=>{$.removeEventListener("mousemove",he)};return}(w.current==="touch"?!Ne(a.floating,B.relatedTarget):!0)&&P(B)}function z(B){I()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:f,x:B.clientX,y:B.clientY,onClose(){k(),N(),I()||P(B)}})(B))}if(ye(a.domReference)){var q;let B=a.domReference;return r&&B.addEventListener("mouseleave",z),(q=a.floating)==null||q.addEventListener("mouseleave",z),p&&B.addEventListener("mousemove",D,{once:!0}),B.addEventListener("mouseenter",D),B.addEventListener("mouseleave",F),()=>{var $;r&&B.removeEventListener("mouseleave",z),($=a.floating)==null||$.removeEventListener("mouseleave",z),p&&B.removeEventListener("mousemove",D),B.removeEventListener("mouseenter",D),B.removeEventListener("mouseleave",F)}}},[a,u,e,c,d,p,P,N,k,n,r,_,f,g,m,i,I]),pe(()=>{var D;if(u&&r&&(D=m.current)!=null&&D.__options.blockPointerEvents&&M()){T.current=!0;let z=a.floating;if(ye(a.domReference)&&z){var F;let q=Ze(a.floating).body;q.setAttribute(jw,"");let B=a.domReference,$=f==null||(F=f.nodesRef.current.find(X=>X.id===h))==null||(F=F.context)==null?void 0:F.elements.floating;return $&&($.style.pointerEvents=""),q.style.pointerEvents="none",B.style.pointerEvents="auto",z.style.pointerEvents="auto",()=>{q.style.pointerEvents="",B.style.pointerEvents="",z.style.pointerEvents=""}}}},[u,r,h,a,f,m,M]),pe(()=>{r||(w.current=void 0,C.current=!1,N(),k())},[r,N,k]),E.useEffect(()=>()=>{N(),clearTimeout(y.current),clearTimeout(O.current),k()},[u,a.domReference,N,k]);let W=E.useMemo(()=>{function D(F){w.current=F.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(F){let{nativeEvent:z}=F;function q(){!A.current&&!_.current&&n(!0,z,"hover")}c&&!bi(w.current)||r||d===0||C.current&&F.movementX**2+F.movementY**2<2||(clearTimeout(O.current),w.current==="touch"?q():(C.current=!0,O.current=window.setTimeout(q,d)))}}},[c,n,r,_,d]),j=E.useMemo(()=>({onMouseEnter(){clearTimeout(y.current)},onMouseLeave(D){I()||P(D.nativeEvent,!1)}}),[P,I]);return E.useMemo(()=>u?{reference:W,floating:j}:{},[u,W,j])}function TI(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=E.useReducer((l,s)=>({...l,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=E.useRef(null),u=E.useCallback(l=>{o({currentId:l})},[]);return pe(()=>{i.currentId?a.current===null?a.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[i.currentId,i.isInstantPhase]),(0,Ee.jsx)(b1.Provider,{value:E.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function PI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,l=g1(),{currentId:s,setCurrentId:c,initialDelay:d,setState:p,timeoutMs:f}=l;return pe(()=>{a&&s&&(p({delay:{open:1,close:gc(d,"close")}}),s!==u&&n(!1))},[a,u,n,p,s,d]),pe(()=>{function h(){n(!1),p({delay:d,currentId:null})}if(a&&s&&!r&&s===u){if(f){let m=window.setTimeout(h,f);return()=>{clearTimeout(m)}}h()}},[a,r,p,s,u,n,d,f]),pe(()=>{a&&(c===im||!r||c(u))},[a,r,c,u]),l}function wi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(Fw);let o=()=>e?.focus({preventScroll:r});i?o():Fw=requestAnimationFrame(o)}function Lw(e,t){var r;let n=[],i=(r=e.find(o=>o.id===t))==null?void 0:r.parentId;for(;i;){let o=e.find(a=>a.id===i);i=o?.parentId,o&&(n=n.concat(o))}return n}function Oi(e,t){let r=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),n=r;for(;n.length;)n=e.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var u;return i.parentId===a.id&&((u=i.context)==null?void 0:u.open)})}),r=r.concat(n);return r}function RI(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),Oi(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function kI(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=CI(t,e),u=new Set,l=new Set(a),s=[];mc[i]||(mc[i]=new WeakMap);let c=mc[i];a.forEach(d),p(t),u.clear();function d(f){!f||u.has(f)||(u.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(Cr(h)!=="script")if(u.has(h))p(h);else{let m=o?h.getAttribute(o):null,g=m!==null&&m!=="false",_=bo.get(h)||0,w=o?_+1:_,y=(c.get(h)||0)+1;bo.set(h,w),c.set(h,y),s.push(h),w===1&&g&&hc.add(h),y===1&&h.setAttribute(i,""),!g&&o&&h.setAttribute(o,"true")}})}return Xh++,()=>{s.forEach(f=>{let h=bo.get(f)||0,m=o?h-1:h,g=(c.get(f)||0)-1;bo.set(f,m),c.set(f,g),m||(!hc.has(f)&&o&&f.removeAttribute(o),hc.delete(f)),g||f.removeAttribute(i)}),Xh--,Xh||(bo=new WeakMap,bo=new WeakMap,hc=new WeakSet,mc={})}}function Nw(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=Ze(e[0]).body;return kI(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function y1(e,t){let r=tu(e,wc());t==="prev"&&r.reverse();let n=r.indexOf($t(Ze(e)));return r.slice(n+1)[0]}function w1(){return y1(document.body,"next")}function x1(){return y1(document.body,"prev")}function nu(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ne(r,n)}function qI(e){tu(e,wc()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function Dw(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{let n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}function zw(e){e.key==="Tab"&&(e.target,clearTimeout(II))}function O1(e){e===void 0&&(e={});let{id:t,root:r}=e,n=So(),i=E1(),[o,a]=E.useState(null),u=E.useRef(null);return pe(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),pe(()=>{if(!n||u.current)return;let l=t?document.getElementById(t):null;if(!l)return;let s=document.createElement("div");s.id=n,s.setAttribute(Bw,""),l.appendChild(s),u.current=s,a(s)},[t,n]),pe(()=>{if(r===null||!n||u.current)return;let l=r||i?.portalNode;l&&!ye(l)&&(l=l.current),l=l||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,l.appendChild(s));let c=document.createElement("div");c.id=n,c.setAttribute(Bw,""),l=s||l,l.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function jI(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=O1({id:r,root:n}),[a,u]=E.useState(null),l=E.useRef(null),s=E.useRef(null),c=E.useRef(null),d=E.useRef(null),p=a?.modal,f=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return E.useEffect(()=>{if(!o||!i||p)return;function m(g){o&&nu(g)&&(g.type==="focusin"?Dw:qI)(o)}return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)}},[o,i,p]),E.useEffect(()=>{o&&(f||Dw(o))},[f,o]),(0,Ee.jsxs)(S1.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Ee.jsx)(yc,{"data-type":"outside",ref:l,onFocus:m=>{if(nu(m,o)){var g;(g=c.current)==null||g.focus()}else{let _=x1()||a?.domReference;_?.focus()}}}),h&&o&&(0,Ee.jsx)("span",{"aria-owns":o.id,style:xc}),o&&yo.createPortal(t,o),h&&o&&(0,Ee.jsx)(yc,{"data-type":"outside",ref:s,onFocus:m=>{if(nu(m,o)){var g;(g=d.current)==null||g.focus()}else{let _=w1()||a?.domReference;_?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function am(e){return e?e.hasAttribute(om)?e:e.querySelector("["+om+"]")||e:null}function Qh(e){xi=xi.filter(t=>t.isConnected),e&&Cr(e)!=="body"&&(xi.push(e),xi.length>Uw&&(xi=xi.slice(-Uw)))}function Ww(){return xi.slice().reverse().find(e=>e.isConnected)}function FI(e){let t=wc();return B0(e,t)?e:tu(e,t)[0]||e}function NI(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:l=!1,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0,outsideElementsInert:p=!1}=e,{open:f,onOpenChange:h,events:m,dataRef:g,elements:{domReference:_,floating:w}}=t,y=Ie(()=>{var K;return(K=g.current.floatingContext)==null?void 0:K.nodeId}),x=typeof a=="number"&&a<0,O=Nh(_)&&x,A=MI(),T=A?o:!0,R=!T||A&&p,C=it(i),M=it(a),P=it(u),N=Ti(),k=E1(),I=E.useRef(null),W=E.useRef(null),j=E.useRef(!1),D=E.useRef(!1),F=E.useRef(-1),z=k!=null,q=am(w),B=Ie(function(K){return K===void 0&&(K=q),K?tu(K,wc()):[]}),$=Ie(K=>{let ne=B(K);return C.current.map(ee=>_&&ee==="reference"?_:q&&ee==="floating"?q:ne).filter(Boolean).flat()});E.useEffect(()=>{if(n||!s)return;function K(ee){if(ee.key==="Tab"){Ne(q,$t(Ze(q)))&&B().length===0&&!O&&Je(ee);let te=$(),_e=lr(ee);C.current[0]==="reference"&&_e===_&&(Je(ee),ee.shiftKey?wi(te[te.length-1]):wi(te[1])),C.current[1]==="floating"&&_e===q&&ee.shiftKey&&(Je(ee),wi(te[0]))}}let ne=Ze(q);return ne.addEventListener("keydown",K),()=>{ne.removeEventListener("keydown",K)}},[n,_,q,s,C,O,B,$]),E.useEffect(()=>{if(n||!w)return;function K(ne){let ee=lr(ne),_e=B().indexOf(ee);_e!==-1&&(F.current=_e)}return w.addEventListener("focusin",K),()=>{w.removeEventListener("focusin",K)}},[n,w,B]),E.useEffect(()=>{if(n||!d)return;function K(){D.current=!0,setTimeout(()=>{D.current=!1})}function ne(ee){let te=ee.relatedTarget;queueMicrotask(()=>{let _e=y(),xe=!(Ne(_,te)||Ne(w,te)||Ne(te,w)||Ne(k?.portalNode,te)||te!=null&&te.hasAttribute(Ei("focus-guard"))||N&&(Oi(N.nodesRef.current,_e).find(ge=>{var We,Pe;return Ne((We=ge.context)==null?void 0:We.elements.floating,te)||Ne((Pe=ge.context)==null?void 0:Pe.elements.domReference,te)})||Lw(N.nodesRef.current,_e).find(ge=>{var We,Pe,ft;return[(We=ge.context)==null?void 0:We.elements.floating,am((Pe=ge.context)==null?void 0:Pe.elements.floating)].includes(te)||((ft=ge.context)==null?void 0:ft.elements.domReference)===te})));if(l&&xe&&$t(Ze(q))===Ze(q).body){qe(q)&&q.focus();let ge=F.current,We=B(),Pe=We[ge]||We[We.length-1]||q;qe(Pe)&&Pe.focus()}(O||!s)&&te&&xe&&!D.current&&te!==Ww()&&(j.current=!0,h(!1,ee,"focus-out"))})}if(w&&qe(_))return _.addEventListener("focusout",ne),_.addEventListener("pointerdown",K),w.addEventListener("focusout",ne),()=>{_.removeEventListener("focusout",ne),_.removeEventListener("pointerdown",K),w.removeEventListener("focusout",ne)}},[n,_,w,q,s,N,k,h,d,l,B,O,y]);let X=E.useRef(null),he=E.useRef(null),le=_c([X,k?.beforeInsideRef]),Te=_c([he,k?.afterInsideRef]);E.useEffect(()=>{var K;if(n||!w)return;let ne=Array.from((k==null||(K=k.portalNode)==null?void 0:K.querySelectorAll("["+Ei("portal")+"]"))||[]),ee=N&&!s?Lw(N?.nodesRef.current,y()).map(xe=>{var ge;return(ge=xe.context)==null?void 0:ge.elements.floating}):[],te=[w,...ne,...ee,I.current,W.current,X.current,he.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,C.current.includes("reference")||O?_:null].filter(xe=>xe!=null),_e=s||O?Nw(te,!R,R):Nw(te);return()=>{_e()}},[n,_,w,s,C,k,O,T,R,N,y]),pe(()=>{if(n||!qe(q))return;let K=Ze(q),ne=$t(K);queueMicrotask(()=>{let ee=$(q),te=M.current,_e=(typeof te=="number"?ee[te]:te.current)||q,xe=Ne(q,ne);!x&&!xe&&f&&wi(_e,{preventScroll:_e===q})})},[n,f,q,x,$,M]),pe(()=>{if(n||!q)return;let K=!1,ne=Ze(q),ee=$t(ne),_e=g.current.openEvent;Qh(ee);function xe(Pe){let{open:ft,reason:re,event:fe,nested:J}=Pe;ft&&(_e=fe),re==="escape-key"&&_&&Qh(_),["hover","safe-polygon"].includes(re)&&fe.type==="mouseleave"&&(j.current=!0),re==="outside-press"&&(J?(j.current=!1,K=!0):j.current=!(Fh(fe)||Zs(fe)))}m.on("openchange",xe);let ge=ne.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,xc),z&&_&&_.insertAdjacentElement("afterend",ge);function We(){return typeof P.current=="boolean"?Ww()||ge:P.current.current||ge}return()=>{m.off("openchange",xe);let Pe=$t(ne),ft=Ne(w,Pe)||N&&Oi(N.nodesRef.current,y()).some(J=>{var ie;return Ne((ie=J.context)==null?void 0:ie.elements.floating,Pe)});(ft||_e&&["click","mousedown"].includes(_e.type))&&_&&Qh(_);let fe=We();queueMicrotask(()=>{let J=FI(fe);P.current&&!j.current&&qe(J)&&(!(J!==Pe&&Pe!==ne.body)||ft)&&J.focus({preventScroll:K}),ge.remove()})}},[n,w,q,P,g,m,N,z,_,y]),E.useEffect(()=>{queueMicrotask(()=>{j.current=!1})},[n]),pe(()=>{if(!n&&k)return k.setFocusManagerState({modal:s,closeOnFocusOut:d,open:f,onOpenChange:h,domReference:_}),()=>{k.setFocusManagerState(null)}},[n,k,s,f,h,d,_]),pe(()=>{if(n||!q||typeof MutationObserver!="function"||x)return;let K=()=>{let ee=q.getAttribute("tabindex"),te=B(),_e=$t(Ze(w)),xe=te.indexOf(_e);xe!==-1&&(F.current=xe),C.current.includes("floating")||_e!==_&&te.length===0?ee!=="0"&&q.setAttribute("tabindex","0"):ee!=="-1"&&q.setAttribute("tabindex","-1")};K();let ne=new MutationObserver(K);return ne.observe(q,{childList:!0,subtree:!0,attributes:!0}),()=>{ne.disconnect()}},[n,w,q,_,C,B,x]);function Ae(K){return n||!c||!s?null:(0,Ee.jsx)(LI,{ref:K==="start"?I:W,onClick:ne=>h(!1,ne.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let ae=!n&&T&&(s?!O:!0)&&(z||s);return(0,Ee.jsxs)(Ee.Fragment,{children:[ae&&(0,Ee.jsx)(yc,{"data-type":"inside",ref:le,onFocus:K=>{if(s){let ee=$();wi(i[0]==="reference"?ee[0]:ee[ee.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(j.current=!1,nu(K,k.portalNode)){let ee=w1()||_;ee?.focus()}else{var ne;(ne=k.beforeOutsideRef.current)==null||ne.focus()}}}),!O&&Ae("start"),r,Ae("end"),ae&&(0,Ee.jsx)(yc,{"data-type":"inside",ref:Te,onFocus:K=>{if(s)wi($()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(d&&(j.current=!0),nu(K,k.portalNode)){let ee=x1()||_;ee?.focus()}else{var ne;(ne=k.afterOutsideRef.current)==null||ne.focus()}}})]})}function DI(){let e=/iP(hone|ad|od)|iOS/.test(Ks()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,a=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",i&&(t[n]=i+"px"),e){var u,l;let s=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,c=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(c))+"px",left:-(o-Math.floor(s))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,a))}}function Vw(e){return qe(e.target)&&e.target.tagName==="BUTTON"}function Gw(e){return Xs(e)}function BI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:l=!0,ignoreMouse:s=!1,keyboardHandlers:c=!0,stickIfOpen:d=!0}=t,p=E.useRef(),f=E.useRef(!1),h=E.useMemo(()=>({onPointerDown(m){p.current=m.pointerType},onMouseDown(m){let g=p.current;m.button===0&&u!=="click"&&(bi(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="mousedown")?n(!1,m.nativeEvent,"click"):(m.preventDefault(),n(!0,m.nativeEvent,"click"))))},onClick(m){let g=p.current;if(u==="mousedown"&&p.current){p.current=void 0;return}bi(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="click")?n(!1,m.nativeEvent,"click"):n(!0,m.nativeEvent,"click"))},onKeyDown(m){p.current=void 0,!(m.defaultPrevented||!c||Vw(m))&&(m.key===" "&&!Gw(o)&&(m.preventDefault(),f.current=!0),m.key==="Enter"&&n(!(r&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!c||Vw(m)||Gw(o)||m.key===" "&&f.current&&(f.current=!1,n(!(r&&l),m.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,d,l]);return E.useMemo(()=>a?{reference:h}:{},[a,h])}function UI(e,t){let r=null,n=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var o;let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",c=a.width,d=a.height,p=a.x,f=a.y;return r==null&&t.x&&u&&(r=a.x-t.x),n==null&&t.y&&l&&(n=a.y-t.y),p-=r||0,f-=n||0,c=0,d=0,!i||s?(c=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=u&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):i&&!s&&(d=t.axis==="x"?a.height:d,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:d,x:p,y:f,top:f,right:p+c,bottom:f+d,left:p}}}}function $w(e){return e!=null&&e.clientX!=null}function WI(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:l="both",x:s=null,y:c=null}=t,d=E.useRef(!1),p=E.useRef(null),[f,h]=E.useState(),[m,g]=E.useState([]),_=Ie((A,T)=>{d.current||n.current.openEvent&&!$w(n.current.openEvent)||a.setPositionReference(UI(o,{x:A,y:T,axis:l,dataRef:n,pointerType:f}))}),w=Ie(A=>{s!=null||c!=null||(r?p.current||g([]):_(A.clientX,A.clientY))}),y=bi(f)?i:r,x=E.useCallback(()=>{if(!y||!u||s!=null||c!=null)return;let A=rt(i);function T(R){let C=lr(R);Ne(i,C)?(A.removeEventListener("mousemove",T),p.current=null):_(R.clientX,R.clientY)}if(!n.current.openEvent||$w(n.current.openEvent)){A.addEventListener("mousemove",T);let R=()=>{A.removeEventListener("mousemove",T),p.current=null};return p.current=R,R}a.setPositionReference(o)},[y,u,s,c,i,n,a,o,_]);E.useEffect(()=>x(),[x,m]),E.useEffect(()=>{u&&!i&&(d.current=!1)},[u,i]),E.useEffect(()=>{!u&&r&&(d.current=!0)},[u,r]),pe(()=>{u&&(s!=null||c!=null)&&(d.current=!1,_(s,c))},[u,s,c,_]);let O=E.useMemo(()=>{function A(T){let{pointerType:R}=T;h(R)}return{onPointerDown:A,onPointerEnter:A,onMouseMove:w,onMouseEnter:w}},[w]);return E.useMemo(()=>u?{reference:O}:{},[u,O])}function GI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:l=!0,outsidePressEvent:s="pointerdown",referencePress:c=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,m=Ti(),g=Ie(typeof l=="function"?l:()=>!1),_=typeof l=="function"?g:l,w=E.useRef(!1),y=E.useRef(!1),{escapeKey:x,outsidePress:O}=Kw(f),{escapeKey:A,outsidePress:T}=Kw(h),R=E.useRef(!1),C=Ie(W=>{var j;if(!r||!a||!u||W.key!=="Escape"||R.current)return;let D=(j=o.current.floatingContext)==null?void 0:j.nodeId,F=m?Oi(m.nodesRef.current,D):[];if(!x&&(W.stopPropagation(),F.length>0)){let z=!0;if(F.forEach(q=>{var B;if((B=q.context)!=null&&B.open&&!q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}n(!1,M0(W)?W.nativeEvent:W,"escape-key")}),M=Ie(W=>{var j;let D=()=>{var F;C(W),(F=lr(W))==null||F.removeEventListener("keydown",D)};(j=lr(W))==null||j.addEventListener("keydown",D)}),P=Ie(W=>{var j;let D=w.current;w.current=!1;let F=y.current;if(y.current=!1,s==="click"&&F||D||typeof _=="function"&&!_(W))return;let z=lr(W),q="["+Ei("inert")+"]",B=Ze(i.floating).querySelectorAll(q),$=ye(z)?z:null;for(;$&&!cr($);){let Te=ur($);if(cr(Te)||!ye(Te))break;$=Te}if(B.length&&ye(z)&&!C0(z)&&!Ne(z,i.floating)&&Array.from(B).every(Te=>!Ne($,Te)))return;if(qe(z)&&I){let Te=cr(z),Ae=bt(z),ae=/auto|scroll/,K=Te||ae.test(Ae.overflowX),ne=Te||ae.test(Ae.overflowY),ee=K&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,te=ne&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,_e=Ae.direction==="rtl",xe=te&&(_e?W.offsetX<=z.offsetWidth-z.clientWidth:W.offsetX>z.clientWidth),ge=ee&&W.offsetY>z.clientHeight;if(xe||ge)return}let X=(j=o.current.floatingContext)==null?void 0:j.nodeId,he=m&&Oi(m.nodesRef.current,X).some(Te=>{var Ae;return Js(W,(Ae=Te.context)==null?void 0:Ae.elements.floating)});if(Js(W,i.floating)||Js(W,i.domReference)||he)return;let le=m?Oi(m.nodesRef.current,X):[];if(le.length>0){let Te=!0;if(le.forEach(Ae=>{var ae;if((ae=Ae.context)!=null&&ae.open&&!Ae.context.dataRef.current.__outsidePressBubbles){Te=!1;return}}),!Te)return}n(!1,W,"outside-press")}),N=Ie(W=>{var j;let D=()=>{var F;P(W),(F=lr(W))==null||F.removeEventListener(s,D)};(j=lr(W))==null||j.addEventListener(s,D)});E.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=x,o.current.__outsidePressBubbles=O;let W=-1;function j(B){n(!1,B,"ancestor-scroll")}function D(){window.clearTimeout(W),R.current=!0}function F(){W=window.setTimeout(()=>{R.current=!1},ho()?5:0)}let z=Ze(i.floating);u&&(z.addEventListener("keydown",A?M:C,A),z.addEventListener("compositionstart",D),z.addEventListener("compositionend",F)),_&&z.addEventListener(s,T?N:P,T);let q=[];return p&&(ye(i.domReference)&&(q=Tt(i.domReference)),ye(i.floating)&&(q=q.concat(Tt(i.floating))),!ye(i.reference)&&i.reference&&i.reference.contextElement&&(q=q.concat(Tt(i.reference.contextElement)))),q=q.filter(B=>{var $;return B!==(($=z.defaultView)==null?void 0:$.visualViewport)}),q.forEach(B=>{B.addEventListener("scroll",j,{passive:!0})}),()=>{u&&(z.removeEventListener("keydown",A?M:C,A),z.removeEventListener("compositionstart",D),z.removeEventListener("compositionend",F)),_&&z.removeEventListener(s,T?N:P,T),q.forEach(B=>{B.removeEventListener("scroll",j)}),window.clearTimeout(W)}},[o,i,u,_,s,r,n,p,a,x,O,C,A,M,P,T,N]),E.useEffect(()=>{w.current=!1},[_,s]);let k=E.useMemo(()=>({onKeyDown:C,...c&&{[HI[d]]:W=>{n(!1,W.nativeEvent,"reference-press")},...d!=="click"&&{onClick(W){n(!1,W.nativeEvent,"reference-press")}}}}),[C,n,c,d]),I=E.useMemo(()=>({onKeyDown:C,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[VI[s]]:()=>{w.current=!0}}),[C,s]);return E.useMemo(()=>a?{reference:k,floating:I}:{},[a,k,I])}function A1(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=So(),o=E.useRef({}),[a]=E.useState(()=>h1()),u=Ai()!=null,[l,s]=E.useState(n.reference),c=Ie((f,h,m)=>{o.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:m,nested:u}),r?.(f,h,m)}),d=E.useMemo(()=>({setPositionReference:s}),[]),p=E.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return E.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:p,events:a,floatingId:i,refs:d}),[t,c,p,a,i,d])}function $I(e){e===void 0&&(e={});let{nodeId:t}=e,r=A1({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=E.useState(null),[u,l]=E.useState(null),c=i?.domReference||o,d=E.useRef(null),p=Ti();pe(()=>{c&&(d.current=c)},[c]);let f=Ow({...e,elements:{...i,...u&&{reference:u}}}),h=E.useCallback(y=>{let x=ye(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),contextElement:y}:y;l(x),f.refs.setReference(x)},[f.refs]),m=E.useCallback(y=>{(ye(y)||y===null)&&(d.current=y,a(y)),(ye(f.refs.reference.current)||f.refs.reference.current===null||y!==null&&!ye(y))&&f.refs.setReference(y)},[f.refs]),g=E.useMemo(()=>({...f.refs,setReference:m,setPositionReference:h,domReference:d}),[f.refs,m,h]),_=E.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),w=E.useMemo(()=>({...f,...n,refs:g,elements:_,nodeId:t}),[f,g,_,t,n]);return pe(()=>{n.dataRef.current.floatingContext=w;let y=p?.nodesRef.current.find(x=>x.id===t);y&&(y.context=w)}),E.useMemo(()=>({...f,context:w,refs:g,elements:_}),[f,g,_,w])}function KI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:l=!0}=t,s=E.useRef(!1),c=E.useRef(),d=E.useRef(!0);E.useEffect(()=>{if(!u)return;let f=rt(a.domReference);function h(){!r&&qe(a.domReference)&&a.domReference===$t(Ze(a.domReference))&&(s.current=!0)}function m(){d.current=!0}return f.addEventListener("blur",h),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",h),f.removeEventListener("keydown",m,!0)}},[a.domReference,r,u]),E.useEffect(()=>{if(!u)return;function f(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(s.current=!0)}return i.on("openchange",f),()=>{i.off("openchange",f)}},[i,u]),E.useEffect(()=>()=>{clearTimeout(c.current)},[]);let p=E.useMemo(()=>({onPointerDown(f){Zs(f.nativeEvent)||(d.current=!1)},onMouseLeave(){s.current=!1},onFocus(f){if(s.current)return;let h=lr(f.nativeEvent);if(l&&ye(h))try{if(Lh()&&R0())throw Error();if(!h.matches(":focus-visible"))return}catch{if(!d.current&&!Xs(h))return}n(!0,f.nativeEvent,"focus")},onBlur(f){s.current=!1;let h=f.relatedTarget,m=f.nativeEvent,g=ye(h)&&h.hasAttribute(Ei("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var _;let w=$t(a.domReference?a.domReference.ownerDocument:document);!h&&w===a.domReference||Ne((_=o.current.floatingContext)==null?void 0:_.refs.floating.current,w)||Ne(a.domReference,w)||g||n(!1,m,"focus")})}}),[o,a.domReference,n,l]);return E.useMemo(()=>u?{reference:p}:{},[u,p])}function em(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[Yw]:a,[Zw]:u,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[om]:""},...o,...t.map(a=>{let u=a?a[r]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((a,u)=>(u&&Object.entries(u).forEach(l=>{let[s,c]=l;if(!(i&&[Yw,Zw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var d;(d=n.get(s))==null||d.push(c),a[s]=function(){for(var p,f=arguments.length,h=new Array(f),m=0;m<f;m++)h[m]=arguments[m];return(p=n.get(s))==null?void 0:p.map(g=>g(...h)).find(g=>g!==void 0)}}}else a[s]=c}),a),{})}}function YI(e){e===void 0&&(e=[]);let t=e.map(u=>u?.reference),r=e.map(u=>u?.floating),n=e.map(u=>u?.item),i=E.useCallback(u=>em(u,e,"reference"),t),o=E.useCallback(u=>em(u,e,"floating"),r),a=E.useCallback(u=>em(u,e,"item"),n);return E.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function Sc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function tm(e,t){return Sc(t,e===wo||e===en,e===dr||e===pr)}function rm(e,t,r){return Sc(t,e===en,r?e===dr:e===pr)||e==="Enter"||e===" "||e===""}function Jw(e,t,r){return Sc(t,r?e===dr:e===pr,e===en)}function Xw(e,t,r,n){let i=r?e===pr:e===dr,o=e===wo;return t==="both"||t==="horizontal"&&n&&n>1?e===ZI:Sc(t,i,o)}function JI(e,t){let{open:r,onOpenChange:n,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:u=()=>{},enabled:l=!0,selectedIndex:s=null,allowEscape:c=!1,loop:d=!1,nested:p=!1,rtl:f=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:_=!0,disabledIndices:w=void 0,orientation:y="vertical",cols:x=1,scrollItemIntoView:O=!0,virtualItemRef:A,itemSizes:T,dense:R=!1}=t,C=am(i.floating),M=it(C),P=Ai(),N=Ti();pe(()=>{e.dataRef.current.orientation=y},[e,y]);let k=Ie(()=>{u(j.current===-1?null:j.current)}),I=Nh(i.domReference),W=E.useRef(m),j=E.useRef(s??-1),D=E.useRef(null),F=E.useRef(!0),z=E.useRef(k),q=E.useRef(!!i.floating),B=E.useRef(r),$=E.useRef(!1),X=E.useRef(!1),he=it(w),le=it(r),Te=it(O),Ae=it(s),[ae,K]=E.useState(),[ne,ee]=E.useState(),te=Ie(()=>{function re(ie){h?(K(ie.id),N?.events.emit("virtualfocus",ie),A&&(A.current=ie)):wi(ie,{sync:$.current,preventScroll:!0})}let fe=o.current[j.current];fe&&re(fe),($.current?ie=>ie():requestAnimationFrame)(()=>{let ie=o.current[j.current]||fe;if(!ie)return;fe||re(ie);let $e=Te.current;$e&&xe&&(X.current||!F.current)&&(ie.scrollIntoView==null||ie.scrollIntoView(typeof $e=="boolean"?{block:"nearest",inline:"nearest"}:$e))})});pe(()=>{l&&(r&&i.floating?W.current&&s!=null&&(X.current=!0,j.current=s,k()):q.current&&(j.current=-1,z.current()))},[l,r,i.floating,s,k]),pe(()=>{if(l&&r&&i.floating)if(a==null){if($.current=!1,Ae.current!=null)return;if(q.current&&(j.current=-1,te()),(!B.current||!q.current)&&W.current&&(D.current!=null||W.current===!0&&D.current==null)){let re=0,fe=()=>{o.current[0]==null?(re<2&&(re?requestAnimationFrame:queueMicrotask)(fe),re++):(j.current=D.current==null||rm(D.current,y,f)||p?bc(o,he.current):nm(o,he.current),D.current=null,k())};fe()}}else _o(o,a)||(j.current=a,te(),X.current=!1)},[l,r,i.floating,a,Ae,p,o,y,f,k,te,he]),pe(()=>{var re;if(!l||i.floating||!N||h||!q.current)return;let fe=N.nodesRef.current,J=(re=fe.find(ze=>ze.id===P))==null||(re=re.context)==null?void 0:re.elements.floating,ie=$t(Ze(i.floating)),$e=fe.some(ze=>ze.context&&Ne(ze.context.elements.floating,ie));J&&!$e&&F.current&&J.focus({preventScroll:!0})},[l,i.floating,N,P,h]),pe(()=>{if(!l||!N||!h||P)return;function re(fe){ee(fe.id),A&&(A.current=fe)}return N.events.on("virtualfocus",re),()=>{N.events.off("virtualfocus",re)}},[l,N,h,P,A]),pe(()=>{z.current=k,B.current=r,q.current=!!i.floating}),pe(()=>{r||(D.current=null)},[r]);let _e=a!=null,xe=E.useMemo(()=>{function re(J){if(!r)return;let ie=o.current.indexOf(J);ie!==-1&&j.current!==ie&&(j.current=ie,k())}return{onFocus(J){let{currentTarget:ie}=J;$.current=!0,re(ie)},onClick:J=>{let{currentTarget:ie}=J;return ie.focus({preventScroll:!0})},...g&&{onMouseMove(J){let{currentTarget:ie}=J;$.current=!0,X.current=!1,re(ie)},onPointerLeave(J){let{pointerType:ie}=J;if(!(!F.current||ie==="touch")&&($.current=!0,j.current=-1,k(),!h)){var $e;($e=M.current)==null||$e.focus({preventScroll:!0})}}}}},[r,M,g,o,k,h]),ge=Ie(re=>{if(F.current=!1,$.current=!0,re.which===229||!le.current&&re.currentTarget===M.current)return;if(p&&Xw(re.key,y,f,x)){Je(re),n(!1,re.nativeEvent,"list-navigation"),qe(i.domReference)&&(h?N?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let fe=j.current,J=bc(o,w),ie=nm(o,w);if(I||(re.key==="Home"&&(Je(re),j.current=J,k()),re.key==="End"&&(Je(re),j.current=ie,k())),x>1){let $e=T||Array.from({length:o.current.length},()=>({width:1,height:1})),ze=i1($e,x,R),wr=ze.findIndex(St=>St!=null&&!Si(o.current,St,w)),tr=ze.reduce((St,rr,Vr)=>rr!=null&&!Si(o.current,rr,w)?Vr:St,-1),fn=ze[n1({current:ze.map(St=>St!=null?o.current[St]:null)},{event:re,orientation:y,loop:d,rtl:f,cols:x,disabledIndices:a1([...w||o.current.map((St,rr)=>Si(o.current,rr)?rr:void 0),void 0],ze),minIndex:wr,maxIndex:tr,prevIndex:o1(j.current>ie?J:j.current,$e,ze,x,re.key===en?"bl":re.key===(f?dr:pr)?"tr":"tl"),stopEvent:!0})];if(fn!=null&&(j.current=fn,k()),y==="both")return}if(tm(re.key,y)){if(Je(re),r&&!h&&$t(re.currentTarget.ownerDocument)===re.currentTarget){j.current=rm(re.key,y,f)?J:ie,k();return}rm(re.key,y,f)?d?j.current=fe>=ie?c&&fe!==o.current.length?-1:J:nt(o,{startingIndex:fe,disabledIndices:w}):j.current=Math.min(ie,nt(o,{startingIndex:fe,disabledIndices:w})):d?j.current=fe<=J?c&&fe!==-1?o.current.length:ie:nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w}):j.current=Math.max(J,nt(o,{startingIndex:fe,decrement:!0,disabledIndices:w})),_o(o,j.current)&&(j.current=-1),k()}}),We=E.useMemo(()=>h&&r&&_e&&{"aria-activedescendant":ne||ae},[h,r,_e,ne,ae]),Pe=E.useMemo(()=>({"aria-orientation":y==="both"?void 0:y,...I?{}:We,onKeyDown:ge,onPointerMove(){F.current=!0}}),[We,ge,y,I]),ft=E.useMemo(()=>{function re(J){m==="auto"&&Fh(J.nativeEvent)&&(W.current=!0)}function fe(J){W.current=m,m==="auto"&&Zs(J.nativeEvent)&&(W.current=!0)}return{...We,onKeyDown(J){var ie;F.current=!1;let $e=J.key.startsWith("Arrow"),ze=["Home","End"].includes(J.key),wr=$e||ze,tr=N==null||(ie=N.nodesRef.current.find(jt=>jt.id===P))==null||(ie=ie.context)==null||(ie=ie.dataRef)==null?void 0:ie.current.orientation,fn=Jw(J.key,y,f),St=Xw(J.key,y,f,x),rr=Jw(J.key,tr,f),Vr=tm(J.key,y),ss=(p?rr:Vr)||J.key==="Enter"||J.key.trim()==="";if(h&&r){let jt=N?.nodesRef.current.find(dn=>dn.parentId==null),zt=N&&jt?RI(N.nodesRef.current,jt.id):null;if(wr&&zt&&A){let dn=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(fn||St){var ni,ii;let sp=((ni=zt.context)==null?void 0:ni.elements.domReference)===J.currentTarget,oi=St&&!sp?(ii=zt.context)==null?void 0:ii.elements.domReference:fn?o.current.find(ai=>ai?.id===ae):null;oi&&(Je(J),oi.dispatchEvent(dn),ee(void 0))}if((Vr||ze)&&zt.context&&zt.context.open&&zt.parentId&&J.currentTarget!==zt.context.elements.domReference){var Dt;Je(J),(Dt=zt.context.elements.domReference)==null||Dt.dispatchEvent(dn);return}}return ge(J)}if(!(!r&&!_&&$e)){if(ss){let jt=tm(J.key,tr);D.current=p&&jt?null:J.key}if(p){rr&&(Je(J),r?(j.current=bc(o,he.current),k()):n(!0,J.nativeEvent,"list-navigation"));return}Vr&&(s!=null&&(j.current=s),Je(J),!r&&_?n(!0,J.nativeEvent,"list-navigation"):ge(J),r&&k())}},onFocus(){r&&!h&&(j.current=-1,k())},onPointerDown:fe,onPointerEnter:fe,onMouseDown:re,onClick:re}},[ae,We,x,ge,he,m,o,p,k,n,r,_,y,P,f,s,N,h,A]);return E.useMemo(()=>l?{reference:ft,floating:Pe,item:xe}:{},[l,ft,Pe,xe])}function QI(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,u=(r=XI.get(a))!=null?r:a,l=So(),c=Ai()!=null,d=E.useMemo(()=>u==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?i:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":u==="alertdialog"?"dialog":u,"aria-controls":n?i:void 0,...u==="listbox"&&{role:"combobox"},...u==="menu"&&{id:l},...u==="menu"&&c&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[u,i,c,n,l,a]),p=E.useMemo(()=>{let h={id:i,...u&&{role:u}};return u==="tooltip"||a==="label"?h:{...h,...u==="menu"&&{"aria-labelledby":l}}},[u,i,l,a]),f=E.useCallback(h=>{let{active:m,selected:g}=h,_={role:"option",...m&&{id:i+"-option"}};switch(a){case"select":return{..._,"aria-selected":m&&g};case"combobox":return{..._,...m&&{"aria-selected":!0}}}return{}},[i,a]);return E.useMemo(()=>o?{reference:d,floating:p,item:f}:{},[o,d,p,f])}function go(e,t){return typeof e=="function"?e(t):e}function ej(e,t){let[r,n]=E.useState(e);return e&&!r&&n(!0),E.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function T1(e,t){t===void 0&&(t={});let{open:r,elements:{floating:n}}=e,{duration:i=250}=t,a=(typeof i=="number"?i:i.close)||0,[u,l]=E.useState("unmounted"),s=ej(r,a);return!s&&u==="close"&&l("unmounted"),pe(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:s,status:u}}function tj(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,l=u.split("-")[0],s=E.useMemo(()=>({side:l,placement:u}),[l,u]),c=typeof a=="number",d=(c?a:a.open)||0,p=(c?a:a.close)||0,[f,h]=E.useState(()=>({...go(o,s),...go(r,s)})),{isMounted:m,status:g}=T1(e,{duration:a}),_=it(r),w=it(n),y=it(i),x=it(o);return pe(()=>{let O=go(_.current,s),A=go(y.current,s),T=go(x.current,s),R=go(w.current,s)||Object.keys(O).reduce((C,M)=>(C[M]="",C),{});if(g==="initial"&&h(C=>({transitionProperty:C.transitionProperty,...T,...O})),g==="open"&&h({transitionProperty:Object.keys(R).map(Qw).join(","),transitionDuration:d+"ms",...T,...R}),g==="close"){let C=A||O;h({transitionProperty:Object.keys(C).map(Qw).join(","),transitionDuration:p+"ms",...T,...C})}},[p,y,_,w,x,d,g,s]),{isMounted:m,styles:f}}function rj(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:l,enabled:s=!0,findMatch:c=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=E.useRef(),m=E.useRef(""),g=E.useRef((r=f??a)!=null?r:-1),_=E.useRef(null),w=Ie(u),y=Ie(l),x=it(c),O=it(p);pe(()=>{n&&(clearTimeout(h.current),_.current=null,m.current="")},[n]),pe(()=>{if(n&&m.current===""){var M;g.current=(M=f??a)!=null?M:-1}},[n,f,a]);let A=Ie(M=>{M?i.current.typing||(i.current.typing=M,y(M)):i.current.typing&&(i.current.typing=M,y(M))}),T=Ie(M=>{function P(j,D,F){let z=x.current?x.current(D,F):D.find(q=>q?.toLocaleLowerCase().indexOf(F.toLocaleLowerCase())===0);return z?j.indexOf(z):-1}let N=o.current;if(m.current.length>0&&m.current[0]!==" "&&(P(N,N,m.current)===-1?A(!1):M.key===" "&&Je(M)),N==null||O.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(Je(M),A(!0)),N.every(j=>{var D,F;return j?((D=j[0])==null?void 0:D.toLocaleLowerCase())!==((F=j[1])==null?void 0:F.toLocaleLowerCase()):!0})&&m.current===M.key&&(m.current="",g.current=_.current),m.current+=M.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",g.current=_.current,A(!1)},d);let I=g.current,W=P(N,[...N.slice((I||0)+1),...N.slice(0,(I||0)+1)],m.current);W!==-1?(w(W),_.current=W):M.key!==" "&&(m.current="",A(!1))}),R=E.useMemo(()=>({onKeyDown:T}),[T]),C=E.useMemo(()=>({onKeyDown:T,onKeyUp(M){M.key===" "&&A(!1)}}),[T,A]);return E.useMemo(()=>s?{reference:R,floating:C}:{},[s,R,C])}function e1(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function ij(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,l=Ie(u),s=E.useRef(!1),c=E.useRef(null),d=E.useRef(null);E.useEffect(()=>{if(!i)return;function f(m){if(m.ctrlKey||!h||o.current==null)return;let g=m.deltaY,_=o.current.top>=-.5,w=o.current.bottom>=-.5,y=h.scrollHeight-h.clientHeight,x=g<0?-1:1,O=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&g>0||!w&&g<0?(m.preventDefault(),yo.flushSync(()=>{l(A=>A+Math[O](g,y*x))})):/firefox/i.test(Ys())&&(h.scrollTop+=g))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{c.current=null,d.current=null,h.removeEventListener("wheel",f)}},[i,r,n.floating,o,a,l]);let p=E.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let f=a?.current||n.floating;if(!(!o.current||!f||!s.current)){if(c.current!==null){let h=f.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&yo.flushSync(()=>l(m=>m+h))}requestAnimationFrame(()=>{c.current=f.scrollTop})}}}),[n.floating,l,o,a]);return E.useMemo(()=>i?{floating:p}:{},[i,p])}function t1(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[l,s]=t[a]||[0,0],[c,d]=t[u]||[0,0];s>=n!=d>=n&&r<=(c-l)*(n-s)/(d-s)+l&&(i=!i)}return i}function oj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function aj(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i,o=!1,a=null,u=null,l=performance.now();function s(d,p){let f=performance.now(),h=f-l;if(a===null||u===null||h===0)return a=d,u=p,l=f,null;let m=d-a,g=p-u,w=Math.sqrt(m*m+g*g)/h;return a=d,u=p,l=f,w}let c=d=>{let{x:p,y:f,placement:h,elements:m,onClose:g,nodeId:_,tree:w}=d;return function(x){function O(){clearTimeout(i),g()}if(clearTimeout(i),!m.domReference||!m.floating||h==null||p==null||f==null)return;let{clientX:A,clientY:T}=x,R=[A,T],C=lr(x),M=x.type==="mouseleave",P=Ne(m.floating,C),N=Ne(m.domReference,C),k=m.domReference.getBoundingClientRect(),I=m.floating.getBoundingClientRect(),W=h.split("-")[0],j=p>I.right-I.width/2,D=f>I.bottom-I.height/2,F=oj(R,k),z=I.width>k.width,q=I.height>k.height,B=(z?k:I).left,$=(z?k:I).right,X=(q?k:I).top,he=(q?k:I).bottom;if(P&&(o=!0,!M))return;if(N&&(o=!1),N&&!M){o=!0;return}if(M&&ye(x.relatedTarget)&&Ne(m.floating,x.relatedTarget)||w&&Oi(w.nodesRef.current,_).some(Ae=>{let{context:ae}=Ae;return ae?.open}))return;if(W==="top"&&f>=k.bottom-1||W==="bottom"&&f<=k.top+1||W==="left"&&p>=k.right-1||W==="right"&&p<=k.left+1)return O();let le=[];switch(W){case"top":le=[[B,k.top+1],[B,I.bottom-1],[$,I.bottom-1],[$,k.top+1]];break;case"bottom":le=[[B,I.top+1],[B,k.bottom-1],[$,k.bottom-1],[$,I.top+1]];break;case"left":le=[[I.right-1,he],[I.right-1,X],[k.left+1,X],[k.left+1,he]];break;case"right":le=[[k.right-1,he],[k.right-1,X],[I.left+1,X],[I.left+1,he]];break}function Te(Ae){let[ae,K]=Ae;switch(W){case"top":{let ne=[z?ae+t/2:j?ae+t*4:ae-t*4,K+t+1],ee=[z?ae-t/2:j?ae+t*4:ae-t*4,K+t+1],te=[[I.left,j||z?I.bottom-t:I.top],[I.right,j?z?I.bottom-t:I.top:I.bottom-t]];return[ne,ee,...te]}case"bottom":{let ne=[z?ae+t/2:j?ae+t*4:ae-t*4,K-t],ee=[z?ae-t/2:j?ae+t*4:ae-t*4,K-t],te=[[I.left,j||z?I.top+t:I.bottom],[I.right,j?z?I.top+t:I.bottom:I.top+t]];return[ne,ee,...te]}case"left":{let ne=[ae+t+1,q?K+t/2:D?K+t*4:K-t*4],ee=[ae+t+1,q?K-t/2:D?K+t*4:K-t*4];return[...[[D||q?I.right-t:I.left,I.top],[D?q?I.right-t:I.left:I.right-t,I.bottom]],ne,ee]}case"right":{let ne=[ae-t,q?K+t/2:D?K+t*4:K-t*4],ee=[ae-t,q?K-t/2:D?K+t*4:K-t*4],te=[[D||q?I.left+t:I.right,I.top],[D?q?I.left+t:I.right:I.left+t,I.bottom]];return[ne,ee,...te]}}}if(!t1([A,T],le)){if(o&&!F)return O();if(!M&&n){let Ae=s(x.clientX,x.clientY);if(Ae!==null&&Ae<.1)return O()}t1([A,T],Te([p,f]))?!o&&n&&(i=window.setTimeout(O,40)):O()}}};return c.__options={blockPointerEvents:r},c}var E,xo,Ee,yo,r1,hI,mI,wo,en,dr,pr,pe,u1,f1,d1,p1,Jh,bI,gI,qw,_I,Iw,wI,So,xI,m1,v1,Ai,Ti,jw,im,b1,g1,Fw,bo,hc,mc,Xh,MI,_1,CI,wc,xc,II,yc,S1,Bw,E1,om,Uw,xi,LI,vc,Hw,zI,HI,VI,Kw,Yw,Zw,ZI,XI,Qw,nj,R1=pt(()=>{E=V(Ye()),xo=V(Ye());k0();eu();Ee=V(Ka());Ja();U0();yo=V(uc());Zh();Zh();r1={...E},hI=r1.useInsertionEffect,mI=hI||(e=>e());wo="ArrowUp",en="ArrowDown",dr="ArrowLeft",pr="ArrowRight";pe=typeof document<"u"?xo.useLayoutEffect:xo.useEffect;u1=E.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});f1=E.createContext({activeIndex:0,onNavigate:()=>{}}),d1=[dr,pr],p1=[wo,en],Jh=[...d1,...p1],bI=E.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:l,activeIndex:s,onNavigate:c,itemSizes:d,dense:p=!1,...f}=t,[h,m]=E.useState(0),g=s??h,_=Ie(c??m),w=E.useRef([]),y=n&&typeof n!="function"?n.props:{},x=E.useMemo(()=>({activeIndex:g,onNavigate:_}),[g,_]),O=u>1;function A(R){if(!Jh.includes(R.key))return;let C=g,M=bc(w,l),P=nm(w,l),N=a?dr:pr,k=a?pr:dr;if(O){let F=d||Array.from({length:w.current.length},()=>({width:1,height:1})),z=i1(F,u,p),q=z.findIndex(X=>X!=null&&!Si(w.current,X,l)),B=z.reduce((X,he,le)=>he!=null&&!Si(w.current,he,l)?le:X,-1),$=z[n1({current:z.map(X=>X?w.current[X]:null)},{event:R,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:a1([...l||w.current.map((X,he)=>Si(w.current,he)?he:void 0),void 0],z),minIndex:q,maxIndex:B,prevIndex:o1(g>P?M:g,F,z,u,R.key===en?"bl":R.key===N?"tr":"tl")})];$!=null&&(C=$)}let I={horizontal:[N],vertical:[en],both:[N,en]}[i],W={horizontal:[k],vertical:[wo],both:[k,wo]}[i],j=O?Jh:{horizontal:d1,vertical:p1,both:Jh}[i];if(C===g&&[...I,...W].includes(R.key)&&(o&&C===P&&I.includes(R.key)?C=M:o&&C===M&&W.includes(R.key)?C=P:C=nt(w,{startingIndex:C,decrement:W.includes(R.key),disabledIndices:l})),C!==g&&!_o(w,C)){var D;R.stopPropagation(),j.includes(R.key)&&R.preventDefault(),_(C),(D=w.current[C])==null||D.focus()}}let T={...f,...y,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(R){f.onKeyDown==null||f.onKeyDown(R),y.onKeyDown==null||y.onKeyDown(R),A(R)}};return(0,Ee.jsx)(f1.Provider,{value:x,children:(0,Ee.jsx)(s1,{elementsRef:w,children:l1(n,T)})})}),gI=E.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=E.useContext(f1),{ref:l,index:s}=c1(),c=_c([l,r,o.ref]),d=a===s,p={...i,...o,ref:c,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(f){i.onFocus==null||i.onFocus(f),o.onFocus==null||o.onFocus(f),u(s)}};return l1(n,p)}),qw=!1,_I=0,Iw=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_I++;wI=r1.useId,So=wI||yI,xI=E.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:l=7,tipRadius:s=0,strokeWidth:c=0,staticOffset:d,stroke:p,d:f,style:{transform:h,...m}={},...g}=t,_=So(),[w,y]=E.useState(!1);if(pe(()=>{if(!i)return;bt(i).direction==="rtl"&&y(!0)},[i]),!i)return null;let[x,O]=n.split("-"),A=x==="top"||x==="bottom",T=d;(A&&a!=null&&a.x||!A&&a!=null&&a.y)&&(T=null);let R=c*2,C=R/2,M=u/2*(s/-8+1),P=l/2*s/4,N=!!f,k=T&&O==="end"?"bottom":"top",I=T&&O==="end"?"right":"left";T&&w&&(I=O==="end"?"left":"right");let W=o?.x!=null?T||o.x:"",j=o?.y!=null?T||o.y:"",D=f||"M0,0"+(" H"+u)+(" L"+(u-M)+","+(l-P))+(" Q"+u/2+","+l+" "+M+","+(l-P))+" Z",F={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Ee.jsxs)("svg",{...g,"aria-hidden":!0,ref:r,width:N?u:u+R,height:u,viewBox:"0 0 "+u+" "+(l>u?l:u),style:{position:"absolute",pointerEvents:"none",[I]:W,[k]:j,[x]:A||N?"100%":"calc(100% - "+R/2+"px)",transform:[F,h].filter(z=>!!z).join(" "),...m},children:[R>0&&(0,Ee.jsx)("path",{clipPath:"url(#"+_+")",fill:"none",stroke:p,strokeWidth:R+(f?0:1),d:D}),(0,Ee.jsx)("path",{stroke:R&&!f?g.fill:"none",d:D}),(0,Ee.jsx)("clipPath",{id:_,children:(0,Ee.jsx)("rect",{x:-C,y:C*(N?-1:1),width:u+R,height:u})})]})});m1=E.createContext(null),v1=E.createContext(null),Ai=()=>{var e;return((e=E.useContext(m1))==null?void 0:e.id)||null},Ti=()=>E.useContext(v1);jw=Ei("safe-polygon");im=()=>{},b1=E.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:im,setState:im,isInstantPhase:!1}),g1=()=>E.useContext(b1);Fw=0;bo=new WeakMap,hc=new WeakSet,mc={},Xh=0,MI=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,_1=e=>e&&(e.host||_1(e.parentNode)),CI=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=_1(r);return e.contains(n)?n:null}).filter(r=>r!=null);wc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});xc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};yc=E.forwardRef(function(t,r){let[n,i]=E.useState();pe(()=>(Lh()&&i("button"),document.addEventListener("keydown",zw),()=>{document.removeEventListener("keydown",zw)}),[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Ei("focus-guard")]:"",style:xc};return(0,Ee.jsx)("span",{...t,...o})}),S1=E.createContext(null),Bw=Ei("portal");E1=()=>E.useContext(S1),om="data-floating-ui-focusable";Uw=20,xi=[];LI=E.forwardRef(function(t,r){return(0,Ee.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:xc})});vc=0;Hw=()=>{},zI=E.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return pe(()=>{if(n)return vc++,vc===1&&(Hw=DI()),()=>{vc--,vc===0&&Hw()}},[n]),(0,Ee.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});HI={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},VI={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Kw=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};Yw="active",Zw="selected";ZI="Escape";XI=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);Qw=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());nj=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:u=4,referenceOverflowThreshold:l=0,scrollRef:s,...c}=Pt(e,t),{rects:d,elements:{floating:p}}=t,f=r.current[a],h=s?.current||p,m=p.clientTop||h.clientTop,g=p.clientTop!==0,_=h.clientTop!==0,w=p===h;if(!f)return{};let y={...t,...await dc(-f.offsetTop-p.clientTop-d.reference.height/2-f.offsetHeight/2-o).fn(t)},x=await yi(e1(y,h.scrollHeight+m+p.clientTop),c),O=await yi(y,{...c,elementContext:"reference"}),A=De(0,x.top),T=y.y+A,M=(h.scrollHeight>h.clientHeight?P=>P:gi)(De(0,h.scrollHeight+(g&&w||_?m*2:0)-A-De(0,x.bottom)));if(h.style.maxHeight=M+"px",h.scrollTop=A,i){let P=h.offsetHeight<f.offsetHeight*gt(u,r.current.length)-1||O.top>=-l||O.bottom>=-l;yo.flushSync(()=>i(P))}return n&&(n.current=await yi(e1({...y,y:T},h.offsetHeight+m+p.clientTop),c)),{y:T}}})});var Oc=b((oQ,M1)=>{M1.exports=JBrowseExports["@mui/material"]});var iu=b((aQ,C1)=>{C1.exports=JBrowseExports["tss-react/mui"]});var q1=b(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.default=lj;var k1=Ka(),Ec=(R1(),vg(P1)),um=Oc(),uj=iu();function sj(e){return Math.round(e*1e5)/1e5}var cj=(0,uj.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,um.alpha)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.fontSize,lineHeight:`${sj(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function lj({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,um.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=cj(),{refs:l,floatingStyles:s,context:c}=(0,Ec.useFloating)({placement:r,strategy:"fixed",middleware:[(0,Ec.offset)(5)]}),d=(0,Ec.useClientPoint)(c,e),{getFloatingProps:p}=(0,Ec.useInteractions)([d]);return(0,k1.jsx)(um.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,k1.jsx)("div",{className:u.tooltip,ref:l.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...p(),children:t})})}});var Y1=b((sQ,K1)=>{"use strict";var{entries:W1,setPrototypeOf:I1,isFrozen:fj,getPrototypeOf:dj,getOwnPropertyDescriptor:pj}=Object,{freeze:yt,seal:Yt,create:H1}=Object,{apply:hm,construct:mm}=typeof Reflect<"u"&&Reflect;yt||(yt=function(t){return t});Yt||(Yt=function(t){return t});hm||(hm=function(t,r,n){return t.apply(r,n)});mm||(mm=function(t,r){return new t(...r)});var Ac=wt(Array.prototype.forEach),hj=wt(Array.prototype.lastIndexOf),j1=wt(Array.prototype.pop),ou=wt(Array.prototype.push),mj=wt(Array.prototype.splice),Pc=wt(String.prototype.toLowerCase),cm=wt(String.prototype.toString),F1=wt(String.prototype.match),au=wt(String.prototype.replace),vj=wt(String.prototype.indexOf),bj=wt(String.prototype.trim),hr=wt(Object.prototype.hasOwnProperty),_t=wt(RegExp.prototype.test),uu=gj(TypeError);function wt(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return hm(e,t,n)}}function gj(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mm(e,r)}}function ue(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pc;I1&&I1(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let o=r(i);o!==i&&(fj(t)||(t[n]=o),i=o)}e[i]=!0}return e}function _j(e){for(let t=0;t<e.length;t++)hr(e,t)||(e[t]=null);return e}function Pi(e){let t=H1(null);for(let[r,n]of W1(e))hr(e,r)&&(Array.isArray(n)?t[r]=_j(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=Pi(n):t[r]=n);return t}function su(e,t){for(;e!==null;){let n=pj(e,t);if(n){if(n.get)return wt(n.get);if(typeof n.value=="function")return wt(n.value)}e=dj(e)}function r(){return null}return r}var L1=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lm=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fm=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yj=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),dm=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),wj=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),N1=yt(["#text"]),D1=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),pm=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z1=yt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tc=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xj=Yt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Sj=Yt(/<%[\w\W]*|[\w\W]*%>/gm),Oj=Yt(/\$\{[\w\W]*/gm),Ej=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Aj=Yt(/^aria-[\-\w]+$/),V1=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tj=Yt(/^(?:\w+script|data):/i),Pj=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G1=Yt(/^html$/i),Rj=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),B1=Object.freeze({__proto__:null,ARIA_ATTR:Aj,ATTR_WHITESPACE:Pj,CUSTOM_ELEMENT:Rj,DATA_ATTR:Ej,DOCTYPE_NAME:G1,ERB_EXPR:Sj,IS_ALLOWED_URI:V1,IS_SCRIPT_OR_DATA:Tj,MUSTACHE_EXPR:xj,TMPLIT_EXPR:Oj}),cu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Mj=function(){return typeof window>"u"?null:window},Cj=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},U1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mj(),t=Q=>$1(Q);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==cu.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:u,Element:l,NodeFilter:s,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:p,trustedTypes:f}=e,h=l.prototype,m=su(h,"cloneNode"),g=su(h,"remove"),_=su(h,"nextSibling"),w=su(h,"childNodes"),y=su(h,"parentNode");if(typeof a=="function"){let Q=r.createElement("template");Q.content&&Q.content.ownerDocument&&(r=Q.content.ownerDocument)}let x,O="",{implementation:A,createNodeIterator:T,createDocumentFragment:R,getElementsByTagName:C}=r,{importNode:M}=n,P=U1();t.isSupported=typeof W1=="function"&&typeof y=="function"&&A&&A.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:k,TMPLIT_EXPR:I,DATA_ATTR:W,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:z}=B1,{IS_ALLOWED_URI:q}=B1,B=null,$=ue({},[...L1,...lm,...fm,...dm,...N1]),X=null,he=ue({},[...D1,...pm,...z1,...Tc]),le=Object.seal(H1(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Ae=null,ae=!0,K=!0,ne=!1,ee=!0,te=!1,_e=!0,xe=!1,ge=!1,We=!1,Pe=!1,ft=!1,re=!1,fe=!0,J=!1,ie="user-content-",$e=!0,ze=!1,wr={},tr=null,fn=ue({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),St=null,rr=ue({},["audio","video","img","source","image","track"]),Vr=null,ss=ue({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ni="http://www.w3.org/1998/Math/MathML",ii="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml",jt=Dt,zt=!1,dn=null,sp=ue({},[ni,ii,Dt],cm),oi=ue({},["mi","mo","mn","ms","mtext"]),ai=ue({},["annotation-xml"]),xM=ue({},["title","style","font","a","script"]),ga=null,SM=["application/xhtml+xml","text/html"],OM="text/html",Ke=null,Ki=null,EM=r.createElement("form"),ng=function(S){return S instanceof RegExp||S instanceof Function},cp=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ki&&Ki===S)){if((!S||typeof S!="object")&&(S={}),S=Pi(S),ga=SM.indexOf(S.PARSER_MEDIA_TYPE)===-1?OM:S.PARSER_MEDIA_TYPE,Ke=ga==="application/xhtml+xml"?cm:Pc,B=hr(S,"ALLOWED_TAGS")?ue({},S.ALLOWED_TAGS,Ke):$,X=hr(S,"ALLOWED_ATTR")?ue({},S.ALLOWED_ATTR,Ke):he,dn=hr(S,"ALLOWED_NAMESPACES")?ue({},S.ALLOWED_NAMESPACES,cm):sp,Vr=hr(S,"ADD_URI_SAFE_ATTR")?ue(Pi(ss),S.ADD_URI_SAFE_ATTR,Ke):ss,St=hr(S,"ADD_DATA_URI_TAGS")?ue(Pi(rr),S.ADD_DATA_URI_TAGS,Ke):rr,tr=hr(S,"FORBID_CONTENTS")?ue({},S.FORBID_CONTENTS,Ke):fn,Te=hr(S,"FORBID_TAGS")?ue({},S.FORBID_TAGS,Ke):{},Ae=hr(S,"FORBID_ATTR")?ue({},S.FORBID_ATTR,Ke):{},wr=hr(S,"USE_PROFILES")?S.USE_PROFILES:!1,ae=S.ALLOW_ARIA_ATTR!==!1,K=S.ALLOW_DATA_ATTR!==!1,ne=S.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=S.SAFE_FOR_TEMPLATES||!1,_e=S.SAFE_FOR_XML!==!1,xe=S.WHOLE_DOCUMENT||!1,Pe=S.RETURN_DOM||!1,ft=S.RETURN_DOM_FRAGMENT||!1,re=S.RETURN_TRUSTED_TYPE||!1,We=S.FORCE_BODY||!1,fe=S.SANITIZE_DOM!==!1,J=S.SANITIZE_NAMED_PROPS||!1,$e=S.KEEP_CONTENT!==!1,ze=S.IN_PLACE||!1,q=S.ALLOWED_URI_REGEXP||V1,jt=S.NAMESPACE||Dt,oi=S.MATHML_TEXT_INTEGRATION_POINTS||oi,ai=S.HTML_INTEGRATION_POINTS||ai,le=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&ng(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&ng(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(K=!1),ft&&(Pe=!0),wr&&(B=ue({},N1),X=[],wr.html===!0&&(ue(B,L1),ue(X,D1)),wr.svg===!0&&(ue(B,lm),ue(X,pm),ue(X,Tc)),wr.svgFilters===!0&&(ue(B,fm),ue(X,pm),ue(X,Tc)),wr.mathMl===!0&&(ue(B,dm),ue(X,z1),ue(X,Tc))),S.ADD_TAGS&&(B===$&&(B=Pi(B)),ue(B,S.ADD_TAGS,Ke)),S.ADD_ATTR&&(X===he&&(X=Pi(X)),ue(X,S.ADD_ATTR,Ke)),S.ADD_URI_SAFE_ATTR&&ue(Vr,S.ADD_URI_SAFE_ATTR,Ke),S.FORBID_CONTENTS&&(tr===fn&&(tr=Pi(tr)),ue(tr,S.FORBID_CONTENTS,Ke)),$e&&(B["#text"]=!0),xe&&ue(B,["html","head","body"]),B.table&&(ue(B,["tbody"]),delete Te.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw uu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw uu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=S.TRUSTED_TYPES_POLICY,O=x.createHTML("")}else x===void 0&&(x=Cj(f,i)),x!==null&&typeof O=="string"&&(O=x.createHTML(""));yt&&yt(S),Ki=S}},ig=ue({},[...lm,...fm,...yj]),og=ue({},[...dm,...wj]),AM=function(S){let H=y(S);(!H||!H.tagName)&&(H={namespaceURI:jt,tagName:"template"});let Y=Pc(S.tagName),Re=Pc(H.tagName);return dn[S.namespaceURI]?S.namespaceURI===ii?H.namespaceURI===Dt?Y==="svg":H.namespaceURI===ni?Y==="svg"&&(Re==="annotation-xml"||oi[Re]):!!ig[Y]:S.namespaceURI===ni?H.namespaceURI===Dt?Y==="math":H.namespaceURI===ii?Y==="math"&&ai[Re]:!!og[Y]:S.namespaceURI===Dt?H.namespaceURI===ii&&!ai[Re]||H.namespaceURI===ni&&!oi[Re]?!1:!og[Y]&&(xM[Y]||!ig[Y]):!!(ga==="application/xhtml+xml"&&dn[S.namespaceURI]):!1},xr=function(S){ou(t.removed,{element:S});try{y(S).removeChild(S)}catch{g(S)}},cs=function(S,H){try{ou(t.removed,{attribute:H.getAttributeNode(S),from:H})}catch{ou(t.removed,{attribute:null,from:H})}if(H.removeAttribute(S),S==="is")if(Pe||ft)try{xr(H)}catch{}else try{H.setAttribute(S,"")}catch{}},ag=function(S){let H=null,Y=null;if(We)S="<remove></remove>"+S;else{let Qe=F1(S,/^[\r\n\t ]+/);Y=Qe&&Qe[0]}ga==="application/xhtml+xml"&&jt===Dt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");let Re=x?x.createHTML(S):S;if(jt===Dt)try{H=new p().parseFromString(Re,ga)}catch{}if(!H||!H.documentElement){H=A.createDocument(jt,"template",null);try{H.documentElement.innerHTML=zt?O:Re}catch{}}let st=H.body||H.documentElement;return S&&Y&&st.insertBefore(r.createTextNode(Y),st.childNodes[0]||null),jt===Dt?C.call(H,xe?"html":"body")[0]:xe?H.documentElement:st},ug=function(S){return T.call(S.ownerDocument||S,S,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null)},lp=function(S){return S instanceof d&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof c)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},sg=function(S){return typeof u=="function"&&S instanceof u};function Gr(Q,S,H){Ac(Q,Y=>{Y.call(t,S,H,Ki)})}let cg=function(S){let H=null;if(Gr(P.beforeSanitizeElements,S,null),lp(S))return xr(S),!0;let Y=Ke(S.nodeName);if(Gr(P.uponSanitizeElement,S,{tagName:Y,allowedTags:B}),S.hasChildNodes()&&!sg(S.firstElementChild)&&_t(/<[/\w]/g,S.innerHTML)&&_t(/<[/\w]/g,S.textContent)||S.nodeType===cu.progressingInstruction||_e&&S.nodeType===cu.comment&&_t(/<[/\w]/g,S.data))return xr(S),!0;if(!B[Y]||Te[Y]){if(!Te[Y]&&fg(Y)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,Y)||le.tagNameCheck instanceof Function&&le.tagNameCheck(Y)))return!1;if($e&&!tr[Y]){let Re=y(S)||S.parentNode,st=w(S)||S.childNodes;if(st&&Re){let Qe=st.length;for(let Ot=Qe-1;Ot>=0;--Ot){let Sr=m(st[Ot],!0);Sr.__removalCount=(S.__removalCount||0)+1,Re.insertBefore(Sr,_(S))}}}return xr(S),!0}return S instanceof l&&!AM(S)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&_t(/<\/no(script|embed|frames)/i,S.innerHTML)?(xr(S),!0):(te&&S.nodeType===cu.text&&(H=S.textContent,Ac([N,k,I],Re=>{H=au(H,Re," ")}),S.textContent!==H&&(ou(t.removed,{element:S.cloneNode()}),S.textContent=H)),Gr(P.afterSanitizeElements,S,null),!1)},lg=function(S,H,Y){if(fe&&(H==="id"||H==="name")&&(Y in r||Y in EM))return!1;if(!(K&&!Ae[H]&&_t(W,H))){if(!(ae&&_t(j,H))){if(!X[H]||Ae[H]){if(!(fg(S)&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,S)||le.tagNameCheck instanceof Function&&le.tagNameCheck(S))&&(le.attributeNameCheck instanceof RegExp&&_t(le.attributeNameCheck,H)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(H))||H==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&_t(le.tagNameCheck,Y)||le.tagNameCheck instanceof Function&&le.tagNameCheck(Y))))return!1}else if(!Vr[H]){if(!_t(q,au(Y,F,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&S!=="script"&&vj(Y,"data:")===0&&St[S])){if(!(ne&&!_t(D,au(Y,F,"")))){if(Y)return!1}}}}}}return!0},fg=function(S){return S!=="annotation-xml"&&F1(S,z)},dg=function(S){Gr(P.beforeSanitizeAttributes,S,null);let{attributes:H}=S;if(!H||lp(S))return;let Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:X,forceKeepAttr:void 0},Re=H.length;for(;Re--;){let st=H[Re],{name:Qe,namespaceURI:Ot,value:Sr}=st,_a=Ke(Qe),dt=Qe==="value"?Sr:bj(Sr);if(Y.attrName=_a,Y.attrValue=dt,Y.keepAttr=!0,Y.forceKeepAttr=void 0,Gr(P.uponSanitizeAttribute,S,Y),dt=Y.attrValue,J&&(_a==="id"||_a==="name")&&(cs(Qe,S),dt=ie+dt),_e&&_t(/((--!?|])>)|<\/(style|title)/i,dt)){cs(Qe,S);continue}if(Y.forceKeepAttr||(cs(Qe,S),!Y.keepAttr))continue;if(!ee&&_t(/\/>/i,dt)){cs(Qe,S);continue}te&&Ac([N,k,I],hg=>{dt=au(dt,hg," ")});let pg=Ke(S.nodeName);if(lg(pg,_a,dt)){if(x&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ot)switch(f.getAttributeType(pg,_a)){case"TrustedHTML":{dt=x.createHTML(dt);break}case"TrustedScriptURL":{dt=x.createScriptURL(dt);break}}try{Ot?S.setAttributeNS(Ot,Qe,dt):S.setAttribute(Qe,dt),lp(S)?xr(S):j1(t.removed)}catch{}}}Gr(P.afterSanitizeAttributes,S,null)},TM=function Q(S){let H=null,Y=ug(S);for(Gr(P.beforeSanitizeShadowDOM,S,null);H=Y.nextNode();)Gr(P.uponSanitizeShadowNode,H,null),cg(H),dg(H),H.content instanceof o&&Q(H.content);Gr(P.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(Q){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,Y=null,Re=null,st=null;if(zt=!Q,zt&&(Q="<!-->"),typeof Q!="string"&&!sg(Q))if(typeof Q.toString=="function"){if(Q=Q.toString(),typeof Q!="string")throw uu("dirty is not a string, aborting")}else throw uu("toString is not a function");if(!t.isSupported)return Q;if(ge||cp(S),t.removed=[],typeof Q=="string"&&(ze=!1),ze){if(Q.nodeName){let Sr=Ke(Q.nodeName);if(!B[Sr]||Te[Sr])throw uu("root node is forbidden and cannot be sanitized in-place")}}else if(Q instanceof u)H=ag("<!---->"),Y=H.ownerDocument.importNode(Q,!0),Y.nodeType===cu.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?H=Y:H.appendChild(Y);else{if(!Pe&&!te&&!xe&&Q.indexOf("<")===-1)return x&&re?x.createHTML(Q):Q;if(H=ag(Q),!H)return Pe?null:re?O:""}H&&We&&xr(H.firstChild);let Qe=ug(ze?Q:H);for(;Re=Qe.nextNode();)cg(Re),dg(Re),Re.content instanceof o&&TM(Re.content);if(ze)return Q;if(Pe){if(ft)for(st=R.call(H.ownerDocument);H.firstChild;)st.appendChild(H.firstChild);else st=H;return(X.shadowroot||X.shadowrootmode)&&(st=M.call(n,st,!0)),st}let Ot=xe?H.outerHTML:H.innerHTML;return xe&&B["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&_t(G1,H.ownerDocument.doctype.name)&&(Ot="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
3
- `+Ot),te&&Ac([N,k,I],Sr=>{Ot=au(Ot,Sr," ")}),x&&re?x.createHTML(Ot):Ot},t.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cp(Q),ge=!0},t.clearConfig=function(){Ki=null,ge=!1},t.isValidAttribute=function(Q,S,H){Ki||cp({});let Y=Ke(Q),Re=Ke(S);return lg(Y,Re,H)},t.addHook=function(Q,S){typeof S=="function"&&ou(P[Q],S)},t.removeHook=function(Q,S){if(S!==void 0){let H=hj(P[Q],S);return H===-1?void 0:mj(P[Q],H,1)[0]}return j1(P[Q])},t.removeHooks=function(Q){P[Q]=[]},t.removeAllHooks=function(){P=U1()},t}var kj=$1();K1.exports=kj});var J1=b((cQ,Z1)=>{"use strict";var qj=/["'&<>]/;Z1.exports=Ij;function Ij(e){var t=""+e,r=qj.exec(t);if(!r)return t;var n,i="",o=0,a=0;for(o=r.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}a!==o&&(i+=t.substring(a,o)),a=o+1,i+=n}return a!==o?i+t.substring(a,o):i}});var X1=b(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.default=jj;var vm=Ye();function jj(){let e=(0,vm.useRef)(null),[t,r]=(0,vm.useState)({width:void 0,height:void 0});return(0,vm.useEffect)(()=>{if(!e.current)return;let n=typeof window<"u"&&"ResizeObserver"in window?window.ResizeObserver:void 0;if(!n)return;let i=new n(o=>{r({width:o[0].contentRect.width,height:o[0].contentRect.height})});return i.observe(e.current),()=>{i.disconnect()}},[]),[e,t]}});var ex=b((fQ,Q1)=>{Q1.exports=JBrowseExports["react-dom/client"]});var xm=b(Ri=>{Object.defineProperty(Ri,"__esModule",{value:!0});var Fj={grad:.9,turn:360,rad:360/(2*Math.PI)},tn=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Xe=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Zt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},sx=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},tx=function(e){return{r:Zt(e.r,0,255),g:Zt(e.g,0,255),b:Zt(e.b,0,255),a:Zt(e.a)}},gm=function(e){return{r:Xe(e.r),g:Xe(e.g),b:Xe(e.b),a:Xe(e.a,3)}},Lj=/^#([0-9a-f]{3,8})$/i,Rc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},cx=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},lx=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),l=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,l,n][s],g:255*[l,n,n,u,a,a][s],b:255*[a,a,l,n,n,u][s],a:i}},rx=function(e){return{h:sx(e.h),s:Zt(e.s,0,100),l:Zt(e.l,0,100),a:Zt(e.a)}},nx=function(e){return{h:Xe(e.h),s:Xe(e.s),l:Xe(e.l),a:Xe(e.a,3)}},ix=function(e){return lx((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},lu=function(e){return{h:(t=cx(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},Nj=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dj=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zj=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bj=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,wm={string:[[function(e){var t=Lj.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Xe(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Xe(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=zj.exec(e)||Bj.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:tx({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Nj.exec(e)||Dj.exec(e);if(!t)return null;var r,n,i=rx({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Fj[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return ix(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return tn(t)&&tn(r)&&tn(n)?tx({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!tn(t)||!tn(r)||!tn(n))return null;var a=rx({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return ix(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!tn(t)||!tn(r)||!tn(n))return null;var a=function(u){return{h:sx(u.h),s:Zt(u.s,0,100),v:Zt(u.v,0,100),a:Zt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return lx(a)},"hsv"]]},ox=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},fx=function(e){return typeof e=="string"?ox(e.trim(),wm.string):typeof e=="object"&&e!==null?ox(e,wm.object):[null,void 0]},_m=function(e,t){var r=lu(e);return{h:r.h,s:Zt(r.s+100*t,0,100),l:r.l,a:r.a}},ym=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ax=function(e,t){var r=lu(e);return{h:r.h,s:r.s,l:Zt(r.l+100*t,0,100),a:r.a}},fu=function(){function e(t){this.parsed=fx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Xe(ym(this.rgba),2)},e.prototype.isDark=function(){return ym(this.rgba)<.5},e.prototype.isLight=function(){return ym(this.rgba)>=.5},e.prototype.toHex=function(){return t=gm(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?Rc(Xe(255*o)):"","#"+Rc(r)+Rc(n)+Rc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return gm(this.rgba)},e.prototype.toRgbString=function(){return t=gm(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return nx(lu(this.rgba))},e.prototype.toHslString=function(){return t=nx(lu(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=cx(this.rgba),{h:Xe(t.h),s:Xe(t.s),v:Xe(t.v),a:Xe(t.a,3)};var t},e.prototype.invert=function(){return qr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),qr(_m(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),qr(_m(this.rgba,-t))},e.prototype.grayscale=function(){return qr(_m(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),qr(ax(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),qr(ax(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?qr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Xe(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=lu(this.rgba);return typeof t=="number"?qr({h:t,s:r.s,l:r.l,a:r.a}):Xe(r.h)},e.prototype.isEqual=function(t){return this.toHex()===qr(t).toHex()},e}(),qr=function(e){return e instanceof fu?e:new fu(e)},ux=[];Ri.Colord=fu,Ri.colord=qr,Ri.extend=function(e){e.forEach(function(t){ux.indexOf(t)<0&&(t(fu,wm),ux.push(t))})},Ri.getFormat=function(e){return fx(e)[1]},Ri.random=function(){return new fu({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var hx=b((pQ,px)=>{var Ir=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Sm=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Om=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},Em=96.422,Am=100,Tm=82.521,Uj=function(e){var t,r,n={x:.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:Om(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:Om(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:Om(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Ir(r.r,0,255),g:Ir(r.g,0,255),b:Ir(r.b,0,255),a:Ir(r.a)}},Wj=function(e){var t=Sm(e.r),r=Sm(e.g),n=Sm(e.b);return function(i){return{x:Ir(i.x,0,Em),y:Ir(i.y,0,Am),z:Ir(i.z,0,Tm),a:Ir(i.a)}}(function(i){return{x:1.0478112*i.x+.0228866*i.y+-.050127*i.z,y:.0295424*i.x+.9904844*i.y+-.0170491*i.z,z:-.0092345*i.x+.0150436*i.y+.7521316*i.z,a:i.a}}({x:100*(.4124564*t+.3575761*r+.1804375*n),y:100*(.2126729*t+.7151522*r+.072175*n),z:100*(.0193339*t+.119192*r+.9503041*n),a:e.a}))},du=216/24389,Oo=24389/27,dx=function(e){var t=Wj(e),r=t.x/Em,n=t.y/Am,i=t.z/Tm;return r=r>du?Math.cbrt(r):(Oo*r+16)/116,{l:116*(n=n>du?Math.cbrt(n):(Oo*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>du?Math.cbrt(i):(Oo*i+16)/116)),alpha:t.a}},Hj=function(e,t,r){var n,i=dx(e),o=dx(t);return function(a){var u=(a.l+16)/116,l=a.a/500+u,s=u-a.b/200;return Uj({x:(Math.pow(l,3)>du?Math.pow(l,3):(116*l-16)/Oo)*Em,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/Oo)*Am,z:(Math.pow(s,3)>du?Math.pow(s,3):(116*s-16)/Oo)*Tm,a:a.alpha})}({l:Ir((n={l:i.l*(1-r)+o.l*r,a:i.a*(1-r)+o.a*r,b:i.b*(1-r)+o.b*r,alpha:i.alpha*(1-r)+o.alpha*r}).l,0,400),a:n.a,b:n.b,alpha:Ir(n.alpha)})};px.exports=function(e){function t(r,n,i){i===void 0&&(i=5);for(var o=[],a=1/(i-1),u=0;u<=i-1;u++)o.push(r.mix(n,a*u));return o}e.prototype.mix=function(r,n){n===void 0&&(n=.5);var i=r instanceof e?r:new e(r),o=Hj(this.toRgb(),i.toRgb(),n);return new e(o)},e.prototype.tints=function(r){return t(this,"#fff",r)},e.prototype.shades=function(r){return t(this,"#000",r)},e.prototype.tones=function(r){return t(this,"#808080",r)}}});var vx=b((hQ,mx)=>{mx.exports=function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,l,s=n[this.toHex()];if(s)return s;if(a?.closest){var c=this.toRgb(),d=1/0,p="black";if(!o.length)for(var f in r)o[f]=new e(r[f]).toRgb();for(var h in r){var m=(u=c,l=o[h],Math.pow(u.r-l.r,2)+Math.pow(u.g-l.g,2)+Math.pow(u.b-l.b,2));m<d&&(d=m,p=h)}return p}},t.string.push([function(a){var u=a.toLowerCase(),l=u==="transparent"?"#0000":r[u];return l?new e(l).toRgb():null},"name"])}});var _x=b(On=>{"use strict";var bx=On&&On.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(On,"__esModule",{value:!0});On.colord=On.Colord=void 0;var Vj=xm(),Gj=bx(hx()),$j=bx(vx());(0,Vj.extend)([Gj.default,$j.default]);var gx=xm();Object.defineProperty(On,"Colord",{enumerable:!0,get:function(){return gx.Colord}});Object.defineProperty(On,"colord",{enumerable:!0,get:function(){return gx.colord}})});var Pm=b(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.createStopToken=Yj;pu.stopStopToken=Zj;pu.checkStopToken=Jj;function Kj(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Yj(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function Zj(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function Jj(e){if(typeof jest>"u"&&e!==void 0&&Kj()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var wx=b(yx=>{"use strict";Object.defineProperty(yx,"__esModule",{value:!0})});var En=b((gQ,hu)=>{function Xj(e){return e&&e.__esModule?e:{default:e}}hu.exports=Xj,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var Mm=b((_Q,rn)=>{function Rm(e){"@babel/helpers - typeof";return rn.exports=Rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn.exports.__esModule=!0,rn.exports.default=rn.exports,Rm(e)}rn.exports=Rm,rn.exports.__esModule=!0,rn.exports.default=rn.exports});var Sx=b((yQ,mu)=>{var xx=Mm().default;function Qj(e,t){if(xx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}mu.exports=Qj,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var Cm=b((wQ,vu)=>{var e2=Mm().default,t2=Sx();function r2(e){var t=t2(e,"string");return e2(t)=="symbol"?t:t+""}vu.exports=r2,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var Ox=b((xQ,bu)=>{var n2=Cm();function i2(e,t,r){return(t=n2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}bu.exports=i2,bu.exports.__esModule=!0,bu.exports.default=bu.exports});var Mi=b((SQ,gu)=>{function o2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}gu.exports=o2,gu.exports.__esModule=!0,gu.exports.default=gu.exports});var Ci=b((OQ,_u)=>{var a2=Cm();function Ex(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a2(n.key),n)}}function u2(e,t,r){return t&&Ex(e.prototype,t),r&&Ex(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_u.exports=u2,_u.exports.__esModule=!0,_u.exports.default=_u.exports});var km=b((EQ,yu)=>{function s2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}yu.exports=s2,yu.exports.__esModule=!0,yu.exports.default=yu.exports});var Ax=b((AQ,wu)=>{var c2=km();function l2(e){if(Array.isArray(e))return c2(e)}wu.exports=l2,wu.exports.__esModule=!0,wu.exports.default=wu.exports});var Tx=b((TQ,xu)=>{function f2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}xu.exports=f2,xu.exports.__esModule=!0,xu.exports.default=xu.exports});var Rx=b((PQ,Su)=>{var Px=km();function d2(e,t){if(e){if(typeof e=="string")return Px(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Px(e,t):void 0}}Su.exports=d2,Su.exports.__esModule=!0,Su.exports.default=Su.exports});var Mx=b((RQ,Ou)=>{function p2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}Ou.exports=p2,Ou.exports.__esModule=!0,Ou.exports.default=Ou.exports});var Cx=b((MQ,Eu)=>{var h2=Ax(),m2=Tx(),v2=Rx(),b2=Mx();function g2(e){return h2(e)||m2(e)||v2(e)||b2()}Eu.exports=g2,Eu.exports.__esModule=!0,Eu.exports.default=Eu.exports});var kx=b(jr=>{"use strict";var _2=En(),y2=_2(Cx()),w2={functions:"Jexl Function",transforms:"Transform"};jr.ArrayLiteral=function(e){return this.evalArray(e.value)};jr.BinaryExpression=function(e){var t=this,r=this._grammar.elements[e.operator];if(r.evalOnDemand){var n=function(o){return{eval:function(){return t.eval(o)}}};return r.evalOnDemand(n(e.left),n(e.right))}return this.Promise.all([this.eval(e.left),this.eval(e.right)]).then(function(i){return r.eval(i[0],i[1])})};jr.ConditionalExpression=function(e){var t=this;return this.eval(e.test).then(function(r){return r?e.consequent?t.eval(e.consequent):r:t.eval(e.alternate)})};jr.FilterExpression=function(e){var t=this;return this.eval(e.subject).then(function(r){return e.relative?t._filterRelative(r,e.expr):t._filterStatic(r,e.expr)})};jr.Identifier=function(e){return e.from?this.eval(e.from).then(function(t){if(t!=null)return Array.isArray(t)&&(t=t[0]),t[e.value]}):e.relative?this._relContext[e.value]:this._context[e.value]};jr.Literal=function(e){return e.value};jr.ObjectLiteral=function(e){return this.evalMap(e.value)};jr.FunctionCall=function(e){var t=w2[e.pool];if(!t)throw new Error("Corrupt AST: Pool '".concat(e.pool,"' not found"));var r=this._grammar[e.pool],n=r[e.name];if(!n)throw new Error("".concat(t," ").concat(e.name," is not defined."));return this.evalArray(e.args||[]).then(function(i){return n.apply(void 0,(0,y2.default)(i))})};jr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var jx=b((kQ,Ix)=>{"use strict";var qx=En(),x2=qx(Mi()),S2=qx(Ci()),O2=kx(),E2=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,x2.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,S2.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return O2[r.type].call(n,r)})}},{key:"evalArray",value:function(r){var n=this;return this.Promise.all(r.map(function(i){return n.eval(i)}))}},{key:"evalMap",value:function(r){var n=this,i=Object.keys(r),o={},a=i.map(function(u){return n.eval(r[u])});return this.Promise.all(a).then(function(u){return u.forEach(function(l,s){o[i[s]]=l}),o})}},{key:"_filterRelative",value:function(r,n){var i=this,o=[];return Array.isArray(r)||(r=r===void 0?[]:[r]),r.forEach(function(a){var u=new e(i._grammar,i._context,a,i.Promise);o.push(u.eval(n))}),this.Promise.all(o).then(function(a){var u=[];return a.forEach(function(l,s){l&&u.push(r[s])}),u})}},{key:"_filterStatic",value:function(r,n){return this.eval(n).then(function(i){return typeof i=="boolean"?i?r:void 0:r[i]})}}]),e}();Ix.exports=E2});var Dx=b((qQ,Nx)=>{"use strict";var Lx=En(),A2=Lx(Mi()),T2=Lx(Ci()),P2=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,Fx=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,R2=/\\\\/,M2=/^\s*$/,C2=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],k2=["[a-zA-Z\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$][a-zA-Z0-9\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$]*","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],q2=["binaryOp","unaryOp","openParen","openBracket","question","colon"],I2=function(){function e(t){(0,A2.default)(this,e),this._grammar=t}return(0,T2.default)(e,[{key:"getElements",value:function(r){var n=this._getSplitRegex();return r.split(n).filter(function(i){return i})}},{key:"getTokens",value:function(r){for(var n=[],i=!1,o=0;o<r.length;o++)this._isWhitespace(r[o])?n.length&&(n[n.length-1].raw+=r[o]):r[o]==="-"&&this._isNegative(n)?i=!0:(i&&(r[o]="-"+r[o],i=!1),n.push(this._createToken(r[o])));return i&&n.push(this._createToken("-")),n}},{key:"tokenize",value:function(r){var n=this.getElements(r);return this.getTokens(n)}},{key:"_createToken",value:function(r){var n={type:"literal",value:r,raw:r};if(r[0]==='"'||r[0]==="'")n.value=this._unquote(r);else if(r.match(P2))n.value=parseFloat(r);else if(r==="true"||r==="false")n.value=r==="true";else if(this._grammar.elements[r])n.type=this._grammar.elements[r].type;else if(r.match(Fx))n.type="identifier";else throw new Error("Invalid expression token: ".concat(r));return n}},{key:"_escapeRegExp",value:function(r){return r=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r.match(Fx)&&(r="\\b"+r+"\\b"),r}},{key:"_getSplitRegex",value:function(){var r=this;if(!this._splitRegex){var n=Object.keys(this._grammar.elements).sort(function(i,o){return o.length-i.length}).map(function(i){return r._escapeRegExp(i)},this);this._splitRegex=new RegExp("("+[C2.join("|"),n.join("|"),k2.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?q2.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(M2)}},{key:"_unquote",value:function(r){var n=r[0],i=new RegExp("\\\\"+n,"g");return r.substr(1,r.length-2).replace(i,n).replace(R2,"\\")}}]),e}();Nx.exports=I2});var qm=b(Ge=>{"use strict";Ge.argVal=function(e){e&&this._cursor.args.push(e)};Ge.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};Ge.arrayVal=function(e){e&&this._cursor.value.push(e)};Ge.binaryOp=function(e){for(var t=this._grammar.elements[e.value].precedence||0,r=this._cursor._parent;r&&r.operator&&this._grammar.elements[r.operator].precedence>=t;)this._cursor=r,r=r._parent;var n={type:"BinaryExpression",operator:e.value,left:this._cursor};this._setParent(this._cursor,n),this._cursor=r,this._placeAtCursor(n)};Ge.dot=function(){this._nextIdentEncapsulate=this._cursor&&this._cursor.type!=="UnaryExpression"&&(this._cursor.type!=="BinaryExpression"||this._cursor.type==="BinaryExpression"&&this._cursor.right),this._nextIdentRelative=!this._cursor||this._cursor&&!this._nextIdentEncapsulate,this._nextIdentRelative&&(this._relative=!0)};Ge.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};Ge.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};Ge.identifier=function(e){var t={type:"Identifier",value:e.value};this._nextIdentEncapsulate?(t.from=this._cursor,this._placeBeforeCursor(t),this._nextIdentEncapsulate=!1):(this._nextIdentRelative&&(t.relative=!0,this._nextIdentRelative=!1),this._placeAtCursor(t))};Ge.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};Ge.objKey=function(e){this._curObjKey=e.value};Ge.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};Ge.objVal=function(e){this._cursor.value[this._curObjKey]=e};Ge.subExpression=function(e){this._placeAtCursor(e)};Ge.ternaryEnd=function(e){this._cursor.alternate=e};Ge.ternaryMid=function(e){this._cursor.consequent=e};Ge.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};Ge.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};Ge.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var Bx=b(zx=>{"use strict";var Mt=qm();zx.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:Mt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:Mt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:Mt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:Mt.objKey},closeCurl:{toState:"expectBinOp"}}},expectKeyValSep:{tokenTypes:{colon:{toState:"objVal"}}},postTransform:{tokenTypes:{openParen:{toState:"argVal"},binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},postArgs:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},identifier:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},openParen:{toState:"argVal",handler:Mt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:Mt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:Mt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:Mt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:Mt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:Mt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:Mt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:Mt.ternaryEnd,completable:!0}}});var Hx=b((FQ,Wx)=>{"use strict";var Ux=En(),j2=Ux(Mi()),F2=Ux(Ci()),L2=qm(),Mc=Bx().states,N2=function(){function e(t,r,n){(0,j2.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,F2.default)(e,[{key:"addToken",value:function(r){if(this._state==="complete")throw new Error("Cannot add a new token to a completed Parser");var n=Mc[this._state],i=this._exprStr;if(this._exprStr+=r.raw,n.subHandler){this._subParser||this._startSubExpression(i);var o=this._subParser.addToken(r);if(o){if(this._endSubExpression(),this._parentStop)return o;this._state=o}}else if(n.tokenTypes[r.type]){var a=n.tokenTypes[r.type],u=L2[r.type];a.handler&&(u=a.handler),u&&u.call(this,r),a.toState&&(this._state=a.toState)}else{if(this._stopMap[r.type])return this._stopMap[r.type];throw new Error("Token ".concat(r.raw," (").concat(r.type,") unexpected in expression: ").concat(this._exprStr))}return!1}},{key:"addTokens",value:function(r){r.forEach(this.addToken,this)}},{key:"complete",value:function(){if(this._cursor&&!Mc[this._state].completable)throw new Error("Unexpected end of expression: ".concat(this._exprStr));return this._subParser&&this._endSubExpression(),this._state="complete",this._cursor?this._tree:null}},{key:"isRelative",value:function(){return this._relative}},{key:"_endSubExpression",value:function(){Mc[this._state].subHandler.call(this,this._subParser.complete()),this._subParser=null}},{key:"_placeAtCursor",value:function(r){this._cursor?(this._cursor.right=r,this._setParent(r,this._cursor)):this._tree=r,this._cursor=r}},{key:"_placeBeforeCursor",value:function(r){this._cursor=this._cursor._parent,this._placeAtCursor(r)}},{key:"_setParent",value:function(r,n){Object.defineProperty(r,"_parent",{value:n,writable:!0})}},{key:"_startSubExpression",value:function(r){var n=Mc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();Wx.exports=N2});var $x=b((LQ,Gx)=>{"use strict";var Vx=En(),D2=Vx(Mi()),z2=Vx(Ci()),An=function(){function e(t){(0,D2.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,z2.default)(e,[{key:"catch",value:function(r){if(this.error)try{this._resolve(r(this.error))}catch(n){this._reject(n)}return this}},{key:"then",value:function(r,n){if(!this.error)try{this._resolve(r(this.value))}catch(i){this._reject(i)}return n&&this.catch(n),this}},{key:"_reject",value:function(r){this.value=void 0,this.error=r}},{key:"_resolve",value:function(r){r instanceof e?r.error?this._reject(r.error):this._resolve(r.value):(this.value=r,this.error=void 0)}}]),e}();An.all=function(e){return new An(function(t){var r=e.map(function(n){for(;n instanceof An;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};An.resolve=function(e){return new An(function(t){return t(e)})};An.reject=function(e){return new An(function(t,r){return r(e)})};Gx.exports=An});var Zx=b((NQ,Yx)=>{"use strict";var Kx=En(),B2=Kx(Mi()),U2=Kx(Ci()),W2=jx(),H2=Dx(),V2=Hx(),G2=$x(),$2=function(){function e(t,r){(0,B2.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,U2.default)(e,[{key:"compile",value:function(){var r=new H2(this._grammar),n=new V2(this._grammar),i=r.tokenize(this._exprStr);return n.addTokens(i),this._ast=n.complete(),this}},{key:"eval",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._eval(r,Promise)}},{key:"evalSync",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=this._eval(r,G2);if(n.error)throw n.error;return n.value}},{key:"_eval",value:function(r,n){var i=this;return n.resolve().then(function(){var o=i._getAst(),a=new W2(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();Yx.exports=$2});var Xx=b(Jx=>{"use strict";Jx.getGrammar=function(){return{elements:{".":{type:"dot"},"[":{type:"openBracket"},"]":{type:"closeBracket"},"|":{type:"pipe"},"{":{type:"openCurl"},"}":{type:"closeCurl"},":":{type:"colon"},",":{type:"comma"},"(":{type:"openParen"},")":{type:"closeParen"},"?":{type:"question"},"+":{type:"binaryOp",precedence:30,eval:function(t,r){return t+r}},"-":{type:"binaryOp",precedence:30,eval:function(t,r){return t-r}},"*":{type:"binaryOp",precedence:40,eval:function(t,r){return t*r}},"/":{type:"binaryOp",precedence:40,eval:function(t,r){return t/r}},"//":{type:"binaryOp",precedence:40,eval:function(t,r){return Math.floor(t/r)}},"%":{type:"binaryOp",precedence:50,eval:function(t,r){return t%r}},"^":{type:"binaryOp",precedence:50,eval:function(t,r){return Math.pow(t,r)}},"==":{type:"binaryOp",precedence:20,eval:function(t,r){return t==r}},"!=":{type:"binaryOp",precedence:20,eval:function(t,r){return t!=r}},">":{type:"binaryOp",precedence:20,eval:function(t,r){return t>r}},">=":{type:"binaryOp",precedence:20,eval:function(t,r){return t>=r}},"<":{type:"binaryOp",precedence:20,eval:function(t,r){return t<r}},"<=":{type:"binaryOp",precedence:20,eval:function(t,r){return t<=r}},"&&":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n&&r.eval()})}},"||":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n||r.eval()})}},in:{type:"binaryOp",precedence:20,eval:function(t,r){return typeof r=="string"?r.indexOf(t)!==-1:Array.isArray(r)?r.some(function(n){return n===t}):!1}},"!":{type:"unaryOp",precedence:1/0,eval:function(t){return!t}}},functions:{},transforms:{}}}});var eS=b((zQ,jm)=>{"use strict";var Im=En(),K2=Im(Ox()),Y2=Im(Mi()),Z2=Im(Ci()),J2=Zx(),X2=Xx(),Q2=X2.getGrammar,Qx=function(){function e(){(0,Y2.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Q2()}return(0,Z2.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,K2.default)({type:"binaryOp",precedence:n},o?"evalOnDemand":"eval",i))}},{key:"addFunction",value:function(r,n){this._grammar.functions[r]=n}},{key:"addFunctions",value:function(r){for(var n in r)this._grammar.functions[n]=r[n]}},{key:"addUnaryOp",value:function(r,n){this._addGrammarElement(r,{type:"unaryOp",weight:1/0,eval:n})}},{key:"addTransform",value:function(r,n){this._grammar.transforms[r]=n}},{key:"addTransforms",value:function(r){for(var n in r)this._grammar.transforms[n]=r[n]}},{key:"compile",value:function(r){var n=this.createExpression(r);return n.compile()}},{key:"createExpression",value:function(r){return new J2(this._grammar,r)}},{key:"getFunction",value:function(r){return this._grammar.functions[r]}},{key:"getTransform",value:function(r){return this._grammar.transforms[r]}},{key:"eval",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.eval(n)}},{key:"evalSync",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.evalSync(n)}},{key:"expr",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a=r.reduce(function(u,l,s){var c=s<i.length?i[s]:"";return u+=l+c,u},"");return this.createExpression(a)}},{key:"removeOp",value:function(r){this._grammar.elements[r]&&(this._grammar.elements[r].type==="binaryOp"||this._grammar.elements[r].type==="unaryOp")&&delete this._grammar.elements[r]}},{key:"_addGrammarElement",value:function(r,n){this._grammar.elements[r]=n}}]),e}();jm.exports=new Qx;jm.exports.Jexl=Qx});var tS=b(Au=>{"use strict";var eF=Au&&Au.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Au,"__esModule",{value:!0});Au.default=rF;var tF=eF(eS());function rF(){let e=new tF.default.Jexl;return e.addFunction("get",(t,r)=>t.get(r)),e.addFunction("parent",t=>t.parent()),e.addFunction("id",t=>t.id()),e.addFunction("cast",t=>t),e.addFunction("log",t=>(console.log(t),t)),e.addFunction("max",Math.max),e.addFunction("min",Math.min),e.addFunction("sqrt",Math.sqrt),e.addFunction("ceil",Math.ceil),e.addFunction("floor",Math.floor),e.addFunction("round",Math.round),e.addFunction("abs",Math.abs),e.addFunction("log10",Math.log10),e.addFunction("parseInt",Number.parseInt),e.addFunction("parseFloat",Number.parseFloat),e.addFunction("split",(t,r)=>t.split(r)),e.addFunction("charAt",(t,r)=>t.charAt(r)),e.addFunction("charCodeAt",(t,r)=>t.charCodeAt(r)),e.addFunction("codePointAt",(t,r)=>t.codePointAt(r)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("endsWith",(t,r,n)=>t.endsWith(r,n)),e.addFunction("padEnd",(t,r,n)=>t.padEnd(r,n)),e.addFunction("padStart",(t,r,n)=>t.padStart(r,n)),e.addFunction("repeat",(t,r)=>t.repeat(r)),e.addFunction("replace",(t,r,n)=>t.replace(r,n)),e.addFunction("replaceAll",(t,r,n)=>t.replaceAll(r,n)),e.addFunction("slice",(t,r,n)=>t.slice(r,n)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("substring",(t,r,n)=>t.substring(r,n)),e.addFunction("toLowerCase",t=>t.toLowerCase()),e.addFunction("toUpperCase",t=>t.toUpperCase()),e.addFunction("jsonParse",t=>JSON.parse(t)),e.addFunction("trim",t=>t.trim()),e.addFunction("trimEnd",t=>t.trimEnd()),e.addFunction("trimStart",t=>t.trimStart()),e.addFunction("getTag",(t,r)=>{let n=t.get("tags");return n?n[r]:t.get(r)}),e.addBinaryOp("&",15,(t,r)=>t&r),e}});var Lm=b(Tu=>{"use strict";var nF=Tu&&Tu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tu,"__esModule",{value:!0});Tu.stringToJexlExpression=oF;var iF=nF(tS()),Fm={};function oF(e,t){let r=`nosig|${e}`;if(!Fm[r]){if(!e.startsWith("jexl:"))throw new Error("string does not appear to be in jexl format");let i=e.split("jexl:")[1],o=t?t.compile(i):(0,iF.default)().compile(i);Fm[r]=o}return Fm[r]}});var rS=b(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.nanoid=Ct.customAlphabet=Ct.customRandom=Ct.random=Ct.urlAlphabet=void 0;Ct.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var aF=e=>crypto.getRandomValues(new Uint8Array(e));Ct.random=aF;var uF=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return(o=t)=>{let a="";for(;;){let u=r(i),l=i;for(;l--;)if(a+=e[u[l]&n]||"",a.length===o)return a}}};Ct.customRandom=uF;var sF=(e,t=21)=>(0,Ct.customRandom)(e,t,Ct.random);Ct.customAlphabet=sF;var cF=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");Ct.nanoid=cF});var Nm=b(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.FileLocation=je.UriLocation=je.UriLocationRaw=je.BlobLocation=je.LocalPathLocation=je.Region=je.NoAssemblyRegion=je.ElementId=void 0;var be=vt(),lF=rS();je.ElementId=be.types.optional(be.types.identifier,()=>(0,lF.nanoid)());je.NoAssemblyRegion=be.types.model("NoAssemblyRegion",{refName:be.types.string,start:be.types.number,end:be.types.number,reversed:be.types.optional(be.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));je.Region=be.types.compose("Region",je.NoAssemblyRegion,be.types.model({assemblyName:be.types.string}));je.LocalPathLocation=be.types.model("LocalPathLocation",{locationType:be.types.literal("LocalPathLocation"),localPath:be.types.string});je.BlobLocation=be.types.model("BlobLocation",{locationType:be.types.literal("BlobLocation"),name:be.types.string,blobId:be.types.string});je.UriLocationRaw=be.types.model("UriLocation",{locationType:be.types.literal("UriLocation"),uri:be.types.string,baseUri:be.types.maybe(be.types.string),internetAccountId:be.types.maybe(be.types.string),internetAccountPreAuthorization:be.types.maybe(be.types.model("InternetAccountPreAuthorization",{internetAccountType:be.types.string,authInfo:be.types.frozen()}))});je.UriLocation=be.types.snapshotProcessor(je.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});je.FileLocation=be.types.snapshotProcessor(be.types.union(je.LocalPathLocation,je.UriLocation,je.BlobLocation),{preProcessor(e){if(!e)return;let{locationType:t,...r}=e;if(!t){let{uri:n,localPath:i,blob:o}=r,a="";return n!==void 0?a="UriLocation":i!==void 0?a="LocalPathLocation":o!==void 0&&(a="BlobLocation"),{...r,locationType:a}}return e}})});var aS=b(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.default=gF;var Ce=vt(),fF=Eo(),dF=Lm(),pF=Nm();function hF(){return!0}var mF={stringArray:Ce.types.array(Ce.types.string),stringArrayMap:Ce.types.map(Ce.types.array(Ce.types.string)),numberMap:Ce.types.map(Ce.types.number),boolean:Ce.types.boolean,color:Ce.types.refinement("Color",Ce.types.string,hF),integer:Ce.types.integer,number:Ce.types.number,string:Ce.types.string,text:Ce.types.string,fileLocation:pF.FileLocation,frozen:Ce.types.frozen()},nS={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},Dm=e=>({views:{get valueJSON(){return e.value}}}),iS=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),oS={fileLocation:iS,number:Dm,integer:Dm,boolean:Dm,frozen:iS,stringArray:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t){e.value.push(t)},removeAtIndex(t){e.value.splice(t,1)},setAtIndex(t,r){e.value[t]=r}}}),stringArrayMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)},addToKey(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.push(r)},removeAtKeyIndex(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.splice(r,1)},setAtKeyIndex(t,r,n){let i=e.value.get(t);if(!i)throw new Error(`${t} not found`);i[r]=n}}}),numberMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)}}})},vF=Ce.types.refinement("JexlString",Ce.types.string,e=>e.startsWith("jexl:"));function bF(e){return e?.toJSON?e.toJSON():`"${e}"`}function gF(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=mF[n]),!r)throw new Error(`no builtin config slot type "${n}", and no 'model' param provided`);if(i===void 0)throw new Error("no 'defaultValue' provided");let a=`${e.charAt(0).toUpperCase()}${e.slice(1)}ConfigSlot`,u=Ce.types.model(a,{name:Ce.types.literal(e),description:Ce.types.literal(t),type:Ce.types.literal(n),value:Ce.types.optional(Ce.types.union(vF,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:d}=(0,fF.getEnv)(c);return!d&&typeof jest>"u"&&console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,dF.stringToJexlExpression)(String(c.value),d?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return bF(c.value)}})).preProcessSnapshot(c=>typeof c=="object"&&c.name===e?c:{name:e,description:t,type:n,value:c}).postProcessSnapshot(c=>typeof c.value=="object"?JSON.stringify(c.value)!==JSON.stringify(i)?c.value:void 0:c.value!==i?c.value:void 0).actions(c=>({set(d){c.value=d},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let d=c.expr.evalSync();if(d!==void 0){c.value=d;return}}catch{}if(c.value=i,!(n in nS))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=nS[n]}}}));oS[n]&&(u=u.extend(oS[n]));let s=Ce.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var sS=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.getSubType=Bm;Pn.getUnionSubTypes=uS;Pn.getPropertyType=_F;Pn.getDefaultValue=yF;Pn.getEnumerationValues=wF;Pn.resolveLateType=xF;var Tn=vt();function Bm(e){let t;if((0,Tn.isOptionalType)(e))t=e._subtype||e.type;else if((0,Tn.isArrayType)(e)||(0,Tn.isMapType)(e))t=e._subtype||e._subType||e.subType;else{if(typeof e.getSubType=="function")return e.getSubType();throw new TypeError("unsupported mst type")}if(!t)throw new Error("failed to get subtype");return t}function uS(e){if(!(0,Tn.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||Bm(e)._types||Bm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function _F(e,t){return e.properties[t]}function yF(e){if(!(0,Tn.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function wF(e){return uS(e).map(r=>r.value)}function xF(e){return!(0,Tn.isUnionType)(e)&&!(0,Tn.isArrayType)(e)&&(0,Tn.isLateType)(e)?e.getSubType():e}});var Um=b(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.readConfObject=Cc;nn.getConf=SF;nn.getTypeNamesFromExplicitlyTypedUnion=cS;nn.isBareConfigurationSchemaType=lS;nn.isConfigurationSchemaType=Ao;nn.isConfigurationModel=fS;nn.isConfigurationSlotType=OF;var Ue=vt(),Rn=sS();function Cc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ue.isStateTreeNode)(e)&&(0,Ue.isMapType)((0,Ue.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ue.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ue.getSnapshot)(i))):i}else return}else if(Array.isArray(t)){let n=t[0];if(t.length>1){let i=t.slice(1),o=e[n];return!o&&(0,Ue.isStateTreeNode)(e)&&(0,Ue.isMapType)((0,Ue.getType)(e))&&(o=e.get(n)),o?Cc(o,i,r):void 0}return Cc(e,n,r)}}else return structuredClone((0,Ue.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function SF(e,t,r){let{configuration:n}=e;if(fS(n))return Cc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function cS(e){if((0,Ue.isType)(e)&&(e=(0,Rn.resolveLateType)(e),(0,Ue.isUnionType)(e))){let t=[];return(0,Rn.getUnionSubTypes)(e).forEach(r=>{r=(0,Rn.resolveLateType)(r);let n=cS(r);if(n.length||(n=[(0,Rn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}),t}return[]}function lS(e){return!!((0,Ue.isType)(e)&&((0,Ue.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ue.isLateType)(e)))}function Ao(e){return(0,Ue.isType)(e)?lS(e)?!0:(0,Ue.isUnionType)(e)?(0,Rn.getUnionSubTypes)(e).every(t=>Ao(t)||t.name==="undefined"):(0,Ue.isOptionalType)(e)&&Ao((0,Rn.getSubType)(e))||(0,Ue.isArrayType)(e)&&Ao((0,Rn.getSubType)(e))?!0:!!((0,Ue.isMapType)(e)&&Ao((0,Rn.getSubType)(e))):!1}function fS(e){return(0,Ue.isStateTreeNode)(e)&&Ao((0,Ue.getType)(e))}function OF(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var hS=b(To=>{"use strict";var EF=To&&To.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(To,"__esModule",{value:!0});To.ConfigurationSchema=CF;To.ConfigurationReference=kF;var Jt=vt(),AF=EF(aS()),dS=Um(),pS=Nm();function TF(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function PF(e){return Array.isArray(e)&&e.length===0}function RF(e,t,r={}){var n;if(typeof e!="string")throw new Error("first arg must be string name of the model that this config schema goes with");let i=t,o=r;return!((n=r.baseConfiguration)===null||n===void 0)&&n.jbrowseSchemaDefinition&&(i={...r.baseConfiguration.jbrowseSchemaDefinition,...i},o={...r.baseConfiguration.jbrowseSchemaOptions,...r},o.baseConfiguration=void 0),{schemaDefinition:i,options:o}}function MF(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Jt.types.optional(Jt.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error(`Cannot have both explicit and implicit identifiers in ${e}`);r.explicitIdentifier?typeof r.explicitIdentifier=="string"?(n[r.explicitIdentifier]=Jt.types.identifier,i=r.explicitIdentifier):(n.id=Jt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=pS.ElementId,i=r.implicitIdentifier):(n.id=pS.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach(([c,d])=>{if((0,Jt.isType)(d)&&(0,Jt.isLateType)(d)||(0,dS.isConfigurationSchemaType)(d))n[c]=d;else if(typeof d=="string"||typeof d=="number")o[c]=d;else if(typeof d=="object"){if(!d.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,AF.default)(c,d)}catch(p){throw new Error(`invalid config slot definition for ${e}.${c}: ${p}`)}}else throw new Error(`invalid configuration schema definition, "${c}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`)});let a=Jt.types.model(`${e}ConfigurationSchema`,n).actions(c=>({setSubschema(d,p){if(!(0,dS.isConfigurationSchemaType)(n[d]))throw new Error(`${d} is not a subschema, cannot replace`);let f=(0,Jt.isStateTreeNode)(p)?p:n[d].create(p);return c[d]=f,f}}));Object.keys(o).length&&(a=a.volatile(()=>o)),r.actions&&(a=a.actions(r.actions)),r.views&&(a=a.views(r.views)),r.extend&&(a=a.extend(r.extend));let u=i?{[i]:"placeholderId"}:{},l=r.explicitlyTyped?{type:e,...u}:u,s=(0,Jt.getSnapshot)(a.create(l));return a=a.postProcessSnapshot(c=>{let d={},p=!0;for(let[f,h]of Object.entries(c))p&&(typeof s[f]=="object"&&typeof h=="object"?JSON.stringify(s[f])!==JSON.stringify(h)&&(p=!1):s[f]!==h&&(p=!1)),h!==void 0&&o[f]===void 0&&!TF(h)&&!PF(h)&&(d[f]=h);return p?{}:d}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Jt.types.optional(a,l)}function CF(e,t,r){let{schemaDefinition:n,options:i}=RF(e,t,r),o=MF(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function kF(e){return Jt.types.union(Jt.types.reference(e),e)}});var Wm=b(mr=>{"use strict";var qF=mr&&mr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),IF=mr&&mr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&qF(t,e,r)};Object.defineProperty(mr,"__esModule",{value:!0});mr.ConfigurationSchema=mr.ConfigurationReference=void 0;var mS=hS();Object.defineProperty(mr,"ConfigurationReference",{enumerable:!0,get:function(){return mS.ConfigurationReference}});Object.defineProperty(mr,"ConfigurationSchema",{enumerable:!0,get:function(){return mS.ConfigurationSchema}});IF(Um(),mr)});var vS=b(Pu=>{"use strict";var jF=Pu&&Pu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pu,"__esModule",{value:!0});var Hm=Wm(),FF=jF(sh()),Vm=class{constructor(t){this.pluginManager=t,this.adapterCache=new FF.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,Hm.readConfObject)(r,"textSearchAdapterId"),i=this.adapterCache.get(n);if(i)return i;{let a=await this.pluginManager.getTextSearchAdapterType(r.type).getAdapterClass(),u=new a(r,void 0,this.pluginManager);return this.adapterCache.set(n,u),u}}))}relevantAdapters(t){let r=this.pluginManager.rootModel,{aggregateTextSearchAdapters:n}=r?.jbrowse,{tracks:i}=r?.session,{assemblyName:o}=t;return[...this.getAdaptersWithAssembly(o,n),...this.getTrackAdaptersWithAssembly(o,i)]}getAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Hm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Hm.readConfObject)(n,["textSearching","textSearchAdapter","assemblyNames"]))===null||i===void 0?void 0:i.includes(t)}).map(n=>n.textSearching.textSearchAdapter)}async search(t,r,n){let i=await this.loadTextSearchAdapters(r),o=await Promise.all(i.map(a=>a.searchIndex(t)));return this.sortResults(o.flat(),n)}sortResults(t,r){return r(t.sort((n,i)=>-i.getLabel().localeCompare(n.getLabel()))).sort((n,i)=>n.getScore()-i.getScore())}};Pu.default=Vm});var kc=b(se=>{"use strict";var LF=se&&se.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),NF=se&&se.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&LF(t,e,r)},DF=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(se,"__esModule",{value:!0});se.TextSearchManager=se.RetryError=se.AuthNeededError=void 0;se.isViewContainer=BF;se.isSessionModel=Mn;se.isSessionModelWithConfigEditing=UF;se.isSessionWithAddTracks=WF;se.isSessionWithShareURL=HF;se.isSessionModelWithWidgets=VF;se.isSessionModelWithConnections=GF;se.isSessionModelWithConnectionEditing=$F;se.isSessionWithSessionPlugins=KF;se.isSelectionContainer=YF;se.isViewModel=ZF;se.isTrackModel=JF;se.isDisplayModel=XF;se.isTrackViewModel=QF;se.isAppRootModel=eL;se.isRootModelWithInternetAccounts=tL;se.isAbstractMenuManager=rL;se.isUriLocation=nL;se.isLocalPathLocation=iL;se.isBlobLocation=oL;se.isAuthNeededException=aL;se.isRetryException=uL;var zF=vt();NF(wx(),se);function BF(e){return(0,zF.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function Mn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function UF(e){return Mn(e)&&"editConfiguration"in e}function WF(e){return Mn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function HF(e){return Mn(e)&&"shareURL"in e&&!!e.shareURL}function VF(e){return Mn(e)&&"widgets"in e}function GF(e){return Mn(e)&&"makeConnection"in e}function $F(e){return Mn(e)&&"addConnectionConf"in e}function KF(e){return Mn(e)&&"sessionPlugins"in e}function YF(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function ZF(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function JF(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function XF(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function QF(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function eL(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function tL(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function rL(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function nL(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function iL(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function oL(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var Gm=class e extends Error{constructor(t,r){super(t),this.message=t,this.url=r,this.name="AuthNeededError",Object.setPrototypeOf(this,e.prototype)}};se.AuthNeededError=Gm;var $m=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};se.RetryError=$m;function aL(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function uL(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var sL=vS();Object.defineProperty(se,"TextSearchManager",{enumerable:!0,get:function(){return DF(sL).default}})});var qc=b((XQ,bS)=>{bS.exports=JBrowseExports.mobx});var gS=b(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.when=void 0;var cL=qc();Object.defineProperty(Ic,"when",{enumerable:!0,get:function(){return cL.when}})});var _S=b(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.intersection2=lL;Ru.doesIntersect2=fL;Ru.isContainedWithin=dL;function lL(e,t,r,n){return t>r&&e<n&&n-r&&t-e?e>r?t<n?[e,t]:[e,n]:t<n?[r,t]:[r,n]:[]}function fL(e,t,r,n){return t>r&&e<n}function dL(e,t,r,n){return r<=e&&n>=t}});var yS=b(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.dedupe=pL;function pL(e,t=JSON.stringify){let r=[],n=new Set;for(let i of e){let o=t(i);n.has(o)||(r.push(i),n.add(o))}return r}});var Xm=b((ree,OS)=>{"use strict";var jc={},Nc={},Mu={METHOD:"method",PROPERTY:"property"},Fc=class{constructor(t,r){this.inst=t,this.args=r}},Ym=class extends Fc{constructor(t,r){super(t,r),this.type=Mu.METHOD}execute(t){t[this.inst](...this.args)}},Zm=class extends Fc{constructor(t,r){super(t,r),this.type=Mu.PROPERTY}execute(t){t[this.inst]=this.args[0]}},hL={[Mu.METHOD]:Ym,[Mu.PROPERTY]:Zm},Lc=class{constructor(t,r,n){return new hL[t](r,n)}};Object.entries(Mu).forEach(([e,t])=>{Object.defineProperty(Lc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Nc=Lc;var xS=Object.freeze({METHODS:["addHitRegion","arc","arcTo","beginPath","bezierCurveTo","clearHitRegions","clearRect","clip","closePath","drawFocusIfNeeded","drawImage","ellipse","fill","fillRect","fillText","lineTo","moveTo","putImageData","quadraticCurveTo","rect","removeHitRegion","resetTransform","restore","rotate","save","scale","scrollPathIntoView","setLineDash","setTransform","stroke","strokeRect","strokeText","transform","translate"],PROPERTIES:["direction","fillStyle","filter","font","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","imageSmoothingQuality","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline"]}),Fr=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),Cu=class{constructor(t=null){this[Fr.sequence]=[],t&&this[Fr.fromJSON](t)}[Fr.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[Fr.push](r,n,i)})}[Fr.push](t,r,n){this[Fr.sequence].push(new Nc(t,r,n))}execute(t){t.save(),this[Fr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Fr.sequence]}}};xS.METHODS.forEach(e=>{Object.defineProperty(Cu.prototype,e,{value:function(...r){this[Fr.push](Nc.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});xS.PROPERTIES.forEach(e=>{Object.defineProperty(Cu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Fr.push](Nc.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});jc=Cu;var SS={},wS=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function mL(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Jm=class extends jc{build(t={}){let r=new jc;return this[wS.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?mL(u,t):u);r[wS.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};SS=Jm;OS.exports={CanvasSequence:jc,CanvasBlueprint:SS}});var AS=b((nee,ES)=>{ES.exports=!1});var Qm=b(lt=>{"use strict";var vL=lt&&lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});lt.ImageBitmapType=lt.createImageBitmap=lt.createCanvas=void 0;lt.drawImageOntoCanvasContext=gL;var PS=Xm(),bL=vL(AS());function gL(e,t){e.serializedCommands?new PS.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var TS={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:bL.default};TS.realOffscreenCanvas?(lt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),lt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,lt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):TS.node?(lt.createCanvas=(...e)=>nodeCreateCanvas(...e),lt.createImageBitmap=async e=>{let t=e.toDataURL(),r=new nodeImage;return new Promise((n,i)=>{r.onload=()=>{n(r)},r.onerror=i,r.src=t})}):(lt.createCanvas=(e,t)=>{let r=new PS.CanvasSequence;return{width:e,height:t,getContext(){return r}}},lt.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},lt.ImageBitmapType=String)});var tv=b(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});ev.blobToDataURL=_L;function _L(e){let t=new FileReader;return new Promise((r,n)=>{t.onload=i=>{i.target?r(i.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)})}});var RS=b((aee,Dc)=>{(function(){"use strict";var e,t,r,n,i;function o(d,p){var f=Object.keys(p),h;for(h=0;h<f.length;h++)d=d.replace(new RegExp("\\{"+f[h]+"\\}","gi"),p[f[h]]);return d}function a(d){var p,f,h;if(!d)throw new Error("cannot create a random attribute name for an undefined object");p="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",f="";do for(f="",h=0;h<12;h++)f+=p[Math.floor(Math.random()*p.length)];while(d[f]);return f}function u(d,p){var f,h,m={},g,_;for(d=d.split(","),p=p||10,f=0;f<d.length;f+=2)h="&"+d[f+1]+";",g=parseInt(d[f],p),m[h]="&#"+g+";";return m["\\xa0"]="&#160;",m}function l(d){var p={left:"start",right:"end",center:"middle",start:"start",end:"end"};return p[d]||p.start}function s(d){var p={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return p[d]||p.alphabetic}i=u("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),e={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"}},r=function(d,p){this.__root=d,this.__ctx=p},r.prototype.addColorStop=function(d,p){var f=this.__ctx.__createElement("stop"),h,m;f.setAttribute("offset",d),p.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,m=h.exec(p),f.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:m[1],g:m[2],b:m[3]})),f.setAttribute("stop-opacity",m[4])):f.setAttribute("stop-color",p),this.__root.appendChild(f)},n=function(d,p){this.__root=d,this.__ctx=p},t=function(d){var p={width:500,height:500,enableMirroring:!1},f;if(arguments.length>1?(f=p,f.width=arguments[0],f.height=arguments[1]):d?f=d:f=p,!(this instanceof t))return new t(f);this.width=f.width||p.width,this.height=f.height||p.height,this.enableMirroring=f.enableMirroring!==void 0?f.enableMirroring:p.enableMirroring,this.canvas=this,this.__document=f.document||document,this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__root.setAttribute("version",1.1),this.__root.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__root.setAttribute("width",this.width),this.__root.setAttribute("height",this.height),this.__ids={},this.__defs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__root.appendChild(this.__currentElement)},t.prototype.__createElement=function(d,p,f){typeof p>"u"&&(p={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",d),m=Object.keys(p),g,_;for(f&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),g=0;g<m.length;g++)_=m[g],h.setAttribute(_,p[_]);return h},t.prototype.__setDefaultStyles=function(){var d=Object.keys(e),p,f;for(p=0;p<d.length;p++)f=d[p],this[f]=e[f].canvas},t.prototype.__applyStyleState=function(d){var p=Object.keys(d),f,h;for(f=0;f<p.length;f++)h=p[f],this[h]=d[h]},t.prototype.__getStyleState=function(){var d,p={},f=Object.keys(e),h;for(d=0;d<f.length;d++)h=f[d],p[h]=this[h];return p},t.prototype.__applyStyleToCurrentElement=function(d){var p=Object.keys(e),f,h,m,g,_,w;for(f=0;f<p.length;f++)if(h=e[p[f]],m=this[p[f]],h.apply)if(h.apply.indexOf("fill")!==-1&&m instanceof n){if(m.__ctx)for(;m.__ctx.__defs.childNodes.length;)g=m.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[g]=g,this.__defs.appendChild(m.__ctx.__defs.childNodes[0]);this.__currentElement.setAttribute("fill",o("url(#{id})",{id:m.__root.getAttribute("id")}))}else h.apply.indexOf("fill")!==-1&&m instanceof r?this.__currentElement.setAttribute("fill",o("url(#{id})",{id:m.__root.getAttribute("id")})):h.apply.indexOf(d)!==-1&&h.svg!==m&&((h.svgAttr==="stroke"||h.svgAttr==="fill")&&m.indexOf("rgba")!==-1?(_=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=_.exec(m),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:w[1],g:w[2],b:w[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",w[4])):this.__currentElement.setAttribute(h.svgAttr,m))},t.prototype.__closestGroupOrSvg=function(d){return d=d||this.__currentElement,d.nodeName==="g"||d.nodeName==="svg"?d:this.__closestGroupOrSvg(d.parentNode)},t.prototype.getSerializedSvg=function(d){var p=new XMLSerializer().serializeToString(this.__root),f,h,m,g,_,w;if(w=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,w.test(p)&&(p=p.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),d)for(f=Object.keys(i),h=0;h<f.length;h++)m=f[h],g=i[m],_=new RegExp(m,"gi"),_.test(p)&&(p=p.replace(_,g));return p},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var d=this.__createElement("g"),p=this.__closestGroupOrSvg();this.__groupStack.push(p),p.appendChild(d),this.__currentElement=d,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var d=this.__stack.pop();this.__applyStyleState(d)},t.prototype.__addTransform=function(d){var p=this.__closestGroupOrSvg();if(p.childNodes.length>0){var f=this.__createElement("g");p.appendChild(f),this.__currentElement=f}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=d,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(d,p){p===void 0&&(p=d),this.__addTransform(o("scale({x},{y})",{x:d,y:p}))},t.prototype.rotate=function(d){var p=d*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:p,cx:0,cy:0}))},t.prototype.translate=function(d,p){this.__addTransform(o("translate({x},{y})",{x:d,y:p}))},t.prototype.transform=function(d,p,f,h,m,g){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:d,b:p,c:f,d:h,e:m,f:g}))},t.prototype.beginPath=function(){var d,p;this.__currentDefaultPath="",this.__currentPosition={},d=this.__createElement("path",{},!0),p=this.__closestGroupOrSvg(),p.appendChild(d),this.__currentElement=d},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var d=this.__currentDefaultPath;this.__currentElement.setAttribute("d",d)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(d){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=d},t.prototype.moveTo=function(d,p){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:d,y:p},this.__addPathCommand(o("M {x} {y}",{x:d,y:p}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(d,p){this.__currentPosition={x:d,y:p},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:d,y:p})):this.__addPathCommand(o("M {x} {y}",{x:d,y:p}))},t.prototype.bezierCurveTo=function(d,p,f,h,m,g){this.__currentPosition={x:m,y:g},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:d,cp1y:p,cp2x:f,cp2y:h,x:m,y:g}))},t.prototype.quadraticCurveTo=function(d,p,f,h){this.__currentPosition={x:f,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:d,cpy:p,x:f,y:h}))};var c=function(d){var p=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return[d[0]/p,d[1]/p]};t.prototype.arcTo=function(d,p,f,h,m){var g=this.__currentPosition&&this.__currentPosition.x,_=this.__currentPosition&&this.__currentPosition.y;if(!(typeof g>"u"||typeof _>"u")){if(m<0)throw new Error("IndexSizeError: The radius provided ("+m+") is negative.");if(g===d&&_===p||d===f&&p===h||m===0){this.lineTo(d,p);return}var w=c([g-d,_-p]),y=c([f-d,h-p]);if(w[0]*y[1]===w[1]*y[0]){this.lineTo(d,p);return}var x=w[0]*y[0]+w[1]*y[1],O=Math.acos(Math.abs(x)),A=c([w[0]+y[0],w[1]+y[1]]),T=m/Math.sin(O/2),R=d+T*A[0],C=p+T*A[1],M=[-w[1],w[0]],P=[y[1],-y[0]],N=function(W){var j=W[0],D=W[1];return D>=0?Math.acos(j):-Math.acos(j)},k=N(M),I=N(P);this.lineTo(R+M[0]*m,C+M[1]*m),this.arc(R,C,m,k,I)}},t.prototype.stroke=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")},t.prototype.fill=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")},t.prototype.rect=function(d,p,f,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(d,p),this.lineTo(d+f,p),this.lineTo(d+f,p+h),this.lineTo(d,p+h),this.lineTo(d,p),this.closePath()},t.prototype.fillRect=function(d,p,f,h){var m,g;m=this.__createElement("rect",{x:d,y:p,width:f,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(d,p,f,h){var m,g;m=this.__createElement("rect",{x:d,y:p,width:f,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(d,p,f,h){var m,g=this.__closestGroupOrSvg();m=this.__createElement("rect",{x:d,y:p,width:f,height:h,fill:"#FFFFFF"},!0),g.appendChild(m)},t.prototype.createLinearGradient=function(d,p,f,h){var m=this.__createElement("linearGradient",{id:a(this.__ids),x1:d+"px",x2:f+"px",y1:p+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(m),new r(m,this)},t.prototype.createRadialGradient=function(d,p,f,h,m,g){var _=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:m+"px",r:g+"px",fx:d+"px",fy:p+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(_),new r(_,this)},t.prototype.__parseFont=function(){var d=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\"\sa-z]+?)\s*$/i,p=d.exec(this.font),f={style:p[1]||"normal",size:p[4]||"10px",family:p[6]||"sans-serif",weight:p[3]||"normal",decoration:p[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(f.decoration="underline"),this.__fontHref&&(f.href=this.__fontHref),f},t.prototype.__wrapTextLink=function(d,p){if(d.href){var f=this.__createElement("a");return f.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.href),f.appendChild(p),f}return p},t.prototype.__applyText=function(d,p,f,h){var m=this.__parseFont(),g=this.__closestGroupOrSvg(),_=this.__createElement("text",{"font-family":m.family,"font-size":m.size,"font-style":m.style,"font-weight":m.weight,"text-decoration":m.decoration,x:p,y:f,"text-anchor":l(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);_.appendChild(this.__document.createTextNode(d)),this.__currentElement=_,this.__applyStyleToCurrentElement(h),g.appendChild(this.__wrapTextLink(m,_))},t.prototype.fillText=function(d,p,f){this.__applyText(d,p,f,"fill")},t.prototype.strokeText=function(d,p,f){this.__applyText(d,p,f,"stroke")},t.prototype.measureText=function(d){return this.__ctx.font=this.font,this.__ctx.measureText(d)},t.prototype.arc=function(d,p,f,h,m,g){if(h!==m){h=h%(2*Math.PI),m=m%(2*Math.PI),h===m&&(m=(m+2*Math.PI-.001*(g?-1:1))%(2*Math.PI));var _=d+f*Math.cos(m),w=p+f*Math.sin(m),y=d+f*Math.cos(h),x=p+f*Math.sin(h),O=g?0:1,A=0,T=m-h;T<0&&(T+=2*Math.PI),g?A=T>Math.PI?0:1:A=T>Math.PI?1:0,this.lineTo(y,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:f,ry:f,xAxisRotation:0,largeArcFlag:A,sweepFlag:O,endX:_,endY:w})),this.__currentPosition={x:_,y:w}}},t.prototype.clip=function(){var d=this.__closestGroupOrSvg(),p=this.__createElement("clipPath"),f=a(this.__ids),h=this.__createElement("g");d.removeChild(this.__currentElement),p.setAttribute("id",f),p.appendChild(this.__currentElement),this.__defs.appendChild(p),d.setAttribute("clip-path",o("url(#{id})",{id:f})),d.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var d=Array.prototype.slice.call(arguments),p=d[0],f,h,m,g,_=0,w=0,y,x,O,A,T,R,C,M,P,N,k;if(d.length===3)f=d[1],h=d[2],y=p.width,x=p.height,m=y,g=x;else if(d.length===5)f=d[1],h=d[2],m=d[3],g=d[4],y=p.width,x=p.height;else if(d.length===9)_=d[1],w=d[2],y=d[3],x=d[4],f=d[5],h=d[6],m=d[7],g=d[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(O=this.__closestGroupOrSvg(),C=this.__currentElement,p instanceof t){for(A=p.getSvg(),T=A.childNodes[0];T.childNodes.length;)k=T.childNodes[0].getAttribute("id"),this.__ids[k]=k,this.__defs.appendChild(T.childNodes[0]);R=A.childNodes[1],O.appendChild(R),this.__currentElement=R,this.translate(f,h),this.__currentElement=C}else(p.nodeName==="CANVAS"||p.nodeName==="IMG")&&(M=this.__createElement("image"),M.setAttribute("width",m),M.setAttribute("height",g),M.setAttribute("preserveAspectRatio","none"),(_||w||y!==p.width||x!==p.height)&&(P=this.__document.createElement("canvas"),P.width=m,P.height=g,N=P.getContext("2d"),N.drawImage(p,_,w,y,x,0,0,m,g),p=P),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p.nodeName==="CANVAS"?p.toDataURL():p.getAttribute("src")),O.appendChild(M),this.__currentElement=M,this.translate(f,h),this.__currentElement=C)},t.prototype.createPattern=function(d,p){var f=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),m;return f.setAttribute("id",h),f.setAttribute("width",d.width),f.setAttribute("height",d.height),d.nodeName==="CANVAS"||d.nodeName==="IMG"?(m=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),m.setAttribute("width",d.width),m.setAttribute("height",d.height),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.nodeName==="CANVAS"?d.toDataURL():d.getAttribute("src")),f.appendChild(m),this.__defs.appendChild(f)):d instanceof t&&(f.appendChild(d.__root.childNodes[1]),this.__defs.appendChild(f)),new n(f,this)},t.prototype.drawFocusRing=function(){},t.prototype.createImageData=function(){},t.prototype.getImageData=function(){},t.prototype.putImageData=function(){},t.prototype.globalCompositeOperation=function(){},t.prototype.setTransform=function(){},typeof window=="object"&&(window.C2S=t),typeof Dc=="object"&&typeof Dc.exports=="object"&&(Dc.exports=t)})()});var kS=b(vr=>{"use strict";var yL=vr&&vr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),wL=vr&&vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xL=vr&&vr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&yL(r,t,n[i]);return wL(r,t),r}}();Object.defineProperty(vr,"__esModule",{value:!0});vr.renderToAbstractCanvas=EL;vr.getSerializedSvg=AL;vr.ReactRendering=TL;var MS=Ka(),SL=Ye(),CS=Xm(),OL=tv(),rv=Qm();async function EL(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,rv.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),reactElement:(0,MS.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,OL.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new CS.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,rv.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),imageData:await(0,rv.createImageBitmap)(u)}}}async function AL(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>xL(RS())),o=new i.default(t,r);return new CS.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function TL({rendering:e}){return(0,SL.isValidElement)(e.reactElement)?e.reactElement:(0,MS.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var IS=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.isFeature=PL;function PL(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function qS(e){return"uniqueId"in e&&typeof e.data!="object"}var nv=class e{constructor(t){var r;qS(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=qS(t)?t.uniqueId:t.id;if(n==null)throw new Error("SimpleFeature requires a unique `id` or `data.uniqueId` attribute");if(this.uniqueId=String(n),!(this.data.aliases||this.data.end-this.data.start>=0))throw new Error(`invalid feature data, end less than start. end: ${this.data.end} start: ${this.data.start}`);this.data.subfeatures&&(this.subfeatures=(r=this.data.subfeatures)===null||r===void 0?void 0:r.map((i,o)=>typeof i.get!="function"?new e({id:i.uniqueId||`${n}-${o}`,data:{strand:this.data.strand,...i},parent:this}):i))}get(t){return t==="subfeatures"?this.subfeatures:t==="parent"?this.parent():this.data[t]}set(t,r){this.data[t]=r}tags(){return Object.keys(this.data)}id(){return this.uniqueId}parent(){return this.parentHandle}children(){return this.get("subfeatures")}toJSON(){let t={...this.data,uniqueId:this.id()},r=this.parent();r&&(t.parentId=r.id());let n=this.children();return n&&(t.subfeatures=n.map(i=>i.toJSON())),t}static fromJSON(t){return new e({...t})}};zc.default=nv});var we=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.isFunction=void 0;function RL(e){return typeof e=="function"}Bc.isFunction=RL});var Cn=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.createErrorClass=void 0;function ML(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}Uc.createErrorClass=ML});var iv=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.UnsubscriptionError=void 0;var CL=Cn();Wc.UnsubscriptionError=CL.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
1
+ "use strict";var JBrowsePluginMafViewer=(()=>{var KR=Object.create;var ns=Object.defineProperty;var ZR=Object.getOwnPropertyDescriptor;var YR=Object.getOwnPropertyNames;var JR=Object.getPrototypeOf,XR=Object.prototype.hasOwnProperty;var ht=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),is=(e,t)=>{for(var r in t)ns(e,r,{get:t[r],enumerable:!0})},Jb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of YR(t))!XR.call(e,i)&&i!==r&&ns(e,i,{get:()=>t[i],enumerable:!(n=ZR(t,i))||n.enumerable});return e};var D=(e,t,r)=>(r=e!=null?KR(JR(e)):{},Jb(t||!e||!e.__esModule?ns(r,"default",{value:e,enumerable:!0}):r,e)),Xb=e=>Jb(ns({},"__esModule",{value:!0}),e);var eg=b((PZ,Qb)=>{Qb.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Nr=b((RZ,rg)=>{rg.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var Xd=b(()=>{});var tp=b(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});function ng(e){return(typeof e=="object"&&e!==null&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}var Qd=class{constructor(t,r={}){this.baseOverrides={},this.url=t;let n=r.fetch||globalThis.fetch.bind(globalThis);r.overrides&&(this.baseOverrides=r.overrides),this.fetchImplementation=n}async fetch(t,r){let n;try{n=await this.fetchImplementation(t,r)}catch(i){if(`${i}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${t} to attempt to work around chrome CORS header caching bug`);try{n=await this.fetchImplementation(t,{...r,cache:"reload"})}catch(o){throw new Error(`${ng(o)} fetching ${t}`,{cause:o})}}else throw new Error(`${ng(i)} fetching ${t}`,{cause:i})}return n}async read(t,r,n={}){let{headers:i={},signal:o,overrides:a={}}=n;t<1/0?i.range=`bytes=${r}-${r+t}`:t===1/0&&r!==0&&(i.range=`bytes=${r}-`);let u=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...i,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:o});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(u.status===200&&r===0||u.status===206){let l=await u.arrayBuffer(),s=u.headers.get("content-range"),c=/\/(\d+)$/.exec(s||"");return c?.[1]&&(this._stat={size:parseInt(c[1],10)}),new Uint8Array(l.slice(0,t))}throw u.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${u.status} fetching ${this.url}`)}async readFile(t={}){let r,n;typeof t=="string"?(r=t,n={}):(r=t.encoding,n=t,delete n.encoding);let{headers:i={},signal:o,overrides:a={}}=n,u=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:o,...this.baseOverrides,...a});if(u.status!==200)throw new Error(`HTTP ${u.status} fetching ${this.url}`);if(r==="utf8")return u.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await u.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}};ep.default=Qd});var og=b(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0})});var ag=b(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var rp=class{constructor(t){this.blob=t,this.size=t.size}async read(t,r=0){if(!t)return new Uint8Array(0);let n=r,i=n+t;return new Uint8Array(await this.blob.slice(n,i).arrayBuffer())}async readFile(t){let r=typeof t=="string"?t:t?.encoding;if(r==="utf8")return this.blob.text();if(r)throw new Error(`unsupported encoding: ${r}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}};np.default=rp});var ya=b(it=>{"use strict";var eM=it&&it.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),tM=it&&it.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&eM(t,e,r)},ga=it&&it.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(it,"__esModule",{value:!0});it.LocalFile=it.RemoteFile=it.BlobFile=void 0;it.fromUrl=ug;it.open=iM;var rM=ga(Xd()),nM=ga(tp());tM(og(),it);function ug(e,t={}){return new nM.default(e,t)}function iM(e,t,r,n={}){if(r!==void 0)return r;if(e!==void 0)return ug(e,n);if(t!==void 0)return new rM.default(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}var oM=ag();Object.defineProperty(it,"BlobFile",{enumerable:!0,get:function(){return ga(oM).default}});var aM=tp();Object.defineProperty(it,"RemoteFile",{enumerable:!0,get:function(){return ga(aM).default}});var uM=Xd();Object.defineProperty(it,"LocalFile",{enumerable:!0,get:function(){return ga(uM).default}})});var Dr=b(vt=>{"use strict";var sM=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function cM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}vt.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)cM(r,n)&&(e[n]=r[n])}}return e};vt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var lM={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},fM={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};vt.setTyped=function(e){e?(vt.Buf8=Uint8Array,vt.Buf16=Uint16Array,vt.Buf32=Int32Array,vt.assign(vt,lM)):(vt.Buf8=Array,vt.Buf16=Array,vt.Buf32=Array,vt.assign(vt,fM))};vt.setTyped(sM)});var Mg=b(Vi=>{"use strict";var dM=Dr(),pM=4,sg=0,cg=1,hM=2;function Wi(e){for(var t=e.length;--t>=0;)e[t]=0}var vM=0,vg=1,mM=2,bM=3,gM=258,lp=29,Ea=256,wa=Ea+1+lp,Ui=30,fp=19,mg=2*wa+1,Qn=15,ip=16,yM=7,dp=256,bg=16,gg=17,yg=18,sp=[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],os=[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],_M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_g=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],wM=512,Br=new Array((wa+2)*2);Wi(Br);var _a=new Array(Ui*2);Wi(_a);var xa=new Array(wM);Wi(xa);var Sa=new Array(gM-bM+1);Wi(Sa);var pp=new Array(lp);Wi(pp);var as=new Array(Ui);Wi(as);function op(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var wg,xg,Sg;function ap(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Og(e){return e<256?xa[e]:xa[256+(e>>>7)]}function Oa(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Et(e,t,r){e.bi_valid>ip-r?(e.bi_buf|=t<<e.bi_valid&65535,Oa(e,e.bi_buf),e.bi_buf=t>>ip-e.bi_valid,e.bi_valid+=r-ip):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function hr(e,t,r){Et(e,r[t*2],r[t*2+1])}function Eg(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function xM(e){e.bi_valid===16?(Oa(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 SM(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,l=t.stat_desc.max_length,s,c,d,p,f,h,v=0;for(p=0;p<=Qn;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<mg;s++)c=e.heap[s],p=r[r[c*2+1]*2+1]+1,p>l&&(p=l,v++),r[c*2+1]=p,!(c>n)&&(e.bl_count[p]++,f=0,c>=u&&(f=a[c-u]),h=r[c*2],e.opt_len+=h*(p+f),o&&(e.static_len+=h*(i[c*2+1]+f)));if(v!==0){do{for(p=l-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[l]--,v-=2}while(v>0);for(p=l;p!==0;p--)for(c=e.bl_count[p];c!==0;)d=e.heap[--s],!(d>n)&&(r[d*2+1]!==p&&(e.opt_len+=(p-r[d*2+1])*r[d*2],r[d*2+1]=p),c--)}}function Ag(e,t,r){var n=new Array(Qn+1),i=0,o,a;for(o=1;o<=Qn;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var u=e[a*2+1];u!==0&&(e[a*2]=Eg(n[u]++,u))}}function OM(){var e,t,r,n,i,o=new Array(Qn+1);for(r=0,n=0;n<lp-1;n++)for(pp[n]=r,e=0;e<1<<sp[n];e++)Sa[r++]=n;for(Sa[r-1]=n,i=0,n=0;n<16;n++)for(as[n]=i,e=0;e<1<<os[n];e++)xa[i++]=n;for(i>>=7;n<Ui;n++)for(as[n]=i<<7,e=0;e<1<<os[n]-7;e++)xa[256+i++]=n;for(t=0;t<=Qn;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(Ag(Br,wa+1,o),e=0;e<Ui;e++)_a[e*2+1]=5,_a[e*2]=Eg(e,5);wg=new op(Br,sp,Ea+1,wa,Qn),xg=new op(_a,os,0,Ui,Qn),Sg=new op(new Array(0),_M,0,fp,yM)}function Pg(e){var t;for(t=0;t<wa;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Ui;t++)e.dyn_dtree[t*2]=0;for(t=0;t<fp;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 Tg(e){e.bi_valid>8?Oa(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 EM(e,t,r,n){Tg(e),n&&(Oa(e,r),Oa(e,~r)),dM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function lg(e,t,r,n){var i=t*2,o=r*2;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function up(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&lg(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!lg(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function fg(e,t,r){var n,i,o=0,a,u;if(e.last_lit!==0)do n=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++,n===0?hr(e,i,t):(a=Sa[i],hr(e,a+Ea+1,t),u=sp[a],u!==0&&(i-=pp[a],Et(e,i,u)),n--,a=Og(n),hr(e,a,r),u=os[a],u!==0&&(n-=as[a],Et(e,n,u)));while(o<e.last_lit);hr(e,dp,t)}function cp(e,t){var r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,a,u,l=-1,s;for(e.heap_len=0,e.heap_max=mg,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=l<2?++l:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)up(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],up(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[s*2]=r[a*2]+r[u*2],e.depth[s]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[a*2+1]=r[u*2+1]=s,e.heap[1]=s++,up(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],SM(e,t),Ag(r,l,e.bl_count)}function dg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[bg*2]++):u<=10?e.bl_tree[gg*2]++:e.bl_tree[yg*2]++,u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4))}function pg(e,t,r){var n,i=-1,o,a=t[0*2+1],u=0,l=7,s=4;for(a===0&&(l=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<l&&o===a)){if(u<s)do hr(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(hr(e,o,e.bl_tree),u--),hr(e,bg,e.bl_tree),Et(e,u-3,2)):u<=10?(hr(e,gg,e.bl_tree),Et(e,u-3,3)):(hr(e,yg,e.bl_tree),Et(e,u-11,7));u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4)}}function AM(e){var t;for(dg(e,e.dyn_ltree,e.l_desc.max_code),dg(e,e.dyn_dtree,e.d_desc.max_code),cp(e,e.bl_desc),t=fp-1;t>=3&&e.bl_tree[_g[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function PM(e,t,r,n){var i;for(Et(e,t-257,5),Et(e,r-1,5),Et(e,n-4,4),i=0;i<n;i++)Et(e,e.bl_tree[_g[i]*2+1],3);pg(e,e.dyn_ltree,t-1),pg(e,e.dyn_dtree,r-1)}function TM(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return sg;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return cg;for(r=32;r<Ea;r++)if(e.dyn_ltree[r*2]!==0)return cg;return sg}var hg=!1;function RM(e){hg||(OM(),hg=!0),e.l_desc=new ap(e.dyn_ltree,wg),e.d_desc=new ap(e.dyn_dtree,xg),e.bl_desc=new ap(e.bl_tree,Sg),e.bi_buf=0,e.bi_valid=0,Pg(e)}function Rg(e,t,r,n){Et(e,(vM<<1)+(n?1:0),3),EM(e,t,r,!0)}function MM(e){Et(e,vg<<1,3),hr(e,dp,Br),xM(e)}function kM(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===hM&&(e.strm.data_type=TM(e)),cp(e,e.l_desc),cp(e,e.d_desc),a=AM(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&t!==-1?Rg(e,t,r,n):e.strategy===pM||o===i?(Et(e,(vg<<1)+(n?1:0),3),fg(e,Br,_a)):(Et(e,(mM<<1)+(n?1:0),3),PM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),fg(e,e.dyn_ltree,e.dyn_dtree)),Pg(e),n&&Tg(e)}function CM(e,t,r){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]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Sa[r]+Ea+1)*2]++,e.dyn_dtree[Og(t)*2]++),e.last_lit===e.lit_bufsize-1}Vi._tr_init=RM;Vi._tr_stored_block=Rg;Vi._tr_flush_block=kM;Vi._tr_tally=CM;Vi._tr_align=MM});var hp=b((NZ,kg)=>{"use strict";function qM(e,t,r,n){for(var i=e&65535|0,o=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+t[n++]|0,o=o+i|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}kg.exports=qM});var vp=b((DZ,Cg)=>{"use strict";function IM(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var jM=IM();function LM(e,t,r,n){var i=jM,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Cg.exports=LM});var us=b((BZ,qg)=>{"use strict";qg.exports={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"}});var Ug=b(br=>{"use strict";var mt=Dr(),Bt=Mg(),Fg=hp(),en=vp(),FM=us(),ni=0,NM=1,DM=3,an=4,Ig=5,mr=0,jg=1,zt=-2,BM=-3,mp=-5,zM=-1,UM=1,ss=2,WM=3,VM=4,$M=0,HM=2,ds=8,GM=9,KM=15,ZM=8,YM=29,JM=256,gp=JM+1+YM,XM=30,QM=19,ek=2*gp+1,tk=15,we=3,nn=258,Xt=nn+we+1,rk=32,ps=42,yp=69,cs=73,ls=91,fs=103,ei=113,Pa=666,Ze=1,Ta=2,ti=3,Gi=4,nk=3;function on(e,t){return e.msg=FM[t],t}function Lg(e){return(e<<1)-(e>4?9:0)}function rn(e){for(var t=e.length;--t>=0;)e[t]=0}function tn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(mt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function ot(e,t){Bt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,tn(e.strm)}function Se(e,t){e.pending_buf[e.pending++]=t}function Aa(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function ik(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,mt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Fg(e.adler,t,i,r):e.state.wrap===2&&(e.adler=en(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Ng(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,l=e.strstart>e.w_size-Xt?e.strstart-(e.w_size-Xt):0,s=e.window,c=e.w_mask,d=e.prev,p=e.strstart+nn,f=s[n+a-1],h=s[n+a];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(s[i+a]!==h||s[i+a-1]!==f||s[i]!==s[n]||s[++i]!==s[n+1])){n+=2,i++;do;while(s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&s[++n]===s[++i]&&n<p);if(o=nn-(p-n),n=p-nn,o>a){if(e.match_start=t,a=o,o>=u)break;f=s[n+a-1],h=s[n+a]}}while((t=d[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function ri(e){var t=e.w_size,r,n,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Xt)){mt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);o+=t}if(e.strm.avail_in===0)break;if(n=ik(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=we)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+we-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<we)););}while(e.lookahead<Xt&&e.strm.avail_in!==0)}function ok(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ri(e),e.lookahead===0&&t===ni)return Ze;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,ot(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Xt&&(ot(e,!1),e.strm.avail_out===0))return Ze}return e.insert=0,t===an?(ot(e,!0),e.strm.avail_out===0?ti:Gi):(e.strstart>e.block_start&&(ot(e,!1),e.strm.avail_out===0),Ze)}function bp(e,t){for(var r,n;;){if(e.lookahead<Xt){if(ri(e),e.lookahead<Xt&&t===ni)return Ze;if(e.lookahead===0)break}if(r=0,e.lookahead>=we&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Xt&&(e.match_length=Ng(e,r)),e.match_length>=we)if(n=Bt._tr_tally(e,e.strstart-e.match_start,e.match_length-we),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=we){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=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 n=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(ot(e,!1),e.strm.avail_out===0))return Ze}return e.insert=e.strstart<we-1?e.strstart:we-1,t===an?(ot(e,!0),e.strm.avail_out===0?ti:Gi):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Ze:Ta}function $i(e,t){for(var r,n,i;;){if(e.lookahead<Xt){if(ri(e),e.lookahead<Xt&&t===ni)return Ze;if(e.lookahead===0)break}if(r=0,e.lookahead>=we&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+we-1])&e.hash_mask,r=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=we-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Xt&&(e.match_length=Ng(e,r),e.match_length<=5&&(e.strategy===UM||e.match_length===we&&e.strstart-e.match_start>4096)&&(e.match_length=we-1)),e.prev_length>=we&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-we,n=Bt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-we),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+we-1])&e.hash_mask,r=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=we-1,e.strstart++,n&&(ot(e,!1),e.strm.avail_out===0))return Ze}else if(e.match_available){if(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),n&&ot(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ze}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Bt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<we-1?e.strstart:we-1,t===an?(ot(e,!0),e.strm.avail_out===0?ti:Gi):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Ze:Ta}function ak(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=nn){if(ri(e),e.lookahead<=nn&&t===ni)return Ze;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=we&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+nn;do;while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);e.match_length=nn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(r=Bt._tr_tally(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ot(e,!1),e.strm.avail_out===0))return Ze}return e.insert=0,t===an?(ot(e,!0),e.strm.avail_out===0?ti:Gi):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Ze:Ta}function uk(e,t){for(var r;;){if(e.lookahead===0&&(ri(e),e.lookahead===0)){if(t===ni)return Ze;break}if(e.match_length=0,r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ot(e,!1),e.strm.avail_out===0))return Ze}return e.insert=0,t===an?(ot(e,!0),e.strm.avail_out===0?ti:Gi):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Ze:Ta}function vr(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var Hi;Hi=[new vr(0,0,0,0,ok),new vr(4,4,8,4,bp),new vr(4,5,16,8,bp),new vr(4,6,32,32,bp),new vr(4,4,16,16,$i),new vr(8,16,32,32,$i),new vr(8,16,128,128,$i),new vr(8,32,128,256,$i),new vr(32,128,258,1024,$i),new vr(32,258,258,4096,$i)];function sk(e){e.window_size=2*e.w_size,rn(e.head),e.max_lazy_match=Hi[e.level].max_lazy,e.good_match=Hi[e.level].good_length,e.nice_match=Hi[e.level].nice_length,e.max_chain_length=Hi[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=we-1,e.match_available=0,e.ins_h=0}function ck(){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=ds,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 mt.Buf16(ek*2),this.dyn_dtree=new mt.Buf16((2*XM+1)*2),this.bl_tree=new mt.Buf16((2*QM+1)*2),rn(this.dyn_ltree),rn(this.dyn_dtree),rn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new mt.Buf16(tk+1),this.heap=new mt.Buf16(2*gp+1),rn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new mt.Buf16(2*gp+1),rn(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 Dg(e){var t;return!e||!e.state?on(e,zt):(e.total_in=e.total_out=0,e.data_type=HM,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ps:ei,e.adler=t.wrap===2?0:1,t.last_flush=ni,Bt._tr_init(t),mr)}function Bg(e){var t=Dg(e);return t===mr&&sk(e.state),t}function lk(e,t){return!e||!e.state||e.state.wrap!==2?zt:(e.state.gzhead=t,mr)}function zg(e,t,r,n,i,o){if(!e)return zt;var a=1;if(t===zM&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>GM||r!==ds||n<8||n>15||t<0||t>9||o<0||o>VM)return on(e,zt);n===8&&(n=9);var u=new ck;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+we-1)/we),u.window=new mt.Buf8(u.w_size*2),u.head=new mt.Buf16(u.hash_size),u.prev=new mt.Buf16(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new mt.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=o,u.method=r,Bg(e)}function fk(e,t){return zg(e,t,ds,KM,ZM,$M)}function dk(e,t){var r,n,i,o;if(!e||!e.state||t>Ig||t<0)return e?on(e,zt):zt;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Pa&&t!==an)return on(e,e.avail_out===0?mp:zt);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ps)if(n.wrap===2)e.adler=0,Se(n,31),Se(n,139),Se(n,8),n.gzhead?(Se(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)),Se(n,n.gzhead.time&255),Se(n,n.gzhead.time>>8&255),Se(n,n.gzhead.time>>16&255),Se(n,n.gzhead.time>>24&255),Se(n,n.level===9?2:n.strategy>=ss||n.level<2?4:0),Se(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Se(n,n.gzhead.extra.length&255),Se(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=en(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=yp):(Se(n,0),Se(n,0),Se(n,0),Se(n,0),Se(n,0),Se(n,n.level===9?2:n.strategy>=ss||n.level<2?4:0),Se(n,nk),n.status=ei);else{var a=ds+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=ss||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=rk),a+=31-a%31,n.status=ei,Aa(n,a),n.strstart!==0&&(Aa(n,e.adler>>>16),Aa(n,e.adler&65535)),e.adler=1}if(n.status===yp)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=en(e.adler,n.pending_buf,n.pending-i,i)),tn(e),i=n.pending,n.pending===n.pending_buf_size));)Se(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=en(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=cs)}else n.status=cs;if(n.status===cs)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=en(e.adler,n.pending_buf,n.pending-i,i)),tn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.name.length?o=n.gzhead.name.charCodeAt(n.gzindex++)&255:o=0,Se(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=en(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=ls)}else n.status=ls;if(n.status===ls)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=en(e.adler,n.pending_buf,n.pending-i,i)),tn(e),i=n.pending,n.pending===n.pending_buf_size)){o=1;break}n.gzindex<n.gzhead.comment.length?o=n.gzhead.comment.charCodeAt(n.gzindex++)&255:o=0,Se(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=en(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=fs)}else n.status=fs;if(n.status===fs&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&tn(e),n.pending+2<=n.pending_buf_size&&(Se(n,e.adler&255),Se(n,e.adler>>8&255),e.adler=0,n.status=ei)):n.status=ei),n.pending!==0){if(tn(e),e.avail_out===0)return n.last_flush=-1,mr}else if(e.avail_in===0&&Lg(t)<=Lg(r)&&t!==an)return on(e,mp);if(n.status===Pa&&e.avail_in!==0)return on(e,mp);if(e.avail_in!==0||n.lookahead!==0||t!==ni&&n.status!==Pa){var l=n.strategy===ss?uk(n,t):n.strategy===WM?ak(n,t):Hi[n.level].func(n,t);if((l===ti||l===Gi)&&(n.status=Pa),l===Ze||l===ti)return e.avail_out===0&&(n.last_flush=-1),mr;if(l===Ta&&(t===NM?Bt._tr_align(n):t!==Ig&&(Bt._tr_stored_block(n,0,0,!1),t===DM&&(rn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),tn(e),e.avail_out===0))return n.last_flush=-1,mr}return t!==an?mr:n.wrap<=0?jg:(n.wrap===2?(Se(n,e.adler&255),Se(n,e.adler>>8&255),Se(n,e.adler>>16&255),Se(n,e.adler>>24&255),Se(n,e.total_in&255),Se(n,e.total_in>>8&255),Se(n,e.total_in>>16&255),Se(n,e.total_in>>24&255)):(Aa(n,e.adler>>>16),Aa(n,e.adler&65535)),tn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?mr:jg)}function pk(e){var t;return!e||!e.state?zt:(t=e.state.status,t!==ps&&t!==yp&&t!==cs&&t!==ls&&t!==fs&&t!==ei&&t!==Pa?on(e,zt):(e.state=null,t===ei?on(e,BM):mr))}function hk(e,t){var r=t.length,n,i,o,a,u,l,s,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ps||n.lookahead))return zt;for(a===1&&(e.adler=Fg(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(rn(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new mt.Buf8(n.w_size),mt.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),u=e.avail_in,l=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,ri(n);n.lookahead>=we;){i=n.strstart,o=n.lookahead-(we-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+we-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++;while(--o);n.strstart=i,n.lookahead=we-1,ri(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=we-1,n.match_available=0,e.next_in=l,e.input=s,e.avail_in=u,n.wrap=a,mr}br.deflateInit=fk;br.deflateInit2=zg;br.deflateReset=Bg;br.deflateResetKeep=Dg;br.deflateSetHeader=lk;br.deflate=dk;br.deflateEnd=pk;br.deflateSetDictionary=hk;br.deflateInfo="pako deflate (from Nodeca project)"});var _p=b(Ki=>{"use strict";var hs=Dr(),Wg=!0,Vg=!0;try{String.fromCharCode.apply(null,[0])}catch{Wg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Vg=!1}var Ra=new hs.Buf8(256);for(zr=0;zr<256;zr++)Ra[zr]=zr>=252?6:zr>=248?5:zr>=240?4:zr>=224?3:zr>=192?2:1;var zr;Ra[254]=Ra[254]=1;Ki.string2buf=function(e){var t,r,n,i,o,a=e.length,u=0;for(i=0;i<a;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new hs.Buf8(u),o=0,i=0;o<u;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<a&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function $g(e,t){if(t<65534&&(e.subarray&&Vg||!e.subarray&&Wg))return String.fromCharCode.apply(null,hs.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Ki.buf2binstring=function(e){return $g(e,e.length)};Ki.binstring2buf=function(e){for(var t=new hs.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Ki.buf2string=function(e,t){var r,n,i,o,a=t||e.length,u=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){u[n++]=i;continue}if(o=Ra[i],o>4){u[n++]=65533,r+=o-1;continue}for(i&=o===2?31:o===3?15:7;o>1&&r<a;)i=i<<6|e[r++]&63,o--;if(o>1){u[n++]=65533;continue}i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|i&1023)}return $g(u,n)};Ki.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Ra[e[r]]>t?r:t}});var wp=b((WZ,Hg)=>{"use strict";function vk(){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}Hg.exports=vk});var Yg=b(Ca=>{"use strict";var Ma=Ug(),ka=Dr(),Sp=_p(),Op=us(),mk=wp(),Zg=Object.prototype.toString,bk=0,xp=4,Zi=0,Gg=1,Kg=2,gk=-1,yk=0,_k=8;function ii(e){if(!(this instanceof ii))return new ii(e);this.options=ka.assign({level:gk,method:_k,chunkSize:16384,windowBits:15,memLevel:8,strategy:yk,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 mk,this.strm.avail_out=0;var r=Ma.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Zi)throw new Error(Op[r]);if(t.header&&Ma.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Sp.string2buf(t.dictionary):Zg.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Ma.deflateSetDictionary(this.strm,n),r!==Zi)throw new Error(Op[r]);this._dict_set=!0}}ii.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,o;if(this.ended)return!1;o=t===~~t?t:t===!0?xp:bk,typeof e=="string"?r.input=Sp.string2buf(e):Zg.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ka.Buf8(n),r.next_out=0,r.avail_out=n),i=Ma.deflate(r,o),i!==Gg&&i!==Zi)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===xp||o===Kg))&&(this.options.to==="string"?this.onData(Sp.buf2binstring(ka.shrinkBuf(r.output,r.next_out))):this.onData(ka.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Gg);return o===xp?(i=Ma.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Zi):(o===Kg&&(this.onEnd(Zi),r.avail_out=0),!0)};ii.prototype.onData=function(e){this.chunks.push(e)};ii.prototype.onEnd=function(e){e===Zi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ka.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ep(e,t){var r=new ii(t);if(r.push(e,!0),r.err)throw r.msg||Op[r.err];return r.result}function wk(e,t){return t=t||{},t.raw=!0,Ep(e,t)}function xk(e,t){return t=t||{},t.gzip=!0,Ep(e,t)}Ca.Deflate=ii;Ca.deflate=Ep;Ca.deflateRaw=wk;Ca.gzip=xk});var Xg=b(($Z,Jg)=>{"use strict";var vs=30,Sk=12;Jg.exports=function(t,r){var n,i,o,a,u,l,s,c,d,p,f,h,v,g,y,w,_,x,O,E,P,A,q,k,C;n=t.state,i=t.next_in,k=t.input,o=i+(t.avail_in-5),a=t.next_out,C=t.output,u=a-(r-t.avail_out),l=a+(t.avail_out-257),s=n.dmax,c=n.wsize,d=n.whave,p=n.wnext,f=n.window,h=n.hold,v=n.bits,g=n.lencode,y=n.distcode,w=(1<<n.lenbits)-1,_=(1<<n.distbits)-1;e:do{v<15&&(h+=k[i++]<<v,v+=8,h+=k[i++]<<v,v+=8),x=g[h&w];t:for(;;){if(O=x>>>24,h>>>=O,v-=O,O=x>>>16&255,O===0)C[a++]=x&65535;else if(O&16){E=x&65535,O&=15,O&&(v<O&&(h+=k[i++]<<v,v+=8),E+=h&(1<<O)-1,h>>>=O,v-=O),v<15&&(h+=k[i++]<<v,v+=8,h+=k[i++]<<v,v+=8),x=y[h&_];r:for(;;){if(O=x>>>24,h>>>=O,v-=O,O=x>>>16&255,O&16){if(P=x&65535,O&=15,v<O&&(h+=k[i++]<<v,v+=8,v<O&&(h+=k[i++]<<v,v+=8)),P+=h&(1<<O)-1,P>s){t.msg="invalid distance too far back",n.mode=vs;break e}if(h>>>=O,v-=O,O=a-u,P>O){if(O=P-O,O>d&&n.sane){t.msg="invalid distance too far back",n.mode=vs;break e}if(A=0,q=f,p===0){if(A+=c-O,O<E){E-=O;do C[a++]=f[A++];while(--O);A=a-P,q=C}}else if(p<O){if(A+=c+p-O,O-=p,O<E){E-=O;do C[a++]=f[A++];while(--O);if(A=0,p<E){O=p,E-=O;do C[a++]=f[A++];while(--O);A=a-P,q=C}}}else if(A+=p-O,O<E){E-=O;do C[a++]=f[A++];while(--O);A=a-P,q=C}for(;E>2;)C[a++]=q[A++],C[a++]=q[A++],C[a++]=q[A++],E-=3;E&&(C[a++]=q[A++],E>1&&(C[a++]=q[A++]))}else{A=a-P;do C[a++]=C[A++],C[a++]=C[A++],C[a++]=C[A++],E-=3;while(E>2);E&&(C[a++]=C[A++],E>1&&(C[a++]=C[A++]))}}else if((O&64)===0){x=y[(x&65535)+(h&(1<<O)-1)];continue r}else{t.msg="invalid distance code",n.mode=vs;break e}break}}else if((O&64)===0){x=g[(x&65535)+(h&(1<<O)-1)];continue t}else if(O&32){n.mode=Sk;break e}else{t.msg="invalid literal/length code",n.mode=vs;break e}break}}while(i<o&&a<l);E=v>>3,i-=E,v-=E<<3,h&=(1<<v)-1,t.next_in=i,t.next_out=a,t.avail_in=i<o?5+(o-i):5-(i-o),t.avail_out=a<l?257+(l-a):257-(a-l),n.hold=h,n.bits=v}});var oy=b((HZ,iy)=>{"use strict";var Qg=Dr(),Yi=15,ey=852,ty=592,ry=0,Ap=1,ny=2,Ok=[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],Ek=[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],Ak=[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],Pk=[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];iy.exports=function(t,r,n,i,o,a,u,l){var s=l.bits,c=0,d=0,p=0,f=0,h=0,v=0,g=0,y=0,w=0,_=0,x,O,E,P,A,q=null,k=0,C,W=new Qg.Buf16(Yi+1),B=new Qg.Buf16(Yi+1),M=null,R=0,z,L,T;for(c=0;c<=Yi;c++)W[c]=0;for(d=0;d<i;d++)W[r[n+d]]++;for(h=s,f=Yi;f>=1&&W[f]===0;f--);if(h>f&&(h=f),f===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p<f&&W[p]===0;p++);for(h<p&&(h=p),y=1,c=1;c<=Yi;c++)if(y<<=1,y-=W[c],y<0)return-1;if(y>0&&(t===ry||f!==1))return-1;for(B[1]=0,c=1;c<Yi;c++)B[c+1]=B[c]+W[c];for(d=0;d<i;d++)r[n+d]!==0&&(u[B[r[n+d]]++]=d);if(t===ry?(q=M=u,C=19):t===Ap?(q=Ok,k-=257,M=Ek,R-=257,C=256):(q=Ak,M=Pk,C=-1),_=0,d=0,c=p,A=a,v=h,g=0,E=-1,w=1<<h,P=w-1,t===Ap&&w>ey||t===ny&&w>ty)return 1;for(;;){z=c-g,u[d]<C?(L=0,T=u[d]):u[d]>C?(L=M[R+u[d]],T=q[k+u[d]]):(L=96,T=0),x=1<<c-g,O=1<<v,p=O;do O-=x,o[A+(_>>g)+O]=z<<24|L<<16|T|0;while(O!==0);for(x=1<<c-1;_&x;)x>>=1;if(x!==0?(_&=x-1,_+=x):_=0,d++,--W[c]===0){if(c===f)break;c=r[n+u[d]]}if(c>h&&(_&P)!==E){for(g===0&&(g=h),A+=p,v=c-g,y=1<<v;v+g<f&&(y-=W[v+g],!(y<=0));)v++,y<<=1;if(w+=1<<v,t===Ap&&w>ey||t===ny&&w>ty)return 1;E=_&P,o[E]=h<<24|v<<16|A-a|0}}return _!==0&&(o[A+_]=c-g<<24|64<<16|0),l.bits=h,0}});var By=b(Qt=>{"use strict";var jt=Dr(),Cp=hp(),gr=vp(),Tk=Xg(),qa=oy(),Rk=0,ky=1,Cy=2,ay=4,Mk=5,ms=6,oi=0,kk=1,Ck=2,Ut=-2,qy=-3,qp=-4,qk=-5,uy=8,Iy=1,sy=2,cy=3,ly=4,fy=5,dy=6,py=7,hy=8,vy=9,my=10,ys=11,Ur=12,Pp=13,by=14,Tp=15,gy=16,yy=17,_y=18,wy=19,bs=20,gs=21,xy=22,Sy=23,Oy=24,Ey=25,Ay=26,Rp=27,Py=28,Ty=29,Le=30,Ip=31,Ik=32,jk=852,Lk=592,Fk=15,Nk=Fk;function Ry(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Dk(){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 jt.Buf16(320),this.work=new jt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function jy(e){var t;return!e||!e.state?Ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Iy,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new jt.Buf32(jk),t.distcode=t.distdyn=new jt.Buf32(Lk),t.sane=1,t.back=-1,oi)}function Ly(e){var t;return!e||!e.state?Ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,jy(e))}function Fy(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ut:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Ly(e))}function Ny(e,t){var r,n;return e?(n=new Dk,e.state=n,n.window=null,r=Fy(e,t),r!==oi&&(e.state=null),r):Ut}function Bk(e){return Ny(e,Nk)}var My=!0,Mp,kp;function zk(e){if(My){var t;for(Mp=new jt.Buf32(512),kp=new jt.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(qa(ky,e.lens,0,288,Mp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;qa(Cy,e.lens,0,32,kp,0,e.work,{bits:5}),My=!1}e.lencode=Mp,e.lenbits=9,e.distcode=kp,e.distbits=5}function Dy(e,t,r,n){var i,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new jt.Buf8(o.wsize)),n>=o.wsize?(jt.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),jt.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(jt.arraySet(o.window,t,r-n,n,0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}function Uk(e,t){var r,n,i,o,a,u,l,s,c,d,p,f,h,v,g=0,y,w,_,x,O,E,P,A,q=new jt.Buf8(4),k,C,W=[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 Ut;r=e.state,r.mode===Ur&&(r.mode=Pp),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,d=u,p=l,A=oi;e:for(;;)switch(r.mode){case Iy:if(r.wrap===0){r.mode=Pp;break}for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.wrap&2&&s===35615){r.check=0,q[0]=s&255,q[1]=s>>>8&255,r.check=gr(r.check,q,2,0),s=0,c=0,r.mode=sy;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",r.mode=Le;break}if((s&15)!==uy){e.msg="unknown compression method",r.mode=Le;break}if(s>>>=4,c-=4,P=(s&15)+8,r.wbits===0)r.wbits=P;else if(P>r.wbits){e.msg="invalid window size",r.mode=Le;break}r.dmax=1<<P,e.adler=r.check=1,r.mode=s&512?my:Ur,s=0,c=0;break;case sy:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==uy){e.msg="unknown compression method",r.mode=Le;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Le;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(q[0]=s&255,q[1]=s>>>8&255,r.check=gr(r.check,q,2,0)),s=0,c=0,r.mode=cy;case cy:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.time=s),r.flags&512&&(q[0]=s&255,q[1]=s>>>8&255,q[2]=s>>>16&255,q[3]=s>>>24&255,r.check=gr(r.check,q,4,0)),s=0,c=0,r.mode=ly;case ly:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(q[0]=s&255,q[1]=s>>>8&255,r.check=gr(r.check,q,2,0)),s=0,c=0,r.mode=fy;case fy:if(r.flags&1024){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(q[0]=s&255,q[1]=s>>>8&255,r.check=gr(r.check,q,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=dy;case dy:if(r.flags&1024&&(f=r.length,f>u&&(f=u),f&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),jt.arraySet(r.head.extra,n,o,f,P)),r.flags&512&&(r.check=gr(r.check,n,f,o)),u-=f,o+=f,r.length-=f),r.length))break e;r.length=0,r.mode=py;case py:if(r.flags&2048){if(u===0)break e;f=0;do P=n[o+f++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P));while(P&&f<u);if(r.flags&512&&(r.check=gr(r.check,n,f,o)),u-=f,o+=f,P)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=hy;case hy:if(r.flags&4096){if(u===0)break e;f=0;do P=n[o+f++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P));while(P&&f<u);if(r.flags&512&&(r.check=gr(r.check,n,f,o)),u-=f,o+=f,P)break e}else r.head&&(r.head.comment=null);r.mode=vy;case vy:if(r.flags&512){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Le;break}s=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Ur;break;case my:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=Ry(s),s=0,c=0,r.mode=ys;case ys:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,Ck;e.adler=r.check=1,r.mode=Ur;case Ur:if(t===Mk||t===ms)break e;case Pp:if(r.last){s>>>=c&7,c-=c&7,r.mode=Rp;break}for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}switch(r.last=s&1,s>>>=1,c-=1,s&3){case 0:r.mode=by;break;case 1:if(zk(r),r.mode=bs,t===ms){s>>>=2,c-=2;break e}break;case 2:r.mode=yy;break;case 3:e.msg="invalid block type",r.mode=Le}s>>>=2,c-=2;break;case by:for(s>>>=c&7,c-=c&7;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Le;break}if(r.length=s&65535,s=0,c=0,r.mode=Tp,t===ms)break e;case Tp:r.mode=gy;case gy:if(f=r.length,f){if(f>u&&(f=u),f>l&&(f=l),f===0)break e;jt.arraySet(i,n,o,f,a),u-=f,o+=f,l-=f,a+=f,r.length-=f;break}r.mode=Ur;break;case yy:for(;c<14;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.nlen=(s&31)+257,s>>>=5,c-=5,r.ndist=(s&31)+1,s>>>=5,c-=5,r.ncode=(s&15)+4,s>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Le;break}r.have=0,r.mode=_y;case _y:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[W[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[W[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,k={bits:r.lenbits},A=qa(Rk,r.lens,0,19,r.lencode,0,r.work,k),r.lenbits=k.bits,A){e.msg="invalid code lengths set",r.mode=Le;break}r.have=0,r.mode=wy;case wy:for(;r.have<r.nlen+r.ndist;){for(;g=r.lencode[s&(1<<r.lenbits)-1],y=g>>>24,w=g>>>16&255,_=g&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(_<16)s>>>=y,c-=y,r.lens[r.have++]=_;else{if(_===16){for(C=y+2;c<C;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s>>>=y,c-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=Le;break}P=r.lens[r.have-1],f=3+(s&3),s>>>=2,c-=2}else if(_===17){for(C=y+3;c<C;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=y,c-=y,P=0,f=3+(s&7),s>>>=3,c-=3}else{for(C=y+7;c<C;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=y,c-=y,P=0,f=11+(s&127),s>>>=7,c-=7}if(r.have+f>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Le;break}for(;f--;)r.lens[r.have++]=P}}if(r.mode===Le)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Le;break}if(r.lenbits=9,k={bits:r.lenbits},A=qa(ky,r.lens,0,r.nlen,r.lencode,0,r.work,k),r.lenbits=k.bits,A){e.msg="invalid literal/lengths set",r.mode=Le;break}if(r.distbits=6,r.distcode=r.distdyn,k={bits:r.distbits},A=qa(Cy,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,k),r.distbits=k.bits,A){e.msg="invalid distances set",r.mode=Le;break}if(r.mode=bs,t===ms)break e;case bs:r.mode=gs;case gs:if(u>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,Tk(e,p),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,r.mode===Ur&&(r.back=-1);break}for(r.back=0;g=r.lencode[s&(1<<r.lenbits)-1],y=g>>>24,w=g>>>16&255,_=g&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=y,O=w,E=_;g=r.lencode[E+((s&(1<<x+O)-1)>>x)],y=g>>>24,w=g>>>16&255,_=g&65535,!(x+y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=y,c-=y,r.back+=y,r.length=_,w===0){r.mode=Ay;break}if(w&32){r.back=-1,r.mode=Ur;break}if(w&64){e.msg="invalid literal/length code",r.mode=Le;break}r.extra=w&15,r.mode=xy;case xy:if(r.extra){for(C=r.extra;c<C;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Sy;case Sy:for(;g=r.distcode[s&(1<<r.distbits)-1],y=g>>>24,w=g>>>16&255,_=g&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((w&240)===0){for(x=y,O=w,E=_;g=r.distcode[E+((s&(1<<x+O)-1)>>x)],y=g>>>24,w=g>>>16&255,_=g&65535,!(x+y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=y,c-=y,r.back+=y,w&64){e.msg="invalid distance code",r.mode=Le;break}r.offset=_,r.extra=w&15,r.mode=Oy;case Oy:if(r.extra){for(C=r.extra;c<C;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Le;break}r.mode=Ey;case Ey:if(l===0)break e;if(f=p-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Le;break}f>r.wnext?(f-=r.wnext,h=r.wsize-f):h=r.wnext-f,f>r.length&&(f=r.length),v=r.window}else v=i,h=a-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do i[a++]=v[h++];while(--f);r.length===0&&(r.mode=gs);break;case Ay:if(l===0)break e;i[a++]=r.length,l--,r.mode=gs;break;case Rp:if(r.wrap){for(;c<32;){if(u===0)break e;u--,s|=n[o++]<<c,c+=8}if(p-=l,e.total_out+=p,r.total+=p,p&&(e.adler=r.check=r.flags?gr(r.check,i,p,a-p):Cp(r.check,i,p,a-p)),p=l,(r.flags?s:Ry(s))!==r.check){e.msg="incorrect data check",r.mode=Le;break}s=0,c=0}r.mode=Py;case Py:if(r.wrap&&r.flags){for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Le;break}s=0,c=0}r.mode=Ty;case Ty:A=kk;break e;case Le:A=qy;break e;case Ip:return qp;case Ik:default:return Ut}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(r.wsize||p!==e.avail_out&&r.mode<Le&&(r.mode<Rp||t!==ay))&&Dy(e,e.output,e.next_out,p-e.avail_out)?(r.mode=Ip,qp):(d-=e.avail_in,p-=e.avail_out,e.total_in+=d,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=r.flags?gr(r.check,i,p,e.next_out-p):Cp(r.check,i,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Ur?128:0)+(r.mode===bs||r.mode===Tp?256:0),(d===0&&p===0||t===ay)&&A===oi&&(A=qk),A)}function Wk(e){if(!e||!e.state)return Ut;var t=e.state;return t.window&&(t.window=null),e.state=null,oi}function Vk(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Ut:(r.head=t,t.done=!1,oi)}function $k(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==ys)?Ut:n.mode===ys&&(i=1,i=Cp(i,t,r,0),i!==n.check)?qy:(o=Dy(e,t,r,r),o?(n.mode=Ip,qp):(n.havedict=1,oi))}Qt.inflateReset=Ly;Qt.inflateReset2=Fy;Qt.inflateResetKeep=jy;Qt.inflateInit=Bk;Qt.inflateInit2=Ny;Qt.inflate=Uk;Qt.inflateEnd=Wk;Qt.inflateGetHeader=Vk;Qt.inflateSetDictionary=$k;Qt.inflateInfo="pako inflate (from Nodeca project)"});var jp=b((KZ,zy)=>{"use strict";zy.exports={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}});var Wy=b((ZZ,Uy)=>{"use strict";function Hk(){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}Uy.exports=Hk});var $y=b(ja=>{"use strict";var Ji=By(),Ia=Dr(),_s=_p(),$e=jp(),Lp=us(),Gk=wp(),Kk=Wy(),Vy=Object.prototype.toString;function ai(e){if(!(this instanceof ai))return new ai(e);this.options=Ia.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)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Gk,this.strm.avail_out=0;var r=Ji.inflateInit2(this.strm,t.windowBits);if(r!==$e.Z_OK)throw new Error(Lp[r]);if(this.header=new Kk,Ji.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=_s.string2buf(t.dictionary):Vy.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Ji.inflateSetDictionary(this.strm,t.dictionary),r!==$e.Z_OK)))throw new Error(Lp[r])}ai.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,u,l,s,c=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?$e.Z_FINISH:$e.Z_NO_FLUSH,typeof e=="string"?r.input=_s.binstring2buf(e):Vy.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ia.Buf8(n),r.next_out=0,r.avail_out=n),o=Ji.inflate(r,$e.Z_NO_FLUSH),o===$e.Z_NEED_DICT&&i&&(o=Ji.inflateSetDictionary(this.strm,i)),o===$e.Z_BUF_ERROR&&c===!0&&(o=$e.Z_OK,c=!1),o!==$e.Z_STREAM_END&&o!==$e.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===$e.Z_STREAM_END||r.avail_in===0&&(a===$e.Z_FINISH||a===$e.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=_s.utf8border(r.output,r.next_out),l=r.next_out-u,s=_s.buf2string(r.output,u),r.next_out=l,r.avail_out=n-l,l&&Ia.arraySet(r.output,r.output,u,l,0),this.onData(s)):this.onData(Ia.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(c=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==$e.Z_STREAM_END);return o===$e.Z_STREAM_END&&(a=$e.Z_FINISH),a===$e.Z_FINISH?(o=Ji.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===$e.Z_OK):(a===$e.Z_SYNC_FLUSH&&(this.onEnd($e.Z_OK),r.avail_out=0),!0)};ai.prototype.onData=function(e){this.chunks.push(e)};ai.prototype.onEnd=function(e){e===$e.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ia.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Fp(e,t){var r=new ai(t);if(r.push(e,!0),r.err)throw r.msg||Lp[r.err];return r.result}function Zk(e,t){return t=t||{},t.raw=!0,Fp(e,t)}ja.Inflate=ai;ja.inflate=Fp;ja.inflateRaw=Zk;ja.ungzip=Fp});var Np=b((JZ,Gy)=>{"use strict";var Yk=Dr().assign,Jk=Yg(),Xk=$y(),Qk=jp(),Hy={};Yk(Hy,Jk,Xk,Qk);Gy.exports=Hy});var xs=b((vY,Zy)=>{Zy.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var Wt=b((mY,Yy)=>{Yy.exports=JBrowseExports["@jbrowse/core/util"]});var Up=b(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});var Bp=class extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if(typeof this.onEviction=="function")for(let[r,n]of t)this.onEviction(r,n.value)}_deleteIfExpired(t,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(t,r.value),this.delete(t)):!1}_getOrDeleteIfExpired(t,r){if(!this._deleteIfExpired(t,r))return r.value}_getItemValue(t,r){return r.expiry?this._getOrDeleteIfExpired(t,r):r.value}_peek(t,r){let n=r.get(t);return this._getItemValue(t,n)}_set(t,r){this.cache.set(t,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,r){this.oldCache.delete(t),this._set(t,r)}*_entriesAscending(){for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield t)}for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield t)}}get(t){if(this.cache.has(t)){let r=this.cache.get(t);return this._getItemValue(t,r)}if(this.oldCache.has(t)){let r=this.oldCache.get(t);if(!this._deleteIfExpired(t,r))return this._moveToRecent(t,r),r.value}}set(t,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(t)?this.cache.set(t,{value:r,expiry:i}):this._set(t,{value:r,expiry:i})}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):this.oldCache.has(t)?!this._deleteIfExpired(t,this.oldCache.get(t)):!1}peek(t){if(this.cache.has(t))return this._peek(t,this.cache);if(this.oldCache.has(t))return this._peek(t,this.oldCache)}delete(t){let r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-t;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(let[t]of this)yield t}*values(){for(let[,t]of this)yield t}*[Symbol.iterator](){for(let t of this.cache){let[r,n]=t;this._deleteIfExpired(r,n)||(yield[r,n.value])}for(let t of this.oldCache){let[r,n]=t;this.cache.has(r)||this._deleteIfExpired(r,n)||(yield[r,n.value])}}*entriesDescending(){let t=[...this.cache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this._deleteIfExpired(i,o)||(yield[i,o.value])}t=[...this.oldCache];for(let r=t.length-1;r>=0;--r){let n=t[r],[i,o]=n;this.cache.has(i)||this._deleteIfExpired(i,o)||(yield[i,o.value])}}*entriesAscending(){for(let[t,r]of this._entriesAscending())yield[t,r.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(let r of this.oldCache.keys())this.cache.has(r)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,r=this){for(let[n,i]of this.entriesAscending())t.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};zp.default=Bp});var Ss=b((gY,Jy)=>{Jy.exports=JBrowseExports["@jbrowse/core/util/io"]});var Os=b((yY,Xy)=>{Xy.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var i_=b(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});function Qy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function oC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aC(e,t,r){return t=Xi(t),sC(e,n_()?Reflect.construct(t,r||[],Xi(e).constructor):t.apply(e,r))}function $p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dC(n.key),n)}}function Hp(e,t,r){return t&&e_(e.prototype,t),r&&e_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function t_(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=pC(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){u=!0,o=l},f:function(){try{a||r.return==null||r.return()}finally{if(u)throw o}}}}function Wp(){return Wp=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=cC(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},Wp.apply(null,arguments)}function Xi(e){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xi(e)}function uC(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&&Vp(e,t)}function n_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n_=function(){return!!e})()}function sC(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 oC(e)}function Vp(e,t){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Vp(e,t)}function cC(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Xi(e))!==null;);return e}function lC(e,t,r,n){var i=Wp(Xi(1&n?e.prototype:e),t,r);return 2&n&&typeof i=="function"?function(o){return i.apply(r,o)}:i}function fC(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dC(e){var t=fC(e,"string");return typeof t=="symbol"?t:t+""}function pC(e,t){if(e){if(typeof e=="string")return Qy(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qy(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function hC(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function vC(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var r_=function(){function e(){$p(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Hp(e,[{key:"addEventListener",value:function(r,n,i){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:i})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var i=this.listeners[r],o=0,a=i.length;o<a;o++)if(i[o].callback===n){i.splice(o,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var i=this.listeners[r.type],o=i.slice(),a=function(){var c=o[u];try{c.callback.call(n,r)}catch(d){Promise.resolve().then(function(){throw d})}c.options&&c.options.once&&n.removeEventListener(r.type,c.callback)},u=0,l=o.length;u<l;u++)a();return!r.defaultPrevented}}}])}(),Gp=function(e){function t(){var r;return $p(this,t),r=aC(this,t),r.listeners||r_.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return uC(t,e),Hp(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),lC(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,i=this.reason,o=i===void 0?"Aborted":i;if(n)throw o}}],[{key:"timeout",value:function(n){var i=new Es;return setTimeout(function(){return i.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),i.signal}},{key:"any",value:function(n){var i=new Es;function o(){i.abort(this.reason),a()}function a(){var c=t_(n),d;try{for(c.s();!(d=c.n()).done;){var p=d.value;p.removeEventListener("abort",o)}}catch(f){c.e(f)}finally{c.f()}}var u=t_(n),l;try{for(u.s();!(l=u.n()).done;){var s=l.value;if(s.aborted){i.abort(s.reason);break}else s.addEventListener("abort",o)}}catch(c){u.e(c)}finally{u.f()}return i.signal}}])}(r_),Es=function(){function e(){$p(this,e),Object.defineProperty(this,"signal",{value:new Gp,writable:!0,configurable:!0})}return Hp(e,[{key:"abort",value:function(r){var n=vC(r),i=hC(n);this.signal.reason=n,this.signal.dispatchEvent(i)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Es.prototype[Symbol.toStringTag]="AbortController",Gp.prototype[Symbol.toStringTag]="AbortSignal");function mC(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 bC(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,i=n===void 0?r.Request:n,o=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,u=a===void 0?!1:a;if(!mC({fetch:r,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:u}))return{fetch:r,Request:l};var l=i;(l&&!l.prototype.hasOwnProperty("signal")||u)&&(l=function(p,f){var h;f&&f.signal&&(h=f.signal,delete f.signal);var v=new i(p,f);return h&&Object.defineProperty(v,"signal",{writable:!1,enumerable:!1,configurable:!0,value:h}),v},l.prototype=i.prototype);var s=r,c=function(p,f){var h=l&&l.prototype.isPrototypeOf(p)?p.signal:f?f.signal:void 0;if(h){var v;try{v=new DOMException("Aborted","AbortError")}catch{v=new Error("Aborted"),v.name="AbortError"}if(h.aborted)return Promise.reject(v);var g=new Promise(function(y,w){h.addEventListener("abort",function(){return w(v)},{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([g,s(p,f)])}return s(p,f)};return{fetch:c,Request:l}}La.AbortController=Es;La.AbortSignal=Gp;La.abortableFetch=bC});var Kp=b(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.AbortSignal=Qi.AbortController=void 0;var o_=i_(),As=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},gC=typeof As().AbortController>"u"?o_.AbortController:As().AbortController;Qi.AbortController=gC;var yC=typeof As().AbortController>"u"?o_.AbortSignal:As().AbortSignal;Qi.AbortSignal=yC});var a_=b(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var _C=Kp(),Zp=class{},Yp=class{constructor(){this.signals=new Set,this.abortController=new _C.AbortController}addSignal(t=new Zp){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()}};Jp.default=Yp});var u_=b(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var Xp=class{constructor(){this.callbacks=new Set}addCallback(t=()=>{}){this.callbacks.add(t),t(this.currentMessage)}callback(t){this.currentMessage=t,this.callbacks.forEach(r=>{r(t)})}};Qp.default=Xp});var c_=b(Fa=>{"use strict";var s_=Fa&&Fa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fa,"__esModule",{value:!0});var wC=Kp(),xC=s_(a_()),SC=s_(u_()),eh=class e{constructor({fill:t,cache:r}){if(typeof t!="function")throw new TypeError("must pass a fill function");if(typeof r!="object")throw new TypeError("must pass a cache object");if(typeof r.get!="function"||typeof r.set!="function"||typeof r.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=r,this.fillCallback=t}static isAbortException(t){return t.name==="AbortError"||t.code==="ERR_ABORTED"||t.message==="AbortError: aborted"||t.message==="Error: aborted"}evict(t,r){this.cache.get(t)===r&&this.cache.delete(t)}fill(t,r,n,i){let o=new xC.default,a=new SC.default;a.addCallback(i);let u={aborter:o,promise:this.fillCallback(r,o.signal,l=>{a.callback(l)}),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};u.aborter.addSignal(n),u.aborter.signal.addEventListener("abort",()=>{u.settled||this.evict(t,u)}),u.promise.then(()=>{u.settled=!0},()=>{u.settled=!0,this.evict(t,u)}).catch(l=>{throw console.error(l),l}),this.cache.set(t,u)}static checkSinglePromise(t,r){function n(){if(r&&r.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return t.then(i=>(n(),i),i=>{throw n(),i})}has(t){return this.cache.has(t)}get(t,r,n,i){if(!n&&r instanceof wC.AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");let o=this.cache.get(t);return o?o.aborted&&!o.settled?(this.evict(t,o),this.get(t,r,n,i)):o.settled?o.promise:(o.aborter.addSignal(n),o.statusReporter.addCallback(i),e.checkSinglePromise(o.promise,n)):(this.fill(t,r,n,i),e.checkSinglePromise(this.cache.get(t).promise,n))}delete(t){let r=this.cache.get(t);r&&(r.settled||r.aborter.abort(),this.cache.delete(t))}clear(){let t=this.cache.keys(),r=0;for(let n=t.next();!n.done;n=t.next())this.delete(n.value),r+=1;return r}};Fa.default=eh});var l_=b(Na=>{"use strict";var OC=Na&&Na.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Na,"__esModule",{value:!0});var EC=OC(c_());Na.default=EC.default});var sn=b((WY,R_)=>{R_.exports=JBrowseExports["@jbrowse/core/configuration"]});var bt=b((KY,q_)=>{q_.exports=JBrowseExports["mobx-state-tree"]});var Ge=b((nX,X_)=>{X_.exports=JBrowseExports.react});var oo=b((iX,Q_)=>{Q_.exports=JBrowseExports["@jbrowse/core/ui"]});var Is=b((oX,e0)=>{e0.exports=JBrowseExports["react/jsx-runtime"]});function js(){return typeof window<"u"}function _r(e){return t0(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rr(e){var t;return(t=(t0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function t0(e){return js()?e instanceof Node||e instanceof at(e).Node:!1}function Re(e){return js()?e instanceof Element||e instanceof at(e).Element:!1}function Fe(e){return js()?e instanceof HTMLElement||e instanceof at(e).HTMLElement:!1}function ao(e){return!js()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof at(e).ShadowRoot}function uo(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=gt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function r0(e){return["table","td","th"].includes(_r(e))}function Ga(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ls(e){let t=so(),r=Re(e)?gt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function n0(e){let t=tr(e);for(;Fe(t)&&!nr(t);){if(Ls(t))return t;if(Ga(t))return null;t=tr(t)}return null}function so(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nr(e){return["html","body","#document"].includes(_r(e))}function gt(e){return at(e).getComputedStyle(e)}function Ka(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tr(e){if(_r(e)==="html")return e;let t=e.assignedSlot||e.parentNode||ao(e)&&e.host||rr(e);return ao(t)?t.host:t}function i0(e){let t=tr(e);return nr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&uo(t)?t:i0(t)}function Pt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=i0(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=at(i);if(o){let u=Fs(a);return t.concat(a,a.visualViewport||[],uo(i)?i:[],u&&r?Pt(u):[])}return t.concat(i,Pt(i,[],r))}function Fs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Za=ht(()=>{});function Ns(e,t,r){return We(e,yt(t,r))}function Tt(e,t){return typeof e=="function"?e(t):e}function Rt(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function Ds(e){return e==="x"?"y":"x"}function Bs(e){return e==="y"?"height":"width"}function or(e){return["top","bottom"].includes(Rt(e))?"y":"x"}function zs(e){return Ds(or(e))}function bh(e,t,r){r===void 0&&(r=!1);let n=Gt(e),i=zs(e),o=Bs(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ja(a)),[a,Ja(a)]}function a0(e){let t=Ja(e);return[Ya(e),t,Ya(t)]}function Ya(e){return e.replace(/start|end/g,t=>NC[t])}function DC(e,t,r){let n=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?i:n:t?n:i;case"left":case"right":return t?o:a;default:return[]}}function u0(e,t,r,n){let i=Gt(e),o=DC(Rt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ya)))),o}function Ja(e){return e.replace(/left|right|bottom|top/g,t=>FC[t])}function BC(e){return{top:0,right:0,bottom:0,left:0,...e}}function Us(e){return typeof e!="number"?BC(e):{top:e,right:e,bottom:e,left:e}}function Vr(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}var vh,o0,mh,yt,We,ci,ln,ir,FC,NC,co=ht(()=>{vh=["top","right","bottom","left"],o0=["start","end"],mh=vh.reduce((e,t)=>e.concat(t,t+"-"+o0[0],t+"-"+o0[1]),[]),yt=Math.min,We=Math.max,ci=Math.round,ln=Math.floor,ir=e=>({x:e,y:e}),FC={left:"right",right:"left",bottom:"top",top:"bottom"},NC={start:"end",end:"start"}});var zC,Ws,c0,lo,Vs,$s,UC,l0,f0,d0,p0,WC,VC,h0,$C,HC,GC,KC,ZC,YC,JC,s0,XC,QC,gh,yh,eq,tq,fo,v0,_h,wh=ht(()=>{zC=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ws=zC.join(","),c0=typeof Element>"u",lo=c0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vs=!c0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},$s=function e(t,r){var n;r===void 0&&(r=!0);var i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=i===""||i==="true",a=o||r&&t&&e(t.parentNode);return a},UC=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},l0=function(t,r,n){if($s(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Ws));return r&&lo.call(t,Ws)&&i.unshift(t),i=i.filter(n),i},f0=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!$s(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),l=u.length?u:a.children,s=e(l,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var c=lo.call(a,Ws);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!$s(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,n);n.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else o.unshift.apply(o,a.children)}}return i},d0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},p0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||UC(t))&&!d0(t)?0:t.tabIndex},WC=function(t,r){var n=p0(t);return n<0&&r&&!d0(t)?0:n},VC=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},h0=function(t){return t.tagName==="INPUT"},$C=function(t){return h0(t)&&t.type==="hidden"},HC=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},GC=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},KC=function(t){if(!t.name)return!0;var r=t.form||Vs(t),n=function(u){return r.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=GC(i,t.form);return!o||o===t},ZC=function(t){return h0(t)&&t.type==="radio"},YC=function(t){return ZC(t)&&!KC(t)},JC=function(t){var r,n=t&&Vs(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,l;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var s,c,d;n=Vs(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((c=i)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(i))}}return o},s0=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},XC=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=lo.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(lo.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var u=t;t;){var l=t.parentElement,s=Vs(t);if(l&&!l.shadowRoot&&i(l)===!0)return s0(t);t.assignedSlot?t=t.assignedSlot:!l&&s!==t.ownerDocument?t=s.host:t=l}t=u}if(JC(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return s0(t);return!1},QC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return lo.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},gh=function(t,r){return!(r.disabled||$s(r)||$C(r)||XC(r,t)||HC(r)||QC(r))},yh=function(t,r){return!(YC(r)||p0(r)<0||!gh(t,r))},eq=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},tq=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,l=WC(u,a),s=a?e(i.candidates):u;l===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:s})}),n.sort(VC).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},fo=function(t,r){r=r||{};var n;return r.getShadowRoot?n=f0([t],r.includeContainer,{filter:yh.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:eq}):n=l0(t,r.includeContainer,yh.bind(null,r)),tq(n)},v0=function(t,r){r=r||{};var n;return r.getShadowRoot?n=f0([t],r.includeContainer,{filter:gh.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=l0(t,r.includeContainer,gh.bind(null,r)),n},_h=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return lo.call(t,Ws)===!1?!1:yh(r,t)}});function Ks(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zs(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function Eh(){return/apple/i.test(navigator.vendor)}function Oh(){let e=/android/i;return e.test(Ks())||e.test(Zs())}function b0(){return Ks().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function g0(){return Zs().includes("jsdom/")}function ar(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function Ye(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ao(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function wr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ys(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function y0(e){return e.matches("html,body")}function tt(e){return e?.ownerDocument||document}function Js(e){return Fe(e)&&e.matches(rq)}function Xs(e){return e?e.getAttribute("role")==="combobox"&&Js(e):!1}function _0(e){if(!e||g0())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Xa(e){return e?e.hasAttribute(m0)?e:e.querySelector("["+m0+"]")||e:null}function fi(e,t,r){r===void 0&&(r=!0);let n=e.filter(o=>{var a;return o.parentId===t&&((a=o.context)==null?void 0:a.open)}),i=n;for(;i.length;)i=r?e.filter(o=>{var a;return(a=i)==null?void 0:a.some(u=>{var l;return o.parentId===u.id&&((l=o.context)==null?void 0:l.open)})}):e,n=n.concat(i);return n}function w0(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),fi(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function Ah(e,t){var r;let n=[],i=(r=e.find(o=>o.id===t))==null?void 0:r.parentId;for(;i;){let o=e.find(a=>a.id===i);i=o?.parentId,o&&(n=n.concat(o))}return n}function et(e){e.preventDefault(),e.stopPropagation()}function x0(e){return"nativeEvent"in e}function Ph(e){return e.mozInputSource===0&&e.isTrusted?!0:Oh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Th(e){return g0()?!1:!Oh()&&e.width===0&&e.height===0||Oh()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function di(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Je(e){let t=po.useRef(e);return be(()=>{t.current=e}),t}function Ie(e){let t=po.useRef(()=>{});return uq(()=>{t.current=e}),po.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function Hs(e,t,r){return Math.floor(e/t)!==r}function li(e,t){return t<0||t>=e.current.length}function Qa(e,t){return Qe(e,{disabledIndices:t})}function Qs(e,t){return Qe(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Qe(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t,a=r;do a+=n?-o:o;while(a>=0&&a<=e.current.length-1&&fn(e,a,i));return a}function Rh(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:l,maxIndex:s,prevIndex:c,stopEvent:d=!1}=t,p=c;if(r.key===nq){if(d&&et(r),c===-1)p=s;else if(p=Qe(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<l||p<0)){let f=c%a,h=s%a,v=s-(h-f);h===f?p=s:p=h>f?v:v-a}li(e,p)&&(p=c)}if(r.key===iq&&(d&&et(r),c===-1?p=l:(p=Qe(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(p=Qe(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),li(e,p)&&(p=c)),n==="both"){let f=ln(c/a);r.key===(o?xh:Sh)&&(d&&et(r),c%a!==a-1?(p=Qe(e,{startingIndex:c,disabledIndices:u}),i&&Hs(p,a,f)&&(p=Qe(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(p=Qe(e,{startingIndex:c-c%a-1,disabledIndices:u})),Hs(p,a,f)&&(p=c)),r.key===(o?Sh:xh)&&(d&&et(r),c%a!==0?(p=Qe(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&Hs(p,a,f)&&(p=Qe(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(p=Qe(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),Hs(p,a,f)&&(p=c));let h=ln(s/a)===f;li(e,p)&&(i&&h?p=r.key===(o?Sh:xh)?s:Qe(e,{startingIndex:c-c%a-1,disabledIndices:u}):p=c)}return p}function Mh(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:l}=o;u>t;let s=!1;for(r&&(i=0);!s;){let c=[];for(let d=0;d<u;d++)for(let p=0;p<l;p++)c.push(i+d+p*t);i%t+u<=t&&c.every(d=>n[d]==null)?(c.forEach(d=>{n[d]=a}),s=!0):i++}}),[...n]}function kh(e,t,r,n,i){if(e===-1)return-1;let o=r.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*n:o;case"br":return r.lastIndexOf(e)}}function Ch(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function fn(e,t,r){if(r)return r.includes(t);let n=e.current[t];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function S0(e,t){let r=fo(e,ho()),n=r.length;if(n===0)return;let i=ar(tt(e)),o=r.indexOf(i),a=o===-1?t===1?0:n-1:o+t;return r[a]}function qh(e){return S0(tt(e).body,1)||e}function Ih(e){return S0(tt(e).body,-1)||e}function vo(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ye(r,n)}function O0(e){fo(e,ho()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function jh(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{let n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}var po,Gs,m0,rq,xh,Sh,nq,iq,be,oq,aq,uq,ho,E0=ht(()=>{Za();po=D(Ge(),1),Gs=D(Ge(),1);co();wh();m0="data-floating-ui-focusable",rq="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",xh="ArrowLeft",Sh="ArrowRight",nq="ArrowUp",iq="ArrowDown";be=typeof document<"u"?Gs.useLayoutEffect:Gs.useEffect,oq={...po};aq=oq.useInsertionEffect,uq=aq||(e=>e());ho=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"})});var ec=b((pX,A0)=>{A0.exports=JBrowseExports["react-dom"]});function P0(e,t,r){let{reference:n,floating:i}=e,o=or(t),a=zs(t),u=Bs(a),l=Rt(t),s=o==="y",c=n.x+n.width/2-i.width/2,d=n.y+n.height/2-i.height/2,p=n[u]/2-i[u]/2,f;switch(l){case"top":f={x:c,y:n.y-i.height};break;case"bottom":f={x:c,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-i.width,y:d};break;default:f={x:n.x,y:n.y}}switch(Gt(t)){case"start":f[a]-=p*(r&&s?-1:1);break;case"end":f[a]+=p*(r&&s?-1:1);break}return f}async function dn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Tt(t,e),h=Us(f),g=u[p?d==="floating"?"reference":"floating":d],y=Vr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(g)))==null||r?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:l})),w=d==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),x=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},O=Vr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:_,strategy:l}):w);return{top:(y.top-O.top+h.top)/x.y,bottom:(O.bottom-y.bottom+h.bottom)/x.y,left:(y.left-O.left+h.left)/x.x,right:(O.right-y.right+h.right)/x.x}}function sq(e,t,r){return(e?[...r.filter(i=>Gt(i)===e),...r.filter(i=>Gt(i)!==e)]:r.filter(i=>Rt(i)===i)).filter(i=>e?Gt(i)===e||(t?Ya(i)!==i:!1):!0)}function T0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R0(e){return vh.some(t=>e[t]>=0)}function j0(e){let t=yt(...e.map(o=>o.left)),r=yt(...e.map(o=>o.top)),n=We(...e.map(o=>o.right)),i=We(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function cq(e){let t=e.slice().sort((i,o)=>i.y-o.y),r=[],n=null;for(let i=0;i<t.length;i++){let o=t[i];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>Vr(j0(i)))}async function lq(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Rt(r),u=Gt(r),l=or(r)==="y",s=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Tt(t,e),{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return u&&typeof h=="number"&&(f=u==="end"?h*-1:h),l?{x:f*c,y:p*s}:{x:p*s,y:f*c}}var M0,k0,C0,q0,I0,L0,F0,N0,D0,B0,z0=ht(()=>{co();co();M0=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=P0(s,n,l),p=n,f={},h=0;for(let v=0;v<u.length;v++){let{name:g,fn:y}=u[v],{x:w,y:_,data:x,reset:O}=await y({x:c,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:f,rects:s,platform:a,elements:{reference:e,floating:t}});c=w??c,d=_??d,f={...f,[g]:{...f[g],...x}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(p=O.placement),O.rects&&(s=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:d}=P0(s,p,l)),v=-1)}return{x:c,y:d,placement:p,strategy:i,middlewareData:f}};k0=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:s,padding:c=0}=Tt(e,t)||{};if(s==null)return{};let d=Us(c),p={x:r,y:n},f=zs(i),h=Bs(f),v=await a.getDimensions(s),g=f==="y",y=g?"top":"left",w=g?"bottom":"right",_=g?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[f]-p[f]-o.floating[h],O=p[f]-o.reference[f],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),P=E?E[_]:0;(!P||!await(a.isElement==null?void 0:a.isElement(E)))&&(P=u.floating[_]||o.floating[h]);let A=x/2-O/2,q=P/2-v[h]/2-1,k=yt(d[y],q),C=yt(d[w],q),W=k,B=P-v[h]-C,M=P/2-v[h]/2+A,R=Ns(W,M,B),z=!l.arrow&&Gt(i)!=null&&M!==R&&o.reference[h]/2-(M<W?k:C)-v[h]/2<0,L=z?M<W?M-W:M-B:0;return{[f]:p[f]+L,data:{[f]:R,centerOffset:M-R-L,...z&&{alignmentOffset:L}},reset:z}}});C0=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:a,placement:u,platform:l,elements:s}=t,{crossAxis:c=!1,alignment:d,allowedPlacements:p=mh,autoAlignment:f=!0,...h}=Tt(e,t),v=d!==void 0||p===mh?sq(d||null,f,p):p,g=await dn(t,h),y=((r=a.autoPlacement)==null?void 0:r.index)||0,w=v[y];if(w==null)return{};let _=bh(w,o,await(l.isRTL==null?void 0:l.isRTL(s.floating)));if(u!==w)return{reset:{placement:v[0]}};let x=[g[Rt(w)],g[_[0]],g[_[1]]],O=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],E=v[y+1];if(E)return{data:{index:y+1,overflows:O},reset:{placement:E}};let P=O.map(k=>{let C=Gt(k.placement);return[k.placement,C&&c?k.overflows.slice(0,2).reduce((W,B)=>W+B,0):k.overflows[0],k.overflows]}).sort((k,C)=>k[1]-C[1]),q=((i=P.filter(k=>k[2].slice(0,Gt(k[0])?2:3).every(C=>C<=0))[0])==null?void 0:i[0])||P[0][0];return q!==u?{data:{index:y+1,overflows:O},reset:{placement:q}}:{}}}},q0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:l,elements:s}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...g}=Tt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let y=Rt(i),w=or(u),_=Rt(u)===u,x=await(l.isRTL==null?void 0:l.isRTL(s.floating)),O=p||(_||!v?[Ja(u)]:a0(u)),E=h!=="none";!p&&E&&O.push(...u0(u,v,h,x));let P=[u,...O],A=await dn(t,g),q=[],k=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&q.push(A[y]),d){let R=bh(i,a,x);q.push(A[R[0]],A[R[1]])}if(k=[...k,{placement:i,overflows:q}],!q.every(R=>R<=0)){var C,W;let R=(((C=o.flip)==null?void 0:C.index)||0)+1,z=P[R];if(z){var B;let T=d==="alignment"?w!==or(z):!1,I=((B=k[0])==null?void 0:B.overflows[0])>0;if(!T||I)return{data:{index:R,overflows:k},reset:{placement:z}}}let L=(W=k.filter(T=>T.overflows[0]<=0).sort((T,I)=>T.overflows[1]-I.overflows[1])[0])==null?void 0:W.placement;if(!L)switch(f){case"bestFit":{var M;let T=(M=k.filter(I=>{if(E){let V=or(I.placement);return V===w||V==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(V=>V>0).reduce((V,Y)=>V+Y,0)]).sort((I,V)=>I[1]-V[1])[0])==null?void 0:M[0];T&&(L=T);break}case"initialPlacement":L=u;break}if(i!==L)return{reset:{placement:L}}}return{}}}};I0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Tt(e,t);switch(n){case"referenceHidden":{let o=await dn(t,{...i,elementContext:"reference"}),a=T0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:R0(a)}}}case"escaped":{let o=await dn(t,{...i,altBoundary:!0}),a=T0(o,r.floating);return{data:{escapedOffsets:a,escaped:R0(a)}}}default:return{}}}}};L0=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:i,platform:o,strategy:a}=t,{padding:u=2,x:l,y:s}=Tt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),d=cq(c),p=Vr(j0(c)),f=Us(u);function h(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&s!=null)return d.find(g=>l>g.left-f.left&&l<g.right+f.right&&s>g.top-f.top&&s<g.bottom+f.bottom)||p;if(d.length>=2){if(or(r)==="y"){let k=d[0],C=d[d.length-1],W=Rt(r)==="top",B=k.top,M=C.bottom,R=W?k.left:C.left,z=W?k.right:C.right,L=z-R,T=M-B;return{top:B,bottom:M,left:R,right:z,width:L,height:T,x:R,y:B}}let g=Rt(r)==="left",y=We(...d.map(k=>k.right)),w=yt(...d.map(k=>k.left)),_=d.filter(k=>g?k.left===w:k.right===y),x=_[0].top,O=_[_.length-1].bottom,E=w,P=y,A=P-E,q=O-x;return{top:x,bottom:O,left:E,right:P,width:A,height:q,x:E,y:x}}return p}let v=await o.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};F0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:o,placement:a,middlewareData:u}=t,l=await lq(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},N0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:u={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...l}=Tt(e,t),s={x:r,y:n},c=await dn(t,l),d=or(Rt(i)),p=Ds(d),f=s[p],h=s[d];if(o){let g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=f+c[g],_=f-c[y];f=Ns(w,f,_)}if(a){let g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=h+c[g],_=h-c[y];h=Ns(w,h,_)}let v=u.fn({...t,[p]:f,[d]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:o,[d]:a}}}}}},D0=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:s=!0}=Tt(e,t),c={x:r,y:n},d=or(i),p=Ds(d),f=c[p],h=c[d],v=Tt(u,t),g=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){let _=p==="y"?"height":"width",x=o.reference[p]-o.floating[_]+g.mainAxis,O=o.reference[p]+o.reference[_]-g.mainAxis;f<x?f=x:f>O&&(f=O)}if(s){var y,w;let _=p==="y"?"width":"height",x=["top","left"].includes(Rt(i)),O=o.reference[d]-o.floating[_]+(x&&((y=a.offset)==null?void 0:y[d])||0)+(x?0:g.crossAxis),E=o.reference[d]+o.reference[_]+(x?0:((w=a.offset)==null?void 0:w[d])||0)-(x?g.crossAxis:0);h<O?h=O:h>E&&(h=E)}return{[p]:f,[d]:h}}}},B0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:i,rects:o,platform:a,elements:u}=t,{apply:l=()=>{},...s}=Tt(e,t),c=await dn(t,s),d=Rt(i),p=Gt(i),f=or(i)==="y",{width:h,height:v}=o.floating,g,y;d==="top"||d==="bottom"?(g=d,y=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(y=d,g=p==="end"?"top":"bottom");let w=v-c.top-c.bottom,_=h-c.left-c.right,x=yt(v-c[g],w),O=yt(h-c[y],_),E=!t.middlewareData.shift,P=x,A=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(A=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=w),E&&!p){let k=We(c.left,0),C=We(c.right,0),W=We(c.top,0),B=We(c.bottom,0);f?A=h-2*(k!==0||C!==0?k+C:We(c.left,c.right)):P=v-2*(W!==0||B!==0?W+B:We(c.top,c.bottom))}await l({...t,availableWidth:A,availableHeight:P});let q=await a.getDimensions(u.floating);return h!==q.width||v!==q.height?{reset:{rects:!0}}:{}}}}});function V0(e){let t=gt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Fe(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=ci(r)!==o||ci(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Fh(e){return Re(e)?e:e.contextElement}function mo(e){let t=Fh(e);if(!Fe(t))return ir(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=V0(t),a=(o?ci(r.width):r.width)/n,u=(o?ci(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function $0(e){let t=at(e);return!so()||!t.visualViewport?fq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dq(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==at(e)?!1:t}function pi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Fh(e),a=ir(1);t&&(n?Re(n)&&(a=mo(n)):a=mo(e));let u=dq(o,r,n)?$0(o):ir(0),l=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){let p=at(o),f=n&&Re(n)?at(n):n,h=p,v=Fs(h);for(;v&&n&&f!==h;){let g=mo(v),y=v.getBoundingClientRect(),w=gt(v),_=y.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,x=y.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,s*=g.y,c*=g.x,d*=g.y,l+=_,s+=x,h=at(v),v=Fs(h)}}return Vr({width:c,height:d,x:l,y:s})}function Nh(e,t){let r=Ka(e).scrollLeft;return t?t.left+r:pi(rr(e)).left+r}function H0(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:Nh(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function pq(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=rr(n),u=t?Ga(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},s=ir(1),c=ir(0),d=Fe(n);if((d||!d&&!o)&&((_r(n)!=="body"||uo(a))&&(l=Ka(n)),Fe(n))){let f=pi(n);s=mo(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop}let p=a&&!d&&!o?H0(a,l,!0):ir(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-l.scrollLeft*s.x+c.x+p.x,y:r.y*s.y-l.scrollTop*s.y+c.y+p.y}}function hq(e){return Array.from(e.getClientRects())}function vq(e){let t=rr(e),r=Ka(e),n=e.ownerDocument.body,i=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Nh(e),u=-r.scrollTop;return gt(n).direction==="rtl"&&(a+=We(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function mq(e,t){let r=at(e),n=rr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;let s=so();(!s||s&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function bq(e,t){let r=pi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Fe(e)?mo(e):ir(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,s=n*o.y;return{width:a,height:u,x:l,y:s}}function U0(e,t,r){let n;if(t==="viewport")n=mq(e,r);else if(t==="document")n=vq(rr(e));else if(Re(t))n=bq(t,r);else{let i=$0(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Vr(n)}function G0(e,t){let r=tr(e);return r===t||!Re(r)||nr(r)?!1:gt(r).position==="fixed"||G0(r,t)}function gq(e,t){let r=t.get(e);if(r)return r;let n=Pt(e,[],!1).filter(u=>Re(u)&&_r(u)!=="body"),i=null,o=gt(e).position==="fixed",a=o?tr(e):e;for(;Re(a)&&!nr(a);){let u=gt(a),l=Ls(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||uo(a)&&!l&&G0(e,a))?n=n.filter(c=>c!==a):i=u,a=tr(a)}return t.set(e,n),n}function yq(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Ga(t)?[]:gq(t,this._c):[].concat(r),n],u=a[0],l=a.reduce((s,c)=>{let d=U0(t,c,i);return s.top=We(d.top,s.top),s.right=yt(d.right,s.right),s.bottom=yt(d.bottom,s.bottom),s.left=We(d.left,s.left),s},U0(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _q(e){let{width:t,height:r}=V0(e);return{width:t,height:r}}function wq(e,t,r){let n=Fe(t),i=rr(t),o=r==="fixed",a=pi(e,!0,o,t),u={scrollLeft:0,scrollTop:0},l=ir(0);function s(){l.x=Nh(i)}if(n||!n&&!o)if((_r(t)!=="body"||uo(i))&&(u=Ka(t)),n){let f=pi(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&s();o&&!n&&i&&s();let c=i&&!n&&!o?H0(i,u):ir(0),d=a.left+u.scrollLeft-l.x-c.x,p=a.top+u.scrollTop-l.y-c.y;return{x:d,y:p,width:a.width,height:a.height}}function Lh(e){return gt(e).position==="static"}function W0(e,t){if(!Fe(e)||gt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rr(e)===r&&(r=r.ownerDocument.body),r}function K0(e,t){let r=at(e);if(Ga(e))return r;if(!Fe(e)){let i=tr(e);for(;i&&!nr(i);){if(Re(i)&&!Lh(i))return i;i=tr(i)}return r}let n=W0(e,t);for(;n&&r0(n)&&Lh(n);)n=W0(n,t);return n&&nr(n)&&Lh(n)&&!Ls(n)?r:n||n0(e)||r}function Sq(e){return gt(e).direction==="rtl"}function Z0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Oq(e,t){let r=null,n,i=rr(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();let s=e.getBoundingClientRect(),{left:c,top:d,width:p,height:f}=s;if(u||t(),!p||!f)return;let h=ln(d),v=ln(i.clientWidth-(c+p)),g=ln(i.clientHeight-(d+f)),y=ln(c),_={rootMargin:-h+"px "+-v+"px "+-g+"px "+-y+"px",threshold:We(0,yt(1,l))||1},x=!0;function O(E){let P=E[0].intersectionRatio;if(P!==l){if(!x)return a();P?a(!1,P):n=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!Z0(s,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(O,{..._,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,_)}r.observe(e)}return a(!0),o}function Dh(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,s=Fh(e),c=i||o?[...s?Pt(s):[],...Pt(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),o&&y.addEventListener("resize",r)});let d=s&&u?Oq(s,r):null,p=-1,f=null;a&&(f=new ResizeObserver(y=>{let[w]=y;w&&w.target===s&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=f)==null||_.observe(t)})),r()}),s&&!l&&f.observe(s),f.observe(t));let h,v=l?pi(e):null;l&&g();function g(){let y=pi(e);v&&!Z0(v,y)&&r(),v=y,h=requestAnimationFrame(g)}return r(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),d?.(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}var fq,xq,tc,hi,Y0,J0,X0,Q0,ew,tw,Bh,rw,nw,eu,zh=ht(()=>{z0();co();Za();Za();fq=ir(0);xq=async function(e){let t=this.getOffsetParent||K0,r=this.getDimensions,n=await r(e.floating);return{reference:wq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};tc={convertOffsetParentRelativeRectToViewportRelativeRect:pq,getDocumentElement:rr,getClippingRect:yq,getOffsetParent:K0,getElementRects:xq,getClientRects:hq,getDimensions:_q,getScale:mo,isElement:Re,isRTL:Sq};hi=dn,Y0=F0,J0=C0,X0=N0,Q0=q0,ew=B0,tw=I0,Bh=k0,rw=L0,nw=D0,eu=(e,t,r)=>{let n=new Map,i={platform:tc,...r},o={...i.platform,_c:n};return M0(e,t,{...i,platform:o})}});function nc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!nc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){let o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!nc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function aw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iw(e,t){let r=aw(e);return Math.round(t*r)/r}function Uh(e){let t=Ke.useRef(e);return rc(()=>{t.current=e}),t}function uw(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:l,open:s}=e,[c,d]=Ke.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=Ke.useState(n);nc(p,n)||f(n);let[h,v]=Ke.useState(null),[g,y]=Ke.useState(null),w=Ke.useCallback(T=>{T!==E.current&&(E.current=T,v(T))},[]),_=Ke.useCallback(T=>{T!==P.current&&(P.current=T,y(T))},[]),x=o||h,O=a||g,E=Ke.useRef(null),P=Ke.useRef(null),A=Ke.useRef(c),q=l!=null,k=Uh(l),C=Uh(i),W=Uh(s),B=Ke.useCallback(()=>{if(!E.current||!P.current)return;let T={placement:t,strategy:r,middleware:p};C.current&&(T.platform=C.current),eu(E.current,P.current,T).then(I=>{let V={...I,isPositioned:W.current!==!1};M.current&&!nc(A.current,V)&&(A.current=V,ow.flushSync(()=>{d(V)}))})},[p,t,r,C,W]);rc(()=>{s===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[s]);let M=Ke.useRef(!1);rc(()=>(M.current=!0,()=>{M.current=!1}),[]),rc(()=>{if(x&&(E.current=x),O&&(P.current=O),x&&O){if(k.current)return k.current(x,O,B);B()}},[x,O,B,k,q]);let R=Ke.useMemo(()=>({reference:E,floating:P,setReference:w,setFloating:_}),[w,_]),z=Ke.useMemo(()=>({reference:x,floating:O}),[x,O]),L=Ke.useMemo(()=>{let T={position:r,left:0,top:0};if(!z.floating)return T;let I=iw(z.floating,c.x),V=iw(z.floating,c.y);return u?{...T,transform:"translate("+I+"px, "+V+"px)",...aw(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:I,top:V}},[r,u,z.floating,c.x,c.y]);return Ke.useMemo(()=>({...c,update:B,refs:R,elements:z,floatingStyles:L}),[c,B,R,z,L])}var Ke,ic,ow,rc,Eq,oc,sw,cw,lw,fw,dw,pw,hw,vw,Wh=ht(()=>{zh();zh();Ke=D(Ge(),1),ic=D(Ge(),1),ow=D(ec(),1),rc=typeof document<"u"?ic.useLayoutEffect:ic.useEffect;Eq=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Bh({element:n.current,padding:i}).fn(r):{}:n?Bh({element:n,padding:i}).fn(r):{}}}},oc=(e,t)=>({...Y0(e),options:[e,t]}),sw=(e,t)=>({...X0(e),options:[e,t]}),cw=(e,t)=>({...nw(e),options:[e,t]}),lw=(e,t)=>({...Q0(e),options:[e,t]}),fw=(e,t)=>({...ew(e),options:[e,t]}),dw=(e,t)=>({...J0(e),options:[e,t]}),pw=(e,t)=>({...tw(e),options:[e,t]}),hw=(e,t)=>({...rw(e),options:[e,t]}),vw=(e,t)=>({...Eq(e),options:[e,t]})});var n1={};is(n1,{Composite:()=>Tq,CompositeItem:()=>Rq,FloatingArrow:()=>Iq,FloatingDelayGroup:()=>Dq,FloatingFocusManager:()=>Qq,FloatingList:()=>Dw,FloatingNode:()=>Lq,FloatingOverlay:()=>tI,FloatingPortal:()=>Kq,FloatingTree:()=>Fq,NextFloatingDelayGroup:()=>zq,arrow:()=>vw,autoPlacement:()=>dw,autoUpdate:()=>Dh,computePosition:()=>eu,detectOverflow:()=>hi,flip:()=>lw,getOverflowAncestors:()=>Pt,hide:()=>pw,inline:()=>hw,inner:()=>yI,limitShift:()=>cw,offset:()=>oc,platform:()=>tc,safePolygon:()=>SI,shift:()=>sw,size:()=>fw,useClick:()=>nI,useClientPoint:()=>oI,useDelayGroup:()=>Bq,useDelayGroupContext:()=>Zw,useDismiss:()=>sI,useFloating:()=>cI,useFloatingNodeId:()=>jq,useFloatingParentNodeId:()=>yi,useFloatingPortalNode:()=>Qw,useFloatingRootContext:()=>t1,useFloatingTree:()=>_i,useFocus:()=>lI,useHover:()=>Nq,useId:()=>yo,useInnerOffset:()=>_I,useInteractions:()=>fI,useListItem:()=>Bw,useListNavigation:()=>pI,useMergeRefs:()=>Fw,useNextDelayGroup:()=>Uq,useRole:()=>vI,useTransitionStatus:()=>r1,useTransitionStyles:()=>bI,useTypeahead:()=>gI});function Fw(e){let t=S.useRef(void 0),r=S.useCallback(n=>{let i=e.map(o=>{if(o!=null){if(typeof o=="function"){let a=o,u=a(n);return typeof u=="function"?u:()=>{a(null)}}return o.current=n,()=>{o.current=null}}});return()=>{i.forEach(o=>o?.())}},e);return S.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function Aq(e,t){let r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Dw(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=S.useState(()=>new Set),a=S.useCallback(s=>{o(c=>new Set(c).add(s))},[]),u=S.useCallback(s=>{o(c=>{let d=new Set(c);return d.delete(s),d})},[]),l=S.useMemo(()=>{let s=new Map;return Array.from(i.keys()).sort(Aq).forEach((d,p)=>{s.set(d,p)}),s},[i]);return(0,ke.jsx)(Nw.Provider,{value:S.useMemo(()=>({register:a,unregister:u,map:l,elementsRef:r,labelsRef:n}),[a,u,l,r,n]),children:t})}function Bw(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=S.useContext(Nw),[u,l]=S.useState(null),s=S.useRef(null),c=S.useCallback(d=>{if(s.current=d,u!==null&&(o.current[u]=d,a)){var p;let f=t!==void 0;a.current[u]=f?t:(p=d?.textContent)!=null?p:null}},[u,o,a,t]);return be(()=>{let d=s.current;if(d)return r(d),()=>{n(d)}},[r,n]),be(()=>{let d=s.current?i.get(s.current):null;d!=null&&l(d)},[i]),S.useMemo(()=>({ref:c,index:u??-1}),[u,c])}function zw(e,t){return typeof e=="function"?e(t):e?S.cloneElement(e,t):(0,ke.jsx)("div",{...t})}function Cq(){let[e,t]=S.useState(()=>gw?yw():void 0);return be(()=>{e==null&&t(yw())},[]),S.useEffect(()=>{gw=!0},[]),e}function $w(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var n;(n=e.get(t))==null||n.delete(r)}}}function jq(e){let t=yo(),r=_i(),n=yi(),i=e||n;return be(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function Lq(e){let{children:t,id:r}=e,n=yi();return(0,ke.jsx)(Hw.Provider,{value:S.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function Fq(e){let{children:t}=e,r=S.useRef([]),n=S.useCallback(a=>{r.current=[...r.current,a]},[]),i=S.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),[o]=S.useState(()=>$w());return(0,ke.jsx)(Gw.Provider,{value:S.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function gi(e){return"data-floating-ui-"+e}function _t(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function tu(e,t,r){if(r&&!di(r))return 0;if(typeof e=="number")return e;if(typeof e=="function"){let n=e();return typeof n=="number"?n:n?.[t]}return e?.[t]}function $h(e){return typeof e=="function"?e():e}function Nq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:l=0,handleClose:s=null,mouseOnly:c=!1,restMs:d=0,move:p=!0}=t,f=_i(),h=yi(),v=Je(s),g=Je(l),y=Je(r),w=Je(d),_=S.useRef(),x=S.useRef(-1),O=S.useRef(),E=S.useRef(-1),P=S.useRef(!0),A=S.useRef(!1),q=S.useRef(()=>{}),k=S.useRef(!1),C=S.useCallback(()=>{var L;let T=(L=i.current.openEvent)==null?void 0:L.type;return T?.includes("mouse")&&T!=="mousedown"},[i]);S.useEffect(()=>{if(!u)return;function L(T){let{open:I}=T;I||(_t(x),_t(E),P.current=!0,k.current=!1)}return o.on("openchange",L),()=>{o.off("openchange",L)}},[u,o]),S.useEffect(()=>{if(!u||!v.current||!r)return;function L(I){C()&&n(!1,I,"hover")}let T=tt(a.floating).documentElement;return T.addEventListener("mouseleave",L),()=>{T.removeEventListener("mouseleave",L)}},[a.floating,r,n,u,v,C]);let W=S.useCallback(function(L,T,I){T===void 0&&(T=!0),I===void 0&&(I="hover");let V=tu(g.current,"close",_.current);V&&!O.current?(_t(x),x.current=window.setTimeout(()=>n(!1,L,I),V)):T&&(_t(x),n(!1,L,I))},[g,n]),B=Ie(()=>{q.current(),O.current=void 0}),M=Ie(()=>{if(A.current){let L=tt(a.floating).body;L.style.pointerEvents="",L.removeAttribute(_w),A.current=!1}}),R=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);S.useEffect(()=>{if(!u)return;function L(F){if(_t(x),P.current=!1,c&&!di(_.current)||$h(w.current)>0&&!tu(g.current,"open"))return;let Q=tu(g.current,"open",_.current);Q?x.current=window.setTimeout(()=>{y.current||n(!0,F,"hover")},Q):r||n(!0,F,"hover")}function T(F){if(R()){M();return}q.current();let Q=tt(a.floating);if(_t(E),k.current=!1,v.current&&i.current.floatingContext){r||_t(x),O.current=v.current({...i.current.floatingContext,tree:f,x:F.clientX,y:F.clientY,onClose(){M(),B(),R()||W(F,!0,"safe-polygon")}});let U=O.current;Q.addEventListener("mousemove",U),q.current=()=>{Q.removeEventListener("mousemove",U)};return}(_.current==="touch"?!Ye(a.floating,F.relatedTarget):!0)&&W(F)}function I(F){R()||i.current.floatingContext&&(v.current==null||v.current({...i.current.floatingContext,tree:f,x:F.clientX,y:F.clientY,onClose(){M(),B(),R()||W(F)}})(F))}function V(){_t(x)}function Y(F){R()||W(F,!1)}if(Re(a.domReference)){let F=a.domReference,Q=a.floating;return r&&F.addEventListener("mouseleave",I),p&&F.addEventListener("mousemove",L,{once:!0}),F.addEventListener("mouseenter",L),F.addEventListener("mouseleave",T),Q&&(Q.addEventListener("mouseleave",I),Q.addEventListener("mouseenter",V),Q.addEventListener("mouseleave",Y)),()=>{r&&F.removeEventListener("mouseleave",I),p&&F.removeEventListener("mousemove",L),F.removeEventListener("mouseenter",L),F.removeEventListener("mouseleave",T),Q&&(Q.removeEventListener("mouseleave",I),Q.removeEventListener("mouseenter",V),Q.removeEventListener("mouseleave",Y))}}},[a,u,e,c,p,W,B,M,n,r,y,f,g,v,i,R,w]),be(()=>{var L;if(u&&r&&(L=v.current)!=null&&L.__options.blockPointerEvents&&C()){A.current=!0;let I=a.floating;if(Re(a.domReference)&&I){var T;let V=tt(a.floating).body;V.setAttribute(_w,"");let Y=a.domReference,F=f==null||(T=f.nodesRef.current.find(Q=>Q.id===h))==null||(T=T.context)==null?void 0:T.elements.floating;return F&&(F.style.pointerEvents=""),V.style.pointerEvents="none",Y.style.pointerEvents="auto",I.style.pointerEvents="auto",()=>{V.style.pointerEvents="",Y.style.pointerEvents="",I.style.pointerEvents=""}}}},[u,r,h,a,f,v,C]),be(()=>{r||(_.current=void 0,k.current=!1,B(),M())},[r,B,M]),S.useEffect(()=>()=>{B(),_t(x),_t(E),M()},[u,a.domReference,B,M]);let z=S.useMemo(()=>{function L(T){_.current=T.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(T){let{nativeEvent:I}=T;function V(){!P.current&&!y.current&&n(!0,I,"hover")}c&&!di(_.current)||r||$h(w.current)===0||k.current&&T.movementX**2+T.movementY**2<2||(_t(E),_.current==="touch"?V():(k.current=!0,E.current=window.setTimeout(V,$h(w.current))))}}},[c,n,r,y,w]);return S.useMemo(()=>u?{reference:z}:{},[u,z])}function Dq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=S.useReducer((l,s)=>({...l,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=S.useRef(null),u=S.useCallback(l=>{o({currentId:l})},[]);return be(()=>{i.currentId?a.current===null?a.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[i.currentId,i.isInstantPhase]),(0,ke.jsx)(Kw.Provider,{value:S.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function Bq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,l=Zw(),{currentId:s,setCurrentId:c,initialDelay:d,setState:p,timeoutMs:f}=l;return be(()=>{a&&s&&(p({delay:{open:1,close:tu(d,"close")}}),s!==u&&n(!1))},[a,u,n,p,s,d]),be(()=>{function h(){n(!1),p({delay:d,currentId:null})}if(a&&s&&!r&&s===u){if(f){let v=window.setTimeout(h,f);return()=>{clearTimeout(v)}}h()}},[a,r,p,s,u,n,d,f]),be(()=>{a&&(c===Jh||!r||c(u))},[a,r,c,u]),l}function zq(e){let{children:t,delay:r,timeoutMs:n=0}=e,i=S.useRef(r),o=S.useRef(r),a=S.useRef(null),u=S.useRef(null),l=S.useRef(-1);return(0,ke.jsx)(Yw.Provider,{value:S.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:n,currentContextRef:u,timeoutIdRef:l}),[n]),children:t})}function Uq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{enabled:o=!0}=t,a=S.useContext(Yw),{currentIdRef:u,delayRef:l,timeoutMs:s,initialDelayRef:c,currentContextRef:d,hasProvider:p,timeoutIdRef:f}=a,[h,v]=S.useState(!1);return be(()=>{function g(){var y;v(!1),(y=d.current)==null||y.setIsInstantPhase(!1),u.current=null,d.current=null,l.current=c.current}if(o&&u.current&&!r&&u.current===i){if(v(!1),s)return f.current=window.setTimeout(g,s),()=>{clearTimeout(f.current)};g()}},[o,r,i,u,l,s,c,d,f]),be(()=>{if(!o||!r)return;let g=d.current,y=u.current;d.current={onOpenChange:n,setIsInstantPhase:v},u.current=i,l.current={open:0,close:tu(c.current,"close")},y!==null&&y!==i?(_t(f),v(!0),g?.setIsInstantPhase(!0),g?.onOpenChange(!1)):(v(!1),g?.setIsInstantPhase(!1))},[o,r,i,n,u,l,s,c,d,f]),be(()=>()=>{d.current=null},[d]),S.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:h}),[p,l,h])}function vi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(ww);let o=()=>e?.focus({preventScroll:r});i?o():ww=requestAnimationFrame(o)}function Hh(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ao(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Wq(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Vq(e){return e?.ownerDocument||document}function Gq(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=Hq(t,e),u=new Set,l=new Set(a),s=[];uc[i]||(uc[i]=new WeakMap);let c=uc[i];a.forEach(d),p(t),u.clear();function d(f){!f||u.has(f)||(u.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,h=>{if(_r(h)!=="script")if(u.has(h))p(h);else{let v=o?h.getAttribute(o):null,g=v!==null&&v!=="false",y=bo.get(h)||0,w=o?y+1:y,_=(c.get(h)||0)+1;bo.set(h,w),c.set(h,_),s.push(h),w===1&&g&&ac.add(h),_===1&&h.setAttribute(i,""),!g&&o&&h.setAttribute(o,o==="inert"?"":"true")}})}return Gh++,()=>{s.forEach(f=>{let h=bo.get(f)||0,v=o?h-1:h,g=(c.get(f)||0)-1;bo.set(f,v),c.set(f,g),v||(!ac.has(f)&&o&&f.removeAttribute(o),ac.delete(f)),g||f.removeAttribute(i)}),Gh--,Gh||(bo=new WeakMap,bo=new WeakMap,ac=new WeakSet,uc={})}}function xw(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=Vq(e[0]).body;return Gq(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function Qw(e){e===void 0&&(e={});let{id:t,root:r}=e,n=yo(),i=e1(),[o,a]=S.useState(null),u=S.useRef(null);return be(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),be(()=>{if(!n||u.current)return;let l=t?document.getElementById(t):null;if(!l)return;let s=document.createElement("div");s.id=n,s.setAttribute(Sw,""),l.appendChild(s),u.current=s,a(s)},[t,n]),be(()=>{if(r===null||!n||u.current)return;let l=r||i?.portalNode;l&&!Re(l)&&(l=l.current),l=l||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,l.appendChild(s));let c=document.createElement("div");c.id=n,c.setAttribute(Sw,""),l=s||l,l.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function Kq(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=Qw({id:r,root:n}),[a,u]=S.useState(null),l=S.useRef(null),s=S.useRef(null),c=S.useRef(null),d=S.useRef(null),p=a?.modal,f=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return S.useEffect(()=>{if(!o||!i||p)return;function v(g){o&&vo(g)&&(g.type==="focusin"?jh:O0)(o)}return o.addEventListener("focusin",v,!0),o.addEventListener("focusout",v,!0),()=>{o.removeEventListener("focusin",v,!0),o.removeEventListener("focusout",v,!0)}},[o,i,p]),S.useEffect(()=>{o&&(f||jh(o))},[f,o]),(0,ke.jsxs)(Xw.Provider,{value:S.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:d,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,ke.jsx)(lc,{"data-type":"outside",ref:l,onFocus:v=>{if(vo(v,o)){var g;(g=c.current)==null||g.focus()}else{let y=a?a.domReference:null,w=Ih(y);w?.focus()}}}),h&&o&&(0,ke.jsx)("span",{"aria-owns":o.id,style:fc}),o&&bi.createPortal(t,o),h&&o&&(0,ke.jsx)(lc,{"data-type":"outside",ref:s,onFocus:v=>{if(vo(v,o)){var g;(g=d.current)==null||g.focus()}else{let y=a?a.domReference:null,w=qh(y);w?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,v.nativeEvent,"focus-out")}}})]})}function Ow(e){return S.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}function Yq(e){mi=mi.filter(t=>t.isConnected),e&&_r(e)!=="body"&&(mi.push(e),mi.length>Zq&&(mi=mi.slice(-20)))}function Ew(){return mi.slice().reverse().find(e=>e.isConnected)}function Jq(e){let t=ho();return _h(e,t)?e:fo(e,t)[0]||e}function Aw(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;let n=ho(),o=v0(e,n).filter(u=>{let l=u.getAttribute("data-tabindex")||"";return _h(u,n)||u.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||o.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Qq(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:l=!1,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:d=!0,outsideElementsInert:p=!1,getInsideElements:f=()=>[]}=e,{open:h,onOpenChange:v,events:g,dataRef:y,elements:{domReference:w,floating:_}}=t,x=Ie(()=>{var H;return(H=y.current.floatingContext)==null?void 0:H.nodeId}),O=Ie(f),E=typeof a=="number"&&a<0,P=Xs(w)&&E,A=$q(),q=A?o:!0,k=!q||A&&p,C=Je(i),W=Je(a),B=Je(u),M=_i(),R=e1(),z=S.useRef(null),L=S.useRef(null),T=S.useRef(!1),I=S.useRef(!1),V=S.useRef(-1),Y=R!=null,F=Xa(_),Q=Ie(function(H){return H===void 0&&(H=F),H?fo(H,ho()):[]}),le=Ie(H=>{let re=Q(H);return C.current.map(ce=>w&&ce==="reference"?w:F&&ce==="floating"?F:re).filter(Boolean).flat()});S.useEffect(()=>{if(n||!s)return;function H(ce){if(ce.key==="Tab"){Ye(F,ar(tt(F)))&&Q().length===0&&!P&&et(ce);let ue=le(),de=wr(ce);C.current[0]==="reference"&&de===w&&(et(ce),ce.shiftKey?vi(ue[ue.length-1]):vi(ue[1])),C.current[1]==="floating"&&de===F&&ce.shiftKey&&(et(ce),vi(ue[0]))}}let re=tt(F);return re.addEventListener("keydown",H),()=>{re.removeEventListener("keydown",H)}},[n,w,F,s,C,P,Q,le]),S.useEffect(()=>{if(n||!_)return;function H(re){let ce=wr(re),de=Q().indexOf(ce);de!==-1&&(V.current=de)}return _.addEventListener("focusin",H),()=>{_.removeEventListener("focusin",H)}},[n,_,Q]),S.useEffect(()=>{if(n||!d)return;function H(){I.current=!0,setTimeout(()=>{I.current=!1})}function re(ce){let ue=ce.relatedTarget,de=ce.currentTarget;queueMicrotask(()=>{let Ee=x(),ve=!(Ye(w,ue)||Ye(_,ue)||Ye(ue,_)||Ye(R?.portalNode,ue)||ue!=null&&ue.hasAttribute(gi("focus-guard"))||M&&(fi(M.nodesRef.current,Ee).find(K=>{var ne,ae;return Ye((ne=K.context)==null?void 0:ne.elements.floating,ue)||Ye((ae=K.context)==null?void 0:ae.elements.domReference,ue)})||Ah(M.nodesRef.current,Ee).find(K=>{var ne,ae,fe;return[(ne=K.context)==null?void 0:ne.elements.floating,Xa((ae=K.context)==null?void 0:ae.elements.floating)].includes(ue)||((fe=K.context)==null?void 0:fe.elements.domReference)===ue})));if(de===w&&F&&Aw(F,C),l&&ve&&ar(tt(F))===tt(F).body){Fe(F)&&F.focus();let K=V.current,ne=Q(),ae=ne[K]||ne[ne.length-1]||F;Fe(ae)&&ae.focus()}(P||!s)&&ue&&ve&&!I.current&&ue!==Ew()&&(T.current=!0,v(!1,ce,"focus-out"))})}if(_&&Fe(w))return w.addEventListener("focusout",re),w.addEventListener("pointerdown",H),_.addEventListener("focusout",re),()=>{w.removeEventListener("focusout",re),w.removeEventListener("pointerdown",H),_.removeEventListener("focusout",re)}},[n,w,_,F,s,M,R,v,d,l,Q,P,x,C]);let U=S.useRef(null),Z=S.useRef(null),se=Ow([U,R?.beforeInsideRef]),ie=Ow([Z,R?.afterInsideRef]);S.useEffect(()=>{var H,re;if(n||!_)return;let ce=Array.from((R==null||(H=R.portalNode)==null?void 0:H.querySelectorAll("["+gi("portal")+"]"))||[]),ue=M?Ah(M.nodesRef.current,x()):[],de=M&&!s?ue.map(ne=>{var ae;return(ae=ne.context)==null?void 0:ae.elements.floating}):[],Ee=(re=ue.find(ne=>{var ae;return Xs(((ae=ne.context)==null?void 0:ae.elements.domReference)||null)}))==null||(re=re.context)==null?void 0:re.elements.domReference,ve=[_,Ee,...ce,...de,...O(),z.current,L.current,U.current,Z.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,C.current.includes("reference")||P?w:null].filter(ne=>ne!=null),K=s||P?xw(ve,!k,k):xw(ve);return()=>{K()}},[n,w,_,s,C,R,P,q,k,M,x,O]),be(()=>{if(n||!Fe(F))return;let H=tt(F),re=ar(H);queueMicrotask(()=>{let ce=le(F),ue=W.current,de=(typeof ue=="number"?ce[ue]:ue.current)||F,Ee=Ye(F,re);!E&&!Ee&&h&&vi(de,{preventScroll:de===F})})},[n,h,F,E,le,W]),be(()=>{if(n||!F)return;let H=!1,re=tt(F),ce=ar(re);Yq(ce);function ue(ve){let{reason:K,event:ne,nested:ae}=ve;if(["hover","safe-polygon"].includes(K)&&ne.type==="mouseleave"&&(T.current=!0),K==="outside-press")if(ae)T.current=!1,H=!0;else if(Ph(ne)||Th(ne))T.current=!1;else{let fe=!1;document.createElement("div").focus({get preventScroll(){return fe=!0,!1}}),fe?(T.current=!1,H=!0):T.current=!0}}g.on("openchange",ue);let de=re.createElement("span");de.setAttribute("tabindex","-1"),de.setAttribute("aria-hidden","true"),Object.assign(de.style,fc),Y&&w&&w.insertAdjacentElement("afterend",de);function Ee(){if(typeof B.current=="boolean"){let ve=w||Ew();return ve&&ve.isConnected?ve:de}return B.current.current||de}return()=>{g.off("openchange",ue);let ve=ar(re),K=Ye(_,ve)||M&&fi(M.nodesRef.current,x()).some(ae=>{var fe;return Ye((fe=ae.context)==null?void 0:fe.elements.floating,ve)}),ne=Ee();queueMicrotask(()=>{let ae=Jq(ne);B.current&&!T.current&&Fe(ae)&&(!(ae!==ve&&ve!==re.body)||K)&&ae.focus({preventScroll:H}),de.remove()})}},[n,_,F,B,y,g,M,Y,w,x]),S.useEffect(()=>{queueMicrotask(()=>{T.current=!1})},[n]),be(()=>{if(!n&&R)return R.setFocusManagerState({modal:s,closeOnFocusOut:d,open:h,onOpenChange:v,domReference:w}),()=>{R.setFocusManagerState(null)}},[n,R,s,h,v,d,w]),be(()=>{n||F&&Aw(F,C)},[n,F,C]);function X(H){return n||!c||!s?null:(0,ke.jsx)(Xq,{ref:H==="start"?z:L,onClick:re=>v(!1,re.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let oe=!n&&q&&(s?!P:!0)&&(Y||s);return(0,ke.jsxs)(ke.Fragment,{children:[oe&&(0,ke.jsx)(lc,{"data-type":"inside",ref:se,onFocus:H=>{if(s){let ce=le();vi(i[0]==="reference"?ce[0]:ce[ce.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(T.current=!1,vo(H,R.portalNode)){let ce=qh(w);ce?.focus()}else{var re;(re=R.beforeOutsideRef.current)==null||re.focus()}}}),!P&&X("start"),r,X("end"),oe&&(0,ke.jsx)(lc,{"data-type":"inside",ref:ie,onFocus:H=>{if(s)vi(le()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(d&&(T.current=!0),vo(H,R.portalNode)){let ce=Ih(w);ce?.focus()}else{var re;(re=R.afterOutsideRef.current)==null||re.focus()}}})]})}function eI(){let e=/iP(hone|ad|od)|iOS/.test(Ks()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,a=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",i&&(t[n]=i+"px"),e){var u,l;let s=((u=window.visualViewport)==null?void 0:u.offsetLeft)||0,c=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(c))+"px",left:-(o-Math.floor(s))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,a))}}function Tw(e){return Fe(e.target)&&e.target.tagName==="BUTTON"}function rI(e){return Fe(e.target)&&e.target.tagName==="A"}function Rw(e){return Js(e)}function nI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:l=!0,ignoreMouse:s=!1,keyboardHandlers:c=!0,stickIfOpen:d=!0}=t,p=S.useRef(),f=S.useRef(!1),h=S.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){let g=p.current;v.button===0&&u!=="click"&&(di(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="mousedown")?n(!1,v.nativeEvent,"click"):(v.preventDefault(),n(!0,v.nativeEvent,"click"))))},onClick(v){let g=p.current;if(u==="mousedown"&&p.current){p.current=void 0;return}di(g,!0)&&s||(r&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="click")?n(!1,v.nativeEvent,"click"):n(!0,v.nativeEvent,"click"))},onKeyDown(v){p.current=void 0,!(v.defaultPrevented||!c||Tw(v))&&(v.key===" "&&!Rw(o)&&(v.preventDefault(),f.current=!0),!rI(v)&&v.key==="Enter"&&n(!(r&&l),v.nativeEvent,"click"))},onKeyUp(v){v.defaultPrevented||!c||Tw(v)||Rw(o)||v.key===" "&&f.current&&(f.current=!1,n(!(r&&l),v.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,d,l]);return S.useMemo(()=>a?{reference:h}:{},[a,h])}function iI(e,t){let r=null,n=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var o;let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},u=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",s=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",c=a.width,d=a.height,p=a.x,f=a.y;return r==null&&t.x&&u&&(r=a.x-t.x),n==null&&t.y&&l&&(n=a.y-t.y),p-=r||0,f-=n||0,c=0,d=0,!i||s?(c=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,p=u&&t.x!=null?t.x:p,f=l&&t.y!=null?t.y:f):i&&!s&&(d=t.axis==="x"?a.height:d,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:d,x:p,y:f,top:f,right:p+c,bottom:f+d,left:p}}}}function Mw(e){return e!=null&&e.clientX!=null}function oI(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:l="both",x:s=null,y:c=null}=t,d=S.useRef(!1),p=S.useRef(null),[f,h]=S.useState(),[v,g]=S.useState([]),y=Ie((E,P)=>{d.current||n.current.openEvent&&!Mw(n.current.openEvent)||a.setPositionReference(iI(o,{x:E,y:P,axis:l,dataRef:n,pointerType:f}))}),w=Ie(E=>{s!=null||c!=null||(r?p.current||g([]):y(E.clientX,E.clientY))}),_=di(f)?i:r,x=S.useCallback(()=>{if(!_||!u||s!=null||c!=null)return;let E=at(i);function P(A){let q=wr(A);Ye(i,q)?(E.removeEventListener("mousemove",P),p.current=null):y(A.clientX,A.clientY)}if(!n.current.openEvent||Mw(n.current.openEvent)){E.addEventListener("mousemove",P);let A=()=>{E.removeEventListener("mousemove",P),p.current=null};return p.current=A,A}a.setPositionReference(o)},[_,u,s,c,i,n,a,o,y]);S.useEffect(()=>x(),[x,v]),S.useEffect(()=>{u&&!i&&(d.current=!1)},[u,i]),S.useEffect(()=>{!u&&r&&(d.current=!0)},[u,r]),be(()=>{u&&(s!=null||c!=null)&&(d.current=!1,y(s,c))},[u,s,c,y]);let O=S.useMemo(()=>{function E(P){let{pointerType:A}=P;h(A)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return S.useMemo(()=>u?{reference:O}:{},[u,O])}function sI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:l=!0,outsidePressEvent:s="pointerdown",referencePress:c=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:h}=t,v=_i(),g=Ie(typeof l=="function"?l:()=>!1),y=typeof l=="function"?g:l,w=S.useRef(!1),_=S.useRef(!1),{escapeKey:x,outsidePress:O}=kw(f),{escapeKey:E,outsidePress:P}=kw(h),A=S.useRef(!1),q=Ie(R=>{var z;if(!r||!a||!u||R.key!=="Escape"||A.current)return;let L=(z=o.current.floatingContext)==null?void 0:z.nodeId,T=v?fi(v.nodesRef.current,L):[];if(!x&&(R.stopPropagation(),T.length>0)){let I=!0;if(T.forEach(V=>{var Y;if((Y=V.context)!=null&&Y.open&&!V.context.dataRef.current.__escapeKeyBubbles){I=!1;return}}),!I)return}n(!1,x0(R)?R.nativeEvent:R,"escape-key")}),k=Ie(R=>{var z;let L=()=>{var T;q(R),(T=wr(R))==null||T.removeEventListener("keydown",L)};(z=wr(R))==null||z.addEventListener("keydown",L)}),C=Ie(R=>{var z;let L=w.current;w.current=!1;let T=_.current;if(_.current=!1,s==="click"&&T||L||typeof y=="function"&&!y(R))return;let I=wr(R),V="["+gi("inert")+"]",Y=tt(i.floating).querySelectorAll(V),F=Re(I)?I:null;for(;F&&!nr(F);){let Z=tr(F);if(nr(Z)||!Re(Z))break;F=Z}if(Y.length&&Re(I)&&!y0(I)&&!Ye(I,i.floating)&&Array.from(Y).every(Z=>!Ye(F,Z)))return;if(Fe(I)&&M){let Z=nr(I),se=gt(I),ie=/auto|scroll/,X=Z||ie.test(se.overflowX),oe=Z||ie.test(se.overflowY),H=X&&I.clientWidth>0&&I.scrollWidth>I.clientWidth,re=oe&&I.clientHeight>0&&I.scrollHeight>I.clientHeight,ce=se.direction==="rtl",ue=re&&(ce?R.offsetX<=I.offsetWidth-I.clientWidth:R.offsetX>I.clientWidth),de=H&&R.offsetY>I.clientHeight;if(ue||de)return}let Q=(z=o.current.floatingContext)==null?void 0:z.nodeId,le=v&&fi(v.nodesRef.current,Q).some(Z=>{var se;return Ys(R,(se=Z.context)==null?void 0:se.elements.floating)});if(Ys(R,i.floating)||Ys(R,i.domReference)||le)return;let U=v?fi(v.nodesRef.current,Q):[];if(U.length>0){let Z=!0;if(U.forEach(se=>{var ie;if((ie=se.context)!=null&&ie.open&&!se.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}n(!1,R,"outside-press")}),W=Ie(R=>{var z;let L=()=>{var T;C(R),(T=wr(R))==null||T.removeEventListener(s,L)};(z=wr(R))==null||z.addEventListener(s,L)});S.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=x,o.current.__outsidePressBubbles=O;let R=-1;function z(Y){n(!1,Y,"ancestor-scroll")}function L(){window.clearTimeout(R),A.current=!0}function T(){R=window.setTimeout(()=>{A.current=!1},so()?5:0)}let I=tt(i.floating);u&&(I.addEventListener("keydown",E?k:q,E),I.addEventListener("compositionstart",L),I.addEventListener("compositionend",T)),y&&I.addEventListener(s,P?W:C,P);let V=[];return p&&(Re(i.domReference)&&(V=Pt(i.domReference)),Re(i.floating)&&(V=V.concat(Pt(i.floating))),!Re(i.reference)&&i.reference&&i.reference.contextElement&&(V=V.concat(Pt(i.reference.contextElement)))),V=V.filter(Y=>{var F;return Y!==((F=I.defaultView)==null?void 0:F.visualViewport)}),V.forEach(Y=>{Y.addEventListener("scroll",z,{passive:!0})}),()=>{u&&(I.removeEventListener("keydown",E?k:q,E),I.removeEventListener("compositionstart",L),I.removeEventListener("compositionend",T)),y&&I.removeEventListener(s,P?W:C,P),V.forEach(Y=>{Y.removeEventListener("scroll",z)}),window.clearTimeout(R)}},[o,i,u,y,s,r,n,p,a,x,O,q,E,k,C,P,W]),S.useEffect(()=>{w.current=!1},[y,s]);let B=S.useMemo(()=>({onKeyDown:q,...c&&{[aI[d]]:R=>{n(!1,R.nativeEvent,"reference-press")},...d!=="click"&&{onClick(R){n(!1,R.nativeEvent,"reference-press")}}}}),[q,n,c,d]),M=S.useMemo(()=>({onKeyDown:q,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[uI[s]]:()=>{w.current=!0}}),[q,s]);return S.useMemo(()=>a?{reference:B,floating:M}:{},[a,B,M])}function t1(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=yo(),o=S.useRef({}),[a]=S.useState(()=>$w()),u=yi()!=null,[l,s]=S.useState(n.reference),c=Ie((f,h,v)=>{o.current.openEvent=f?h:void 0,a.emit("openchange",{open:f,event:h,reason:v,nested:u}),r?.(f,h,v)}),d=S.useMemo(()=>({setPositionReference:s}),[]),p=S.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return S.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:p,events:a,floatingId:i,refs:d}),[t,c,p,a,i,d])}function cI(e){e===void 0&&(e={});let{nodeId:t}=e,r=t1({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=S.useState(null),[u,l]=S.useState(null),c=i?.domReference||o,d=S.useRef(null),p=_i();be(()=>{c&&(d.current=c)},[c]);let f=uw({...e,elements:{...i,...u&&{reference:u}}}),h=S.useCallback(_=>{let x=Re(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;l(x),f.refs.setReference(x)},[f.refs]),v=S.useCallback(_=>{(Re(_)||_===null)&&(d.current=_,a(_)),(Re(f.refs.reference.current)||f.refs.reference.current===null||_!==null&&!Re(_))&&f.refs.setReference(_)},[f.refs]),g=S.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:d}),[f.refs,v,h]),y=S.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),w=S.useMemo(()=>({...f,...n,refs:g,elements:y,nodeId:t}),[f,g,y,t,n]);return be(()=>{n.dataRef.current.floatingContext=w;let _=p?.nodesRef.current.find(x=>x.id===t);_&&(_.context=w)}),S.useMemo(()=>({...f,context:w,refs:g,elements:y}),[f,g,y,w])}function Kh(){return b0()&&Eh()}function lI(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:l=!0}=t,s=S.useRef(!1),c=S.useRef(-1),d=S.useRef(!0);S.useEffect(()=>{if(!u)return;let f=at(a.domReference);function h(){!r&&Fe(a.domReference)&&a.domReference===ar(tt(a.domReference))&&(s.current=!0)}function v(){d.current=!0}function g(){d.current=!1}return f.addEventListener("blur",h),Kh()&&(f.addEventListener("keydown",v,!0),f.addEventListener("pointerdown",g,!0)),()=>{f.removeEventListener("blur",h),Kh()&&(f.removeEventListener("keydown",v,!0),f.removeEventListener("pointerdown",g,!0))}},[a.domReference,r,u]),S.useEffect(()=>{if(!u)return;function f(h){let{reason:v}=h;(v==="reference-press"||v==="escape-key")&&(s.current=!0)}return i.on("openchange",f),()=>{i.off("openchange",f)}},[i,u]),S.useEffect(()=>()=>{_t(c)},[]);let p=S.useMemo(()=>({onMouseLeave(){s.current=!1},onFocus(f){if(s.current)return;let h=wr(f.nativeEvent);if(l&&Re(h)){if(Kh()&&!f.relatedTarget){if(!d.current&&!Js(h))return}else if(!_0(h))return}n(!0,f.nativeEvent,"focus")},onBlur(f){s.current=!1;let h=f.relatedTarget,v=f.nativeEvent,g=Re(h)&&h.hasAttribute(gi("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var y;let w=ar(a.domReference?a.domReference.ownerDocument:document);!h&&w===a.domReference||Ye((y=o.current.floatingContext)==null?void 0:y.refs.floating.current,w)||Ye(a.domReference,w)||g||n(!1,v,"focus")})}}),[o,a.domReference,n,l]);return S.useMemo(()=>u?{reference:p}:{},[u,p])}function Zh(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[mw]:a,[bw]:u,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[Pq]:""},...o,...t.map(a=>{let u=a?a[r]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((a,u)=>(u&&Object.entries(u).forEach(l=>{let[s,c]=l;if(!(i&&[mw,bw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var d;(d=n.get(s))==null||d.push(c),a[s]=function(){for(var p,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return(p=n.get(s))==null?void 0:p.map(g=>g(...h)).find(g=>g!==void 0)}}}else a[s]=c}),a),{})}}function fI(e){e===void 0&&(e=[]);let t=e.map(u=>u?.reference),r=e.map(u=>u?.floating),n=e.map(u=>u?.item),i=S.useCallback(u=>Zh(u,e,"reference"),t),o=S.useCallback(u=>Zh(u,e,"floating"),r),a=S.useCallback(u=>Zh(u,e,"item"),n);return S.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function dc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function cc(e,t){return dc(t,e===ru||e===pn,e===hn||e===vn)}function Yh(e,t,r){return dc(t,e===pn,r?e===hn:e===vn)||e==="Enter"||e===" "||e===""}function Cw(e,t,r){return dc(t,r?e===hn:e===vn,e===pn)}function qw(e,t,r,n){let i=r?e===vn:e===hn,o=e===ru;return t==="both"||t==="horizontal"&&n&&n>1?e===dI:dc(t,i,o)}function pI(e,t){let{open:r,onOpenChange:n,elements:i,floatingId:o}=e,{listRef:a,activeIndex:u,onNavigate:l=()=>{},enabled:s=!0,selectedIndex:c=null,allowEscape:d=!1,loop:p=!1,nested:f=!1,rtl:h=!1,virtual:v=!1,focusItemOnOpen:g="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:w=!0,disabledIndices:_=void 0,orientation:x="vertical",parentOrientation:O,cols:E=1,scrollItemIntoView:P=!0,virtualItemRef:A,itemSizes:q,dense:k=!1}=t,C=Xa(i.floating),W=Je(C),B=yi(),M=_i();be(()=>{e.dataRef.current.orientation=x},[e,x]);let R=Ie(()=>{l(T.current===-1?null:T.current)}),z=Xs(i.domReference),L=S.useRef(g),T=S.useRef(c??-1),I=S.useRef(null),V=S.useRef(!0),Y=S.useRef(R),F=S.useRef(!!i.floating),Q=S.useRef(r),le=S.useRef(!1),U=S.useRef(!1),Z=Je(_),se=Je(r),ie=Je(P),X=Je(c),[oe,H]=S.useState(),[re,ce]=S.useState(),ue=Ie(()=>{function $(me){if(v){var Pe;(Pe=me.id)!=null&&Pe.endsWith("-fui-option")&&(me.id=o+"-"+Math.random().toString(16).slice(2,10)),H(me.id),M?.events.emit("virtualfocus",me),A&&(A.current=me)}else vi(me,{sync:le.current,preventScroll:!0})}let te=a.current[T.current],J=U.current;te&&$(te),(le.current?me=>me():requestAnimationFrame)(()=>{let me=a.current[T.current]||te;if(!me)return;te||$(me);let Pe=ie.current;Pe&&Ee&&(J||!V.current)&&(me.scrollIntoView==null||me.scrollIntoView(typeof Pe=="boolean"?{block:"nearest",inline:"nearest"}:Pe))})});be(()=>{s&&(r&&i.floating?L.current&&c!=null&&(U.current=!0,T.current=c,R()):F.current&&(T.current=-1,Y.current()))},[s,r,i.floating,c,R]),be(()=>{if(s&&r&&i.floating)if(u==null){if(le.current=!1,X.current!=null)return;if(F.current&&(T.current=-1,ue()),(!Q.current||!F.current)&&L.current&&(I.current!=null||L.current===!0&&I.current==null)){let $=0,te=()=>{a.current[0]==null?($<2&&($?requestAnimationFrame:queueMicrotask)(te),$++):(T.current=I.current==null||Yh(I.current,x,h)||f?Qa(a,Z.current):Qs(a,Z.current),I.current=null,R())};te()}}else li(a,u)||(T.current=u,ue(),U.current=!1)},[s,r,i.floating,u,X,f,a,x,h,R,ue,Z]),be(()=>{var $;if(!s||i.floating||!M||v||!F.current)return;let te=M.nodesRef.current,J=($=te.find(Pe=>Pe.id===B))==null||($=$.context)==null?void 0:$.elements.floating,he=ar(tt(i.floating)),me=te.some(Pe=>Pe.context&&Ye(Pe.context.elements.floating,he));J&&!me&&V.current&&J.focus({preventScroll:!0})},[s,i.floating,M,B,v]),be(()=>{if(!s||!M||!v||B)return;function $(te){ce(te.id),A&&(A.current=te)}return M.events.on("virtualfocus",$),()=>{M.events.off("virtualfocus",$)}},[s,M,v,B,A]),be(()=>{Y.current=R,Q.current=r,F.current=!!i.floating}),be(()=>{r||(I.current=null)},[r]);let de=u!=null,Ee=S.useMemo(()=>{function $(J){if(!r)return;let he=a.current.indexOf(J);he!==-1&&T.current!==he&&(T.current=he,R())}return{onFocus(J){let{currentTarget:he}=J;le.current=!0,$(he)},onClick:J=>{let{currentTarget:he}=J;return he.focus({preventScroll:!0})},...y&&{onMouseMove(J){let{currentTarget:he}=J;le.current=!0,U.current=!1,$(he)},onPointerLeave(J){let{pointerType:he}=J;if(!(!V.current||he==="touch")&&(le.current=!0,T.current=-1,R(),!v)){var me;(me=W.current)==null||me.focus({preventScroll:!0})}}}}},[r,W,y,a,R,v]),ve=S.useCallback(()=>{var $;return O??(M==null||($=M.nodesRef.current.find(te=>te.id===B))==null||($=$.context)==null||($=$.dataRef)==null?void 0:$.current.orientation)},[B,M,O]),K=Ie($=>{if(V.current=!1,le.current=!0,$.which===229||!se.current&&$.currentTarget===W.current)return;if(f&&qw($.key,x,h,E)){cc($.key,ve())||et($),n(!1,$.nativeEvent,"list-navigation"),Fe(i.domReference)&&(v?M?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let te=T.current,J=Qa(a,_),he=Qs(a,_);if(z||($.key==="Home"&&(et($),T.current=J,R()),$.key==="End"&&(et($),T.current=he,R())),E>1){let me=q||Array.from({length:a.current.length},()=>({width:1,height:1})),Pe=Mh(me,E,k),je=Pe.findIndex(_e=>_e!=null&&!fn(a,_e,_)),Nt=Pe.reduce((_e,dt,Yn)=>dt!=null&&!fn(a,dt,_)?Yn:_e,-1),xt=Pe[Rh({current:Pe.map(_e=>_e!=null?a.current[_e]:null)},{event:$,orientation:x,loop:p,rtl:h,cols:E,disabledIndices:Ch([..._||a.current.map((_e,dt)=>fn(a,dt)?dt:void 0),void 0],Pe),minIndex:je,maxIndex:Nt,prevIndex:kh(T.current>he?J:T.current,me,Pe,E,$.key===pn?"bl":$.key===(h?hn:vn)?"tr":"tl"),stopEvent:!0})];if(xt!=null&&(T.current=xt,R()),x==="both")return}if(cc($.key,x)){if(et($),r&&!v&&ar($.currentTarget.ownerDocument)===$.currentTarget){T.current=Yh($.key,x,h)?J:he,R();return}Yh($.key,x,h)?p?T.current=te>=he?d&&te!==a.current.length?-1:J:Qe(a,{startingIndex:te,disabledIndices:_}):T.current=Math.min(he,Qe(a,{startingIndex:te,disabledIndices:_})):p?T.current=te<=J?d&&te!==-1?a.current.length:he:Qe(a,{startingIndex:te,decrement:!0,disabledIndices:_}):T.current=Math.max(J,Qe(a,{startingIndex:te,decrement:!0,disabledIndices:_})),li(a,T.current)&&(T.current=-1),R()}}),ne=S.useMemo(()=>v&&r&&de&&{"aria-activedescendant":re||oe},[v,r,de,re,oe]),ae=S.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...z?{}:ne,onKeyDown:K,onPointerMove(){V.current=!0}}),[ne,K,x,z]),fe=S.useMemo(()=>{function $(J){g==="auto"&&Ph(J.nativeEvent)&&(L.current=!0)}function te(J){L.current=g,g==="auto"&&Th(J.nativeEvent)&&(L.current=!0)}return{...ne,onKeyDown(J){V.current=!1;let he=J.key.startsWith("Arrow"),me=["Home","End"].includes(J.key),Pe=he||me,je=Cw(J.key,x,h),Nt=qw(J.key,x,h,E),xt=Cw(J.key,ve(),h),_e=cc(J.key,x),dt=(f?xt:_e)||J.key==="Enter"||J.key.trim()==="";if(v&&r){let Dt=M?.nodesRef.current.find(qe=>qe.parentId==null),Ae=M&&Dt?w0(M.nodesRef.current,Dt.id):null;if(Pe&&Ae&&A){let qe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(je||Nt){var Yn,va;let pr=((Yn=Ae.context)==null?void 0:Yn.elements.domReference)===J.currentTarget,nt=Nt&&!pr?(va=Ae.context)==null?void 0:va.elements.domReference:je?a.current.find(Di=>Di?.id===oe):null;nt&&(et(J),nt.dispatchEvent(qe),ce(void 0))}if((_e||me)&&Ae.context&&Ae.context.open&&Ae.parentId&&J.currentTarget!==Ae.context.elements.domReference){var ma;et(J),(ma=Ae.context.elements.domReference)==null||ma.dispatchEvent(qe);return}}return K(J)}if(!(!r&&!w&&he)){if(dt){let Dt=cc(J.key,ve());I.current=f&&Dt?null:J.key}if(f){xt&&(et(J),r?(T.current=Qa(a,Z.current),R()):n(!0,J.nativeEvent,"list-navigation"));return}_e&&(c!=null&&(T.current=c),et(J),!r&&w?n(!0,J.nativeEvent,"list-navigation"):K(J),r&&R())}},onFocus(){r&&!v&&(T.current=-1,R())},onPointerDown:te,onPointerEnter:te,onMouseDown:$,onClick:$}},[oe,ne,E,K,Z,g,a,f,R,n,r,w,x,ve,h,c,M,v,A]);return S.useMemo(()=>s?{reference:fe,floating:ae,item:Ee}:{},[s,fe,ae,Ee])}function vI(e,t){var r,n;t===void 0&&(t={});let{open:i,elements:o,floatingId:a}=e,{enabled:u=!0,role:l="dialog"}=t,s=yo(),c=((r=o.domReference)==null?void 0:r.id)||s,d=S.useMemo(()=>{var w;return((w=Xa(o.floating))==null?void 0:w.id)||a},[o.floating,a]),p=(n=hI.get(l))!=null?n:l,h=yi()!=null,v=S.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?d:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":i?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:c},...p==="menu"&&h&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,d,h,i,c,l]),g=S.useMemo(()=>{let w={id:d,...p&&{role:p}};return p==="tooltip"||l==="label"?w:{...w,...p==="menu"&&{"aria-labelledby":c}}},[p,d,c,l]),y=S.useCallback(w=>{let{active:_,selected:x}=w,O={role:"option",..._&&{id:d+"-fui-option"}};switch(l){case"select":return{...O,"aria-selected":_&&x};case"combobox":return{...O,"aria-selected":x}}return{}},[d,l]);return S.useMemo(()=>u?{reference:v,floating:g,item:y}:{},[u,v,g,y])}function go(e,t){return typeof e=="function"?e(t):e}function mI(e,t){let[r,n]=S.useState(e);return e&&!r&&n(!0),S.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function r1(e,t){t===void 0&&(t={});let{open:r,elements:{floating:n}}=e,{duration:i=250}=t,a=(typeof i=="number"?i:i.close)||0,[u,l]=S.useState("unmounted"),s=mI(r,a);return!s&&u==="close"&&l("unmounted"),be(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{bi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:s,status:u}}function bI(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,l=u.split("-")[0],s=S.useMemo(()=>({side:l,placement:u}),[l,u]),c=typeof a=="number",d=(c?a:a.open)||0,p=(c?a:a.close)||0,[f,h]=S.useState(()=>({...go(o,s),...go(r,s)})),{isMounted:v,status:g}=r1(e,{duration:a}),y=Je(r),w=Je(n),_=Je(i),x=Je(o);return be(()=>{let O=go(y.current,s),E=go(_.current,s),P=go(x.current,s),A=go(w.current,s)||Object.keys(O).reduce((q,k)=>(q[k]="",q),{});if(g==="initial"&&h(q=>({transitionProperty:q.transitionProperty,...P,...O})),g==="open"&&h({transitionProperty:Object.keys(A).map(Iw).join(","),transitionDuration:d+"ms",...P,...A}),g==="close"){let q=E||O;h({transitionProperty:Object.keys(q).map(Iw).join(","),transitionDuration:p+"ms",...P,...q})}},[p,_,y,w,x,d,g,s]),{isMounted:v,styles:f}}function gI(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:l,enabled:s=!0,findMatch:c=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=S.useRef(-1),v=S.useRef(""),g=S.useRef((r=f??a)!=null?r:-1),y=S.useRef(null),w=Ie(u),_=Ie(l),x=Je(c),O=Je(p);be(()=>{n&&(_t(h),y.current=null,v.current="")},[n]),be(()=>{if(n&&v.current===""){var k;g.current=(k=f??a)!=null?k:-1}},[n,f,a]);let E=Ie(k=>{k?i.current.typing||(i.current.typing=k,_(k)):i.current.typing&&(i.current.typing=k,_(k))}),P=Ie(k=>{function C(z,L,T){let I=x.current?x.current(L,T):L.find(V=>V?.toLocaleLowerCase().indexOf(T.toLocaleLowerCase())===0);return I?z.indexOf(I):-1}let W=o.current;if(v.current.length>0&&v.current[0]!==" "&&(C(W,W,v.current)===-1?E(!1):k.key===" "&&et(k)),W==null||O.current.includes(k.key)||k.key.length!==1||k.ctrlKey||k.metaKey||k.altKey)return;n&&k.key!==" "&&(et(k),E(!0)),W.every(z=>{var L,T;return z?((L=z[0])==null?void 0:L.toLocaleLowerCase())!==((T=z[1])==null?void 0:T.toLocaleLowerCase()):!0})&&v.current===k.key&&(v.current="",g.current=y.current),v.current+=k.key,_t(h),h.current=window.setTimeout(()=>{v.current="",g.current=y.current,E(!1)},d);let M=g.current,R=C(W,[...W.slice((M||0)+1),...W.slice(0,(M||0)+1)],v.current);R!==-1?(w(R),y.current=R):k.key!==" "&&(v.current="",E(!1))}),A=S.useMemo(()=>({onKeyDown:P}),[P]),q=S.useMemo(()=>({onKeyDown:P,onKeyUp(k){k.key===" "&&E(!1)}}),[P,E]);return S.useMemo(()=>s?{reference:A,floating:q}:{},[s,A,q])}function jw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function _I(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,l=Ie(u),s=S.useRef(!1),c=S.useRef(null),d=S.useRef(null);S.useEffect(()=>{if(!i)return;function f(v){if(v.ctrlKey||!h||o.current==null)return;let g=v.deltaY,y=o.current.top>=-.5,w=o.current.bottom>=-.5,_=h.scrollHeight-h.clientHeight,x=g<0?-1:1,O=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!y&&g>0||!w&&g<0?(v.preventDefault(),bi.flushSync(()=>{l(E=>E+Math[O](g,_*x))})):/firefox/i.test(Zs())&&(h.scrollTop+=g))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(d.current={...o.current})}),()=>{c.current=null,d.current=null,h.removeEventListener("wheel",f)}},[i,r,n.floating,o,a,l]);let p=S.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let f=a?.current||n.floating;if(!(!o.current||!f||!s.current)){if(c.current!==null){let h=f.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&bi.flushSync(()=>l(v=>v+h))}requestAnimationFrame(()=>{c.current=f.scrollTop})}}}),[n.floating,l,o,a]);return S.useMemo(()=>i?{floating:p}:{},[i,p])}function wI(e,t,r){r===void 0&&(r=!0);let n=e.filter(o=>{var a;return o.parentId===t&&((a=o.context)==null?void 0:a.open)}),i=n;for(;i.length;)i=r?e.filter(o=>{var a;return(a=i)==null?void 0:a.some(u=>{var l;return o.parentId===u.id&&((l=o.context)==null?void 0:l.open)})}):e,n=n.concat(i);return n}function Lw(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[l,s]=t[a]||[0,0],[c,d]=t[u]||[0,0];s>=n!=d>=n&&r<=(c-l)*(n-s)/(d-s)+l&&(i=!i)}return i}function xI(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function SI(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i,o=!1,a=null,u=null,l=performance.now();function s(d,p){let f=performance.now(),h=f-l;if(a===null||u===null||h===0)return a=d,u=p,l=f,null;let v=d-a,g=p-u,w=Math.sqrt(v*v+g*g)/h;return a=d,u=p,l=f,w}let c=d=>{let{x:p,y:f,placement:h,elements:v,onClose:g,nodeId:y,tree:w}=d;return function(x){function O(){clearTimeout(i),g()}if(clearTimeout(i),!v.domReference||!v.floating||h==null||p==null||f==null)return;let{clientX:E,clientY:P}=x,A=[E,P],q=Wq(x),k=x.type==="mouseleave",C=Hh(v.floating,q),W=Hh(v.domReference,q),B=v.domReference.getBoundingClientRect(),M=v.floating.getBoundingClientRect(),R=h.split("-")[0],z=p>M.right-M.width/2,L=f>M.bottom-M.height/2,T=xI(A,B),I=M.width>B.width,V=M.height>B.height,Y=(I?B:M).left,F=(I?B:M).right,Q=(V?B:M).top,le=(V?B:M).bottom;if(C&&(o=!0,!k))return;if(W&&(o=!1),W&&!k){o=!0;return}if(k&&Re(x.relatedTarget)&&Hh(v.floating,x.relatedTarget)||w&&wI(w.nodesRef.current,y).some(se=>{let{context:ie}=se;return ie?.open}))return;if(R==="top"&&f>=B.bottom-1||R==="bottom"&&f<=B.top+1||R==="left"&&p>=B.right-1||R==="right"&&p<=B.left+1)return O();let U=[];switch(R){case"top":U=[[Y,B.top+1],[Y,M.bottom-1],[F,M.bottom-1],[F,B.top+1]];break;case"bottom":U=[[Y,M.top+1],[Y,B.bottom-1],[F,B.bottom-1],[F,M.top+1]];break;case"left":U=[[M.right-1,le],[M.right-1,Q],[B.left+1,Q],[B.left+1,le]];break;case"right":U=[[B.right-1,le],[B.right-1,Q],[M.left+1,Q],[M.left+1,le]];break}function Z(se){let[ie,X]=se;switch(R){case"top":{let oe=[I?ie+t/2:z?ie+t*4:ie-t*4,X+t+1],H=[I?ie-t/2:z?ie+t*4:ie-t*4,X+t+1],re=[[M.left,z||I?M.bottom-t:M.top],[M.right,z?I?M.bottom-t:M.top:M.bottom-t]];return[oe,H,...re]}case"bottom":{let oe=[I?ie+t/2:z?ie+t*4:ie-t*4,X-t],H=[I?ie-t/2:z?ie+t*4:ie-t*4,X-t],re=[[M.left,z||I?M.top+t:M.bottom],[M.right,z?I?M.top+t:M.bottom:M.top+t]];return[oe,H,...re]}case"left":{let oe=[ie+t+1,V?X+t/2:L?X+t*4:X-t*4],H=[ie+t+1,V?X-t/2:L?X+t*4:X-t*4];return[...[[L||V?M.right-t:M.left,M.top],[L?V?M.right-t:M.left:M.right-t,M.bottom]],oe,H]}case"right":{let oe=[ie-t,V?X+t/2:L?X+t*4:X-t*4],H=[ie-t,V?X-t/2:L?X+t*4:X-t*4],re=[[L||V?M.left+t:M.right,M.top],[L?V?M.left+t:M.right:M.left+t,M.bottom]];return[oe,H,...re]}}}if(!Lw([E,P],U)){if(o&&!T)return O();if(!k&&n){let se=s(x.clientX,x.clientY);if(se!==null&&se<.1)return O()}Lw([E,P],Z([p,f]))?!o&&n&&(i=window.setTimeout(O,40)):O()}}};return c.__options={blockPointerEvents:r},c}var S,ke,bi,Nw,Pq,mw,bw,hn,vn,ru,pn,Uw,Ww,Vw,Vh,Tq,Rq,Mq,gw,kq,yw,qq,yo,Iq,Hw,Gw,yi,_i,_w,Jh,Kw,Zw,Yw,ww,bo,ac,uc,Gh,$q,Jw,Hq,fc,lc,Xw,Sw,e1,Zq,mi,Xq,sc,Pw,tI,aI,uI,kw,dI,hI,Iw,yI,i1=ht(()=>{S=D(Ge());E0();ke=D(Is());Za();wh();bi=D(ec());Wh();Wh();co();Nw=S.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});Pq="data-floating-ui-focusable",mw="active",bw="selected",hn="ArrowLeft",vn="ArrowRight",ru="ArrowUp",pn="ArrowDown";Uw=S.createContext({activeIndex:0,onNavigate:()=>{}}),Ww=[hn,vn],Vw=[ru,pn],Vh=[...Ww,...Vw],Tq=S.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:l,activeIndex:s,onNavigate:c,itemSizes:d,dense:p=!1,...f}=t,[h,v]=S.useState(0),g=s??h,y=Ie(c??v),w=S.useRef([]),_=n&&typeof n!="function"?n.props:{},x=S.useMemo(()=>({activeIndex:g,onNavigate:y}),[g,y]),O=u>1;function E(A){if(!Vh.includes(A.key))return;let q=g,k=Qa(w,l),C=Qs(w,l),W=a?hn:vn,B=a?vn:hn;if(O){let T=d||Array.from({length:w.current.length},()=>({width:1,height:1})),I=Mh(T,u,p),V=I.findIndex(Q=>Q!=null&&!fn(w,Q,l)),Y=I.reduce((Q,le,U)=>le!=null&&!fn(w,le,l)?U:Q,-1),F=I[Rh({current:I.map(Q=>Q?w.current[Q]:null)},{event:A,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:Ch([...l||w.current.map((Q,le)=>fn(w,le)?le:void 0),void 0],I),minIndex:V,maxIndex:Y,prevIndex:kh(g>C?k:g,T,I,u,A.key===pn?"bl":A.key===W?"tr":"tl")})];F!=null&&(q=F)}let M={horizontal:[W],vertical:[pn],both:[W,pn]}[i],R={horizontal:[B],vertical:[ru],both:[B,ru]}[i],z=O?Vh:{horizontal:Ww,vertical:Vw,both:Vh}[i];if(q===g&&[...M,...R].includes(A.key)&&(o&&q===C&&M.includes(A.key)?q=k:o&&q===k&&R.includes(A.key)?q=C:q=Qe(w,{startingIndex:q,decrement:R.includes(A.key),disabledIndices:l})),q!==g&&!li(w,q)){var L;A.stopPropagation(),z.includes(A.key)&&A.preventDefault(),y(q),(L=w.current[q])==null||L.focus()}}let P={...f,..._,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(A){f.onKeyDown==null||f.onKeyDown(A),_.onKeyDown==null||_.onKeyDown(A),E(A)}};return(0,ke.jsx)(Uw.Provider,{value:x,children:(0,ke.jsx)(Dw,{elementsRef:w,children:zw(n,P)})})}),Rq=S.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=S.useContext(Uw),{ref:l,index:s}=Bw(),c=Fw([l,r,o.ref]),d=a===s,p={...i,...o,ref:c,tabIndex:d?0:-1,"data-active":d?"":void 0,onFocus(f){i.onFocus==null||i.onFocus(f),o.onFocus==null||o.onFocus(f),u(s)}};return zw(n,p)}),Mq={...S},gw=!1,kq=0,yw=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+kq++;qq=Mq.useId,yo=qq||Cq,Iq=S.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:l=7,tipRadius:s=0,strokeWidth:c=0,staticOffset:d,stroke:p,d:f,style:{transform:h,...v}={},...g}=t,y=yo(),[w,_]=S.useState(!1);if(be(()=>{if(!i)return;gt(i).direction==="rtl"&&_(!0)},[i]),!i)return null;let[x,O]=n.split("-"),E=x==="top"||x==="bottom",P=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(P=null);let A=c*2,q=A/2,k=u/2*(s/-8+1),C=l/2*s/4,W=!!f,B=P&&O==="end"?"bottom":"top",M=P&&O==="end"?"right":"left";P&&w&&(M=O==="end"?"left":"right");let R=o?.x!=null?P||o.x:"",z=o?.y!=null?P||o.y:"",L=f||"M0,0"+(" H"+u)+(" L"+(u-k)+","+(l-C))+(" Q"+u/2+","+l+" "+k+","+(l-C))+" Z",T={top:W?"rotate(180deg)":"",left:W?"rotate(90deg)":"rotate(-90deg)",bottom:W?"":"rotate(180deg)",right:W?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,ke.jsxs)("svg",{...g,"aria-hidden":!0,ref:r,width:W?u:u+A,height:u,viewBox:"0 0 "+u+" "+(l>u?l:u),style:{position:"absolute",pointerEvents:"none",[M]:R,[B]:z,[x]:E||W?"100%":"calc(100% - "+A/2+"px)",transform:[T,h].filter(I=>!!I).join(" "),...v},children:[A>0&&(0,ke.jsx)("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:A+(f?0:1),d:L}),(0,ke.jsx)("path",{stroke:A&&!f?g.fill:"none",d:L}),(0,ke.jsx)("clipPath",{id:y,children:(0,ke.jsx)("rect",{x:-q,y:q*(W?-1:1),width:u+A,height:u})})]})});Hw=S.createContext(null),Gw=S.createContext(null),yi=()=>{var e;return((e=S.useContext(Hw))==null?void 0:e.id)||null},_i=()=>S.useContext(Gw);_w=gi("safe-polygon");Jh=()=>{},Kw=S.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Jh,setState:Jh,isInstantPhase:!1}),Zw=()=>S.useContext(Kw);Yw=S.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});ww=0;bo=new WeakMap,ac=new WeakSet,uc={},Gh=0,$q=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Jw=e=>e&&(e.host||Jw(e.parentNode)),Hq=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Jw(r);return e.contains(n)?n:null}).filter(r=>r!=null);fc={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},lc=S.forwardRef(function(t,r){let[n,i]=S.useState();be(()=>{Eh()&&i("button")},[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[gi("focus-guard")]:"",style:fc};return(0,ke.jsx)("span",{...t,...o})}),Xw=S.createContext(null),Sw=gi("portal");e1=()=>S.useContext(Xw);Zq=20,mi=[];Xq=S.forwardRef(function(t,r){return(0,ke.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:fc})});sc=0;Pw=()=>{},tI=S.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return be(()=>{if(n)return sc++,sc===1&&(Pw=eI()),()=>{sc--,sc===0&&Pw()}},[n]),(0,ke.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});aI={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},uI={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},kw=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};dI="Escape";hI=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);Iw=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());yI=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:u=4,referenceOverflowThreshold:l=0,scrollRef:s,...c}=Tt(e,t),{rects:d,elements:{floating:p}}=t,f=r.current[a],h=s?.current||p,v=p.clientTop||h.clientTop,g=p.clientTop!==0,y=h.clientTop!==0,w=p===h;if(!f)return{};let _={...t,...await oc(-f.offsetTop-p.clientTop-d.reference.height/2-f.offsetHeight/2-o).fn(t)},x=await hi(jw(_,h.scrollHeight+v+p.clientTop),c),O=await hi(_,{...c,elementContext:"reference"}),E=We(0,x.top),P=_.y+E,k=(h.scrollHeight>h.clientHeight?C=>C:ci)(We(0,h.scrollHeight+(g&&w||y?v*2:0)-E-We(0,x.bottom)));if(h.style.maxHeight=k+"px",h.scrollTop=E,i){let C=h.offsetHeight<f.offsetHeight*yt(u,r.current.length)-1||O.top>=-l||O.bottom>=-l;bi.flushSync(()=>i(C))}return n&&(n.current=await hi(jw({..._,y:P},h.offsetHeight+v+p.clientTop),c)),{y:P}}})});var pc=b((kX,o1)=>{o1.exports=JBrowseExports["@mui/material"]});var nu=b((CX,a1)=>{a1.exports=JBrowseExports["tss-react/mui"]});var s1=b(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.default=PI;var u1=Is(),hc=(i1(),Xb(n1)),Xh=pc(),OI=nu();function EI(e){return Math.round(e*1e5)/1e5}var AI=(0,OI.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Xh.alpha)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.fontSize,lineHeight:`${EI(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function PI({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Xh.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=AI(),{refs:l,floatingStyles:s,context:c}=(0,hc.useFloating)({placement:r,strategy:"fixed",middleware:[(0,hc.offset)(5)]}),d=(0,hc.useClientPoint)(c,e),{getFloatingProps:p}=(0,hc.useInteractions)([d]);return(0,u1.jsx)(Xh.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,u1.jsx)("div",{className:u.tooltip,ref:l.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...p(),children:t})})}});var mn=b((IX,c1)=>{c1.exports=JBrowseExports["mobx-react"]});var l1,TI,ev,f1=ht(()=>{"use strict";l1=D(Ge()),TI=e=>{let{color:t="rgb(255,255,255,0.5)"}=e;return l1.default.createElement("rect",{...e,fill:t})},ev=TI});var wi,d1,RI,p1,h1=ht(()=>{"use strict";wi=D(Ge()),d1=D(mn()),RI=(0,d1.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return wi.default.createElement(wi.default.Fragment,null,r?[...r.links()].map(i=>{let{source:o,target:a}=i,u=o.x,l=a.x,s=n?a.len:a.y,c=n?o.len:o.y;return wi.default.createElement(wi.default.Fragment,{key:[u,l,s,c].join("-")},wi.default.createElement("line",{stroke:"black",x1:c,y1:u,x2:c,y2:l}),wi.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:s,y2:l}))}):null)}),p1=RI});var bn,v1,MI,m1,b1=ht(()=>{"use strict";bn=D(Ge()),v1=D(mn());f1();h1();MI=(0,v1.observer)(function({model:e}){let{labelWidth:t,canDisplayLabel:r,totalHeight:n,treeWidth:i,samples:o=[],rowHeight:a,svgFontSize:u}=e,l=Math.min(20,a);return bn.default.createElement(bn.default.Fragment,null,bn.default.createElement(ev,{y:0,x:0,width:t+5+i,height:n}),bn.default.createElement(p1,{model:e}),bn.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,c)=>bn.default.createElement(ev,{key:`${s.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:s.color})),r?o.map((s,c)=>bn.default.createElement("text",{key:`${s.id}-${c}`,dominantBaseline:"middle",fontSize:u,x:2,y:c*a+a/2},s.label)):null))}),m1=MI});var vc,g1,y1,kI,_1,w1=ht(()=>{"use strict";vc=D(Ge()),g1=D(Wt()),y1=D(mn()),kI=(0,y1.observer)(function({children:e,model:t,exportSVG:r}){if(r)return vc.default.createElement(vc.default.Fragment,null,e);{let{totalHeight:n}=t;return vc.default.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:n,width:(0,g1.getContainingView)(t).width}},e)}}),_1=kI});var tv,x1,CI,mc,rv=ht(()=>{"use strict";tv=D(Ge()),x1=D(mn());b1();w1();CI=(0,x1.observer)(function(e){let{model:t}=e;return tv.default.createElement(_1,{...e},tv.default.createElement(m1,{model:t}))}),mc=CI});var M1=b((GX,R1)=>{R1.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var $1=b((MQ,V1)=>{"use strict";V1.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var _c=b((kQ,H1)=>{H1.exports=JBrowseExports.mobx});var Y1={};is(Y1,{default:()=>JI});var Lt,G1,Kt,K1,Z1,ZI,YI,JI,J1=ht(()=>{"use strict";Lt=D(Ge()),G1=D(oo()),Kt=D(pc()),K1=D(mn()),Z1=D(nu()),ZI=(0,Z1.makeStyles)()({root:{width:500}}),YI=(0,K1.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=ZI(),[i,o]=(0,Lt.useState)(`${t.rowHeight}`),[a,u]=(0,Lt.useState)(`${t.rowProportion}`);return Lt.default.createElement(G1.Dialog,{open:!0,onClose:r,title:"Set row height"},Lt.default.createElement("form",{onSubmit:l=>{l.preventDefault(),t.setRowProportion(+a),t.setRowHeight(+i),r()}},Lt.default.createElement(Kt.DialogContent,{className:n.root},Lt.default.createElement(Kt.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Lt.default.createElement(Kt.TextField,{value:i,helperText:"Enter row height",autoFocus:!0,onChange:l=>{o(l.target.value)}}),Lt.default.createElement(Kt.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{u(l.target.value)}}),Lt.default.createElement(Kt.DialogActions,null,Lt.default.createElement(Kt.Button,{variant:"contained",color:"primary",type:"submit"},"Submit"),Lt.default.createElement(Kt.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel")))))}),JI=YI});var Q1={};is(Q1,{renderSvg:()=>XI});async function XI(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,X1.getContainingView)(e),u=`mafclip-${i}`;return xr.default.createElement(xr.default.Fragment,null,xr.default.createElement("defs",null,xr.default.createElement("clipPath",{id:u},xr.default.createElement("rect",{x:0,y:0,width:a,height:n}))),xr.default.createElement("g",{clipPath:`url(#${u})`},xr.default.createElement("g",{id:"snpcov"},await r(t)),xr.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},xr.default.createElement(mc,{model:e,orientation:"left",exportSVG:!0}))))}var xr,X1,ex=ht(()=>{"use strict";xr=D(Ge()),X1=D(Wt());rv()});var vv=b(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.sum=_x;Sc.concatUint8Array=n2;function _x(e){let t=0;for(let r of e)t+=r.length;return t}function n2(e){let t=new Uint8Array(_x(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var mv=b(xo=>{"use strict";var i2=xo&&xo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xo,"__esModule",{value:!0});xo.unzip=a2;xo.unzipChunkSlice=u2;var o2=i2(Np()),wx=vv(),{Z_SYNC_FLUSH:xx,Inflate:Sx}=o2.default;async function a2(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new Sx,{strm:t}=n,n.push(o,xx),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,wx.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function u2(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],l=[],s=[],c=0;do{let d=e.subarray(o-n.blockPosition),p=new Sx;if({strm:r}=p,p.push(d,xx),p.err)throw new Error(p.msg);let f=p.result;u.push(f);let h=f.length;l.push(o),s.push(a),u.length===1&&n.dataPosition&&(u[0]=u[0].subarray(n.dataPosition),h=u[0].length);let v=o;if(o+=r.next_in,a+=h,v>=i.blockPosition){u[c]=u[c].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),l.push(o),s.push(a);break}c++}while(r.avail_in);return{buffer:(0,wx.concatUint8Array)(u),cpositions:l,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var Ox=b(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.TWO_PWR_32_DBL=Er.TWO_PWR_16_DBL=void 0;Er.longFromBytesToUnsigned=s2;Er.TWO_PWR_16_DBL=65536;Er.TWO_PWR_32_DBL=Er.TWO_PWR_16_DBL*Er.TWO_PWR_16_DBL;function s2(e,t=0){let r=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24;return((e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24)>>>0)*Er.TWO_PWR_32_DBL+(r>>>0)}});var Ax=b(yv=>{"use strict";Object.defineProperty(yv,"__esModule",{value:!0});var c2=ya(),bv=Ox(),Oc=1;function Ex(e,t,r){let n=t[Oc],i=r?r[Oc]:1/0;return n<=e&&i>e?0:n<e?-1:1}var gv=class{constructor({filehandle:t,path:r}){if(t)this.filehandle=t;else if(r)this.filehandle=new c2.LocalFile(r);else throw new TypeError("either filehandle or path must be defined")}_getIndex(){return this.index||(this.index=this._readIndex().catch(t=>{throw this.index=void 0,t})),this.index}async _readIndex(){let t=await this.filehandle.read(8,0),r=(0,bv.longFromBytesToUnsigned)(t);if(!r)return[[0,0]];let n=new Array(r+1);n[0]=[0,0];let i=8*2*r;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");let o=await this.filehandle.read(i,8);for(let a=0;a<r;a+=1){let u=(0,bv.longFromBytesToUnsigned)(o,a*16),l=(0,bv.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,l]}return n}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(t,r){let n=r+t;if(t===0)return[];let i=await this._getIndex(),o=[],a=0,u=i.length-1,l=Math.floor(i.length/2),s=Ex(r,i[l],i[l+1]);for(;s!==0;)s>0?u=l-1:s<0&&(a=l+1),l=Math.ceil((u-a)/2)+a,s=Ex(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Oc]>=n));c+=1);return o[o.length-1][Oc]<n&&o.push([]),o}};yv.default=gv});var Px=b(uu=>{"use strict";var l2=uu&&uu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uu,"__esModule",{value:!0});var f2=ya(),d2=mv(),p2=l2(Ax()),h2=vv(),_v=class{constructor({filehandle:t,path:r,gziFilehandle:n,gziPath:i}){if(t)this.filehandle=t;else if(r)this.filehandle=new f2.LocalFile(r);else throw new TypeError("either filehandle or path must be defined");if(!n&&!i&&!r)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new p2.default({filehandle:n,path:!n&&!i&&r?i:`${r}.gzi`})}async _readAndUncompressBlock(t,r){let n=r;n||(n=(await this.filehandle.stat()).size);let i=n-t,o=await this.filehandle.read(i,t);return(0,d2.unzip)(o)}async read(t,r){let n=await this.gzi.getRelevantBlocksForRead(t,r),i=[];for(let o=0;o<n.length-1;o+=1){let a=await this._readAndUncompressBlock(n[o][0],n[o+1][0]),[,u]=n[o],l=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;l>=0&&l<a.length&&i.push(a.subarray(l,s))}return(0,h2.concatUint8Array)(i)}};uu.default=_v});var Rx=b(Ar=>{"use strict";var v2=Ar&&Ar.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.unzip=Ar.unzipChunkSlice=Ar.BgzfFilehandle=void 0;var m2=Px();Object.defineProperty(Ar,"BgzfFilehandle",{enumerable:!0,get:function(){return v2(m2).default}});var Tx=mv();Object.defineProperty(Ar,"unzipChunkSlice",{enumerable:!0,get:function(){return Tx.unzipChunkSlice}});Object.defineProperty(Ar,"unzip",{enumerable:!0,get:function(){return Tx.unzip}})});var Mx=b(xv=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});xv.default=b2;var wv=Ge();function b2(){let e=(0,wv.useRef)(null),[t,r]=(0,wv.useState)({width:void 0,height:void 0});return(0,wv.useEffect)(()=>{if(!e.current)return;let n=typeof window<"u"&&"ResizeObserver"in window?window.ResizeObserver:void 0;if(!n)return;let i=new n(o=>{r({width:o[0].contentRect.width,height:o[0].contentRect.height})});return i.observe(e.current),()=>{i.disconnect()}},[]),[e,t]}});var Cx=b((hee,kx)=>{kx.exports=JBrowseExports["react-dom/client"]});var Pv=b(xi=>{Object.defineProperty(xi,"__esModule",{value:!0});var g2={grad:.9,turn:360,rad:360/(2*Math.PI)},Hr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},rt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Zt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Bx=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qx=function(e){return{r:Zt(e.r,0,255),g:Zt(e.g,0,255),b:Zt(e.b,0,255),a:Zt(e.a)}},Sv=function(e){return{r:rt(e.r),g:rt(e.g),b:rt(e.b),a:rt(e.a,3)}},y2=/^#([0-9a-f]{3,8})$/i,Ec=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},zx=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},Ux=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),l=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,l,n][s],g:255*[l,n,n,u,a,a][s],b:255*[a,a,l,n,n,u][s],a:i}},Ix=function(e){return{h:Bx(e.h),s:Zt(e.s,0,100),l:Zt(e.l,0,100),a:Zt(e.a)}},jx=function(e){return{h:rt(e.h),s:rt(e.s),l:rt(e.l),a:rt(e.a,3)}},Lx=function(e){return Ux((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},su=function(e){return{h:(t=zx(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},_2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,w2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,x2=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,S2=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Av={string:[[function(e){var t=y2.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?rt(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?rt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=x2.exec(e)||S2.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qx({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=_2.exec(e)||w2.exec(e);if(!t)return null;var r,n,i=Ix({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(g2[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Lx(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return Hr(t)&&Hr(r)&&Hr(n)?qx({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!Hr(t)||!Hr(r)||!Hr(n))return null;var a=Ix({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return Lx(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Hr(t)||!Hr(r)||!Hr(n))return null;var a=function(u){return{h:Bx(u.h),s:Zt(u.s,0,100),v:Zt(u.v,0,100),a:Zt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return Ux(a)},"hsv"]]},Fx=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Wx=function(e){return typeof e=="string"?Fx(e.trim(),Av.string):typeof e=="object"&&e!==null?Fx(e,Av.object):[null,void 0]},Ov=function(e,t){var r=su(e);return{h:r.h,s:Zt(r.s+100*t,0,100),l:r.l,a:r.a}},Ev=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Nx=function(e,t){var r=su(e);return{h:r.h,s:r.s,l:Zt(r.l+100*t,0,100),a:r.a}},cu=function(){function e(t){this.parsed=Wx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return rt(Ev(this.rgba),2)},e.prototype.isDark=function(){return Ev(this.rgba)<.5},e.prototype.isLight=function(){return Ev(this.rgba)>=.5},e.prototype.toHex=function(){return t=Sv(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?Ec(rt(255*o)):"","#"+Ec(r)+Ec(n)+Ec(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Sv(this.rgba)},e.prototype.toRgbString=function(){return t=Sv(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return jx(su(this.rgba))},e.prototype.toHslString=function(){return t=jx(su(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=zx(this.rgba),{h:rt(t.h),s:rt(t.s),v:rt(t.v),a:rt(t.a,3)};var t},e.prototype.invert=function(){return Pr({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Pr(Ov(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Pr(Ov(this.rgba,-t))},e.prototype.grayscale=function(){return Pr(Ov(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Pr(Nx(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Pr(Nx(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Pr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):rt(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=su(this.rgba);return typeof t=="number"?Pr({h:t,s:r.s,l:r.l,a:r.a}):rt(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Pr(t).toHex()},e}(),Pr=function(e){return e instanceof cu?e:new cu(e)},Dx=[];xi.Colord=cu,xi.colord=Pr,xi.extend=function(e){e.forEach(function(t){Dx.indexOf(t)<0&&(t(cu,Av),Dx.push(t))})},xi.getFormat=function(e){return Wx(e)[1]},xi.random=function(){return new cu({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var Hx=b((mee,$x)=>{var Tr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Tv=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Rv=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},Mv=96.422,kv=100,Cv=82.521,O2=function(e){var t,r,n={x:.9555766*(t=e).x+-.0230393*t.y+.0631636*t.z,y:-.0282895*t.x+1.0099416*t.y+.0210077*t.z,z:.0122982*t.x+-.020483*t.y+1.3299098*t.z};return r={r:Rv(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:Rv(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:Rv(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Tr(r.r,0,255),g:Tr(r.g,0,255),b:Tr(r.b,0,255),a:Tr(r.a)}},E2=function(e){var t=Tv(e.r),r=Tv(e.g),n=Tv(e.b);return function(i){return{x:Tr(i.x,0,Mv),y:Tr(i.y,0,kv),z:Tr(i.z,0,Cv),a:Tr(i.a)}}(function(i){return{x:1.0478112*i.x+.0228866*i.y+-.050127*i.z,y:.0295424*i.x+.9904844*i.y+-.0170491*i.z,z:-.0092345*i.x+.0150436*i.y+.7521316*i.z,a:i.a}}({x:100*(.4124564*t+.3575761*r+.1804375*n),y:100*(.2126729*t+.7151522*r+.072175*n),z:100*(.0193339*t+.119192*r+.9503041*n),a:e.a}))},lu=216/24389,So=24389/27,Vx=function(e){var t=E2(e),r=t.x/Mv,n=t.y/kv,i=t.z/Cv;return r=r>lu?Math.cbrt(r):(So*r+16)/116,{l:116*(n=n>lu?Math.cbrt(n):(So*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>lu?Math.cbrt(i):(So*i+16)/116)),alpha:t.a}},A2=function(e,t,r){var n,i=Vx(e),o=Vx(t);return function(a){var u=(a.l+16)/116,l=a.a/500+u,s=u-a.b/200;return O2({x:(Math.pow(l,3)>lu?Math.pow(l,3):(116*l-16)/So)*Mv,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/So)*kv,z:(Math.pow(s,3)>lu?Math.pow(s,3):(116*s-16)/So)*Cv,a:a.alpha})}({l:Tr((n={l:i.l*(1-r)+o.l*r,a:i.a*(1-r)+o.a*r,b:i.b*(1-r)+o.b*r,alpha:i.alpha*(1-r)+o.alpha*r}).l,0,400),a:n.a,b:n.b,alpha:Tr(n.alpha)})};$x.exports=function(e){function t(r,n,i){i===void 0&&(i=5);for(var o=[],a=1/(i-1),u=0;u<=i-1;u++)o.push(r.mix(n,a*u));return o}e.prototype.mix=function(r,n){n===void 0&&(n=.5);var i=r instanceof e?r:new e(r),o=A2(this.toRgb(),i.toRgb(),n);return new e(o)},e.prototype.tints=function(r){return t(this,"#fff",r)},e.prototype.shades=function(r){return t(this,"#000",r)},e.prototype.tones=function(r){return t(this,"#808080",r)}}});var Kx=b((bee,Gx)=>{Gx.exports=function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,l,s=n[this.toHex()];if(s)return s;if(a?.closest){var c=this.toRgb(),d=1/0,p="black";if(!o.length)for(var f in r)o[f]=new e(r[f]).toRgb();for(var h in r){var v=(u=c,l=o[h],Math.pow(u.r-l.r,2)+Math.pow(u.g-l.g,2)+Math.pow(u.b-l.b,2));v<d&&(d=v,p=h)}return p}},t.string.push([function(a){var u=a.toLowerCase(),l=u==="transparent"?"#0000":r[u];return l?new e(l).toRgb():null},"name"])}});var Jx=b(yn=>{"use strict";var Zx=yn&&yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yn,"__esModule",{value:!0});yn.colord=yn.Colord=void 0;var P2=Pv(),T2=Zx(Hx()),R2=Zx(Kx());(0,P2.extend)([T2.default,R2.default]);var Yx=Pv();Object.defineProperty(yn,"Colord",{enumerable:!0,get:function(){return Yx.Colord}});Object.defineProperty(yn,"colord",{enumerable:!0,get:function(){return Yx.colord}})});var qv=b(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.createStopToken=k2;fu.stopStopToken=C2;fu.checkStopToken=q2;function M2(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function k2(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function C2(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function q2(e){if(typeof jest>"u"&&e!==void 0&&M2()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var Qx=b(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0})});var aS=b((wee,oS)=>{"use strict";var nS=(e,t)=>e>t?1:e<t?-1:0,Iv=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),eS="eexxaacctt",I2=/\p{P}/gu,j2="A-Z",L2="a-z",F2=["en",{numeric:!0,sensitivity:"base"}],Oo=(e,t,r)=>e.replace(j2,t).replace(L2,r),tS={unicode:!1,alpha:null,interSplit:"[^A-Za-z\\d']+",intraSplit:"[a-z][A-Z]",interBound:"[^A-Za-z\\d]",intraBound:"[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:1/0,intraChars:"[a-z\\d']",intraIns:null,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,1/0],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,r)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,r,n=nS)=>{let{idx:i,chars:o,terms:a,interLft2:u,interLft1:l,start:s,intraIns:c,interIns:d,cases:p}=e;return i.map((f,h)=>h).sort((f,h)=>o[h]-o[f]||c[f]-c[h]||a[h]+u[h]+.5*l[h]-(a[f]+u[f]+.5*l[f])||d[f]-d[h]||s[f]-s[h]||p[h]-p[f]||n(t[i[f]],t[i[h]]))}},jv=(e,t)=>t==0?"":t==1?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`,rS="(?:\\b|_)";function Ac(e){e=Object.assign({},tS,e);let{unicode:t,interLft:r,interRgt:n,intraMode:i,intraSlice:o,intraIns:a,intraSub:u,intraTrn:l,intraDel:s,intraContr:c,intraSplit:d,interSplit:p,intraBound:f,interBound:h,intraChars:v,toUpper:g,toLower:y,compare:w}=e;a??=i,u??=i,l??=i,s??=i,w??=typeof Intl>"u"?nS:new Intl.Collator(...F2).compare;let _=e.letters??e.alpha;if(_!=null){let U=g(_),Z=y(_);p=Oo(p,U,Z),d=Oo(d,U,Z),h=Oo(h,U,Z),f=Oo(f,U,Z),v=Oo(v,U,Z),c=Oo(c,U,Z)}let x=t?"u":"",O='".+?"',E=new RegExp(O,"gi"+x),P=new RegExp(`(?:\\s+|^)-(?:${v}+|${O})`,"gi"+x),{intraRules:A}=e;A==null&&(A=U=>{let Z=tS.intraSlice,se=0,ie=0,X=0,oe=0;if(/[^\d]/.test(U)){let H=U.length;H<=4?H>=3&&(X=Math.min(l,1),H==4&&(se=Math.min(a,1))):(Z=o,se=a,ie=u,X=l,oe=s)}return{intraSlice:Z,intraIns:se,intraSub:ie,intraTrn:X,intraDel:oe}});let q=!!d,k=new RegExp(d,"g"+x),C=new RegExp(p,"g"+x),W=new RegExp("^"+p+"|"+p+"$","g"+x),B=new RegExp(c,"gi"+x),M=(U,Z=!1)=>{let se=[];U=U.replace(E,X=>(se.push(X),eS)),U=U.replace(W,""),Z||(U=y(U)),q&&(U=U.replace(k,X=>X[0]+" "+X[1]));let ie=0;return U.split(C).filter(X=>X!="").map(X=>X===eS?se[ie++]:X)},R=/[^\d]+|\d+/g,z=(U,Z=0,se=!1)=>{let ie=M(U);if(ie.length==0)return[];let X=Array(ie.length).fill("");ie=ie.map((ue,de)=>ue.replace(B,Ee=>(X[de]=Ee,"")));let oe;if(i==1)oe=ie.map((ue,de)=>{if(ue[0]==='"')return Iv(ue.slice(1,-1));let Ee="";for(let ve of ue.matchAll(R)){let K=ve[0],{intraSlice:ne,intraIns:ae,intraSub:fe,intraTrn:$,intraDel:te}=A(K);if(ae+fe+$+te==0)Ee+=K+X[de];else{let[J,he]=ne,me=K.slice(0,J),Pe=K.slice(he),je=K.slice(J,he);ae==1&&me.length==1&&me!=je[0]&&(me+="(?!"+me+")");let Nt=je.length,xt=[K];if(fe)for(let _e=0;_e<Nt;_e++)xt.push(me+je.slice(0,_e)+v+je.slice(_e+1)+Pe);if($)for(let _e=0;_e<Nt-1;_e++)je[_e]!=je[_e+1]&&xt.push(me+je.slice(0,_e)+je[_e+1]+je[_e]+je.slice(_e+2)+Pe);if(te)for(let _e=0;_e<Nt;_e++)xt.push(me+je.slice(0,_e+1)+"?"+je.slice(_e+1)+Pe);if(ae){let _e=jv(v,1);for(let dt=0;dt<Nt;dt++)xt.push(me+je.slice(0,dt)+_e+je.slice(dt)+Pe)}Ee+="(?:"+xt.join("|")+")"+X[de]}}return Ee});else{let ue=jv(v,a);Z==2&&a>0&&(ue=")("+ue+")("),oe=ie.map((de,Ee)=>de[0]==='"'?Iv(de.slice(1,-1)):de.split("").map((ve,K,ne)=>(a==1&&K==0&&ne.length>1&&ve!=ne[K+1]&&(ve+="(?!"+ve+")"),ve)).join(ue)+X[Ee])}let H=r==2?rS:"",re=n==2?rS:"",ce=re+jv(e.interChars,e.interIns)+H;return Z>0?se?oe=H+"("+oe.join(")"+re+"|"+H+"(")+")"+re:(oe="("+oe.join(")("+ce+")(")+")",oe="(.??"+H+")"+oe+"("+re+".*)"):(oe=oe.join(ce),oe=H+oe+re),[new RegExp(oe,"i"+x),ie,X]},L=(U,Z,se)=>{let[ie]=z(Z);if(ie==null)return null;let X=[];if(se!=null)for(let oe=0;oe<se.length;oe++){let H=se[oe];ie.test(U[H])&&X.push(H)}else for(let oe=0;oe<U.length;oe++)ie.test(U[oe])&&X.push(oe);return X},T=!!f,I=new RegExp(h,x),V=new RegExp(f,x),Y=(U,Z,se)=>{let[ie,X,oe]=z(se,1),H=M(se,!0),[re]=z(se,2),ce=X.length,ue=Array(ce),de=Array(ce);for(let fe=0;fe<ce;fe++){let $=X[fe],te=H[fe],J=$[0]=='"'?$.slice(1,-1):$+oe[fe],he=te[0]=='"'?te.slice(1,-1):te+oe[fe];ue[fe]=J,de[fe]=he}let Ee=U.length,ve=Array(Ee).fill(0),K={idx:Array(Ee),start:ve.slice(),chars:ve.slice(),cases:ve.slice(),terms:ve.slice(),interIns:ve.slice(),intraIns:ve.slice(),interLft2:ve.slice(),interRgt2:ve.slice(),interLft1:ve.slice(),interRgt1:ve.slice(),ranges:Array(Ee)},ne=r==1||n==1,ae=0;for(let fe=0;fe<U.length;fe++){let $=Z[U[fe]],te=$.match(ie),J=te.index+te[1].length,he=J,me=!1,Pe=0,je=0,Nt=0,xt=0,_e=0,dt=0,Yn=0,va=0,ma=0,Dt=[];for(let Ae=0,qe=2;Ae<ce;Ae++,qe+=2){let pr=y(te[qe]),nt=ue[Ae],Di=de[Ae],St=nt.length,Ot=pr.length,pt=pr==nt;if(te[qe]==Di&&Yn++,!pt&&te[qe+1].length>=St){let Ve=y(te[qe+1]).indexOf(nt);Ve>-1&&(Dt.push(he,Ot,Ve,St),he+=F(te,qe,Ve,St),pr=nt,Ot=St,pt=!0,Ae==0&&(J=he))}if(ne||pt){let Ve=he-1,Fr=he+Ot,Jn=!1,ba=!1;if(Ve==-1||I.test($[Ve]))pt&&Pe++,Jn=!0;else{if(r==2){me=!0;break}if(T&&V.test($[Ve]+$[Ve+1]))pt&&je++,Jn=!0;else if(r==1){let rs=te[qe+1],Bi=he+Ot;if(rs.length>=St){let Xn=0,zi=!1,GR=new RegExp(nt,"ig"+x),Zb;for(;Zb=GR.exec(rs);){Xn=Zb.index;let Yb=Bi+Xn,Jd=Yb-1;if(Jd==-1||I.test($[Jd])){Pe++,zi=!0;break}else if(V.test($[Jd]+$[Yb])){je++,zi=!0;break}}zi&&(Jn=!0,Dt.push(he,Ot,Xn,St),he+=F(te,qe,Xn,St),pr=nt,Ot=St,pt=!0,Ae==0&&(J=he))}if(!Jn){me=!0;break}}}if(Fr==$.length||I.test($[Fr]))pt&&Nt++,ba=!0;else{if(n==2){me=!0;break}if(T&&V.test($[Fr-1]+$[Fr]))pt&&xt++,ba=!0;else if(n==1){me=!0;break}}pt&&(_e+=St,Jn&&ba&&dt++)}if(Ot>St&&(ma+=Ot-St),Ae>0&&(va+=te[qe-1].length),!e.intraFilt(nt,pr,he)){me=!0;break}Ae<ce-1&&(he+=Ot+te[qe+1].length)}if(!me){K.idx[ae]=U[fe],K.interLft2[ae]=Pe,K.interLft1[ae]=je,K.interRgt2[ae]=Nt,K.interRgt1[ae]=xt,K.chars[ae]=_e,K.terms[ae]=dt,K.cases[ae]=Yn,K.interIns[ae]=va,K.intraIns[ae]=ma,K.start[ae]=J;let Ae=$.match(re),qe=Ae.index+Ae[1].length,pr=Dt.length,nt=pr>0?0:1/0,Di=pr-4;for(let Ve=2;Ve<Ae.length;){let Fr=Ae[Ve].length;if(nt<=Di&&Dt[nt]==qe){let Jn=Dt[nt+1],ba=Dt[nt+2],rs=Dt[nt+3],Bi=Ve,Xn="";for(let zi=0;zi<Jn;Bi++)Xn+=Ae[Bi],zi+=Ae[Bi].length;Ae.splice(Ve,Bi-Ve,Xn),qe+=F(Ae,Ve,ba,rs),nt+=4}else qe+=Fr,Ve++}qe=Ae.index+Ae[1].length;let St=K.ranges[ae]=[],Ot=qe,pt=qe;for(let Ve=2;Ve<Ae.length;Ve++){let Fr=Ae[Ve].length;qe+=Fr,Ve%2==0?pt=qe:Fr>0&&(St.push(Ot,pt),Ot=pt=qe)}pt>Ot&&St.push(Ot,pt),ae++}}if(ae<U.length)for(let fe in K)K[fe]=K[fe].slice(0,ae);return K},F=(U,Z,se,ie)=>{let X=U[Z]+U[Z+1].slice(0,se);return U[Z-1]+=X,U[Z]=U[Z+1].slice(se,se+ie),U[Z+1]=U[Z+1].slice(se+ie),X.length},Q=5,le=(U,Z,se,ie=1e3,X)=>{se=se?se===!0?Q:se:0;let oe=null,H=null,re=[];Z=Z.replace(P,K=>{let ne=K.trim().slice(1);return ne=ne[0]==='"'?Iv(ne.slice(1,-1)):ne.replace(I2,""),ne!=""&&re.push(ne),""});let ce=M(Z),ue;if(re.length>0){if(ue=new RegExp(re.join("|"),"i"+x),ce.length==0){let K=[];for(let ne=0;ne<U.length;ne++)ue.test(U[ne])||K.push(ne);return[K,null,null]}}else if(ce.length==0)return[null,null,null];if(se>0){let K=M(Z);if(K.length>1){let ne=K.slice().sort((fe,$)=>$.length-fe.length);for(let fe=0;fe<ne.length;fe++){if(X?.length==0)return[[],null,null];X=L(U,ne[fe],X)}if(K.length>se)return[X,null,null];oe=iS(K).map(fe=>fe.join(" ")),H=[];let ae=new Set;for(let fe=0;fe<oe.length;fe++)if(ae.size<X.length){let $=X.filter(J=>!ae.has(J)),te=L(U,oe[fe],$);for(let J=0;J<te.length;J++)ae.add(te[J]);H.push(te)}else H.push([])}}oe==null&&(oe=[Z],H=[X?.length>0?X:L(U,Z)]);let de=null,Ee=null;if(re.length>0&&(H=H.map(K=>K.filter(ne=>!ue.test(U[ne])))),H.reduce((K,ne)=>K+ne.length,0)<=ie){de={},Ee=[];for(let K=0;K<H.length;K++){let ne=H[K];if(ne==null||ne.length==0)continue;let ae=oe[K],fe=Y(ne,U,ae),$=e.sort(fe,U,ae,w);if(K>0)for(let te=0;te<$.length;te++)$[te]+=Ee.length;for(let te in fe)de[te]=(de[te]??[]).concat(fe[te]);Ee=Ee.concat($)}}return[[].concat(...H),de,Ee]};return{search:(...U)=>le(...U),split:M,filter:L,info:Y,sort:e.sort}}var N2=(()=>{let e={A:"\xC1\xC0\xC3\xC2\xC4\u0104",a:"\xE1\xE0\xE3\xE2\xE4\u0105",E:"\xC9\xC8\xCA\xCB\u0116",e:"\xE9\xE8\xEA\xEB\u0119",I:"\xCD\xCC\xCE\xCF\u012E",i:"\xED\xEC\xEE\xEF\u012F",O:"\xD3\xD2\xD4\xD5\xD6",o:"\xF3\xF2\xF4\xF5\xF6",U:"\xDA\xD9\xDB\xDC\u016A\u0172",u:"\xFA\xF9\xFB\xFC\u016B\u0173",C:"\xC7\u010C\u0106",c:"\xE7\u010D\u0107",L:"\u0141",l:"\u0142",N:"\xD1\u0143",n:"\xF1\u0144",S:"\u0160\u015A",s:"\u0161\u015B",Z:"\u017B\u0179",z:"\u017C\u017A"},t=new Map,r="";for(let o in e)e[o].split("").forEach(a=>{r+=a,t.set(a,o)});let n=new RegExp(`[${r}]`,"g"),i=o=>t.get(o);return o=>{if(typeof o=="string")return o.replace(n,i);let a=Array(o.length);for(let u=0;u<o.length;u++)a[u]=o[u].replace(n,i);return a}})();function iS(e){e=e.slice();let t=e.length,r=[e.slice()],n=new Array(t).fill(0),i=1,o,a;for(;i<t;)n[i]<i?(o=i%2&&n[i],a=e[i],e[i]=e[o],e[o]=a,++n[i],i=1,r.push(e.slice())):(n[i]=0,++i);return r}var D2=(e,t)=>t?`<mark>${e}</mark>`:e,B2=(e,t)=>e+t;function z2(e,t,r=D2,n="",i=B2){n=i(n,r(e.substring(0,t[0]),!1))??n;for(let o=0;o<t.length;o+=2){let a=t[o],u=t[o+1];n=i(n,r(e.substring(a,u),!0))??n,o<t.length-3&&(n=i(n,r(e.substring(t[o+1],t[o+2]),!1))??n)}return n=i(n,r(e.substring(t[t.length-1]),!1))??n,n}Ac.latinize=N2;Ac.permute=e=>iS([...Array(e.length).keys()]).sort((r,n)=>{for(let i=0;i<r.length;i++)if(r[i]!=n[i])return r[i]-n[i];return 0}).map(r=>r.map(n=>e[n]));Ac.highlight=z2;oS.exports=Ac});var _n=b((xee,du)=>{function U2(e){return e&&e.__esModule?e:{default:e}}du.exports=U2,du.exports.__esModule=!0,du.exports.default=du.exports});var Fv=b((See,Gr)=>{function Lv(e){"@babel/helpers - typeof";return Gr.exports=Lv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr.exports.__esModule=!0,Gr.exports.default=Gr.exports,Lv(e)}Gr.exports=Lv,Gr.exports.__esModule=!0,Gr.exports.default=Gr.exports});var sS=b((Oee,pu)=>{var uS=Fv().default;function W2(e,t){if(uS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}pu.exports=W2,pu.exports.__esModule=!0,pu.exports.default=pu.exports});var Nv=b((Eee,hu)=>{var V2=Fv().default,$2=sS();function H2(e){var t=$2(e,"string");return V2(t)=="symbol"?t:t+""}hu.exports=H2,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var cS=b((Aee,vu)=>{var G2=Nv();function K2(e,t,r){return(t=G2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}vu.exports=K2,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var Si=b((Pee,mu)=>{function Z2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}mu.exports=Z2,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var Oi=b((Tee,bu)=>{var Y2=Nv();function lS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y2(n.key),n)}}function J2(e,t,r){return t&&lS(e.prototype,t),r&&lS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}bu.exports=J2,bu.exports.__esModule=!0,bu.exports.default=bu.exports});var Dv=b((Ree,gu)=>{function X2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}gu.exports=X2,gu.exports.__esModule=!0,gu.exports.default=gu.exports});var fS=b((Mee,yu)=>{var Q2=Dv();function ej(e){if(Array.isArray(e))return Q2(e)}yu.exports=ej,yu.exports.__esModule=!0,yu.exports.default=yu.exports});var dS=b((kee,_u)=>{function tj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}_u.exports=tj,_u.exports.__esModule=!0,_u.exports.default=_u.exports});var hS=b((Cee,wu)=>{var pS=Dv();function rj(e,t){if(e){if(typeof e=="string")return pS(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pS(e,t):void 0}}wu.exports=rj,wu.exports.__esModule=!0,wu.exports.default=wu.exports});var vS=b((qee,xu)=>{function nj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}xu.exports=nj,xu.exports.__esModule=!0,xu.exports.default=xu.exports});var mS=b((Iee,Su)=>{var ij=fS(),oj=dS(),aj=hS(),uj=vS();function sj(e){return ij(e)||oj(e)||aj(e)||uj()}Su.exports=sj,Su.exports.__esModule=!0,Su.exports.default=Su.exports});var bS=b(Rr=>{"use strict";var cj=_n(),lj=cj(mS()),fj={functions:"Jexl Function",transforms:"Transform"};Rr.ArrayLiteral=function(e){return this.evalArray(e.value)};Rr.BinaryExpression=function(e){var t=this,r=this._grammar.elements[e.operator];if(r.evalOnDemand){var n=function(o){return{eval:function(){return t.eval(o)}}};return r.evalOnDemand(n(e.left),n(e.right))}return this.Promise.all([this.eval(e.left),this.eval(e.right)]).then(function(i){return r.eval(i[0],i[1])})};Rr.ConditionalExpression=function(e){var t=this;return this.eval(e.test).then(function(r){return r?e.consequent?t.eval(e.consequent):r:t.eval(e.alternate)})};Rr.FilterExpression=function(e){var t=this;return this.eval(e.subject).then(function(r){return e.relative?t._filterRelative(r,e.expr):t._filterStatic(r,e.expr)})};Rr.Identifier=function(e){return e.from?this.eval(e.from).then(function(t){if(t!=null)return Array.isArray(t)&&(t=t[0]),t[e.value]}):e.relative?this._relContext[e.value]:this._context[e.value]};Rr.Literal=function(e){return e.value};Rr.ObjectLiteral=function(e){return this.evalMap(e.value)};Rr.FunctionCall=function(e){var t=fj[e.pool];if(!t)throw new Error("Corrupt AST: Pool '".concat(e.pool,"' not found"));var r=this._grammar[e.pool],n=r[e.name];if(!n)throw new Error("".concat(t," ").concat(e.name," is not defined."));return this.evalArray(e.args||[]).then(function(i){return n.apply(void 0,(0,lj.default)(i))})};Rr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var _S=b((Lee,yS)=>{"use strict";var gS=_n(),dj=gS(Si()),pj=gS(Oi()),hj=bS(),vj=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,dj.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,pj.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return hj[r.type].call(n,r)})}},{key:"evalArray",value:function(r){var n=this;return this.Promise.all(r.map(function(i){return n.eval(i)}))}},{key:"evalMap",value:function(r){var n=this,i=Object.keys(r),o={},a=i.map(function(u){return n.eval(r[u])});return this.Promise.all(a).then(function(u){return u.forEach(function(l,s){o[i[s]]=l}),o})}},{key:"_filterRelative",value:function(r,n){var i=this,o=[];return Array.isArray(r)||(r=r===void 0?[]:[r]),r.forEach(function(a){var u=new e(i._grammar,i._context,a,i.Promise);o.push(u.eval(n))}),this.Promise.all(o).then(function(a){var u=[];return a.forEach(function(l,s){l&&u.push(r[s])}),u})}},{key:"_filterStatic",value:function(r,n){return this.eval(n).then(function(i){return typeof i=="boolean"?i?r:void 0:r[i]})}}]),e}();yS.exports=vj});var OS=b((Fee,SS)=>{"use strict";var xS=_n(),mj=xS(Si()),bj=xS(Oi()),gj=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,wS=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,yj=/\\\\/,_j=/^\s*$/,wj=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],xj=["[a-zA-Z\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$][a-zA-Z0-9\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$]*","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],Sj=["binaryOp","unaryOp","openParen","openBracket","question","colon"],Oj=function(){function e(t){(0,mj.default)(this,e),this._grammar=t}return(0,bj.default)(e,[{key:"getElements",value:function(r){var n=this._getSplitRegex();return r.split(n).filter(function(i){return i})}},{key:"getTokens",value:function(r){for(var n=[],i=!1,o=0;o<r.length;o++)this._isWhitespace(r[o])?n.length&&(n[n.length-1].raw+=r[o]):r[o]==="-"&&this._isNegative(n)?i=!0:(i&&(r[o]="-"+r[o],i=!1),n.push(this._createToken(r[o])));return i&&n.push(this._createToken("-")),n}},{key:"tokenize",value:function(r){var n=this.getElements(r);return this.getTokens(n)}},{key:"_createToken",value:function(r){var n={type:"literal",value:r,raw:r};if(r[0]==='"'||r[0]==="'")n.value=this._unquote(r);else if(r.match(gj))n.value=parseFloat(r);else if(r==="true"||r==="false")n.value=r==="true";else if(this._grammar.elements[r])n.type=this._grammar.elements[r].type;else if(r.match(wS))n.type="identifier";else throw new Error("Invalid expression token: ".concat(r));return n}},{key:"_escapeRegExp",value:function(r){return r=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r.match(wS)&&(r="\\b"+r+"\\b"),r}},{key:"_getSplitRegex",value:function(){var r=this;if(!this._splitRegex){var n=Object.keys(this._grammar.elements).sort(function(i,o){return o.length-i.length}).map(function(i){return r._escapeRegExp(i)},this);this._splitRegex=new RegExp("("+[wj.join("|"),n.join("|"),xj.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?Sj.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(_j)}},{key:"_unquote",value:function(r){var n=r[0],i=new RegExp("\\\\"+n,"g");return r.substr(1,r.length-2).replace(i,n).replace(yj,"\\")}}]),e}();SS.exports=Oj});var Bv=b(Xe=>{"use strict";Xe.argVal=function(e){e&&this._cursor.args.push(e)};Xe.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};Xe.arrayVal=function(e){e&&this._cursor.value.push(e)};Xe.binaryOp=function(e){for(var t=this._grammar.elements[e.value].precedence||0,r=this._cursor._parent;r&&r.operator&&this._grammar.elements[r.operator].precedence>=t;)this._cursor=r,r=r._parent;var n={type:"BinaryExpression",operator:e.value,left:this._cursor};this._setParent(this._cursor,n),this._cursor=r,this._placeAtCursor(n)};Xe.dot=function(){this._nextIdentEncapsulate=this._cursor&&this._cursor.type!=="UnaryExpression"&&(this._cursor.type!=="BinaryExpression"||this._cursor.type==="BinaryExpression"&&this._cursor.right),this._nextIdentRelative=!this._cursor||this._cursor&&!this._nextIdentEncapsulate,this._nextIdentRelative&&(this._relative=!0)};Xe.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};Xe.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};Xe.identifier=function(e){var t={type:"Identifier",value:e.value};this._nextIdentEncapsulate?(t.from=this._cursor,this._placeBeforeCursor(t),this._nextIdentEncapsulate=!1):(this._nextIdentRelative&&(t.relative=!0,this._nextIdentRelative=!1),this._placeAtCursor(t))};Xe.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};Xe.objKey=function(e){this._curObjKey=e.value};Xe.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};Xe.objVal=function(e){this._cursor.value[this._curObjKey]=e};Xe.subExpression=function(e){this._placeAtCursor(e)};Xe.ternaryEnd=function(e){this._cursor.alternate=e};Xe.ternaryMid=function(e){this._cursor.consequent=e};Xe.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};Xe.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};Xe.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var AS=b(ES=>{"use strict";var Mt=Bv();ES.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:Mt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:Mt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:Mt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:Mt.objKey},closeCurl:{toState:"expectBinOp"}}},expectKeyValSep:{tokenTypes:{colon:{toState:"objVal"}}},postTransform:{tokenTypes:{openParen:{toState:"argVal"},binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},postArgs:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},pipe:{toState:"expectTransform"}},completable:!0},identifier:{tokenTypes:{binaryOp:{toState:"expectOperand"},dot:{toState:"traverse"},openBracket:{toState:"filter"},openParen:{toState:"argVal",handler:Mt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:Mt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:Mt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:Mt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:Mt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:Mt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:Mt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:Mt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:Mt.ternaryEnd,completable:!0}}});var RS=b((Bee,TS)=>{"use strict";var PS=_n(),Ej=PS(Si()),Aj=PS(Oi()),Pj=Bv(),Pc=AS().states,Tj=function(){function e(t,r,n){(0,Ej.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,Aj.default)(e,[{key:"addToken",value:function(r){if(this._state==="complete")throw new Error("Cannot add a new token to a completed Parser");var n=Pc[this._state],i=this._exprStr;if(this._exprStr+=r.raw,n.subHandler){this._subParser||this._startSubExpression(i);var o=this._subParser.addToken(r);if(o){if(this._endSubExpression(),this._parentStop)return o;this._state=o}}else if(n.tokenTypes[r.type]){var a=n.tokenTypes[r.type],u=Pj[r.type];a.handler&&(u=a.handler),u&&u.call(this,r),a.toState&&(this._state=a.toState)}else{if(this._stopMap[r.type])return this._stopMap[r.type];throw new Error("Token ".concat(r.raw," (").concat(r.type,") unexpected in expression: ").concat(this._exprStr))}return!1}},{key:"addTokens",value:function(r){r.forEach(this.addToken,this)}},{key:"complete",value:function(){if(this._cursor&&!Pc[this._state].completable)throw new Error("Unexpected end of expression: ".concat(this._exprStr));return this._subParser&&this._endSubExpression(),this._state="complete",this._cursor?this._tree:null}},{key:"isRelative",value:function(){return this._relative}},{key:"_endSubExpression",value:function(){Pc[this._state].subHandler.call(this,this._subParser.complete()),this._subParser=null}},{key:"_placeAtCursor",value:function(r){this._cursor?(this._cursor.right=r,this._setParent(r,this._cursor)):this._tree=r,this._cursor=r}},{key:"_placeBeforeCursor",value:function(r){this._cursor=this._cursor._parent,this._placeAtCursor(r)}},{key:"_setParent",value:function(r,n){Object.defineProperty(r,"_parent",{value:n,writable:!0})}},{key:"_startSubExpression",value:function(r){var n=Pc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();TS.exports=Tj});var CS=b((zee,kS)=>{"use strict";var MS=_n(),Rj=MS(Si()),Mj=MS(Oi()),wn=function(){function e(t){(0,Rj.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,Mj.default)(e,[{key:"catch",value:function(r){if(this.error)try{this._resolve(r(this.error))}catch(n){this._reject(n)}return this}},{key:"then",value:function(r,n){if(!this.error)try{this._resolve(r(this.value))}catch(i){this._reject(i)}return n&&this.catch(n),this}},{key:"_reject",value:function(r){this.value=void 0,this.error=r}},{key:"_resolve",value:function(r){r instanceof e?r.error?this._reject(r.error):this._resolve(r.value):(this.value=r,this.error=void 0)}}]),e}();wn.all=function(e){return new wn(function(t){var r=e.map(function(n){for(;n instanceof wn;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};wn.resolve=function(e){return new wn(function(t){return t(e)})};wn.reject=function(e){return new wn(function(t,r){return r(e)})};kS.exports=wn});var jS=b((Uee,IS)=>{"use strict";var qS=_n(),kj=qS(Si()),Cj=qS(Oi()),qj=_S(),Ij=OS(),jj=RS(),Lj=CS(),Fj=function(){function e(t,r){(0,kj.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,Cj.default)(e,[{key:"compile",value:function(){var r=new Ij(this._grammar),n=new jj(this._grammar),i=r.tokenize(this._exprStr);return n.addTokens(i),this._ast=n.complete(),this}},{key:"eval",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._eval(r,Promise)}},{key:"evalSync",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=this._eval(r,Lj);if(n.error)throw n.error;return n.value}},{key:"_eval",value:function(r,n){var i=this;return n.resolve().then(function(){var o=i._getAst(),a=new qj(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();IS.exports=Fj});var FS=b(LS=>{"use strict";LS.getGrammar=function(){return{elements:{".":{type:"dot"},"[":{type:"openBracket"},"]":{type:"closeBracket"},"|":{type:"pipe"},"{":{type:"openCurl"},"}":{type:"closeCurl"},":":{type:"colon"},",":{type:"comma"},"(":{type:"openParen"},")":{type:"closeParen"},"?":{type:"question"},"+":{type:"binaryOp",precedence:30,eval:function(t,r){return t+r}},"-":{type:"binaryOp",precedence:30,eval:function(t,r){return t-r}},"*":{type:"binaryOp",precedence:40,eval:function(t,r){return t*r}},"/":{type:"binaryOp",precedence:40,eval:function(t,r){return t/r}},"//":{type:"binaryOp",precedence:40,eval:function(t,r){return Math.floor(t/r)}},"%":{type:"binaryOp",precedence:50,eval:function(t,r){return t%r}},"^":{type:"binaryOp",precedence:50,eval:function(t,r){return Math.pow(t,r)}},"==":{type:"binaryOp",precedence:20,eval:function(t,r){return t==r}},"!=":{type:"binaryOp",precedence:20,eval:function(t,r){return t!=r}},">":{type:"binaryOp",precedence:20,eval:function(t,r){return t>r}},">=":{type:"binaryOp",precedence:20,eval:function(t,r){return t>=r}},"<":{type:"binaryOp",precedence:20,eval:function(t,r){return t<r}},"<=":{type:"binaryOp",precedence:20,eval:function(t,r){return t<=r}},"&&":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n&&r.eval()})}},"||":{type:"binaryOp",precedence:10,evalOnDemand:function(t,r){return t.eval().then(function(n){return n||r.eval()})}},in:{type:"binaryOp",precedence:20,eval:function(t,r){return typeof r=="string"?r.indexOf(t)!==-1:Array.isArray(r)?r.some(function(n){return n===t}):!1}},"!":{type:"unaryOp",precedence:1/0,eval:function(t){return!t}}},functions:{},transforms:{}}}});var DS=b((Vee,Uv)=>{"use strict";var zv=_n(),Nj=zv(cS()),Dj=zv(Si()),Bj=zv(Oi()),zj=jS(),Uj=FS(),Wj=Uj.getGrammar,NS=function(){function e(){(0,Dj.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Wj()}return(0,Bj.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,Nj.default)({type:"binaryOp",precedence:n},o?"evalOnDemand":"eval",i))}},{key:"addFunction",value:function(r,n){this._grammar.functions[r]=n}},{key:"addFunctions",value:function(r){for(var n in r)this._grammar.functions[n]=r[n]}},{key:"addUnaryOp",value:function(r,n){this._addGrammarElement(r,{type:"unaryOp",weight:1/0,eval:n})}},{key:"addTransform",value:function(r,n){this._grammar.transforms[r]=n}},{key:"addTransforms",value:function(r){for(var n in r)this._grammar.transforms[n]=r[n]}},{key:"compile",value:function(r){var n=this.createExpression(r);return n.compile()}},{key:"createExpression",value:function(r){return new zj(this._grammar,r)}},{key:"getFunction",value:function(r){return this._grammar.functions[r]}},{key:"getTransform",value:function(r){return this._grammar.transforms[r]}},{key:"eval",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.eval(n)}},{key:"evalSync",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.createExpression(r);return i.evalSync(n)}},{key:"expr",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a=r.reduce(function(u,l,s){var c=s<i.length?i[s]:"";return u+=l+c,u},"");return this.createExpression(a)}},{key:"removeOp",value:function(r){this._grammar.elements[r]&&(this._grammar.elements[r].type==="binaryOp"||this._grammar.elements[r].type==="unaryOp")&&delete this._grammar.elements[r]}},{key:"_addGrammarElement",value:function(r,n){this._grammar.elements[r]=n}}]),e}();Uv.exports=new NS;Uv.exports.Jexl=NS});var BS=b(Ou=>{"use strict";var Vj=Ou&&Ou.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.default=Hj;var $j=Vj(DS());function Hj(){let e=new $j.default.Jexl;return e.addFunction("get",(t,r)=>t.get(r)),e.addFunction("parent",t=>t.parent()),e.addFunction("id",t=>t.id()),e.addFunction("cast",t=>t),e.addFunction("log",t=>(console.log(t),t)),e.addFunction("max",Math.max),e.addFunction("min",Math.min),e.addFunction("sqrt",Math.sqrt),e.addFunction("ceil",Math.ceil),e.addFunction("floor",Math.floor),e.addFunction("round",Math.round),e.addFunction("abs",Math.abs),e.addFunction("log10",Math.log10),e.addFunction("parseInt",Number.parseInt),e.addFunction("parseFloat",Number.parseFloat),e.addFunction("split",(t,r)=>t.split(r)),e.addFunction("charAt",(t,r)=>t.charAt(r)),e.addFunction("charCodeAt",(t,r)=>t.charCodeAt(r)),e.addFunction("codePointAt",(t,r)=>t.codePointAt(r)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("endsWith",(t,r,n)=>t.endsWith(r,n)),e.addFunction("padEnd",(t,r,n)=>t.padEnd(r,n)),e.addFunction("padStart",(t,r,n)=>t.padStart(r,n)),e.addFunction("repeat",(t,r)=>t.repeat(r)),e.addFunction("replace",(t,r,n)=>t.replace(r,n)),e.addFunction("replaceAll",(t,r,n)=>t.replaceAll(r,n)),e.addFunction("slice",(t,r,n)=>t.slice(r,n)),e.addFunction("startsWith",(t,r,n)=>t.startsWith(r,n)),e.addFunction("substring",(t,r,n)=>t.substring(r,n)),e.addFunction("toLowerCase",t=>t.toLowerCase()),e.addFunction("toUpperCase",t=>t.toUpperCase()),e.addFunction("jsonParse",t=>JSON.parse(t)),e.addFunction("trim",t=>t.trim()),e.addFunction("trimEnd",t=>t.trimEnd()),e.addFunction("trimStart",t=>t.trimStart()),e.addFunction("getTag",(t,r)=>{let n=t.get("tags");return n?n[r]:t.get(r)}),e.addBinaryOp("&",15,(t,r)=>t&r),e}});var Vv=b(Eu=>{"use strict";var Gj=Eu&&Eu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Eu,"__esModule",{value:!0});Eu.stringToJexlExpression=Zj;var Kj=Gj(BS()),Wv={};function Zj(e,t){let r=`nosig|${e}`;if(!Wv[r]){if(!e.startsWith("jexl:"))throw new Error("string does not appear to be in jexl format");let i=e.split("jexl:")[1],o=t?t.compile(i):(0,Kj.default)().compile(i);Wv[r]=o}return Wv[r]}});var zS=b(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.nanoid=kt.customAlphabet=kt.customRandom=kt.random=kt.urlAlphabet=void 0;kt.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Yj=e=>crypto.getRandomValues(new Uint8Array(e));kt.random=Yj;var Jj=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return(o=t)=>{let a="";for(;;){let u=r(i),l=i;for(;l--;)if(a+=e[u[l]&n]||"",a.length===o)return a}}};kt.customRandom=Jj;var Xj=(e,t=21)=>(0,kt.customRandom)(e,t,kt.random);kt.customAlphabet=Xj;var Qj=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");kt.nanoid=Qj});var $v=b(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.FileLocation=ze.UriLocation=ze.UriLocationRaw=ze.BlobLocation=ze.LocalPathLocation=ze.Region=ze.NoAssemblyRegion=ze.ElementId=void 0;var Oe=bt(),eL=zS();ze.ElementId=Oe.types.optional(Oe.types.identifier,()=>(0,eL.nanoid)());ze.NoAssemblyRegion=Oe.types.model("NoAssemblyRegion",{refName:Oe.types.string,start:Oe.types.number,end:Oe.types.number,reversed:Oe.types.optional(Oe.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));ze.Region=Oe.types.compose("Region",ze.NoAssemblyRegion,Oe.types.model({assemblyName:Oe.types.string}));ze.LocalPathLocation=Oe.types.model("LocalPathLocation",{locationType:Oe.types.literal("LocalPathLocation"),localPath:Oe.types.string});ze.BlobLocation=Oe.types.model("BlobLocation",{locationType:Oe.types.literal("BlobLocation"),name:Oe.types.string,blobId:Oe.types.string});ze.UriLocationRaw=Oe.types.model("UriLocation",{locationType:Oe.types.literal("UriLocation"),uri:Oe.types.string,baseUri:Oe.types.maybe(Oe.types.string),internetAccountId:Oe.types.maybe(Oe.types.string),internetAccountPreAuthorization:Oe.types.maybe(Oe.types.model("InternetAccountPreAuthorization",{internetAccountType:Oe.types.string,authInfo:Oe.types.frozen()}))});ze.UriLocation=Oe.types.snapshotProcessor(ze.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});ze.FileLocation=Oe.types.snapshotProcessor(Oe.types.union(ze.LocalPathLocation,ze.UriLocation,ze.BlobLocation),{preProcessor(e){if(!e)return;let{locationType:t,...r}=e;if(!t){let{uri:n,localPath:i,blob:o}=r,a="";return n!==void 0?a="UriLocation":i!==void 0?a="LocalPathLocation":o!==void 0&&(a="BlobLocation"),{...r,locationType:a}}return e}})});var $S=b(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});Gv.default=sL;var Ne=bt(),tL=Au(),rL=Vv(),nL=$v();function iL(){return!0}var oL={stringArray:Ne.types.array(Ne.types.string),stringArrayMap:Ne.types.map(Ne.types.array(Ne.types.string)),numberMap:Ne.types.map(Ne.types.number),boolean:Ne.types.boolean,color:Ne.types.refinement("Color",Ne.types.string,iL),integer:Ne.types.integer,number:Ne.types.number,string:Ne.types.string,text:Ne.types.string,fileLocation:nL.FileLocation,frozen:Ne.types.frozen()},US={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},Hv=e=>({views:{get valueJSON(){return e.value}}}),WS=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),VS={fileLocation:WS,number:Hv,integer:Hv,boolean:Hv,frozen:WS,stringArray:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t){e.value.push(t)},removeAtIndex(t){e.value.splice(t,1)},setAtIndex(t,r){e.value[t]=r}}}),stringArrayMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)},addToKey(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.push(r)},removeAtKeyIndex(t,r){let n=e.value.get(t);if(!n)throw new Error(`${t} not found`);n.splice(r,1)},setAtKeyIndex(t,r,n){let i=e.value.get(t);if(!i)throw new Error(`${t} not found`);i[r]=n}}}),numberMap:e=>({views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add(t,r){e.value.set(t,r)},remove(t){e.value.delete(t)}}})},aL=Ne.types.refinement("JexlString",Ne.types.string,e=>e.startsWith("jexl:"));function uL(e){return e?.toJSON?e.toJSON():`"${e}"`}function sL(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=oL[n]),!r)throw new Error(`no builtin config slot type "${n}", and no 'model' param provided`);if(i===void 0)throw new Error("no 'defaultValue' provided");let a=`${e.charAt(0).toUpperCase()}${e.slice(1)}ConfigSlot`,u=Ne.types.model(a,{name:Ne.types.literal(e),description:Ne.types.literal(t),type:Ne.types.literal(n),value:Ne.types.optional(Ne.types.union(aL,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:d}=(0,tL.getEnv)(c);return!d&&typeof jest>"u"&&console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,rL.stringToJexlExpression)(String(c.value),d?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return uL(c.value)}})).preProcessSnapshot(c=>typeof c=="object"&&c.name===e?c:{name:e,description:t,type:n,value:c}).postProcessSnapshot(c=>typeof c.value=="object"?JSON.stringify(c.value)!==JSON.stringify(i)?c.value:void 0:c.value!==i?c.value:void 0).actions(c=>({set(d){c.value=d},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let d=c.expr.evalSync();if(d!==void 0){c.value=d;return}}catch{}if(c.value=i,!(n in US))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=US[n]}}}));VS[n]&&(u=u.extend(VS[n]));let s=Ne.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var GS=b(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.getSubType=Kv;Sn.getUnionSubTypes=HS;Sn.getPropertyType=cL;Sn.getDefaultValue=lL;Sn.getEnumerationValues=fL;Sn.resolveLateType=dL;var xn=bt();function Kv(e){let t;if((0,xn.isOptionalType)(e))t=e._subtype||e.type;else if((0,xn.isArrayType)(e)||(0,xn.isMapType)(e))t=e._subtype||e._subType||e.subType;else{if(typeof e.getSubType=="function")return e.getSubType();throw new TypeError("unsupported mst type")}if(!t)throw new Error("failed to get subtype");return t}function HS(e){if(!(0,xn.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||Kv(e)._types||Kv(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function cL(e,t){return e.properties[t]}function lL(e){if(!(0,xn.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function fL(e){return HS(e).map(r=>r.value)}function dL(e){return!(0,xn.isUnionType)(e)&&!(0,xn.isArrayType)(e)&&(0,xn.isLateType)(e)?e.getSubType():e}});var Zv=b(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.readConfObject=Tc;Kr.getConf=pL;Kr.getTypeNamesFromExplicitlyTypedUnion=KS;Kr.isBareConfigurationSchemaType=ZS;Kr.isConfigurationSchemaType=Eo;Kr.isConfigurationModel=YS;Kr.isConfigurationSlotType=hL;var He=bt(),On=GS();function Tc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,He.isStateTreeNode)(e)&&(0,He.isMapType)((0,He.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,He.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,He.getSnapshot)(i))):i}else return}else if(Array.isArray(t)){let n=t[0];if(t.length>1){let i=t.slice(1),o=e[n];return!o&&(0,He.isStateTreeNode)(e)&&(0,He.isMapType)((0,He.getType)(e))&&(o=e.get(n)),o?Tc(o,i,r):void 0}return Tc(e,n,r)}}else return structuredClone((0,He.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function pL(e,t,r){let{configuration:n}=e;if(YS(n))return Tc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function KS(e){if((0,He.isType)(e)&&(e=(0,On.resolveLateType)(e),(0,He.isUnionType)(e))){let t=[];for(let r of(0,On.getUnionSubTypes)(e)){r=(0,On.resolveLateType)(r);let n=KS(r);if(n.length||(n=[(0,On.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}return t}return[]}function ZS(e){return!!((0,He.isType)(e)&&((0,He.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,He.isLateType)(e)))}function Eo(e){return(0,He.isType)(e)?ZS(e)?!0:(0,He.isUnionType)(e)?(0,On.getUnionSubTypes)(e).every(t=>Eo(t)||t.name==="undefined"):(0,He.isOptionalType)(e)&&Eo((0,On.getSubType)(e))||(0,He.isArrayType)(e)&&Eo((0,On.getSubType)(e))?!0:!!((0,He.isMapType)(e)&&Eo((0,On.getSubType)(e))):!1}function YS(e){return(0,He.isStateTreeNode)(e)&&Eo((0,He.getType)(e))}function hL(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var QS=b(Ao=>{"use strict";var vL=Ao&&Ao.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.ConfigurationSchema=wL;Ao.ConfigurationReference=xL;var Yt=bt(),mL=vL($S()),JS=Zv(),XS=$v();function bL(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function gL(e){return Array.isArray(e)&&e.length===0}function yL(e,t,r={}){var n;if(typeof e!="string")throw new Error("first arg must be string name of the model that this config schema goes with");let i=t,o=r;return!((n=r.baseConfiguration)===null||n===void 0)&&n.jbrowseSchemaDefinition&&(i={...r.baseConfiguration.jbrowseSchemaDefinition,...i},o={...r.baseConfiguration.jbrowseSchemaOptions,...r},o.baseConfiguration=void 0),{schemaDefinition:i,options:o}}function _L(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Yt.types.optional(Yt.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error(`Cannot have both explicit and implicit identifiers in ${e}`);r.explicitIdentifier?typeof r.explicitIdentifier=="string"?(n[r.explicitIdentifier]=Yt.types.identifier,i=r.explicitIdentifier):(n.id=Yt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=XS.ElementId,i=r.implicitIdentifier):(n.id=XS.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};for(let[c,d]of Object.entries(t))if((0,Yt.isType)(d)&&(0,Yt.isLateType)(d)||(0,JS.isConfigurationSchemaType)(d))n[c]=d;else if(typeof d=="string"||typeof d=="number")o[c]=d;else if(typeof d=="object"){if(!d.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,mL.default)(c,d)}catch(p){throw new Error(`invalid config slot definition for ${e}.${c}: ${p}`)}}else throw new Error(`invalid configuration schema definition, "${c}" must be either a valid configuration slot definition, a constant, or a nested configuration schema`);let a=Yt.types.model(`${e}ConfigurationSchema`,n).actions(c=>({setSubschema(d,p){if(!(0,JS.isConfigurationSchemaType)(n[d]))throw new Error(`${d} is not a subschema, cannot replace`);let f=(0,Yt.isStateTreeNode)(p)?p:n[d].create(p);return c[d]=f,f}}));Object.keys(o).length&&(a=a.volatile(()=>o)),r.actions&&(a=a.actions(r.actions)),r.views&&(a=a.views(r.views)),r.extend&&(a=a.extend(r.extend));let u=i?{[i]:"placeholderId"}:{},l=r.explicitlyTyped?{type:e,...u}:u,s=(0,Yt.getSnapshot)(a.create(l));return a=a.postProcessSnapshot(c=>{let d={},p=!0;for(let[f,h]of Object.entries(c))p&&(typeof s[f]=="object"&&typeof h=="object"?JSON.stringify(s[f])!==JSON.stringify(h)&&(p=!1):s[f]!==h&&(p=!1)),h!==void 0&&o[f]===void 0&&!bL(h)&&!gL(h)&&(d[f]=h);return p?{}:d}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Yt.types.optional(a,l)}function wL(e,t,r){let{schemaDefinition:n,options:i}=yL(e,t,r),o=_L(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function xL(e){return Yt.types.union(Yt.types.reference(e),e)}});var Yv=b(ur=>{"use strict";var SL=ur&&ur.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),OL=ur&&ur.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&SL(t,e,r)};Object.defineProperty(ur,"__esModule",{value:!0});ur.ConfigurationSchema=ur.ConfigurationReference=void 0;var eO=QS();Object.defineProperty(ur,"ConfigurationReference",{enumerable:!0,get:function(){return eO.ConfigurationReference}});Object.defineProperty(ur,"ConfigurationSchema",{enumerable:!0,get:function(){return eO.ConfigurationSchema}});OL(Zv(),ur)});var rO=b(Pu=>{"use strict";var tO=Pu&&Pu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pu,"__esModule",{value:!0});var EL=tO(aS()),Jv=Yv(),AL=tO(Up()),Xv=class{constructor(t){this.pluginManager=t,this.adapterCache=new AL.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,Jv.readConfObject)(r,"textSearchAdapterId"),i=this.adapterCache.get(n);if(i)return i;{let a=await this.pluginManager.getTextSearchAdapterType(r.type).getAdapterClass(),u=new a(r,void 0,this.pluginManager);return this.adapterCache.set(n,u),u}}))}relevantAdapters(t){let r=this.pluginManager.rootModel,{aggregateTextSearchAdapters:n}=r?.jbrowse,{tracks:i}=r?.session,{assemblyName:o}=t;return[...this.getAdaptersWithAssembly(o,n),...this.getTrackAdaptersWithAssembly(o,i)]}getAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Jv.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Jv.readConfObject)(n,["textSearching","textSearchAdapter","assemblyNames"]))===null||i===void 0?void 0:i.includes(t)}).map(n=>n.textSearching.textSearchAdapter)}async search(t,r,n){return this.search2({args:t,searchScope:r,rankFn:n})}async search2({args:t,searchScope:r,rankFn:n}){let i=await this.loadTextSearchAdapters(r),o=await Promise.all(i.map(a=>a.searchIndex(t)));return this.sortResults2({args:t,results:o.flat(),rankFn:n})}sortResults2({results:t,rankFn:r,args:n}){let i=new EL.default({}),o=t.map(s=>s.getDisplayString()),a=n.queryString,u=i.filter(o,a),l=[];if(u!=null&&u.length>0){let s=i.info(u,o,a),c=i.sort(s,o,a);for(let d of c)l.push(t[s.idx[d]])}return r(l)}};Pu.default=Xv});var Rc=b(ye=>{"use strict";var PL=ye&&ye.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),TL=ye&&ye.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&PL(t,e,r)},RL=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.TextSearchManager=ye.RetryError=ye.AuthNeededError=void 0;ye.isViewContainer=kL;ye.isSessionModel=En;ye.isSessionModelWithConfigEditing=CL;ye.isSessionWithAddTracks=qL;ye.isSessionWithShareURL=IL;ye.isSessionModelWithWidgets=jL;ye.isSessionModelWithConnections=LL;ye.isSessionModelWithConnectionEditing=FL;ye.isSessionWithSessionPlugins=NL;ye.isSelectionContainer=DL;ye.isViewModel=BL;ye.isTrackModel=zL;ye.isDisplayModel=UL;ye.isTrackViewModel=WL;ye.isAppRootModel=VL;ye.isRootModelWithInternetAccounts=$L;ye.isAbstractMenuManager=HL;ye.isUriLocation=GL;ye.isLocalPathLocation=KL;ye.isBlobLocation=ZL;ye.isAuthNeededException=YL;ye.isRetryException=JL;var ML=bt();TL(Qx(),ye);function kL(e){return(0,ML.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function En(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function CL(e){return En(e)&&"editConfiguration"in e}function qL(e){return En(e)&&"addTrackConf"in e&&!e.disableAddTracks}function IL(e){return En(e)&&"shareURL"in e&&!!e.shareURL}function jL(e){return En(e)&&"widgets"in e}function LL(e){return En(e)&&"makeConnection"in e}function FL(e){return En(e)&&"addConnectionConf"in e}function NL(e){return En(e)&&"sessionPlugins"in e}function DL(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function BL(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function zL(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function UL(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function WL(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function VL(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function $L(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function HL(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function GL(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function KL(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function ZL(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var Qv=class e extends Error{constructor(t,r){super(t),this.message=t,this.url=r,this.name="AuthNeededError",Object.setPrototypeOf(this,e.prototype)}};ye.AuthNeededError=Qv;var em=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};ye.RetryError=em;function YL(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function JL(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var XL=rO();Object.defineProperty(ye,"TextSearchManager",{enumerable:!0,get:function(){return RL(XL).default}})});var nO=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.when=void 0;var QL=_c();Object.defineProperty(Mc,"when",{enumerable:!0,get:function(){return QL.when}})});var iO=b(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.intersection2=eF;Tu.doesIntersect2=tF;Tu.isContainedWithin=rF;function eF(e,t,r,n){return t>r&&e<n&&n-r&&t-e?e>r?t<n?[e,t]:[e,n]:t<n?[r,t]:[r,n]:[]}function tF(e,t,r,n){return t>r&&e<n}function rF(e,t,r,n){return r<=e&&n>=t}});var oO=b(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});tm.dedupe=nF;function nF(e,t=JSON.stringify){let r=[],n=new Set;for(let i of e){let o=t(i);n.has(o)||(r.push(i),n.add(o))}return r}});var om=b((ote,cO)=>{"use strict";var kc={},Ic={},Ru={METHOD:"method",PROPERTY:"property"},Cc=class{constructor(t,r){this.inst=t,this.args=r}},rm=class extends Cc{constructor(t,r){super(t,r),this.type=Ru.METHOD}execute(t){t[this.inst](...this.args)}},nm=class extends Cc{constructor(t,r){super(t,r),this.type=Ru.PROPERTY}execute(t){t[this.inst]=this.args[0]}},iF={[Ru.METHOD]:rm,[Ru.PROPERTY]:nm},qc=class{constructor(t,r,n){return new iF[t](r,n)}};Object.entries(Ru).forEach(([e,t])=>{Object.defineProperty(qc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Ic=qc;var uO=Object.freeze({METHODS:["addHitRegion","arc","arcTo","beginPath","bezierCurveTo","clearHitRegions","clearRect","clip","closePath","drawFocusIfNeeded","drawImage","ellipse","fill","fillRect","fillText","lineTo","moveTo","putImageData","quadraticCurveTo","rect","removeHitRegion","resetTransform","restore","rotate","save","scale","scrollPathIntoView","setLineDash","setTransform","stroke","strokeRect","strokeText","transform","translate"],PROPERTIES:["direction","fillStyle","filter","font","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","imageSmoothingQuality","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline"]}),Mr=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),Mu=class{constructor(t=null){this[Mr.sequence]=[],t&&this[Mr.fromJSON](t)}[Mr.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[Mr.push](r,n,i)})}[Mr.push](t,r,n){this[Mr.sequence].push(new Ic(t,r,n))}execute(t){t.save(),this[Mr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Mr.sequence]}}};uO.METHODS.forEach(e=>{Object.defineProperty(Mu.prototype,e,{value:function(...r){this[Mr.push](Ic.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});uO.PROPERTIES.forEach(e=>{Object.defineProperty(Mu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Mr.push](Ic.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});kc=Mu;var sO={},aO=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function oF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var im=class extends kc{build(t={}){let r=new kc;return this[aO.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?oF(u,t):u);r[aO.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};sO=im;cO.exports={CanvasSequence:kc,CanvasBlueprint:sO}});var fO=b((ate,lO)=>{lO.exports=!1});var am=b(ft=>{"use strict";var aF=ft&&ft.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ft,"__esModule",{value:!0});ft.ImageBitmapType=ft.createImageBitmap=ft.createCanvas=void 0;ft.drawImageOntoCanvasContext=sF;var pO=om(),uF=aF(fO());function sF(e,t){e.serializedCommands?new pO.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var dO={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:uF.default};dO.realOffscreenCanvas?(ft.createCanvas=(e,t)=>new OffscreenCanvas(e,t),ft.createImageBitmap=window.createImageBitmap||self.createImageBitmap,ft.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):dO.node?(ft.createCanvas=(...e)=>nodeCreateCanvas(...e),ft.createImageBitmap=async e=>{let t=e.toDataURL(),r=new nodeImage;return new Promise((n,i)=>{r.onload=()=>{n(r)},r.onerror=i,r.src=t})}):(ft.createCanvas=(e,t)=>{let r=new pO.CanvasSequence;return{width:e,height:t,getContext(){return r}}},ft.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},ft.ImageBitmapType=String)});var sm=b(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.blobToDataURL=cF;function cF(e){let t=new FileReader;return new Promise((r,n)=>{t.onload=i=>{i.target?r(i.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)})}});var hO=b((cte,jc)=>{(function(){"use strict";var e,t,r,n,i;function o(d,p){var f=Object.keys(p),h;for(h=0;h<f.length;h++)d=d.replace(new RegExp("\\{"+f[h]+"\\}","gi"),p[f[h]]);return d}function a(d){var p,f,h;if(!d)throw new Error("cannot create a random attribute name for an undefined object");p="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",f="";do for(f="",h=0;h<12;h++)f+=p[Math.floor(Math.random()*p.length)];while(d[f]);return f}function u(d,p){var f,h,v={},g,y;for(d=d.split(","),p=p||10,f=0;f<d.length;f+=2)h="&"+d[f+1]+";",g=parseInt(d[f],p),v[h]="&#"+g+";";return v["\\xa0"]="&#160;",v}function l(d){var p={left:"start",right:"end",center:"middle",start:"start",end:"end"};return p[d]||p.start}function s(d){var p={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return p[d]||p.alphabetic}i=u("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),e={strokeStyle:{svgAttr:"stroke",canvas:"#000000",svg:"none",apply:"stroke"},fillStyle:{svgAttr:"fill",canvas:"#000000",svg:null,apply:"fill"},lineCap:{svgAttr:"stroke-linecap",canvas:"butt",svg:"butt",apply:"stroke"},lineJoin:{svgAttr:"stroke-linejoin",canvas:"miter",svg:"miter",apply:"stroke"},miterLimit:{svgAttr:"stroke-miterlimit",canvas:10,svg:4,apply:"stroke"},lineWidth:{svgAttr:"stroke-width",canvas:1,svg:1,apply:"stroke"},globalAlpha:{svgAttr:"opacity",canvas:1,svg:1,apply:"fill stroke"},font:{canvas:"10px sans-serif"},shadowColor:{canvas:"#000000"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:"start"},textBaseline:{canvas:"alphabetic"}},r=function(d,p){this.__root=d,this.__ctx=p},r.prototype.addColorStop=function(d,p){var f=this.__ctx.__createElement("stop"),h,v;f.setAttribute("offset",d),p.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,v=h.exec(p),f.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:v[1],g:v[2],b:v[3]})),f.setAttribute("stop-opacity",v[4])):f.setAttribute("stop-color",p),this.__root.appendChild(f)},n=function(d,p){this.__root=d,this.__ctx=p},t=function(d){var p={width:500,height:500,enableMirroring:!1},f;if(arguments.length>1?(f=p,f.width=arguments[0],f.height=arguments[1]):d?f=d:f=p,!(this instanceof t))return new t(f);this.width=f.width||p.width,this.height=f.height||p.height,this.enableMirroring=f.enableMirroring!==void 0?f.enableMirroring:p.enableMirroring,this.canvas=this,this.__document=f.document||document,this.__canvas=this.__document.createElement("canvas"),this.__ctx=this.__canvas.getContext("2d"),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS("http://www.w3.org/2000/svg","svg"),this.__root.setAttribute("version",1.1),this.__root.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.__root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),this.__root.setAttribute("width",this.width),this.__root.setAttribute("height",this.height),this.__ids={},this.__defs=this.__document.createElementNS("http://www.w3.org/2000/svg","defs"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS("http://www.w3.org/2000/svg","g"),this.__root.appendChild(this.__currentElement)},t.prototype.__createElement=function(d,p,f){typeof p>"u"&&(p={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",d),v=Object.keys(p),g,y;for(f&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),g=0;g<v.length;g++)y=v[g],h.setAttribute(y,p[y]);return h},t.prototype.__setDefaultStyles=function(){var d=Object.keys(e),p,f;for(p=0;p<d.length;p++)f=d[p],this[f]=e[f].canvas},t.prototype.__applyStyleState=function(d){var p=Object.keys(d),f,h;for(f=0;f<p.length;f++)h=p[f],this[h]=d[h]},t.prototype.__getStyleState=function(){var d,p={},f=Object.keys(e),h;for(d=0;d<f.length;d++)h=f[d],p[h]=this[h];return p},t.prototype.__applyStyleToCurrentElement=function(d){var p=Object.keys(e),f,h,v,g,y,w;for(f=0;f<p.length;f++)if(h=e[p[f]],v=this[p[f]],h.apply)if(h.apply.indexOf("fill")!==-1&&v instanceof n){if(v.__ctx)for(;v.__ctx.__defs.childNodes.length;)g=v.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[g]=g,this.__defs.appendChild(v.__ctx.__defs.childNodes[0]);this.__currentElement.setAttribute("fill",o("url(#{id})",{id:v.__root.getAttribute("id")}))}else h.apply.indexOf("fill")!==-1&&v instanceof r?this.__currentElement.setAttribute("fill",o("url(#{id})",{id:v.__root.getAttribute("id")})):h.apply.indexOf(d)!==-1&&h.svg!==v&&((h.svgAttr==="stroke"||h.svgAttr==="fill")&&v.indexOf("rgba")!==-1?(y=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=y.exec(v),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:w[1],g:w[2],b:w[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",w[4])):this.__currentElement.setAttribute(h.svgAttr,v))},t.prototype.__closestGroupOrSvg=function(d){return d=d||this.__currentElement,d.nodeName==="g"||d.nodeName==="svg"?d:this.__closestGroupOrSvg(d.parentNode)},t.prototype.getSerializedSvg=function(d){var p=new XMLSerializer().serializeToString(this.__root),f,h,v,g,y,w;if(w=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,w.test(p)&&(p=p.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),d)for(f=Object.keys(i),h=0;h<f.length;h++)v=f[h],g=i[v],y=new RegExp(v,"gi"),y.test(p)&&(p=p.replace(y,g));return p},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var d=this.__createElement("g"),p=this.__closestGroupOrSvg();this.__groupStack.push(p),p.appendChild(d),this.__currentElement=d,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var d=this.__stack.pop();this.__applyStyleState(d)},t.prototype.__addTransform=function(d){var p=this.__closestGroupOrSvg();if(p.childNodes.length>0){var f=this.__createElement("g");p.appendChild(f),this.__currentElement=f}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=d,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(d,p){p===void 0&&(p=d),this.__addTransform(o("scale({x},{y})",{x:d,y:p}))},t.prototype.rotate=function(d){var p=d*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:p,cx:0,cy:0}))},t.prototype.translate=function(d,p){this.__addTransform(o("translate({x},{y})",{x:d,y:p}))},t.prototype.transform=function(d,p,f,h,v,g){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:d,b:p,c:f,d:h,e:v,f:g}))},t.prototype.beginPath=function(){var d,p;this.__currentDefaultPath="",this.__currentPosition={},d=this.__createElement("path",{},!0),p=this.__closestGroupOrSvg(),p.appendChild(d),this.__currentElement=d},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var d=this.__currentDefaultPath;this.__currentElement.setAttribute("d",d)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(d){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=d},t.prototype.moveTo=function(d,p){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:d,y:p},this.__addPathCommand(o("M {x} {y}",{x:d,y:p}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(d,p){this.__currentPosition={x:d,y:p},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:d,y:p})):this.__addPathCommand(o("M {x} {y}",{x:d,y:p}))},t.prototype.bezierCurveTo=function(d,p,f,h,v,g){this.__currentPosition={x:v,y:g},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:d,cp1y:p,cp2x:f,cp2y:h,x:v,y:g}))},t.prototype.quadraticCurveTo=function(d,p,f,h){this.__currentPosition={x:f,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:d,cpy:p,x:f,y:h}))};var c=function(d){var p=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return[d[0]/p,d[1]/p]};t.prototype.arcTo=function(d,p,f,h,v){var g=this.__currentPosition&&this.__currentPosition.x,y=this.__currentPosition&&this.__currentPosition.y;if(!(typeof g>"u"||typeof y>"u")){if(v<0)throw new Error("IndexSizeError: The radius provided ("+v+") is negative.");if(g===d&&y===p||d===f&&p===h||v===0){this.lineTo(d,p);return}var w=c([g-d,y-p]),_=c([f-d,h-p]);if(w[0]*_[1]===w[1]*_[0]){this.lineTo(d,p);return}var x=w[0]*_[0]+w[1]*_[1],O=Math.acos(Math.abs(x)),E=c([w[0]+_[0],w[1]+_[1]]),P=v/Math.sin(O/2),A=d+P*E[0],q=p+P*E[1],k=[-w[1],w[0]],C=[_[1],-_[0]],W=function(R){var z=R[0],L=R[1];return L>=0?Math.acos(z):-Math.acos(z)},B=W(k),M=W(C);this.lineTo(A+k[0]*v,q+k[1]*v),this.arc(A,q,v,B,M)}},t.prototype.stroke=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","fill stroke markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("stroke")},t.prototype.fill=function(){this.__currentElement.nodeName==="path"&&this.__currentElement.setAttribute("paint-order","stroke fill markers"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement("fill")},t.prototype.rect=function(d,p,f,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(d,p),this.lineTo(d+f,p),this.lineTo(d+f,p+h),this.lineTo(d,p+h),this.lineTo(d,p),this.closePath()},t.prototype.fillRect=function(d,p,f,h){var v,g;v=this.__createElement("rect",{x:d,y:p,width:f,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(v),this.__currentElement=v,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(d,p,f,h){var v,g;v=this.__createElement("rect",{x:d,y:p,width:f,height:h},!0),g=this.__closestGroupOrSvg(),g.appendChild(v),this.__currentElement=v,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(d,p,f,h){var v,g=this.__closestGroupOrSvg();v=this.__createElement("rect",{x:d,y:p,width:f,height:h,fill:"#FFFFFF"},!0),g.appendChild(v)},t.prototype.createLinearGradient=function(d,p,f,h){var v=this.__createElement("linearGradient",{id:a(this.__ids),x1:d+"px",x2:f+"px",y1:p+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(v),new r(v,this)},t.prototype.createRadialGradient=function(d,p,f,h,v,g){var y=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:v+"px",r:g+"px",fx:d+"px",fy:p+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(y),new r(y,this)},t.prototype.__parseFont=function(){var d=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-,\"\sa-z]+?)\s*$/i,p=d.exec(this.font),f={style:p[1]||"normal",size:p[4]||"10px",family:p[6]||"sans-serif",weight:p[3]||"normal",decoration:p[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(f.decoration="underline"),this.__fontHref&&(f.href=this.__fontHref),f},t.prototype.__wrapTextLink=function(d,p){if(d.href){var f=this.__createElement("a");return f.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.href),f.appendChild(p),f}return p},t.prototype.__applyText=function(d,p,f,h){var v=this.__parseFont(),g=this.__closestGroupOrSvg(),y=this.__createElement("text",{"font-family":v.family,"font-size":v.size,"font-style":v.style,"font-weight":v.weight,"text-decoration":v.decoration,x:p,y:f,"text-anchor":l(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);y.appendChild(this.__document.createTextNode(d)),this.__currentElement=y,this.__applyStyleToCurrentElement(h),g.appendChild(this.__wrapTextLink(v,y))},t.prototype.fillText=function(d,p,f){this.__applyText(d,p,f,"fill")},t.prototype.strokeText=function(d,p,f){this.__applyText(d,p,f,"stroke")},t.prototype.measureText=function(d){return this.__ctx.font=this.font,this.__ctx.measureText(d)},t.prototype.arc=function(d,p,f,h,v,g){if(h!==v){h=h%(2*Math.PI),v=v%(2*Math.PI),h===v&&(v=(v+2*Math.PI-.001*(g?-1:1))%(2*Math.PI));var y=d+f*Math.cos(v),w=p+f*Math.sin(v),_=d+f*Math.cos(h),x=p+f*Math.sin(h),O=g?0:1,E=0,P=v-h;P<0&&(P+=2*Math.PI),g?E=P>Math.PI?0:1:E=P>Math.PI?1:0,this.lineTo(_,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:f,ry:f,xAxisRotation:0,largeArcFlag:E,sweepFlag:O,endX:y,endY:w})),this.__currentPosition={x:y,y:w}}},t.prototype.clip=function(){var d=this.__closestGroupOrSvg(),p=this.__createElement("clipPath"),f=a(this.__ids),h=this.__createElement("g");d.removeChild(this.__currentElement),p.setAttribute("id",f),p.appendChild(this.__currentElement),this.__defs.appendChild(p),d.setAttribute("clip-path",o("url(#{id})",{id:f})),d.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var d=Array.prototype.slice.call(arguments),p=d[0],f,h,v,g,y=0,w=0,_,x,O,E,P,A,q,k,C,W,B;if(d.length===3)f=d[1],h=d[2],_=p.width,x=p.height,v=_,g=x;else if(d.length===5)f=d[1],h=d[2],v=d[3],g=d[4],_=p.width,x=p.height;else if(d.length===9)y=d[1],w=d[2],_=d[3],x=d[4],f=d[5],h=d[6],v=d[7],g=d[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(O=this.__closestGroupOrSvg(),q=this.__currentElement,p instanceof t){for(E=p.getSvg(),P=E.childNodes[0];P.childNodes.length;)B=P.childNodes[0].getAttribute("id"),this.__ids[B]=B,this.__defs.appendChild(P.childNodes[0]);A=E.childNodes[1],O.appendChild(A),this.__currentElement=A,this.translate(f,h),this.__currentElement=q}else(p.nodeName==="CANVAS"||p.nodeName==="IMG")&&(k=this.__createElement("image"),k.setAttribute("width",v),k.setAttribute("height",g),k.setAttribute("preserveAspectRatio","none"),(y||w||_!==p.width||x!==p.height)&&(C=this.__document.createElement("canvas"),C.width=v,C.height=g,W=C.getContext("2d"),W.drawImage(p,y,w,_,x,0,0,v,g),p=C),k.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p.nodeName==="CANVAS"?p.toDataURL():p.getAttribute("src")),O.appendChild(k),this.__currentElement=k,this.translate(f,h),this.__currentElement=q)},t.prototype.createPattern=function(d,p){var f=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),v;return f.setAttribute("id",h),f.setAttribute("width",d.width),f.setAttribute("height",d.height),d.nodeName==="CANVAS"||d.nodeName==="IMG"?(v=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),v.setAttribute("width",d.width),v.setAttribute("height",d.height),v.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.nodeName==="CANVAS"?d.toDataURL():d.getAttribute("src")),f.appendChild(v),this.__defs.appendChild(f)):d instanceof t&&(f.appendChild(d.__root.childNodes[1]),this.__defs.appendChild(f)),new n(f,this)},t.prototype.drawFocusRing=function(){},t.prototype.createImageData=function(){},t.prototype.getImageData=function(){},t.prototype.putImageData=function(){},t.prototype.globalCompositeOperation=function(){},t.prototype.setTransform=function(){},typeof window=="object"&&(window.C2S=t),typeof jc=="object"&&typeof jc.exports=="object"&&(jc.exports=t)})()});var bO=b(sr=>{"use strict";var lF=sr&&sr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),fF=sr&&sr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dF=sr&&sr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&lF(r,t,n[i]);return fF(r,t),r}}();Object.defineProperty(sr,"__esModule",{value:!0});sr.renderToAbstractCanvas=vF;sr.getSerializedSvg=mF;sr.ReactRendering=bF;var vO=Is(),pF=Ge(),mO=om(),hF=sm(),cm=am();async function vF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,cm.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),reactElement:(0,vO.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,hF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new mO.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,cm.createCanvas)(Math.ceil(e*a),t*a),l=u.getContext("2d");if(!l)throw new Error("2d canvas rendering not supported on this platform");return l.scale(a,a),{...await n(l),imageData:await(0,cm.createImageBitmap)(u)}}}async function mF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>dF(hO())),o=new i.default(t,r);return new mO.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function bF({rendering:e}){return(0,pF.isValidElement)(e.reactElement)?e.reactElement:(0,vO.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var yO=b(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.isFeature=gF;function gF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function gO(e){return"uniqueId"in e&&typeof e.data!="object"}var lm=class e{constructor(t){var r;gO(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=gO(t)?t.uniqueId:t.id;if(n==null)throw new Error("SimpleFeature requires a unique `id` or `data.uniqueId` attribute");if(this.uniqueId=String(n),!(this.data.aliases||this.data.end-this.data.start>=0))throw new Error(`invalid feature data, end less than start. end: ${this.data.end} start: ${this.data.start}`);this.data.subfeatures&&(this.subfeatures=(r=this.data.subfeatures)===null||r===void 0?void 0:r.map((i,o)=>typeof i.get!="function"?new e({id:i.uniqueId||`${n}-${o}`,data:{strand:this.data.strand,...i},parent:this}):i))}get(t){return t==="subfeatures"?this.subfeatures:t==="parent"?this.parent():this.data[t]}set(t,r){this.data[t]=r}tags(){return Object.keys(this.data)}id(){return this.uniqueId}parent(){return this.parentHandle}children(){return this.get("subfeatures")}toJSON(){let t={...this.data,uniqueId:this.id()},r=this.parent();r&&(t.parentId=r.id());let n=this.children();return n&&(t.subfeatures=n.map(i=>i.toJSON())),t}static fromJSON(t){return new e({...t})}};Lc.default=lm});var Me=b(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.isFunction=void 0;function yF(e){return typeof e=="function"}Fc.isFunction=yF});var An=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.createErrorClass=void 0;function _F(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}Nc.createErrorClass=_F});var fm=b(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.UnsubscriptionError=void 0;var wF=An();Dc.UnsubscriptionError=wF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
5
4
  `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
6
- `):"",this.name="UnsubscriptionError",this.errors=r}})});var on=b(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.arrRemove=void 0;function kL(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}Hc.arrRemove=kL});var Nt=b(kt=>{"use strict";var jS=kt&&kt.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},FS=kt&&kt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},LS=kt&&kt.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(kt,"__esModule",{value:!0});kt.isSubscription=kt.EMPTY_SUBSCRIPTION=kt.Subscription=void 0;var ku=we(),ov=iv(),NS=on(),av=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=jS(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(ku.isFunction(c))try{c()}catch(m){o=m instanceof ov.UnsubscriptionError?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=jS(d),f=p.next();!f.done;f=p.next()){var h=f.value;try{DS(h)}catch(m){o=o??[],m instanceof ov.UnsubscriptionError?o=LS(LS([],FS(o)),FS(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new ov.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)DS(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&NS.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&NS.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();kt.Subscription=av;kt.EMPTY_SUBSCRIPTION=av.EMPTY;function qL(e){return e instanceof av||e&&"closed"in e&&ku.isFunction(e.remove)&&ku.isFunction(e.add)&&ku.isFunction(e.unsubscribe)}kt.isSubscription=qL;function DS(e){ku.isFunction(e)?e():e.unsubscribe()}});var Po=b(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.config=void 0;Vc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var uv=b(Lr=>{"use strict";var zS=Lr&&Lr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},BS=Lr&&Lr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.timeoutProvider=void 0;Lr.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lr.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,BS([e,t],zS(r))):setTimeout.apply(void 0,BS([e,t],zS(r)))},clearTimeout:function(e){var t=Lr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var sv=b(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.reportUnhandledError=void 0;var IL=Po(),jL=uv();function FL(e){jL.timeoutProvider.setTimeout(function(){var t=IL.config.onUnhandledError;if(t)t(e);else throw e})}Gc.reportUnhandledError=FL});var ot=b($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.noop=void 0;function LL(){}$c.noop=LL});var US=b(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.createNotification=Nr.nextNotification=Nr.errorNotification=Nr.COMPLETE_NOTIFICATION=void 0;Nr.COMPLETE_NOTIFICATION=function(){return Kc("C",void 0,void 0)}();function NL(e){return Kc("E",void 0,e)}Nr.errorNotification=NL;function DL(e){return Kc("N",e,void 0)}Nr.nextNotification=DL;function Kc(e,t,r){return{kind:e,value:t,error:r}}Nr.createNotification=Kc});var Yc=b(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.captureError=Ro.errorContext=void 0;var WS=Po(),ki=null;function zL(e){if(WS.config.useDeprecatedSynchronousErrorHandling){var t=!ki;if(t&&(ki={errorThrown:!1,error:null}),e(),t){var r=ki,n=r.errorThrown,i=r.error;if(ki=null,n)throw i}}else e()}Ro.errorContext=zL;function BL(e){WS.config.useDeprecatedSynchronousErrorHandling&&ki&&(ki.errorThrown=!0,ki.error=e)}Ro.captureError=BL});var Mo=b(br=>{"use strict";var GS=br&&br.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(br,"__esModule",{value:!0});br.EMPTY_OBSERVER=br.SafeSubscriber=br.Subscriber=void 0;var UL=we(),HS=Nt(),dv=Po(),WL=sv(),VS=ot(),cv=US(),HL=uv(),VL=Yc(),$S=function(e){GS(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,HS.isSubscription(r)&&r.add(n)):n.destination=br.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new KS(r,n,i)},t.prototype.next=function(r){this.isStopped?fv(cv.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?fv(cv.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?fv(cv.COMPLETE_NOTIFICATION,this):(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(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(HS.Subscription);br.Subscriber=$S;var GL=Function.prototype.bind;function lv(e,t){return GL.call(e,t)}var $L=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Zc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Zc(n)}else Zc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Zc(r)}},e}(),KS=function(e){GS(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(UL.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&dv.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&lv(r.next,u),error:r.error&&lv(r.error,u),complete:r.complete&&lv(r.complete,u)}):a=r}return o.destination=new $L(a),o}return t}($S);br.SafeSubscriber=KS;function Zc(e){dv.config.useDeprecatedSynchronousErrorHandling?VL.captureError(e):WL.reportUnhandledError(e)}function KL(e){throw e}function fv(e,t){var r=dv.config.onStoppedNotification;r&&HL.timeoutProvider.setTimeout(function(){return r(e,t)})}br.EMPTY_OBSERVER={closed:!0,next:VS.noop,error:KL,complete:VS.noop}});var qu=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.observable=void 0;Jc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var at=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.identity=void 0;function YL(e){return e}Xc.identity=YL});var Iu=b(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.pipeFromArray=Co.pipe=void 0;var ZL=at();function JL(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return YS(e)}Co.pipe=JL;function YS(e){return e.length===0?ZL.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Co.pipeFromArray=YS});var Oe=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.Observable=void 0;var hv=Mo(),XL=Nt(),QL=qu(),eN=Iu(),tN=Po(),pv=we(),rN=Yc(),nN=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=oN(t)?t:new hv.SafeSubscriber(t,r,n);return rN.errorContext(function(){var a=i,u=a.operator,l=a.source;o.add(u?u.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=ZS(r),new r(function(i,o){var a=new hv.SafeSubscriber({next:function(u){try{t(u)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[QL.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return eN.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=ZS(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();Qc.Observable=nN;function ZS(e){var t;return(t=e??tN.config.Promise)!==null&&t!==void 0?t:Promise}function iN(e){return e&&pv.isFunction(e.next)&&pv.isFunction(e.error)&&pv.isFunction(e.complete)}function oN(e){return e&&e instanceof hv.Subscriber||iN(e)&&XL.isSubscription(e)}});var G=b(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.operate=ko.hasLift=void 0;var aN=we();function JS(e){return aN.isFunction(e?.lift)}ko.hasLift=JS;function uN(e){return function(t){if(JS(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}ko.operate=uN});var Z=b(kn=>{"use strict";var sN=kn&&kn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(kn,"__esModule",{value:!0});kn.OperatorSubscriber=kn.createOperatorSubscriber=void 0;var cN=Mo();function lN(e,t,r,n,i){return new XS(e,t,r,n,i)}kn.createOperatorSubscriber=lN;var XS=function(e){sN(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(cN.Subscriber);kn.OperatorSubscriber=XS});var mv=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.refCount=void 0;var fN=G(),dN=Z();function pN(){return fN.operate(function(e,t){var r=null;e._refCount++;var n=dN.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,o=r;r=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}el.refCount=pN});var ju=b(qo=>{"use strict";var hN=qo&&qo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qo,"__esModule",{value:!0});qo.ConnectableObservable=void 0;var mN=Oe(),QS=Nt(),vN=mv(),bN=Z(),gN=G(),_N=function(e){hN(t,e);function t(r,n){var i=e.call(this)||this;return i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,gN.hasLift(r)&&(i.lift=r.lift),i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new QS.Subscription;var i=this.getSubject();n.add(this.source.subscribe(bN.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(o){r._teardown(),i.error(o)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=QS.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return vN.refCount()(this)},t}(mN.Observable);qo.ConnectableObservable=_N});var eO=b(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.performanceTimestampProvider=void 0;Fu.performanceTimestampProvider={now:function(){return(Fu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var vv=b(gr=>{"use strict";var tO=gr&&gr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},rO=gr&&gr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(gr,"__esModule",{value:!0});gr.animationFrameProvider=void 0;var yN=Nt();gr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=gr.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new yN.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gr.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,rO([],tO(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=gr.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,rO([],tO(e)))},delegate:void 0}});var oO=b(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.animationFrames=void 0;var wN=Oe(),xN=eO(),nO=vv();function SN(e){return e?iO(e):ON}tl.animationFrames=SN;function iO(e){return new wN.Observable(function(t){var r=e||xN.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=nO.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&nO.animationFrameProvider.cancelAnimationFrame(i)}})}var ON=iO()});var bv=b(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.ObjectUnsubscribedError=void 0;var EN=Cn();rl.ObjectUnsubscribedError=EN.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ut=b(Dr=>{"use strict";var uO=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),AN=Dr&&Dr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.AnonymousSubject=Dr.Subject=void 0;var aO=Oe(),_v=Nt(),TN=bv(),PN=on(),gv=Yc(),sO=function(e){uO(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new yv(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new TN.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;gv.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=AN(n.currentObservers),u=a.next();!u.done;u=a.next()){var l=u.value;l.next(r)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;gv.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;gv.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?_v.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new _v.Subscription(function(){n.currentObservers=null,PN.arrRemove(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new aO.Observable;return r.source=this,r},t.create=function(r,n){return new yv(r,n)},t}(aO.Observable);Dr.Subject=sO;var yv=function(e){uO(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:_v.EMPTY_SUBSCRIPTION},t}(sO);Dr.AnonymousSubject=yv});var wv=b(Io=>{"use strict";var RN=Io&&Io.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Io,"__esModule",{value:!0});Io.BehaviorSubject=void 0;var MN=ut(),CN=function(e){RN(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(MN.Subject);Io.BehaviorSubject=CN});var nl=b(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.dateTimestampProvider=void 0;Lu.dateTimestampProvider={now:function(){return(Lu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var il=b(jo=>{"use strict";var kN=jo&&jo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(jo,"__esModule",{value:!0});jo.ReplaySubject=void 0;var qN=ut(),IN=nl(),jN=function(e){kN(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=IN.dateTimestampProvider);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,u=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),l=0;l<u.length&&!r.closed;l+=o?1:2)r.next(u[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,u=(a?1:2)*n;if(n<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var l=i.now(),s=0,c=1;c<o.length&&o[c]<=l;c+=2)s=c;s&&o.splice(0,s+1)}},t}(qN.Subject);jo.ReplaySubject=jN});var ol=b(Fo=>{"use strict";var FN=Fo&&Fo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.AsyncSubject=void 0;var LN=ut(),NN=function(e){FN(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n._hasValue,a=n._value,u=n.thrownError,l=n.isStopped,s=n._isComplete;i?r.error(u):(l||s)&&(o&&r.next(a),r.complete())},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=!0)},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,o=r._isComplete;o||(this._isComplete=!0,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this))},t}(LN.Subject);Fo.AsyncSubject=NN});var cO=b(Lo=>{"use strict";var DN=Lo&&Lo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.Action=void 0;var zN=Nt(),BN=function(e){DN(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(zN.Subscription);Lo.Action=BN});var dO=b(zr=>{"use strict";var lO=zr&&zr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},fO=zr&&zr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zr,"__esModule",{value:!0});zr.intervalProvider=void 0;zr.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=zr.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,fO([e,t],lO(r))):setInterval.apply(void 0,fO([e,t],lO(r)))},clearInterval:function(e){var t=zr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Do=b(No=>{"use strict";var UN=No&&No.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(No,"__esModule",{value:!0});No.AsyncAction=void 0;var WN=cO(),pO=dO(),HN=on(),VN=function(e){UN(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),pO.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&pO.intervalProvider.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,HN.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(WN.Action);No.AsyncAction=VN});var mO=b(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.TestTools=zo.Immediate=void 0;var GN=1,xv,al={};function hO(e){return e in al?(delete al[e],!0):!1}zo.Immediate={setImmediate:function(e){var t=GN++;return al[t]=!0,xv||(xv=Promise.resolve()),xv.then(function(){return hO(t)&&e()}),t},clearImmediate:function(e){hO(e)}};zo.TestTools={pending:function(){return Object.keys(al).length}}});var bO=b(Br=>{"use strict";var $N=Br&&Br.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},KN=Br&&Br.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Br,"__esModule",{value:!0});Br.immediateProvider=void 0;var vO=mO(),YN=vO.Immediate.setImmediate,ZN=vO.Immediate.clearImmediate;Br.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Br.immediateProvider.delegate;return(r?.setImmediate||YN).apply(void 0,KN([],$N(e)))},clearImmediate:function(e){var t=Br.immediateProvider.delegate;return(t?.clearImmediate||ZN)(e)},delegate:void 0}});var _O=b(Bo=>{"use strict";var JN=Bo&&Bo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.AsapAction=void 0;var XN=Do(),gO=bO(),QN=function(e){JN(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=gO.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&(gO.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(XN.AsyncAction);Bo.AsapAction=QN});var Sv=b(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.Scheduler=void 0;var eD=nl(),tD=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=eD.dateTimestampProvider.now,e}();ul.Scheduler=tD});var Wo=b(Uo=>{"use strict";var rD=Uo&&Uo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.AsyncScheduler=void 0;var yO=Sv(),nD=function(e){rD(t,e);function t(r,n){n===void 0&&(n=yO.Scheduler.now);var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},t}(yO.Scheduler);Uo.AsyncScheduler=nD});var wO=b(Ho=>{"use strict";var iD=Ho&&Ho.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.AsapScheduler=void 0;var oD=Wo(),aD=function(e){iD(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(oD.AsyncScheduler);Ho.AsapScheduler=aD});var xO=b(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.asap=qi.asapScheduler=void 0;var uD=_O(),sD=wO();qi.asapScheduler=new sD.AsapScheduler(uD.AsapAction);qi.asap=qi.asapScheduler});var qt=b(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.async=Ii.asyncScheduler=void 0;var cD=Do(),lD=Wo();Ii.asyncScheduler=new lD.AsyncScheduler(cD.AsyncAction);Ii.async=Ii.asyncScheduler});var SO=b(Vo=>{"use strict";var fD=Vo&&Vo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.QueueAction=void 0;var dD=Do(),pD=function(e){fD(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.flush(this),0)},t}(dD.AsyncAction);Vo.QueueAction=pD});var OO=b(Go=>{"use strict";var hD=Go&&Go.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Go,"__esModule",{value:!0});Go.QueueScheduler=void 0;var mD=Wo(),vD=function(e){hD(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(mD.AsyncScheduler);Go.QueueScheduler=vD});var EO=b(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.queue=ji.queueScheduler=void 0;var bD=SO(),gD=OO();ji.queueScheduler=new gD.QueueScheduler(bD.QueueAction);ji.queue=ji.queueScheduler});var TO=b($o=>{"use strict";var _D=$o&&$o.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($o,"__esModule",{value:!0});$o.AnimationFrameAction=void 0;var yD=Do(),AO=vv(),wD=function(e){_D(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=AO.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&(AO.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(yD.AsyncAction);$o.AnimationFrameAction=wD});var PO=b(Ko=>{"use strict";var xD=Ko&&Ko.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ko,"__esModule",{value:!0});Ko.AnimationFrameScheduler=void 0;var SD=Wo(),OD=function(e){xD(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(SD.AsyncScheduler);Ko.AnimationFrameScheduler=OD});var RO=b(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.animationFrame=Fi.animationFrameScheduler=void 0;var ED=TO(),AD=PO();Fi.animationFrameScheduler=new AD.AnimationFrameScheduler(ED.AnimationFrameAction);Fi.animationFrame=Fi.animationFrameScheduler});var kO=b(qn=>{"use strict";var MO=qn&&qn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qn,"__esModule",{value:!0});qn.VirtualAction=qn.VirtualTimeScheduler=void 0;var TD=Do(),PD=Nt(),RD=Wo(),MD=function(e){MO(t,e);function t(r,n){r===void 0&&(r=CO),n===void 0&&(n=1/0);var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){for(var r=this,n=r.actions,i=r.maxFrames,o,a;(a=n[0])&&a.delay<=i&&(n.shift(),this.frame=a.delay,!(o=a.execute(a.state,a.delay))););if(o){for(;a=n.shift();)a.unsubscribe();throw o}},t.frameTimeFactor=10,t}(RD.AsyncScheduler);qn.VirtualTimeScheduler=MD;var CO=function(e){MO(t,e);function t(r,n,i){i===void 0&&(i=r.index+=1);var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.index=i,o.active=!0,o.index=r.index=i,o}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return PD.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){i===void 0&&(i=0),this.delay=r.frame+i;var o=r.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){i===void 0&&(i=0)},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(TD.AsyncAction);qn.VirtualAction=CO});var _r=b(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.empty=Li.EMPTY=void 0;var qO=Oe();Li.EMPTY=new qO.Observable(function(e){return e.complete()});function CD(e){return e?kD(e):Li.EMPTY}Li.empty=CD;function kD(e){return new qO.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Nu=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.isScheduler=void 0;var qD=we();function ID(e){return e&&qD.isFunction(e.schedule)}sl.isScheduler=ID});var It=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.popNumber=In.popScheduler=In.popResultSelector=void 0;var jD=we(),FD=Nu();function Ov(e){return e[e.length-1]}function LD(e){return jD.isFunction(Ov(e))?e.pop():void 0}In.popResultSelector=LD;function ND(e){return FD.isScheduler(Ov(e))?e.pop():void 0}In.popScheduler=ND;function DD(e,t){return typeof Ov(e)=="number"?e.pop():t}In.popNumber=DD});var ll=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.isArrayLike=void 0;cl.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var Ev=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.isPromise=void 0;var zD=we();function BD(e){return zD.isFunction(e?.then)}fl.isPromise=BD});var Av=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.isInteropObservable=void 0;var UD=qu(),WD=we();function HD(e){return WD.isFunction(e[UD.observable])}dl.isInteropObservable=HD});var Tv=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.isAsyncIterable=void 0;var VD=we();function GD(e){return Symbol.asyncIterator&&VD.isFunction(e?.[Symbol.asyncIterator])}pl.isAsyncIterable=GD});var Pv=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.createInvalidObservableTypeError=void 0;function $D(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.")}hl.createInvalidObservableTypeError=$D});var Rv=b(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.iterator=Yo.getSymbolIterator=void 0;function IO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Yo.getSymbolIterator=IO;Yo.iterator=IO()});var Mv=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.isIterable=void 0;var KD=Rv(),YD=we();function ZD(e){return YD.isFunction(e?.[KD.iterator])}ml.isIterable=ZD});var vl=b(Xt=>{"use strict";var JD=Xt&&Xt.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Zo=Xt&&Xt.__await||function(e){return this instanceof Zo?(this.v=e,this):new Zo(e)},XD=Xt&&Xt.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(p){n[p]&&(i[p]=function(f){return new Promise(function(h,m){o.push([p,f,h,m])>1||u(p,f)})})}function u(p,f){try{l(n[p](f))}catch(h){d(o[0][3],h)}}function l(p){p.value instanceof Zo?Promise.resolve(p.value.v).then(s,c):d(o[0][2],p)}function s(p){u("next",p)}function c(p){u("throw",p)}function d(p,f){p(f),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.isReadableStreamLike=Xt.readableStreamLikeToAsyncGenerator=void 0;var QD=we();function e5(e){return XD(this,arguments,function(){var r,n,i,o;return JD(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Zo(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,Zo(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Zo(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Xt.readableStreamLikeToAsyncGenerator=e5;function t5(e){return QD.isFunction(e?.getReader)}Xt.isReadableStreamLike=t5});var oe=b(ke=>{"use strict";var r5=ke&&ke.__awaiter||function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(c){try{s(n.next(c))}catch(d){a(d)}}function l(c){try{s(n.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((n=n.apply(e,t||[])).next())})},n5=ke&&ke.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},i5=ke&&ke.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Cv=="function"?Cv(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,l){a=e[o](a),i(u,l,a.done,a.value)})}}function i(o,a,u,l){Promise.resolve(l).then(function(s){o({value:s,done:u})},a)}},Cv=ke&&ke.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ke,"__esModule",{value:!0});ke.fromReadableStreamLike=ke.fromAsyncIterable=ke.fromIterable=ke.fromPromise=ke.fromArrayLike=ke.fromInteropObservable=ke.innerFrom=void 0;var o5=ll(),a5=Ev(),Jo=Oe(),u5=Av(),s5=Tv(),c5=Pv(),l5=Mv(),jO=vl(),f5=we(),d5=sv(),p5=qu();function h5(e){if(e instanceof Jo.Observable)return e;if(e!=null){if(u5.isInteropObservable(e))return FO(e);if(o5.isArrayLike(e))return LO(e);if(a5.isPromise(e))return NO(e);if(s5.isAsyncIterable(e))return kv(e);if(l5.isIterable(e))return DO(e);if(jO.isReadableStreamLike(e))return zO(e)}throw c5.createInvalidObservableTypeError(e)}ke.innerFrom=h5;function FO(e){return new Jo.Observable(function(t){var r=e[p5.observable]();if(f5.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}ke.fromInteropObservable=FO;function LO(e){return new Jo.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}ke.fromArrayLike=LO;function NO(e){return new Jo.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,d5.reportUnhandledError)})}ke.fromPromise=NO;function DO(e){return new Jo.Observable(function(t){var r,n;try{for(var i=Cv(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()})}ke.fromIterable=DO;function kv(e){return new Jo.Observable(function(t){m5(e,t).catch(function(r){return t.error(r)})})}ke.fromAsyncIterable=kv;function zO(e){return kv(jO.readableStreamLikeToAsyncGenerator(e))}ke.fromReadableStreamLike=zO;function m5(e,t){var r,n,i,o;return r5(this,void 0,void 0,function(){var a,u;return n5(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=i5(e),l.label=1;case 1:return[4,r.next()];case 2:if(n=l.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=l.sent(),i={error:u},[3,11];case 6:return l.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:l.sent(),l.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]}})})}});var an=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.executeSchedule=void 0;function v5(e,t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}bl.executeSchedule=v5});var Du=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.observeOn=void 0;var qv=an(),b5=G(),g5=Z();function _5(e,t){return t===void 0&&(t=0),b5.operate(function(r,n){r.subscribe(g5.createOperatorSubscriber(n,function(i){return qv.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return qv.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return qv.executeSchedule(n,e,function(){return n.error(i)},t)}))})}gl.observeOn=_5});var zu=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.subscribeOn=void 0;var y5=G();function w5(e,t){return t===void 0&&(t=0),y5.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}_l.subscribeOn=w5});var BO=b(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.scheduleObservable=void 0;var x5=oe(),S5=Du(),O5=zu();function E5(e,t){return x5.innerFrom(e).pipe(O5.subscribeOn(t),S5.observeOn(t))}yl.scheduleObservable=E5});var UO=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.schedulePromise=void 0;var A5=oe(),T5=Du(),P5=zu();function R5(e,t){return A5.innerFrom(e).pipe(P5.subscribeOn(t),T5.observeOn(t))}wl.schedulePromise=R5});var WO=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.scheduleArray=void 0;var M5=Oe();function C5(e,t){return new M5.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}xl.scheduleArray=C5});var Iv=b(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.scheduleIterable=void 0;var k5=Oe(),q5=Rv(),I5=we(),HO=an();function j5(e,t){return new k5.Observable(function(r){var n;return HO.executeSchedule(r,t,function(){n=e[q5.iterator](),HO.executeSchedule(r,t,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return I5.isFunction(n?.return)&&n.return()}})}Sl.scheduleIterable=j5});var jv=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.scheduleAsyncIterable=void 0;var F5=Oe(),VO=an();function L5(e,t){if(!e)throw new Error("Iterable cannot be null");return new F5.Observable(function(r){VO.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();VO.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}Ol.scheduleAsyncIterable=L5});var GO=b(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.scheduleReadableStreamLike=void 0;var N5=jv(),D5=vl();function z5(e,t){return N5.scheduleAsyncIterable(D5.readableStreamLikeToAsyncGenerator(e),t)}El.scheduleReadableStreamLike=z5});var Fv=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.scheduled=void 0;var B5=BO(),U5=UO(),W5=WO(),H5=Iv(),V5=jv(),G5=Av(),$5=Ev(),K5=ll(),Y5=Mv(),Z5=Tv(),J5=Pv(),X5=vl(),Q5=GO();function e3(e,t){if(e!=null){if(G5.isInteropObservable(e))return B5.scheduleObservable(e,t);if(K5.isArrayLike(e))return W5.scheduleArray(e,t);if($5.isPromise(e))return U5.schedulePromise(e,t);if(Z5.isAsyncIterable(e))return V5.scheduleAsyncIterable(e,t);if(Y5.isIterable(e))return H5.scheduleIterable(e,t);if(X5.isReadableStreamLike(e))return Q5.scheduleReadableStreamLike(e,t)}throw J5.createInvalidObservableTypeError(e)}Al.scheduled=e3});var un=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.from=void 0;var t3=Fv(),r3=oe();function n3(e,t){return t?t3.scheduled(e,t):r3.innerFrom(e)}Tl.from=n3});var Rl=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.of=void 0;var i3=It(),o3=un();function a3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i3.popScheduler(e);return o3.from(e,r)}Pl.of=a3});var Lv=b(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.throwError=void 0;var u3=Oe(),s3=we();function c3(e,t){var r=s3.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new u3.Observable(t?function(i){return t.schedule(n,0,i)}:n)}Ml.throwError=c3});var Cl=b(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.observeNotification=sn.Notification=sn.NotificationKind=void 0;var l3=_r(),f3=Rl(),d3=Lv(),p3=we(),h3;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(h3=sn.NotificationKind||(sn.NotificationKind={}));var m3=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return $O(this,t)},e.prototype.do=function(t,r,n){var i=this,o=i.kind,a=i.value,u=i.error;return o==="N"?t?.(a):o==="E"?r?.(u):n?.()},e.prototype.accept=function(t,r,n){var i;return p3.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,o=r==="N"?f3.of(n):r==="E"?d3.throwError(function(){return i}):r==="C"?l3.EMPTY:0;if(!o)throw new TypeError("Unexpected notification kind "+r);return o},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();sn.Notification=m3;function $O(e,t){var r,n,i,o=e,a=o.kind,u=o.value,l=o.error;if(typeof a!="string")throw new TypeError('Invalid notification, missing "kind"');a==="N"?(r=t.next)===null||r===void 0||r.call(t,u):a==="E"?(n=t.error)===null||n===void 0||n.call(t,l):(i=t.complete)===null||i===void 0||i.call(t)}sn.observeNotification=$O});var YO=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.isObservable=void 0;var v3=Oe(),KO=we();function b3(e){return!!e&&(e instanceof v3.Observable||KO.isFunction(e.lift)&&KO.isFunction(e.subscribe))}kl.isObservable=b3});var jn=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.EmptyError=void 0;var g3=Cn();ql.EmptyError=g3.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var ZO=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.lastValueFrom=void 0;var _3=jn();function y3(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=!1,a;e.subscribe({next:function(u){a=u,o=!0},error:i,complete:function(){o?n(a):r?n(t.defaultValue):i(new _3.EmptyError)}})})}Il.lastValueFrom=y3});var JO=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.firstValueFrom=void 0;var w3=jn(),x3=Mo();function S3(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new x3.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new w3.EmptyError)}});e.subscribe(o)})}jl.firstValueFrom=S3});var Nv=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.ArgumentOutOfRangeError=void 0;var O3=Cn();Fl.ArgumentOutOfRangeError=O3.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var Dv=b(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.NotFoundError=void 0;var E3=Cn();Ll.NotFoundError=E3.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var zv=b(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.SequenceError=void 0;var A3=Cn();Nl.SequenceError=A3.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var zl=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.isValidDate=void 0;function T3(e){return e instanceof Date&&!isNaN(e)}Dl.isValidDate=T3});var Bl=b(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.timeout=Ni.TimeoutError=void 0;var P3=qt(),R3=zl(),M3=G(),C3=oe(),k3=Cn(),q3=Z(),I3=an();Ni.TimeoutError=k3.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function j3(e,t){var r=R3.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?F3:o,u=r.scheduler,l=u===void 0?t??P3.asyncScheduler:u,s=r.meta,c=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return M3.operate(function(d,p){var f,h,m=null,g=0,_=function(w){h=I3.executeSchedule(p,l,function(){try{f.unsubscribe(),C3.innerFrom(a({meta:c,lastValue:m,seen:g})).subscribe(p)}catch(y){p.error(y)}},w)};f=d.subscribe(q3.createOperatorSubscriber(p,function(w){h?.unsubscribe(),g++,p.next(m=w),i>0&&_(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),m=null})),!g&&_(n!=null?typeof n=="number"?n:+n-l.now():i)})}Ni.timeout=j3;function F3(e){throw new Ni.TimeoutError(e)}});var Fn=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.map=void 0;var L3=G(),N3=Z();function D3(e,t){return L3.operate(function(r,n){var i=0;r.subscribe(N3.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}Ul.map=D3});var Nn=b(Ln=>{"use strict";var z3=Ln&&Ln.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},B3=Ln&&Ln.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.mapOneOrManyArgs=void 0;var U3=Fn(),W3=Array.isArray;function H3(e,t){return W3(t)?e.apply(void 0,B3([],z3(t))):e(t)}function V3(e){return U3.map(function(t){return H3(e,t)})}Ln.mapOneOrManyArgs=V3});var Uv=b(Dn=>{"use strict";var G3=Dn&&Dn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},XO=Dn&&Dn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.bindCallbackInternals=void 0;var $3=Nu(),K3=Oe(),Y3=zu(),Z3=Nn(),J3=Du(),X3=ol();function Bv(e,t,r,n){if(r)if($3.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Bv(e,t,n).apply(this,i).pipe(Z3.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Bv(e,t).apply(this,i).pipe(Y3.subscribeOn(n),J3.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new X3.AsyncSubject,l=!0;return new K3.Observable(function(s){var c=u.subscribe(s);if(l){l=!1;var d=!1,p=!1;t.apply(i,XO(XO([],G3(o)),[function(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];if(e){var m=f.shift();if(m!=null){u.error(m);return}}u.next(1<f.length?f:f[0]),p=!0,d&&u.complete()}])),p&&u.complete(),d=!0}return c})}}Dn.bindCallbackInternals=Bv});var QO=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.bindCallback=void 0;var Q3=Uv();function e6(e,t,r){return Q3.bindCallbackInternals(!1,e,t,r)}Wl.bindCallback=e6});var eE=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.bindNodeCallback=void 0;var t6=Uv();function r6(e,t,r){return t6.bindCallbackInternals(!0,e,t,r)}Hl.bindNodeCallback=r6});var Wv=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.argsArgArrayOrObject=void 0;var n6=Array.isArray,i6=Object.getPrototypeOf,o6=Object.prototype,a6=Object.keys;function u6(e){if(e.length===1){var t=e[0];if(n6(t))return{args:t,keys:null};if(s6(t)){var r=a6(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Vl.argsArgArrayOrObject=u6;function s6(e){return e&&typeof e=="object"&&i6(e)===o6}});var Hv=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.createObject=void 0;function c6(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Gl.createObject=c6});var $l=b(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.combineLatestInit=Xo.combineLatest=void 0;var l6=Oe(),f6=Wv(),nE=un(),iE=at(),d6=Nn(),tE=It(),p6=Hv(),h6=Z(),m6=an();function v6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=tE.popScheduler(e),n=tE.popResultSelector(e),i=f6.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return nE.from([],r);var u=new l6.Observable(oE(o,r,a?function(l){return p6.createObject(a,l)}:iE.identity));return n?u.pipe(d6.mapOneOrManyArgs(n)):u}Xo.combineLatest=v6;function oE(e,t,r){return r===void 0&&(r=iE.identity),function(n){rE(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,l=function(c){rE(t,function(){var d=nE.from(e[c],t),p=!1;d.subscribe(h6.createOperatorSubscriber(n,function(f){o[c]=f,p||(p=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)l(s)},n)}}Xo.combineLatestInit=oE;function rE(e,t,r){e?m6.executeSchedule(r,e,t):t()}});var Yl=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.mergeInternals=void 0;var b6=oe(),g6=an(),aE=Z();function _6(e,t,r,n,i,o,a,u){var l=[],s=0,c=0,d=!1,p=function(){d&&!l.length&&!s&&t.complete()},f=function(m){return s<n?h(m):l.push(m)},h=function(m){o&&t.next(m),s++;var g=!1;b6.innerFrom(r(m,c++)).subscribe(aE.createOperatorSubscriber(t,function(_){i?.(_),o?f(_):t.next(_)},function(){g=!0},void 0,function(){if(g)try{s--;for(var _=function(){var w=l.shift();a?g6.executeSchedule(t,a,function(){return h(w)}):h(w)};l.length&&s<n;)_();p()}catch(w){t.error(w)}}))};return e.subscribe(aE.createOperatorSubscriber(t,f,function(){d=!0,p()})),function(){u?.()}}Kl.mergeInternals=_6});var cn=b(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.mergeMap=void 0;var y6=Fn(),w6=oe(),x6=G(),S6=Yl(),O6=we();function uE(e,t,r){return r===void 0&&(r=1/0),O6.isFunction(t)?uE(function(n,i){return y6.map(function(o,a){return t(n,o,i,a)})(w6.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),x6.operate(function(n,i){return S6.mergeInternals(n,i,e,r)}))}Zl.mergeMap=uE});var Bu=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.mergeAll=void 0;var E6=cn(),A6=at();function T6(e){return e===void 0&&(e=1/0),E6.mergeMap(A6.identity,e)}Jl.mergeAll=T6});var Ql=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.concatAll=void 0;var P6=Bu();function R6(){return P6.mergeAll(1)}Xl.concatAll=R6});var Uu=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.concat=void 0;var M6=Ql(),C6=It(),k6=un();function q6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return M6.concatAll()(k6.from(e,C6.popScheduler(e)))}ef.concat=q6});var Wu=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.defer=void 0;var I6=Oe(),j6=oe();function F6(e){return new I6.Observable(function(t){j6.innerFrom(e()).subscribe(t)})}tf.defer=F6});var sE=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.connectable=void 0;var L6=ut(),N6=Oe(),D6=Wu(),z6={connector:function(){return new L6.Subject},resetOnDisconnect:!0};function B6(e,t){t===void 0&&(t=z6);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new N6.Observable(function(l){return a.subscribe(l)});return u.connect=function(){return(!r||r.closed)&&(r=D6.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}rf.connectable=B6});var cE=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.forkJoin=void 0;var U6=Oe(),W6=Wv(),H6=oe(),V6=It(),G6=Z(),$6=Nn(),K6=Hv();function Y6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=V6.popResultSelector(e),n=W6.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new U6.Observable(function(u){var l=i.length;if(!l){u.complete();return}for(var s=new Array(l),c=l,d=l,p=function(h){var m=!1;H6.innerFrom(i[h]).subscribe(G6.createOperatorSubscriber(u,function(g){m||(m=!0,d--),s[h]=g},function(){return c--},void 0,function(){(!c||!m)&&(d||u.next(o?K6.createObject(o,s):s),u.complete())}))},f=0;f<l;f++)p(f)});return r?a.pipe($6.mapOneOrManyArgs(r)):a}nf.forkJoin=Y6});var fE=b(Qo=>{"use strict";var Z6=Qo&&Qo.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.fromEvent=void 0;var J6=oe(),X6=Oe(),Q6=cn(),e8=ll(),Di=we(),t8=Nn(),r8=["addListener","removeListener"],n8=["addEventListener","removeEventListener"],i8=["on","off"];function Vv(e,t,r,n){if(Di.isFunction(r)&&(n=r,r=void 0),n)return Vv(e,t,r).pipe(t8.mapOneOrManyArgs(n));var i=Z6(u8(e)?n8.map(function(u){return function(l){return e[u](t,l,r)}}):o8(e)?r8.map(lE(e,t)):a8(e)?i8.map(lE(e,t)):[],2),o=i[0],a=i[1];if(!o&&e8.isArrayLike(e))return Q6.mergeMap(function(u){return Vv(u,t,r)})(J6.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new X6.Observable(function(u){var l=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return u.next(1<s.length?s:s[0])};return o(l),function(){return a(l)}})}Qo.fromEvent=Vv;function lE(e,t){return function(r){return function(n){return e[r](t,n)}}}function o8(e){return Di.isFunction(e.addListener)&&Di.isFunction(e.removeListener)}function a8(e){return Di.isFunction(e.on)&&Di.isFunction(e.off)}function u8(e){return Di.isFunction(e.addEventListener)&&Di.isFunction(e.removeEventListener)}});var pE=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.fromEventPattern=void 0;var s8=Oe(),c8=we(),l8=Nn();function dE(e,t,r){return r?dE(e,t).pipe(l8.mapOneOrManyArgs(r)):new s8.Observable(function(n){var i=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n.next(a.length===1?a[0]:a)},o=e(i);return c8.isFunction(t)?function(){return t(i,o)}:void 0})}of.fromEventPattern=dE});var mE=b(ea=>{"use strict";var f8=ea&&ea.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(ea,"__esModule",{value:!0});ea.generate=void 0;var hE=at(),d8=Nu(),p8=Wu(),h8=Iv();function m8(e,t,r,n,i){var o,a,u,l;arguments.length===1?(o=e,l=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?hE.identity:a,i=o.scheduler):(l=e,!n||d8.isScheduler(n)?(u=hE.identity,i=n):u=n);function s(){var c;return f8(this,function(d){switch(d.label){case 0:c=l,d.label=1;case 1:return!t||t(c)?[4,u(c)]:[3,4];case 2:d.sent(),d.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return p8.defer(i?function(){return h8.scheduleIterable(s(),i)}:s)}ea.generate=m8});var vE=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.iif=void 0;var v8=Wu();function b8(e,t,r){return v8.defer(function(){return e()?t:r})}af.iif=b8});var zn=b(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.timer=void 0;var g8=Oe(),_8=qt(),y8=Nu(),w8=zl();function x8(e,t,r){e===void 0&&(e=0),r===void 0&&(r=_8.async);var n=-1;return t!=null&&(y8.isScheduler(t)?r=t:n=t),new g8.Observable(function(i){var o=w8.isValidDate(e)?+e-r.now():e;o<0&&(o=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}uf.timer=x8});var Gv=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.interval=void 0;var S8=qt(),O8=zn();function E8(e,t){return e===void 0&&(e=0),t===void 0&&(t=S8.asyncScheduler),e<0&&(e=0),O8.timer(e,e,t)}sf.interval=E8});var gE=b(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.merge=void 0;var A8=Bu(),T8=oe(),P8=_r(),bE=It(),R8=un();function M8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=bE.popScheduler(e),n=bE.popNumber(e,1/0),i=e;return i.length?i.length===1?T8.innerFrom(i[0]):A8.mergeAll(n)(R8.from(i,r)):P8.EMPTY}cf.merge=M8});var $v=b(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.never=zi.NEVER=void 0;var C8=Oe(),k8=ot();zi.NEVER=new C8.Observable(k8.noop);function q8(){return zi.NEVER}zi.never=q8});var Bi=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.argsOrArgArray=void 0;var I8=Array.isArray;function j8(e){return e.length===1&&I8(e[0])?e[0]:e}lf.argsOrArgArray=j8});var Kv=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.onErrorResumeNext=void 0;var F8=Oe(),L8=Bi(),N8=Z(),_E=ot(),D8=oe();function z8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=L8.argsOrArgArray(e);return new F8.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=D8.innerFrom(r[i++])}catch{o();return}var u=new N8.OperatorSubscriber(n,void 0,_E.noop,_E.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}ff.onErrorResumeNext=z8});var yE=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.pairs=void 0;var B8=un();function U8(e,t){return B8.from(Object.entries(e),t)}df.pairs=U8});var wE=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.not=void 0;function W8(e,t){return function(r,n){return!e.call(t,r,n)}}pf.not=W8});var Ui=b(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.filter=void 0;var H8=G(),V8=Z();function G8(e,t){return H8.operate(function(r,n){var i=0;r.subscribe(V8.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}hf.filter=G8});var OE=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.partition=void 0;var $8=wE(),xE=Ui(),SE=oe();function K8(e,t,r){return[xE.filter(t,r)(SE.innerFrom(e)),xE.filter($8.not(t,r))(SE.innerFrom(e))]}mf.partition=K8});var Yv=b(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.raceInit=ta.race=void 0;var Y8=Oe(),EE=oe(),Z8=Bi(),J8=Z();function X8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=Z8.argsOrArgArray(e),e.length===1?EE.innerFrom(e[0]):new Y8.Observable(AE(e))}ta.race=X8;function AE(e){return function(t){for(var r=[],n=function(o){r.push(EE.innerFrom(e[o]).subscribe(J8.createOperatorSubscriber(t,function(a){if(r){for(var u=0;u<r.length;u++)u!==o&&r[u].unsubscribe();r=null}t.next(a)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}ta.raceInit=AE});var TE=b(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.range=void 0;var Q8=Oe(),ez=_r();function tz(e,t,r){if(t==null&&(t=e,e=0),t<=0)return ez.EMPTY;var n=t+e;return new Q8.Observable(r?function(i){var o=e;return r.schedule(function(){o<n?(i.next(o++),this.schedule()):i.complete()})}:function(i){for(var o=e;o<n&&!i.closed;)i.next(o++);i.complete()})}vf.range=tz});var PE=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.using=void 0;var rz=Oe(),nz=oe(),iz=_r();function oz(e,t){return new rz.Observable(function(r){var n=e(),i=t(n),o=i?nz.innerFrom(i):iz.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}bf.using=oz});var gf=b(Bn=>{"use strict";var az=Bn&&Bn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},uz=Bn&&Bn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.zip=void 0;var sz=Oe(),cz=oe(),lz=Bi(),fz=_r(),dz=Z(),pz=It();function hz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pz.popResultSelector(e),n=lz.argsOrArgArray(e);return n.length?new sz.Observable(function(i){var o=n.map(function(){return[]}),a=n.map(function(){return!1});i.add(function(){o=a=null});for(var u=function(s){cz.innerFrom(n[s]).subscribe(dz.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(p){return p.length})){var d=o.map(function(p){return p.shift()});i.next(r?r.apply(void 0,uz([],az(d))):d),o.some(function(p,f){return!p.length&&a[f]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},l=0;!i.closed&&l<n.length;l++)u(l);return function(){o=a=null}}):fz.EMPTY}Bn.zip=hz});var ME=b(RE=>{"use strict";Object.defineProperty(RE,"__esModule",{value:!0})});var Zv=b(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.audit=void 0;var mz=G(),vz=oe(),CE=Z();function bz(e){return mz.operate(function(t,r){var n=!1,i=null,o=null,a=!1,u=function(){if(o?.unsubscribe(),o=null,n){n=!1;var s=i;i=null,r.next(s)}a&&r.complete()},l=function(){o=null,a&&r.complete()};t.subscribe(CE.createOperatorSubscriber(r,function(s){n=!0,i=s,o||vz.innerFrom(e(s)).subscribe(o=CE.createOperatorSubscriber(r,u,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}_f.audit=bz});var kE=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.auditTime=void 0;var gz=qt(),_z=Zv(),yz=zn();function wz(e,t){return t===void 0&&(t=gz.asyncScheduler),_z.audit(function(){return yz.timer(e,t)})}yf.auditTime=wz});var IE=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.buffer=void 0;var xz=G(),Sz=ot(),qE=Z(),Oz=oe();function Ez(e){return xz.operate(function(t,r){var n=[];return t.subscribe(qE.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),Oz.innerFrom(e).subscribe(qE.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},Sz.noop)),function(){n=null}})}wf.buffer=Ez});var jE=b(ra=>{"use strict";var Jv=ra&&ra.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ra,"__esModule",{value:!0});ra.bufferCount=void 0;var Az=G(),Tz=Z(),Pz=on();function Rz(e,t){return t===void 0&&(t=null),t=t??e,Az.operate(function(r,n){var i=[],o=0;r.subscribe(Tz.createOperatorSubscriber(n,function(a){var u,l,s,c,d=null;o++%t===0&&i.push([]);try{for(var p=Jv(i),f=p.next();!f.done;f=p.next()){var h=f.value;h.push(a),e<=h.length&&(d=d??[],d.push(h))}}catch(_){u={error:_}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(u)throw u.error}}if(d)try{for(var m=Jv(d),g=m.next();!g.done;g=m.next()){var h=g.value;Pz.arrRemove(i,h),n.next(h)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var l=Jv(i),s=l.next();!s.done;s=l.next()){var c=s.value;n.next(c)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}ra.bufferCount=Rz});var LE=b(na=>{"use strict";var Mz=na&&na.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(na,"__esModule",{value:!0});na.bufferTime=void 0;var Cz=Nt(),kz=G(),qz=Z(),Iz=on(),jz=qt(),Fz=It(),FE=an();function Lz(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=Fz.popScheduler(n))!==null&&t!==void 0?t:jz.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return kz.operate(function(l,s){var c=[],d=!1,p=function(m){var g=m.buffer,_=m.subs;_.unsubscribe(),Iz.arrRemove(c,m),s.next(g),d&&f()},f=function(){if(c){var m=new Cz.Subscription;s.add(m);var g=[],_={buffer:g,subs:m};c.push(_),FE.executeSchedule(m,o,function(){return p(_)},e)}};a!==null&&a>=0?FE.executeSchedule(s,o,f,a,!0):d=!0,f();var h=qz.createOperatorSubscriber(s,function(m){var g,_,w=c.slice();try{for(var y=Mz(w),x=y.next();!x.done;x=y.next()){var O=x.value,A=O.buffer;A.push(m),u<=A.length&&p(O)}}catch(T){g={error:T}}finally{try{x&&!x.done&&(_=y.return)&&_.call(y)}finally{if(g)throw g.error}}},function(){for(;c?.length;)s.next(c.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return c=null});l.subscribe(h)})}na.bufferTime=Lz});var zE=b(ia=>{"use strict";var Nz=ia&&ia.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ia,"__esModule",{value:!0});ia.bufferToggle=void 0;var Dz=Nt(),zz=G(),NE=oe(),Xv=Z(),DE=ot(),Bz=on();function Uz(e,t){return zz.operate(function(r,n){var i=[];NE.innerFrom(e).subscribe(Xv.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new Dz.Subscription,l=function(){Bz.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(NE.innerFrom(t(o)).subscribe(Xv.createOperatorSubscriber(n,l,DE.noop)))},DE.noop)),r.subscribe(Xv.createOperatorSubscriber(n,function(o){var a,u;try{for(var l=Nz(i),s=l.next();!s.done;s=l.next()){var c=s.value;c.push(o)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}ia.bufferToggle=Uz});var UE=b(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.bufferWhen=void 0;var Wz=G(),Hz=ot(),BE=Z(),Vz=oe();function Gz(e){return Wz.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),Vz.innerFrom(e()).subscribe(i=BE.createOperatorSubscriber(r,o,Hz.noop))};o(),t.subscribe(BE.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}xf.bufferWhen=Gz});var HE=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.catchError=void 0;var $z=oe(),Kz=Z(),Yz=G();function WE(e){return Yz.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(Kz.createOperatorSubscriber(r,void 0,void 0,function(a){o=$z.innerFrom(e(a,WE(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}Sf.catchError=WE});var Qv=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.scanInternals=void 0;var Zz=Z();function Jz(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(Zz.createOperatorSubscriber(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}Of.scanInternals=Jz});var oa=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.reduce=void 0;var Xz=Qv(),Qz=G();function eB(e,t){return Qz.operate(Xz.scanInternals(e,t,arguments.length>=2,!1,!0))}Ef.reduce=eB});var eb=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.toArray=void 0;var tB=oa(),rB=G(),nB=function(e,t){return e.push(t),e};function iB(){return rB.operate(function(e,t){tB.reduce(nB,[])(e).subscribe(t)})}Af.toArray=iB});var tb=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.joinAllInternals=void 0;var oB=at(),aB=Nn(),uB=Iu(),sB=cn(),cB=eb();function lB(e,t){return uB.pipe(cB.toArray(),sB.mergeMap(function(r){return e(r)}),t?aB.mapOneOrManyArgs(t):oB.identity)}Tf.joinAllInternals=lB});var rb=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.combineLatestAll=void 0;var fB=$l(),dB=tb();function pB(e){return dB.joinAllInternals(fB.combineLatest,e)}Pf.combineLatestAll=pB});var VE=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.combineAll=void 0;var hB=rb();Rf.combineAll=hB.combineLatestAll});var YE=b(Un=>{"use strict";var GE=Un&&Un.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},$E=Un&&Un.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Un,"__esModule",{value:!0});Un.combineLatest=void 0;var mB=$l(),vB=G(),bB=Bi(),gB=Nn(),_B=Iu(),yB=It();function KE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=yB.popResultSelector(e);return r?_B.pipe(KE.apply(void 0,$E([],GE(e))),gB.mapOneOrManyArgs(r)):vB.operate(function(n,i){mB.combineLatestInit($E([n],GE(bB.argsOrArgArray(e))))(i)})}Un.combineLatest=KE});var ZE=b(Wn=>{"use strict";var wB=Wn&&Wn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},xB=Wn&&Wn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.combineLatestWith=void 0;var SB=YE();function OB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return SB.combineLatest.apply(void 0,xB([],wB(e)))}Wn.combineLatestWith=OB});var nb=b(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.concatMap=void 0;var JE=cn(),EB=we();function AB(e,t){return EB.isFunction(t)?JE.mergeMap(e,t,1):JE.mergeMap(e,1)}Mf.concatMap=AB});var QE=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.concatMapTo=void 0;var XE=nb(),TB=we();function PB(e,t){return TB.isFunction(t)?XE.concatMap(function(){return e},t):XE.concatMap(function(){return e})}Cf.concatMapTo=PB});var eA=b(Hn=>{"use strict";var RB=Hn&&Hn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},MB=Hn&&Hn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.concat=void 0;var CB=G(),kB=Ql(),qB=It(),IB=un();function jB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=qB.popScheduler(e);return CB.operate(function(n,i){kB.concatAll()(IB.from(MB([n],RB(e)),r)).subscribe(i)})}Hn.concat=jB});var tA=b(Vn=>{"use strict";var FB=Vn&&Vn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},LB=Vn&&Vn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.concatWith=void 0;var NB=eA();function DB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return NB.concat.apply(void 0,LB([],FB(e)))}Vn.concatWith=DB});var rA=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.fromSubscribable=void 0;var zB=Oe();function BB(e){return new zB.Observable(function(t){return e.subscribe(t)})}kf.fromSubscribable=BB});var If=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.connect=void 0;var UB=ut(),WB=oe(),HB=G(),VB=rA(),GB={connector:function(){return new UB.Subject}};function $B(e,t){t===void 0&&(t=GB);var r=t.connector;return HB.operate(function(n,i){var o=r();WB.innerFrom(e(VB.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}qf.connect=$B});var nA=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.count=void 0;var KB=oa();function YB(e){return KB.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}jf.count=YB});var oA=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.debounce=void 0;var ZB=G(),JB=ot(),iA=Z(),XB=oe();function QB(e){return ZB.operate(function(t,r){var n=!1,i=null,o=null,a=function(){if(o?.unsubscribe(),o=null,n){n=!1;var u=i;i=null,r.next(u)}};t.subscribe(iA.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=iA.createOperatorSubscriber(r,a,JB.noop),XB.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Ff.debounce=QB});var aA=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.debounceTime=void 0;var eU=qt(),tU=G(),rU=Z();function nU(e,t){return t===void 0&&(t=eU.asyncScheduler),tU.operate(function(r,n){var i=null,o=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var s=o;o=null,n.next(s)}};function l(){var s=a+e,c=t.now();if(c<s){i=this.schedule(void 0,s-c),n.add(i);return}u()}r.subscribe(rU.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(l,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}Lf.debounceTime=nU});var Hu=b(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.defaultIfEmpty=void 0;var iU=G(),oU=Z();function aU(e){return iU.operate(function(t,r){var n=!1;t.subscribe(oU.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}Nf.defaultIfEmpty=aU});var Vu=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.take=void 0;var uU=_r(),sU=G(),cU=Z();function lU(e){return e<=0?function(){return uU.EMPTY}:sU.operate(function(t,r){var n=0;t.subscribe(cU.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Df.take=lU});var ib=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.ignoreElements=void 0;var fU=G(),dU=Z(),pU=ot();function hU(){return fU.operate(function(e,t){e.subscribe(dU.createOperatorSubscriber(t,pU.noop))})}zf.ignoreElements=hU});var ob=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.mapTo=void 0;var mU=Fn();function vU(e){return mU.map(function(){return e})}Bf.mapTo=vU});var ab=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.delayWhen=void 0;var bU=Uu(),uA=Vu(),gU=ib(),_U=ob(),yU=cn(),wU=oe();function sA(e,t){return t?function(r){return bU.concat(t.pipe(uA.take(1),gU.ignoreElements()),r.pipe(sA(e)))}:yU.mergeMap(function(r,n){return wU.innerFrom(e(r,n)).pipe(uA.take(1),_U.mapTo(r))})}Uf.delayWhen=sA});var cA=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.delay=void 0;var xU=qt(),SU=ab(),OU=zn();function EU(e,t){t===void 0&&(t=xU.asyncScheduler);var r=OU.timer(e,t);return SU.delayWhen(function(){return r})}Wf.delay=EU});var lA=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.dematerialize=void 0;var AU=Cl(),TU=G(),PU=Z();function RU(){return TU.operate(function(e,t){e.subscribe(PU.createOperatorSubscriber(t,function(r){return AU.observeNotification(r,t)}))})}Hf.dematerialize=RU});var dA=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.distinct=void 0;var MU=G(),fA=Z(),CU=ot(),kU=oe();function qU(e,t){return MU.operate(function(r,n){var i=new Set;r.subscribe(fA.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&kU.innerFrom(t).subscribe(fA.createOperatorSubscriber(n,function(){return i.clear()},CU.noop))})}Vf.distinct=qU});var ub=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.distinctUntilChanged=void 0;var IU=at(),jU=G(),FU=Z();function LU(e,t){return t===void 0&&(t=IU.identity),e=e??NU,jU.operate(function(r,n){var i,o=!0;r.subscribe(FU.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}Gf.distinctUntilChanged=LU;function NU(e,t){return e===t}});var pA=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.distinctUntilKeyChanged=void 0;var DU=ub();function zU(e,t){return DU.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}$f.distinctUntilKeyChanged=zU});var Gu=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.throwIfEmpty=void 0;var BU=jn(),UU=G(),WU=Z();function HU(e){return e===void 0&&(e=VU),UU.operate(function(t,r){var n=!1;t.subscribe(WU.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Kf.throwIfEmpty=HU;function VU(){return new BU.EmptyError}});var mA=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.elementAt=void 0;var hA=Nv(),GU=Ui(),$U=Gu(),KU=Hu(),YU=Vu();function ZU(e,t){if(e<0)throw new hA.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(GU.filter(function(i,o){return o===e}),YU.take(1),r?KU.defaultIfEmpty(t):$U.throwIfEmpty(function(){return new hA.ArgumentOutOfRangeError}))}}Yf.elementAt=ZU});var vA=b(Gn=>{"use strict";var JU=Gn&&Gn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},XU=Gn&&Gn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.endWith=void 0;var QU=Uu(),eW=Rl();function tW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return QU.concat(r,eW.of.apply(void 0,XU([],JU(e))))}}Gn.endWith=tW});var bA=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.every=void 0;var rW=G(),nW=Z();function iW(e,t){return rW.operate(function(r,n){var i=0;r.subscribe(nW.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Zf.every=iW});var sb=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.exhaustMap=void 0;var oW=Fn(),gA=oe(),aW=G(),_A=Z();function yA(e,t){return t?function(r){return r.pipe(yA(function(n,i){return gA.innerFrom(e(n,i)).pipe(oW.map(function(o,a){return t(n,o,i,a)}))}))}:aW.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(_A.createOperatorSubscriber(n,function(u){o||(o=_A.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),gA.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}Jf.exhaustMap=yA});var cb=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.exhaustAll=void 0;var uW=sb(),sW=at();function cW(){return uW.exhaustMap(sW.identity)}Xf.exhaustAll=cW});var wA=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.exhaust=void 0;var lW=cb();Qf.exhaust=lW.exhaustAll});var xA=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.expand=void 0;var fW=G(),dW=Yl();function pW(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,fW.operate(function(n,i){return dW.mergeInternals(n,i,e,t,void 0,!0,r)})}ed.expand=pW});var SA=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.finalize=void 0;var hW=G();function mW(e){return hW.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}td.finalize=mW});var lb=b(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.createFind=aa.find=void 0;var vW=G(),bW=Z();function gW(e,t){return vW.operate(OA(e,t,"value"))}aa.find=gW;function OA(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(bW.createOperatorSubscriber(o,function(u){var l=a++;e.call(t,u,l,i)&&(o.next(n?l:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}aa.createFind=OA});var EA=b(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.findIndex=void 0;var _W=G(),yW=lb();function wW(e,t){return _W.operate(yW.createFind(e,t,"index"))}rd.findIndex=wW});var AA=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.first=void 0;var xW=jn(),SW=Ui(),OW=Vu(),EW=Hu(),AW=Gu(),TW=at();function PW(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?SW.filter(function(i,o){return e(i,o,n)}):TW.identity,OW.take(1),r?EW.defaultIfEmpty(t):AW.throwIfEmpty(function(){return new xW.EmptyError}))}}nd.first=PW});var PA=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.groupBy=void 0;var RW=Oe(),MW=oe(),CW=ut(),kW=G(),TA=Z();function qW(e,t,r,n){return kW.operate(function(i,o){var a;!t||typeof t=="function"?a=t:(r=t.duration,a=t.element,n=t.connector);var u=new Map,l=function(h){u.forEach(h),h(o)},s=function(h){return l(function(m){return m.error(h)})},c=0,d=!1,p=new TA.OperatorSubscriber(o,function(h){try{var m=e(h),g=u.get(m);if(!g){u.set(m,g=n?n():new CW.Subject);var _=f(m,g);if(o.next(_),r){var w=TA.createOperatorSubscriber(g,function(){g.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(m)});p.add(MW.innerFrom(r(_)).subscribe(w))}}g.next(a?a(h):h)}catch(y){s(y)}},function(){return l(function(h){return h.complete()})},s,function(){return u.clear()},function(){return d=!0,c===0});i.subscribe(p);function f(h,m){var g=new RW.Observable(function(_){c++;var w=m.subscribe(_);return function(){w.unsubscribe(),--c===0&&d&&p.unsubscribe()}});return g.key=h,g}})}id.groupBy=qW});var RA=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.isEmpty=void 0;var IW=G(),jW=Z();function FW(){return IW.operate(function(e,t){e.subscribe(jW.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}od.isEmpty=FW});var fb=b(ua=>{"use strict";var LW=ua&&ua.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ua,"__esModule",{value:!0});ua.takeLast=void 0;var NW=_r(),DW=G(),zW=Z();function BW(e){return e<=0?function(){return NW.EMPTY}:DW.operate(function(t,r){var n=[];t.subscribe(zW.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=LW(n),u=a.next();!u.done;u=a.next()){var l=u.value;r.next(l)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}ua.takeLast=BW});var MA=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.last=void 0;var UW=jn(),WW=Ui(),HW=fb(),VW=Gu(),GW=Hu(),$W=at();function KW(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?WW.filter(function(i,o){return e(i,o,n)}):$W.identity,HW.takeLast(1),r?GW.defaultIfEmpty(t):VW.throwIfEmpty(function(){return new UW.EmptyError}))}}ad.last=KW});var CA=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.materialize=void 0;var db=Cl(),YW=G(),ZW=Z();function JW(){return YW.operate(function(e,t){e.subscribe(ZW.createOperatorSubscriber(t,function(r){t.next(db.Notification.createNext(r))},function(){t.next(db.Notification.createComplete()),t.complete()},function(r){t.next(db.Notification.createError(r)),t.complete()}))})}ud.materialize=JW});var kA=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.max=void 0;var XW=oa(),QW=we();function e4(e){return XW.reduce(QW.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}sd.max=e4});var qA=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.flatMap=void 0;var t4=cn();cd.flatMap=t4.mergeMap});var jA=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.mergeMapTo=void 0;var IA=cn(),r4=we();function n4(e,t,r){return r===void 0&&(r=1/0),r4.isFunction(t)?IA.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),IA.mergeMap(function(){return e},r))}ld.mergeMapTo=n4});var FA=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.mergeScan=void 0;var i4=G(),o4=Yl();function a4(e,t,r){return r===void 0&&(r=1/0),i4.operate(function(n,i){var o=t;return o4.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}fd.mergeScan=a4});var NA=b($n=>{"use strict";var u4=$n&&$n.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},s4=$n&&$n.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty($n,"__esModule",{value:!0});$n.merge=void 0;var c4=G(),l4=Bi(),f4=Bu(),LA=It(),d4=un();function p4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=LA.popScheduler(e),n=LA.popNumber(e,1/0);return e=l4.argsOrArgArray(e),c4.operate(function(i,o){f4.mergeAll(n)(d4.from(s4([i],u4(e)),r)).subscribe(o)})}$n.merge=p4});var DA=b(Kn=>{"use strict";var h4=Kn&&Kn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},m4=Kn&&Kn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.mergeWith=void 0;var v4=NA();function b4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return v4.merge.apply(void 0,m4([],h4(e)))}Kn.mergeWith=b4});var zA=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.min=void 0;var g4=oa(),_4=we();function y4(e){return g4.reduce(_4.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}dd.min=y4});var hd=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.multicast=void 0;var w4=ju(),BA=we(),x4=If();function S4(e,t){var r=BA.isFunction(e)?e:function(){return e};return BA.isFunction(t)?x4.connect(t,{connector:r}):function(n){return new w4.ConnectableObservable(n,r)}}pd.multicast=S4});var WA=b(Ur=>{"use strict";var O4=Ur&&Ur.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},E4=Ur&&Ur.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.onErrorResumeNext=Ur.onErrorResumeNextWith=void 0;var A4=Bi(),T4=Kv();function UA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=A4.argsOrArgArray(e);return function(n){return T4.onErrorResumeNext.apply(void 0,E4([n],O4(r)))}}Ur.onErrorResumeNextWith=UA;Ur.onErrorResumeNext=UA});var HA=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.pairwise=void 0;var P4=G(),R4=Z();function M4(){return P4.operate(function(e,t){var r,n=!1;e.subscribe(R4.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}md.pairwise=M4});var VA=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.pluck=void 0;var C4=Fn();function k4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return C4.map(function(n){for(var i=n,o=0;o<r;o++){var a=i?.[e[o]];if(typeof a<"u")i=a;else return}return i})}vd.pluck=k4});var GA=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.publish=void 0;var q4=ut(),I4=hd(),j4=If();function F4(e){return e?function(t){return j4.connect(e)(t)}:function(t){return I4.multicast(new q4.Subject)(t)}}bd.publish=F4});var $A=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.publishBehavior=void 0;var L4=wv(),N4=ju();function D4(e){return function(t){var r=new L4.BehaviorSubject(e);return new N4.ConnectableObservable(t,function(){return r})}}gd.publishBehavior=D4});var KA=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.publishLast=void 0;var z4=ol(),B4=ju();function U4(){return function(e){var t=new z4.AsyncSubject;return new B4.ConnectableObservable(e,function(){return t})}}_d.publishLast=U4});var ZA=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.publishReplay=void 0;var W4=il(),H4=hd(),YA=we();function V4(e,t,r,n){r&&!YA.isFunction(r)&&(n=r);var i=YA.isFunction(r)?r:void 0;return function(o){return H4.multicast(new W4.ReplaySubject(e,t,n),i)(o)}}yd.publishReplay=V4});var JA=b(Yn=>{"use strict";var G4=Yn&&Yn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},$4=Yn&&Yn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.raceWith=void 0;var K4=Yv(),Y4=G(),Z4=at();function J4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?Y4.operate(function(r,n){K4.raceInit($4([r],G4(e)))(n)}):Z4.identity}Yn.raceWith=J4});var QA=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.repeat=void 0;var X4=_r(),Q4=G(),XA=Z(),e7=oe(),t7=zn();function r7(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return X4.EMPTY}:Q4.operate(function(i,o){var a=0,u,l=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?t7.timer(n):e7.innerFrom(n(a)),d=XA.createOperatorSubscriber(o,function(){d.unsubscribe(),s()});c.subscribe(d)}else s()},s=function(){var c=!1;u=i.subscribe(XA.createOperatorSubscriber(o,void 0,function(){++a<r?u?l():c=!0:o.complete()})),c&&l()};s()})}wd.repeat=r7});var tT=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.repeatWhen=void 0;var n7=oe(),i7=ut(),o7=G(),eT=Z();function a7(e){return o7.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,l=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new i7.Subject,n7.innerFrom(e(o)).subscribe(eT.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){u=!1,n=t.subscribe(eT.createOperatorSubscriber(r,void 0,function(){u=!0,!l()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}xd.repeatWhen=a7});var nT=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.retry=void 0;var u7=G(),rT=Z(),s7=at(),c7=zn(),l7=oe();function f7(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,o=t.resetOnSuccess,a=o===void 0?!1:o;return n<=0?s7.identity:u7.operate(function(u,l){var s=0,c,d=function(){var p=!1;c=u.subscribe(rT.createOperatorSubscriber(l,function(f){a&&(s=0),l.next(f)},void 0,function(f){if(s++<n){var h=function(){c?(c.unsubscribe(),c=null,d()):p=!0};if(i!=null){var m=typeof i=="number"?c7.timer(i):l7.innerFrom(i(f,s)),g=rT.createOperatorSubscriber(l,function(){g.unsubscribe(),h()},function(){l.complete()});m.subscribe(g)}else h()}else l.error(f)})),p&&(c.unsubscribe(),c=null,d())};d()})}Sd.retry=f7});var oT=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.retryWhen=void 0;var d7=oe(),p7=ut(),h7=G(),iT=Z();function m7(e){return h7.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(iT.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new p7.Subject,d7.innerFrom(e(o)).subscribe(iT.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}Od.retryWhen=m7});var pb=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.sample=void 0;var v7=oe(),b7=G(),g7=ot(),aT=Z();function _7(e){return b7.operate(function(t,r){var n=!1,i=null;t.subscribe(aT.createOperatorSubscriber(r,function(o){n=!0,i=o})),v7.innerFrom(e).subscribe(aT.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},g7.noop))})}Ed.sample=_7});var uT=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.sampleTime=void 0;var y7=qt(),w7=pb(),x7=Gv();function S7(e,t){return t===void 0&&(t=y7.asyncScheduler),w7.sample(x7.interval(e,t))}Ad.sampleTime=S7});var sT=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.scan=void 0;var O7=G(),E7=Qv();function A7(e,t){return O7.operate(E7.scanInternals(e,t,arguments.length>=2,!0))}Td.scan=A7});var lT=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.sequenceEqual=void 0;var T7=G(),P7=Z(),R7=oe();function M7(e,t){return t===void 0&&(t=function(r,n){return r===n}),T7.operate(function(r,n){var i=cT(),o=cT(),a=function(l){n.next(l),n.complete()},u=function(l,s){var c=P7.createOperatorSubscriber(n,function(d){var p=s.buffer,f=s.complete;p.length===0?f?a(!1):l.buffer.push(d):!t(d,p.shift())&&a(!1)},function(){l.complete=!0;var d=s.complete,p=s.buffer;d&&a(p.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),R7.innerFrom(e).subscribe(u(o,i))})}Pd.sequenceEqual=M7;function cT(){return{buffer:[],complete:!1}}});var mb=b(Zn=>{"use strict";var C7=Zn&&Zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},k7=Zn&&Zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.share=void 0;var fT=oe(),q7=ut(),dT=Mo(),I7=G();function j7(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new q7.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,l=u===void 0?!0:u;return function(s){var c,d,p,f=0,h=!1,m=!1,g=function(){d?.unsubscribe(),d=void 0},_=function(){g(),c=p=void 0,h=m=!1},w=function(){var y=c;_(),y?.unsubscribe()};return I7.operate(function(y,x){f++,!m&&!h&&g();var O=p=p??r();x.add(function(){f--,f===0&&!m&&!h&&(d=hb(w,l))}),O.subscribe(x),!c&&f>0&&(c=new dT.SafeSubscriber({next:function(A){return O.next(A)},error:function(A){m=!0,g(),d=hb(_,i,A),O.error(A)},complete:function(){h=!0,g(),d=hb(_,a),O.complete()}}),fT.innerFrom(y).subscribe(c))})(s)}}Zn.share=j7;function hb(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t!==!1){var i=new dT.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return fT.innerFrom(t.apply(void 0,k7([],C7(r)))).subscribe(i)}}});var pT=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.shareReplay=void 0;var F7=il(),L7=mb();function N7(e,t,r){var n,i,o,a,u=!1;return e&&typeof e=="object"?(n=e.bufferSize,a=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,u=o===void 0?!1:o,r=e.scheduler):a=e??1/0,L7.share({connector:function(){return new F7.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}Rd.shareReplay=N7});var hT=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.single=void 0;var D7=jn(),z7=zv(),B7=Dv(),U7=G(),W7=Z();function H7(e){return U7.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(W7.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new z7.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new B7.NotFoundError("No matching values"):new D7.EmptyError)}))})}Md.single=H7});var mT=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.skip=void 0;var V7=Ui();function G7(e){return V7.filter(function(t,r){return e<=r})}Cd.skip=G7});var vT=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.skipLast=void 0;var $7=at(),K7=G(),Y7=Z();function Z7(e){return e<=0?$7.identity:K7.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(Y7.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,l=n[u];n[u]=o,r.next(l)}})),function(){n=null}})}kd.skipLast=Z7});var gT=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.skipUntil=void 0;var J7=G(),bT=Z(),X7=oe(),Q7=ot();function eH(e){return J7.operate(function(t,r){var n=!1,i=bT.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},Q7.noop);X7.innerFrom(e).subscribe(i),t.subscribe(bT.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}qd.skipUntil=eH});var _T=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.skipWhile=void 0;var tH=G(),rH=Z();function nH(e){return tH.operate(function(t,r){var n=!1,i=0;t.subscribe(rH.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}Id.skipWhile=nH});var wT=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.startWith=void 0;var yT=Uu(),iH=It(),oH=G();function aH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=iH.popScheduler(e);return oH.operate(function(n,i){(r?yT.concat(e,n,r):yT.concat(e,n)).subscribe(i)})}jd.startWith=aH});var $u=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.switchMap=void 0;var uH=oe(),sH=G(),xT=Z();function cH(e,t){return sH.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(xT.createOperatorSubscriber(n,function(l){i?.unsubscribe();var s=0,c=o++;uH.innerFrom(e(l,c)).subscribe(i=xT.createOperatorSubscriber(n,function(d){return n.next(t?t(l,d,c,s++):d)},function(){i=null,u()}))},function(){a=!0,u()}))})}Fd.switchMap=cH});var ST=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.switchAll=void 0;var lH=$u(),fH=at();function dH(){return lH.switchMap(fH.identity)}Ld.switchAll=dH});var ET=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.switchMapTo=void 0;var OT=$u(),pH=we();function hH(e,t){return pH.isFunction(t)?OT.switchMap(function(){return e},t):OT.switchMap(function(){return e})}Nd.switchMapTo=hH});var AT=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.switchScan=void 0;var mH=$u(),vH=G();function bH(e,t){return vH.operate(function(r,n){var i=t;return mH.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Dd.switchScan=bH});var TT=b(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.takeUntil=void 0;var gH=G(),_H=Z(),yH=oe(),wH=ot();function xH(e){return gH.operate(function(t,r){yH.innerFrom(e).subscribe(_H.createOperatorSubscriber(r,function(){return r.complete()},wH.noop)),!r.closed&&t.subscribe(r)})}zd.takeUntil=xH});var PT=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.takeWhile=void 0;var SH=G(),OH=Z();function EH(e,t){return t===void 0&&(t=!1),SH.operate(function(r,n){var i=0;r.subscribe(OH.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Bd.takeWhile=EH});var RT=b(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.tap=void 0;var AH=we(),TH=G(),PH=Z(),RH=at();function MH(e,t,r){var n=AH.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?TH.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(PH.createOperatorSubscriber(o,function(l){var s;(s=n.next)===null||s===void 0||s.call(n,l),o.next(l)},function(){var l;u=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},function(l){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,l),o.error(l)},function(){var l,s;u&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):RH.identity}Ud.tap=MH});var vb=b(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.throttle=void 0;var CH=G(),MT=Z(),kH=oe();function qH(e,t){return CH.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,l=u===void 0?!1:u,s=!1,c=null,d=null,p=!1,f=function(){d?.unsubscribe(),d=null,l&&(g(),p&&n.complete())},h=function(){d=null,p&&n.complete()},m=function(_){return d=kH.innerFrom(e(_)).subscribe(MT.createOperatorSubscriber(n,f,h))},g=function(){if(s){s=!1;var _=c;c=null,n.next(_),!p&&m(_)}};r.subscribe(MT.createOperatorSubscriber(n,function(_){s=!0,c=_,!(d&&!d.closed)&&(a?g():m(_))},function(){p=!0,!(l&&s&&d&&!d.closed)&&n.complete()}))})}Wd.throttle=qH});var CT=b(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.throttleTime=void 0;var IH=qt(),jH=vb(),FH=zn();function LH(e,t,r){t===void 0&&(t=IH.asyncScheduler);var n=FH.timer(e,t);return jH.throttle(function(){return n},r)}Hd.throttleTime=LH});var qT=b(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.TimeInterval=sa.timeInterval=void 0;var NH=qt(),DH=G(),zH=Z();function BH(e){return e===void 0&&(e=NH.asyncScheduler),DH.operate(function(t,r){var n=e.now();t.subscribe(zH.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new kT(i,a))}))})}sa.timeInterval=BH;var kT=function(){function e(t,r){this.value=t,this.interval=r}return e}();sa.TimeInterval=kT});var IT=b(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.timeoutWith=void 0;var UH=qt(),WH=zl(),HH=Bl();function VH(e,t,r){var n,i,o;if(r=r??UH.async,WH.isValidDate(e)?n=e:typeof e=="number"&&(i=e),t)o=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return HH.timeout({first:n,each:i,scheduler:r,with:o})}Vd.timeoutWith=VH});var jT=b(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.timestamp=void 0;var GH=nl(),$H=Fn();function KH(e){return e===void 0&&(e=GH.dateTimestampProvider),$H.map(function(t){return{value:t,timestamp:e.now()}})}Gd.timestamp=KH});var NT=b($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.window=void 0;var FT=ut(),YH=G(),LT=Z(),ZH=ot(),JH=oe();function XH(e){return YH.operate(function(t,r){var n=new FT.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(LT.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),JH.innerFrom(e).subscribe(LT.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new FT.Subject)},ZH.noop,i)),function(){n?.unsubscribe(),n=null}})}$d.window=XH});var zT=b(ca=>{"use strict";var QH=ca&&ca.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ca,"__esModule",{value:!0});ca.windowCount=void 0;var DT=ut(),eV=G(),tV=Z();function rV(e,t){t===void 0&&(t=0);var r=t>0?t:e;return eV.operate(function(n,i){var o=[new DT.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(tV.createOperatorSubscriber(i,function(l){var s,c;try{for(var d=QH(o),p=d.next();!p.done;p=d.next()){var f=p.value;f.next(l)}}catch(g){s={error:g}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}var h=u-e+1;if(h>=0&&h%r===0&&o.shift().complete(),++u%r===0){var m=new DT.Subject;o.push(m),i.next(m.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(l){for(;o.length>0;)o.shift().error(l);i.error(l)},function(){a=null,o=null}))})}ca.windowCount=rV});var UT=b(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.windowTime=void 0;var nV=ut(),iV=qt(),oV=Nt(),aV=G(),uV=Z(),sV=on(),cV=It(),BT=an();function lV(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=cV.popScheduler(n))!==null&&t!==void 0?t:iV.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return aV.operate(function(l,s){var c=[],d=!1,p=function(g){var _=g.window,w=g.subs;_.complete(),w.unsubscribe(),sV.arrRemove(c,g),d&&f()},f=function(){if(c){var g=new oV.Subscription;s.add(g);var _=new nV.Subject,w={window:_,subs:g,seen:0};c.push(w),s.next(_.asObservable()),BT.executeSchedule(g,o,function(){return p(w)},e)}};a!==null&&a>=0?BT.executeSchedule(s,o,f,a,!0):d=!0,f();var h=function(g){return c.slice().forEach(g)},m=function(g){h(function(_){var w=_.window;return g(w)}),g(s),s.unsubscribe()};return l.subscribe(uV.createOperatorSubscriber(s,function(g){h(function(_){_.window.next(g),u<=++_.seen&&p(_)})},function(){return m(function(g){return g.complete()})},function(g){return m(function(_){return _.error(g)})})),function(){c=null}})}Kd.windowTime=lV});var VT=b(la=>{"use strict";var fV=la&&la.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(la,"__esModule",{value:!0});la.windowToggle=void 0;var dV=ut(),pV=Nt(),hV=G(),WT=oe(),bb=Z(),HT=ot(),mV=on();function vV(e,t){return hV.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};WT.innerFrom(e).subscribe(bb.createOperatorSubscriber(n,function(a){var u=new dV.Subject;i.push(u);var l=new pV.Subscription,s=function(){mV.arrRemove(i,u),u.complete(),l.unsubscribe()},c;try{c=WT.innerFrom(t(a))}catch(d){o(d);return}n.next(u.asObservable()),l.add(c.subscribe(bb.createOperatorSubscriber(n,s,HT.noop,o)))},HT.noop)),r.subscribe(bb.createOperatorSubscriber(n,function(a){var u,l,s=i.slice();try{for(var c=fV(s),d=c.next();!d.done;d=c.next()){var p=d.value;p.next(a)}}catch(f){u={error:f}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(u)throw u.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},o,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}la.windowToggle=vV});var $T=b(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.windowWhen=void 0;var bV=ut(),gV=G(),GT=Z(),_V=oe();function yV(e){return gV.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new bV.Subject,r.next(n.asObservable());var u;try{u=_V.innerFrom(e())}catch(l){o(l);return}u.subscribe(i=GT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(GT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}Yd.windowWhen=yV});var JT=b(Jn=>{"use strict";var KT=Jn&&Jn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},YT=Jn&&Jn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.withLatestFrom=void 0;var wV=G(),ZT=Z(),xV=oe(),SV=at(),OV=ot(),EV=It();function AV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=EV.popResultSelector(e);return wV.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),l=!1,s=function(d){xV.innerFrom(e[d]).subscribe(ZT.createOperatorSubscriber(i,function(p){a[d]=p,!l&&!u[d]&&(u[d]=!0,(l=u.every(SV.identity))&&(u=null))},OV.noop))},c=0;c<o;c++)s(c);n.subscribe(ZT.createOperatorSubscriber(i,function(d){if(l){var p=YT([d],KT(a));i.next(r?r.apply(void 0,YT([],KT(p))):p)}}))})}Jn.withLatestFrom=AV});var XT=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.zipAll=void 0;var TV=gf(),PV=tb();function RV(e){return PV.joinAllInternals(TV.zip,e)}Zd.zipAll=RV});var QT=b(Xn=>{"use strict";var MV=Xn&&Xn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},CV=Xn&&Xn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.zip=void 0;var kV=gf(),qV=G();function IV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qV.operate(function(r,n){kV.zip.apply(void 0,CV([r],MV(e))).subscribe(n)})}Xn.zip=IV});var eP=b(Qn=>{"use strict";var jV=Qn&&Qn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},FV=Qn&&Qn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.zipWith=void 0;var LV=QT();function NV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return LV.zip.apply(void 0,FV([],jV(e)))}Qn.zipWith=NV});var uP=b(v=>{"use strict";var DV=v&&v.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),zV=v&&v.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&DV(t,e,r)};Object.defineProperty(v,"__esModule",{value:!0});v.interval=v.iif=v.generate=v.fromEventPattern=v.fromEvent=v.from=v.forkJoin=v.empty=v.defer=v.connectable=v.concat=v.combineLatest=v.bindNodeCallback=v.bindCallback=v.UnsubscriptionError=v.TimeoutError=v.SequenceError=v.ObjectUnsubscribedError=v.NotFoundError=v.EmptyError=v.ArgumentOutOfRangeError=v.firstValueFrom=v.lastValueFrom=v.isObservable=v.identity=v.noop=v.pipe=v.NotificationKind=v.Notification=v.Subscriber=v.Subscription=v.Scheduler=v.VirtualAction=v.VirtualTimeScheduler=v.animationFrameScheduler=v.animationFrame=v.queueScheduler=v.queue=v.asyncScheduler=v.async=v.asapScheduler=v.asap=v.AsyncSubject=v.ReplaySubject=v.BehaviorSubject=v.Subject=v.animationFrames=v.observable=v.ConnectableObservable=v.Observable=void 0;v.filter=v.expand=v.exhaustMap=v.exhaustAll=v.exhaust=v.every=v.endWith=v.elementAt=v.distinctUntilKeyChanged=v.distinctUntilChanged=v.distinct=v.dematerialize=v.delayWhen=v.delay=v.defaultIfEmpty=v.debounceTime=v.debounce=v.count=v.connect=v.concatWith=v.concatMapTo=v.concatMap=v.concatAll=v.combineLatestWith=v.combineLatestAll=v.combineAll=v.catchError=v.bufferWhen=v.bufferToggle=v.bufferTime=v.bufferCount=v.buffer=v.auditTime=v.audit=v.config=v.NEVER=v.EMPTY=v.scheduled=v.zip=v.using=v.timer=v.throwError=v.range=v.race=v.partition=v.pairs=v.onErrorResumeNext=v.of=v.never=v.merge=void 0;v.switchMap=v.switchAll=v.subscribeOn=v.startWith=v.skipWhile=v.skipUntil=v.skipLast=v.skip=v.single=v.shareReplay=v.share=v.sequenceEqual=v.scan=v.sampleTime=v.sample=v.refCount=v.retryWhen=v.retry=v.repeatWhen=v.repeat=v.reduce=v.raceWith=v.publishReplay=v.publishLast=v.publishBehavior=v.publish=v.pluck=v.pairwise=v.onErrorResumeNextWith=v.observeOn=v.multicast=v.min=v.mergeWith=v.mergeScan=v.mergeMapTo=v.mergeMap=v.flatMap=v.mergeAll=v.max=v.materialize=v.mapTo=v.map=v.last=v.isEmpty=v.ignoreElements=v.groupBy=v.first=v.findIndex=v.find=v.finalize=void 0;v.zipWith=v.zipAll=v.withLatestFrom=v.windowWhen=v.windowToggle=v.windowTime=v.windowCount=v.window=v.toArray=v.timestamp=v.timeoutWith=v.timeout=v.timeInterval=v.throwIfEmpty=v.throttleTime=v.throttle=v.tap=v.takeWhile=v.takeUntil=v.takeLast=v.take=v.switchScan=v.switchMapTo=void 0;var BV=Oe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return BV.Observable}});var UV=ju();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return UV.ConnectableObservable}});var WV=qu();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return WV.observable}});var HV=oO();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return HV.animationFrames}});var VV=ut();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return VV.Subject}});var GV=wv();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return GV.BehaviorSubject}});var $V=il();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return $V.ReplaySubject}});var KV=ol();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return KV.AsyncSubject}});var tP=xO();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return tP.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return tP.asapScheduler}});var rP=qt();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return rP.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return rP.asyncScheduler}});var nP=EO();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return nP.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return nP.queueScheduler}});var iP=RO();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return iP.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return iP.animationFrameScheduler}});var oP=kO();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return oP.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return oP.VirtualAction}});var YV=Sv();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return YV.Scheduler}});var ZV=Nt();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return ZV.Subscription}});var JV=Mo();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return JV.Subscriber}});var aP=Cl();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return aP.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return aP.NotificationKind}});var XV=Iu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return XV.pipe}});var QV=ot();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return QV.noop}});var eG=at();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return eG.identity}});var tG=YO();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return tG.isObservable}});var rG=ZO();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return rG.lastValueFrom}});var nG=JO();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return nG.firstValueFrom}});var iG=Nv();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return iG.ArgumentOutOfRangeError}});var oG=jn();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return oG.EmptyError}});var aG=Dv();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return aG.NotFoundError}});var uG=bv();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return uG.ObjectUnsubscribedError}});var sG=zv();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return sG.SequenceError}});var cG=Bl();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return cG.TimeoutError}});var lG=iv();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return lG.UnsubscriptionError}});var fG=QO();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return fG.bindCallback}});var dG=eE();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return dG.bindNodeCallback}});var pG=$l();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return pG.combineLatest}});var hG=Uu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return hG.concat}});var mG=sE();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return mG.connectable}});var vG=Wu();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return vG.defer}});var bG=_r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return bG.empty}});var gG=cE();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return gG.forkJoin}});var _G=un();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return _G.from}});var yG=fE();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return yG.fromEvent}});var wG=pE();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return wG.fromEventPattern}});var xG=mE();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return xG.generate}});var SG=vE();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return SG.iif}});var OG=Gv();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return OG.interval}});var EG=gE();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return EG.merge}});var AG=$v();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return AG.never}});var TG=Rl();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return TG.of}});var PG=Kv();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return PG.onErrorResumeNext}});var RG=yE();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return RG.pairs}});var MG=OE();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return MG.partition}});var CG=Yv();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return CG.race}});var kG=TE();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return kG.range}});var qG=Lv();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return qG.throwError}});var IG=zn();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return IG.timer}});var jG=PE();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return jG.using}});var FG=gf();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return FG.zip}});var LG=Fv();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return LG.scheduled}});var NG=_r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return NG.EMPTY}});var DG=$v();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return DG.NEVER}});zV(ME(),v);var zG=Po();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return zG.config}});var BG=Zv();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return BG.audit}});var UG=kE();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return UG.auditTime}});var WG=IE();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return WG.buffer}});var HG=jE();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return HG.bufferCount}});var VG=LE();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return VG.bufferTime}});var GG=zE();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return GG.bufferToggle}});var $G=UE();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return $G.bufferWhen}});var KG=HE();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return KG.catchError}});var YG=VE();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return YG.combineAll}});var ZG=rb();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return ZG.combineLatestAll}});var JG=ZE();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return JG.combineLatestWith}});var XG=Ql();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return XG.concatAll}});var QG=nb();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return QG.concatMap}});var e9=QE();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return e9.concatMapTo}});var t9=tA();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return t9.concatWith}});var r9=If();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return r9.connect}});var n9=nA();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return n9.count}});var i9=oA();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return i9.debounce}});var o9=aA();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return o9.debounceTime}});var a9=Hu();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return a9.defaultIfEmpty}});var u9=cA();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return u9.delay}});var s9=ab();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return s9.delayWhen}});var c9=lA();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return c9.dematerialize}});var l9=dA();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return l9.distinct}});var f9=ub();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return f9.distinctUntilChanged}});var d9=pA();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return d9.distinctUntilKeyChanged}});var p9=mA();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return p9.elementAt}});var h9=vA();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return h9.endWith}});var m9=bA();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return m9.every}});var v9=wA();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return v9.exhaust}});var b9=cb();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return b9.exhaustAll}});var g9=sb();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return g9.exhaustMap}});var _9=xA();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return _9.expand}});var y9=Ui();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return y9.filter}});var w9=SA();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return w9.finalize}});var x9=lb();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return x9.find}});var S9=EA();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return S9.findIndex}});var O9=AA();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return O9.first}});var E9=PA();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return E9.groupBy}});var A9=ib();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return A9.ignoreElements}});var T9=RA();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return T9.isEmpty}});var P9=MA();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return P9.last}});var R9=Fn();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return R9.map}});var M9=ob();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return M9.mapTo}});var C9=CA();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return C9.materialize}});var k9=kA();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return k9.max}});var q9=Bu();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return q9.mergeAll}});var I9=qA();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return I9.flatMap}});var j9=cn();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return j9.mergeMap}});var F9=jA();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return F9.mergeMapTo}});var L9=FA();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return L9.mergeScan}});var N9=DA();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return N9.mergeWith}});var D9=zA();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return D9.min}});var z9=hd();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return z9.multicast}});var B9=Du();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return B9.observeOn}});var U9=WA();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return U9.onErrorResumeNextWith}});var W9=HA();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return W9.pairwise}});var H9=VA();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return H9.pluck}});var V9=GA();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return V9.publish}});var G9=$A();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return G9.publishBehavior}});var $9=KA();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return $9.publishLast}});var K9=ZA();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return K9.publishReplay}});var Y9=JA();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return Y9.raceWith}});var Z9=oa();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return Z9.reduce}});var J9=QA();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return J9.repeat}});var X9=tT();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return X9.repeatWhen}});var Q9=nT();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return Q9.retry}});var e$=oT();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return e$.retryWhen}});var t$=mv();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return t$.refCount}});var r$=pb();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return r$.sample}});var n$=uT();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return n$.sampleTime}});var i$=sT();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return i$.scan}});var o$=lT();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return o$.sequenceEqual}});var a$=mb();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return a$.share}});var u$=pT();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return u$.shareReplay}});var s$=hT();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return s$.single}});var c$=mT();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return c$.skip}});var l$=vT();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return l$.skipLast}});var f$=gT();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return f$.skipUntil}});var d$=_T();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return d$.skipWhile}});var p$=wT();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return p$.startWith}});var h$=zu();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return h$.subscribeOn}});var m$=ST();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return m$.switchAll}});var v$=$u();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return v$.switchMap}});var b$=ET();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return b$.switchMapTo}});var g$=AT();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return g$.switchScan}});var _$=Vu();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return _$.take}});var y$=fb();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return y$.takeLast}});var w$=TT();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return w$.takeUntil}});var x$=PT();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return x$.takeWhile}});var S$=RT();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return S$.tap}});var O$=vb();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return O$.throttle}});var E$=CT();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return E$.throttleTime}});var A$=Gu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return A$.throwIfEmpty}});var T$=qT();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return T$.timeInterval}});var P$=Bl();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return P$.timeout}});var R$=IT();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return R$.timeoutWith}});var M$=jT();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return M$.timestamp}});var C$=eb();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return C$.toArray}});var k$=NT();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return k$.window}});var q$=zT();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return q$.windowCount}});var I$=UT();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return I$.windowTime}});var j$=VT();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return j$.windowToggle}});var F$=$T();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return F$.windowWhen}});var L$=JT();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return L$.withLatestFrom}});var N$=XT();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return N$.zipAll}});var D$=eP();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return D$.zipWith}})});var _b=b(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.checkAbortSignal=cP;Wi.abortBreakPoint=B$;Wi.makeAbortError=lP;Wi.observeAbortSignal=U$;Wi.isAbortException=W$;var sP=uP(),gb=class extends Error{};function cP(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw lP()}}function z$(e){return new Promise(t=>setTimeout(t,e))}async function B$(e){await z$(1),cP(e)}function lP(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new gb("aborted");return e.code="ERR_ABORTED",e}function U$(e){return e?(0,sP.fromEvent)(e,"abort"):new sP.Observable}function W$(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var fP=b(wb=>{"use strict";Object.defineProperty(wb,"__esModule",{value:!0});wb.makeAbortableReaction=G$;var H$=qc(),Ku=vt(),V$=_b(),yb=Pm();function G$(e,t,r,n,i,o,a){let u;function l(s){(0,V$.isAbortException)(s)||(console.error(s),(0,Ku.isAlive)(e)&&a(s))}(0,Ku.addDisposer)(e,(0,H$.reaction)(()=>{try{return t(e)}catch(s){l(s);return}},async(s,c)=>{if(u&&(0,yb.stopStopToken)(u),!!(0,Ku.isAlive)(e)){u=(0,yb.createStopToken)(),i(u);try{let d=await r(s,u,e,c);(0,Ku.isAlive)(e)&&o(d)}catch(d){l(d)}}},n)),(0,Ku.addDisposer)(e,()=>{u&&(0,yb.stopStopToken)(u)})}});var Eo=b(L=>{"use strict";var $$=L&&L.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Vi=L&&L.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&$$(t,e,r)},dP=L&&L.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L,"__esModule",{value:!0});L.makeAbortableReaction=L.blobToDataURL=L.isFeature=L.SimpleFeature=L.defaultCodonTable=L.defaultStops=L.defaultStarts=L.rIC=L.complementTable=L.isElectron=void 0;L.useDebounce=Q$;L.useWidthSetter=eK;L.useDebouncedCallback=tK;L.findParentThat=pP;L.springAnimate=rK;L.findParentThatIs=Zu;L.getSession=nK;L.getContainingView=hP;L.getContainingTrack=iK;L.getContainingDisplay=oK;L.assembleLocString=aK;L.assembleLocStringFast=mP;L.parseLocStringOneBased=vP;L.parseLocString=xb;L.compareLocs=bP;L.compareLocStrings=uK;L.clamp=sK;L.bpToPx=Sb;L.radToDeg=dK;L.degToRad=pK;L.polarToCartesian=hK;L.cartesianToPolar=mK;L.featureSpanPx=vK;L.bpSpanPx=gP;L.iterMap=bK;L.findLastIndex=gK;L.findLast=_K;L.renameRegionIfNeeded=_P;L.renameRegionsIfNeeded=yK;L.minmax=wK;L.shorten=yP;L.stringify=xK;L.revcom=SK;L.reverse=OK;L.complement=EK;L.measureText=wP;L.getFrame=TK;L.generateCodonTable=PK;L.updateStatus=Ob;L.updateStatus2=RK;L.hashCode=xP;L.objectHash=MK;L.bytesForRegions=CK;L.isSupportedIndexingAdapter=kK;L.getBpDisplayStr=qK;L.toLocale=fa;L.getTickDisplayStr=IK;L.getViewParams=jK;L.getLayoutId=FK;L.useLocalStorage=LK;L.getUriLink=SP;L.getStr=OP;L.coarseStripHTML=EP;L.linkify=NK;L.measureGridWidth=DK;L.getEnv=zK;L.localStorageGetItem=Ab;L.localStorageSetItem=BK;L.max=AP;L.min=UK;L.sum=TP;L.avg=WK;L.groupBy=HK;L.notEmpty=VK;L.mergeIntervals=PP;L.gatherOverlaps=GK;L.stripAlpha=$K;L.getStrokeProps=KK;L.getFillProps=YK;L.renderToStaticMarkup=ZK;L.isGzip=RP;L.fetchAndMaybeUnzip=MP;L.fetchAndMaybeUnzipText=JK;L.isObject=CP;L.localStorageGetNumber=XK;L.localStorageGetBoolean=QK;L.testAdapter=eY;var Hi=Ye(),K$=oh(),Y$=dP(X1()),yr=vt(),Z$=uc(),J$=ex(),Eb=_x(),X$=Pm(),Yu=kc();Vi(kc(),L);Vi(gS(),L);Vi(_S(),L);Vi(yS(),L);Vi(Qm(),L);Vi(kS(),L);function Q$(e,t){let[r,n]=(0,Hi.useState)(e);return(0,Hi.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function eK(e,t){let[r,{width:n}]=(0,Y$.default)();return(0,Hi.useEffect)(()=>{n&&(0,yr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function tK(e,t=400){let r=(0,Hi.useRef)(null),n=(0,Hi.useRef)(null);return(0,Hi.useEffect)(()=>{n.current&&clearTimeout(n.current)},[]),function(...o){r.current=o,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current&&e(...r.current)},t)}}function pP(e,t){if(!(0,yr.hasParent)(e))throw new Error("node does not have parent");let r=(0,yr.getParent)(e);for(;r&&(0,yr.isAlive)(r);){if(t(r))return r;if((0,yr.hasParent)(r))r=(0,yr.getParent)(r);else break}throw new Error("no matching node found")}function rK(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function c(d){let p=Date.now(),f=d.lastPosition,h=d.lastTime||p,m=d.lastVelocity||0;p>h+64&&(h=p);let g=Math.floor(p-h);for(let O=0;O<g;++O){let A=-o*(f-t),T=-a*m,R=(A+T)/1;m+=R*1/1e3,f+=m*1/1e3}let _=Math.abs(m)<=i,w=o!==0?Math.abs(t-f)<=i:!0;(u&&o!==0?e<t?f>t:f<t:!1)||_&&w?(r(t),n()):(r(f),s=requestAnimationFrame(()=>{c({lastPosition:f,lastTime:p,lastVelocity:m})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Zu(e,t){return pP(e,t)}function nK(e){try{return Zu(e,Yu.isSessionModel)}catch{throw new Error("no session model found!")}}function hP(e){try{return Zu(e,Yu.isViewModel)}catch{throw new Error("no containing view found")}}function iK(e){try{return Zu(e,Yu.isTrackModel)}catch{throw new Error("no containing track found")}}function oK(e){try{return Zu(e,Yu.isDisplayModel)}catch{throw new Error("no containing display found")}}function aK(e){return mP(e,fa)}function mP(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",l;i!==void 0?l=`:${t(i+1)}`:o!==void 0?l=":1":l="";let s;o!==void 0?s=i!==void 0&&i+1===o?"":`..${t(o)}`:s=i!==void 0?"..":"";let c="";return a&&(c="[rev]"),`${u}${n}${l}${s}${c}`}function vP(e,t){if(!e)throw new Error("no location string provided, could not parse");let r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,"")),e=e.replace(/\s/,"");let n=/({(.+)})?(.+)/.exec(e);if(!n)throw new Error(`invalid location string: "${e}"`);let[,,i,o]=n,a=i,u=o;if(!a&&u.startsWith("{}"))throw new Error(`no assembly name was provided in location "${u}"`);let l=u.lastIndexOf(":");if(l===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,l),c=u.slice(l+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(c){let d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),p=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(d){let[,f,,,,h]=d;if(f!==void 0&&h!==void 0)return{assemblyName:a,refName:s,start:+f.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(p){let[,f,,,h]=p;if(f!==void 0)return h?{assemblyName:a,refName:s,start:+f.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+f.replaceAll(",",""),end:+f.replaceAll(",",""),reversed:r}}else throw new Error(`could not parse range "${c}" on location "${e}"`)}else return{assemblyName:a,refName:s,reversed:r};else if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`unknown reference sequence name in location "${e}"`)}function xb(e,t){let r=vP(e,t);return typeof r.start=="number"&&(r.start-=1),r}function bP(e,t){let r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;let n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(e.start!==void 0&&t.start!==void 0){let i=e.start-t.start;if(i)return i}if(e.end!==void 0&&t.end!==void 0){let i=e.end-t.end;if(i)return i}return 0}function uK(e,t,r){let n=xb(e,r),i=xb(t,r);return bP(n,i)}function sK(e,t,r){return e<t?t:e>r?r:e}function cK(e){return Math.round(e*10)/10}function Sb(e,{reversed:t,end:r=0,start:n=0},i){return cK((t?r-e:e-n)/i)}var lK=180/Math.PI,fK=Math.PI/180;function dK(e){return e*lK%360}function pK(e){return e*fK%(2*Math.PI)}function hK(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function mK(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function vK(e,t,r){return gP(e.get("start"),e.get("end"),t,r)}function gP(e,t,r,n){let i=Sb(e,r,n),o=Sb(t,r,n);return r.reversed?[o,i]:[i,o]}function bK(e,t,r){let n=Array.from({length:r||0}),i=0;for(let o of e)n[i]=t(o),i+=1;return n}function gK(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function _K(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function _P(e,t){if((0,yr.isStateTreeNode)(t)&&!(0,yr.isAlive)(t))return t;if(e?.[t.refName]){t=(0,yr.isStateTreeNode)(t)?{...(0,yr.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function yK(e,t){let{regions:r=[],adapterConfig:n}=t;if(!t.sessionId)throw new Error("sessionId is required");let i=r.map(a=>a.assemblyName),o=Object.fromEntries(await Promise.all([...new Set(i)].map(async a=>[a,await e.getRefNameMapForAdapter(n,a,t)])));return{...t,regions:r.map((a,u)=>_P(o[i[u]],a))}}function wK(e,t){return[Math.min(e,t),Math.max(e,t)]}function yP(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function xK({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${yP(e)}:${fa(t)}${n?" (out of bounds)":""}`:""].join("")}L.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");L.complementTable={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"};function SK(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=L.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function OK(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function EK(e){var t;let r="";for(let n=0;n<e.length;n++)r+=(t=L.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}L.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var AK=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function wP(e,t=10){var r;let n=.5279276315789471,i=String(e),o=0;for(let a=0;a<i.length;a++){let u=i.charCodeAt(a);o+=(r=AK[u])!==null&&r!==void 0?r:n}return o*t}function TK(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}L.defaultStarts=["ATG"];L.defaultStops=["TAA","TAG","TGA"];L.defaultCodonTable={TCA:"S",TCC:"S",TCG:"S",TCT:"S",TTC:"F",TTT:"F",TTA:"L",TTG:"L",TAC:"Y",TAT:"Y",TAA:"*",TAG:"*",TGC:"C",TGT:"C",TGA:"*",TGG:"W",CTA:"L",CTC:"L",CTG:"L",CTT:"L",CCA:"P",CCC:"P",CCG:"P",CCT:"P",CAC:"H",CAT:"H",CAA:"Q",CAG:"Q",CGA:"R",CGC:"R",CGG:"R",CGT:"R",ATA:"I",ATC:"I",ATT:"I",ATG:"M",ACA:"T",ACC:"T",ACG:"T",ACT:"T",AAC:"N",AAT:"N",AAA:"K",AAG:"K",AGC:"S",AGT:"S",AGA:"R",AGG:"R",GTA:"V",GTC:"V",GTG:"V",GTT:"V",GCA:"A",GCC:"A",GCG:"A",GCT:"A",GAC:"D",GAT:"D",GAA:"E",GAG:"E",GGA:"G",GGC:"G",GGG:"G",GGT:"G"};function PK(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r],i=[];for(let o=0;o<3;o++){let a=r.charAt(o);i[o]=[],i[o][0]=a.toUpperCase(),i[o][1]=a.toLowerCase()}for(let o=0;o<2;o++){let a=i[0][o];for(let u=0;u<2;u++){let l=i[1][u];for(let s=0;s<2;s++){let c=i[2][s],d=a+l+c;t[d]=n}}}}),t}async function Ob(e,t,r){t(e);let n=await r();return t(""),n}async function RK(e,t,r,n){t(e);let i=await n();return(0,X$.checkStopToken)(r),t(""),i}function xP(e){let t=0;if(e.length===0)return t;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function MK(e){return`${xP(JSON.stringify(e))}`}async function CK(e,t){return(await Promise.all(e.map(n=>t.blocksForRange(n.refName,n.start,n.end)))).flat().map(n=>({start:n.minv.blockPosition,end:n.maxv.blockPosition+65535})).reduce((n,i)=>n+i.end-i.start,0)}function kK(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function qK(e){return Math.floor(e/1e6)>0?`${Number.parseFloat((e/1e6).toPrecision(3))}Mbp`:Math.floor(e/1e3)>0?`${Number.parseFloat((e/1e3).toPrecision(3))}Kbp`:`${fa(Math.floor(e))}bp`}function fa(e){return e.toLocaleString("en-US")}function IK(e,t){return Math.floor(t/1e3)>0?`${fa(Number.parseFloat((e/1e6).toFixed(2)))}M`:fa(Math.floor(e))}function jK(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=hP(e),o=r?.contentBlocks[0]||{},a=n?.contentBlocks[0]||{},u=n?.contentBlocks[1]||{};return{offsetPx:t?0:i-a.offsetPx,offsetPx1:t?0:i-u.offsetPx,start:o.start,end:o.end}}function FK({sessionId:e,layoutId:t}){return`${e}-${t}`}function LK(e,t){let[r,n]=(0,Hi.useState)(()=>{if(typeof window>"u")return t;try{let o=window.localStorage.getItem(e);return o?JSON.parse(o):t}catch(o){return console.error(o),t}});return[r,o=>{try{let a=o instanceof Function?o(r):o;n(a),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(a))}catch(a){console.error(a)}}]}function SP(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function OP(e){return CP(e)?(0,Yu.isUriLocation)(e)?SP(e):JSON.stringify(e):String(e)}function EP(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function NK(e){let t=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;return e.replaceAll(t,`$1<a href='$2' target="_blank">$2</a>`)}function DK(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return AP(e.map(u=>OP(u)).map(u=>a?EP(u):u).map(u=>wP(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function zK(e){return(0,yr.getEnv)(e)}function Ab(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function BK(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function AP(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function UK(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function TP(e){let t=0;for(let r of e)t+=r;return t}function WK(e){return TP(e)/e.length}function HK(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function VK(e){return e!=null}function PP(e,t=5e3){if(e.length<=1)return e;let r=[],n=null;e=e.sort((i,o)=>i.start-o.start),r.push(e[0]);for(let i=1;i<e.length;i++)n=r.at(-1),n.end+t<e[i].start-t?r.push(e[i]):n.end<e[i].end&&(n.end=Math.max(n.end,e[i].end),r.pop(),r.push(n));return r}function GK(e,t=5e3){let r={};for(let n of e)r[n.refName]||(r[n.refName]=[]),r[n.refName].push(n);return Object.values(r).flatMap(n=>PP(n.sort((i,o)=>i.start-o.start),t))}function $K(e){return(0,Eb.colord)(e).alpha(1).toHex()}function KK(e){let t=(0,Eb.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function YK(e){let t=(0,Eb.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function ZK(e){let t=document.createElement("div");return(0,Z$.flushSync)(()=>{(0,J$.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function RP(e){return e[0]===31&&e[1]===139&&e[2]===8}async function MP(e,t){let{statusCallback:r=()=>{}}=t||{},n=await Ob("Downloading file",r,()=>e.readFile(t));return RP(n)?await Ob("Unzipping",r,()=>(0,K$.unzip)(n)):n}async function JK(e,t){let r=await MP(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function CP(e){return typeof e=="object"&&e!==null}function XK(e,t){var r;return+((r=Ab(e))!==null&&r!==void 0?r:t)}function QK(e,t){return!!JSON.parse(Ab(e)||JSON.stringify(t))}function eY(e,t,r,n){return t.test(e)&&!r||r===n}var kP=IS();Object.defineProperty(L,"SimpleFeature",{enumerable:!0,get:function(){return dP(kP).default}});Object.defineProperty(L,"isFeature",{enumerable:!0,get:function(){return kP.isFeature}});var tY=tv();Object.defineProperty(L,"blobToDataURL",{enumerable:!0,get:function(){return tY.blobToDataURL}});var rY=fP();Object.defineProperty(L,"makeAbortableReaction",{enumerable:!0,get:function(){return rY.makeAbortableReaction}});Vi(_b(),L)});var FP=b(Ju=>{"use strict";var jP=Ju&&Ju.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ju,"__esModule",{value:!0});Ju.default=cY;var nY=Ka(),qP=jP(Y1()),iY=jP(J1()),oY=Eo(),aY=["a","b","br","code","div","em","h1","h2","h3","h4","h5","h6","i","img","li","p","pre","span","small","strong","table","tbody","sup","sub","td","tfoot","th","thead","tr","u","ul"],IP=!1,uY=new RegExp(aY.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function sY(e){return uY.test(e)}function cY({html:e,className:t}){let r=(0,oY.linkify)(`${e}`),n=sY(r)?r:(0,iY.default)(r);return IP||(IP=!0,qP.default.addHook("afterSanitizeAttributes",i=>{i.tagName==="A"&&(i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target","_blank"))})),(0,nY.jsx)("span",{className:t,dangerouslySetInnerHTML:{__html:qP.default.sanitize(n)}})}});var ei=b((yie,LP)=>{LP.exports=JBrowseExports["mobx-react"]});var NP,lY,Tb,DP=pt(()=>{"use strict";NP=V(Ye()),lY=e=>{let{color:t="rgb(255,255,255,0.5)"}=e;return NP.default.createElement("rect",{...e,fill:t})},Tb=lY});var Gi,zP,fY,BP,UP=pt(()=>{"use strict";Gi=V(Ye()),zP=V(ei()),fY=(0,zP.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return Gi.default.createElement(Gi.default.Fragment,null,r?[...r.links()].map(i=>{let{source:o,target:a}=i,u=o.x,l=a.x,s=n?a.len:a.y,c=n?o.len:o.y;return Gi.default.createElement(Gi.default.Fragment,{key:[u,l,s,c].join("-")},Gi.default.createElement("line",{stroke:"black",x1:c,y1:u,x2:c,y2:l}),Gi.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:s,y2:l}))}):null)}),BP=fY});var ti,WP,dY,HP,VP=pt(()=>{"use strict";ti=V(Ye()),WP=V(ei());DP();UP();dY=(0,WP.observer)(function({model:e,labelWidth:t,svgFontSize:r}){let{totalHeight:n,treeWidth:i,samples:o=[],rowHeight:a}=e,u=a>=8,l=Math.min(20,a);return ti.default.createElement(ti.default.Fragment,null,ti.default.createElement(Tb,{y:0,x:0,width:t+5+i,height:n}),ti.default.createElement(BP,{model:e}),ti.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,c)=>ti.default.createElement(Tb,{key:`${s.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:s.color})),u?o.map((s,c)=>ti.default.createElement("text",{key:`${s.id}-${c}`,dominantBaseline:"middle",fontSize:r,x:2,y:c*a+a/2},s.label)):null))}),HP=dY});var Jd,GP,$P,pY,KP,YP=pt(()=>{"use strict";Jd=V(Ye()),GP=V(Lt()),$P=V(ei()),pY=(0,$P.observer)(function({children:e,model:t,exportSVG:r}){if(r)return Jd.default.createElement(Jd.default.Fragment,null,e);{let{totalHeight:n}=t;return Jd.default.createElement("svg",{style:{position:"absolute",top:0,left:0,pointerEvents:"none",height:n,width:(0,GP.getContainingView)(t).width}},e)}}),KP=pY});function ZP(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}var JP=pt(()=>{"use strict"});var Pb,XP,QP,hY,Xd,Rb=pt(()=>{"use strict";Pb=V(Ye()),XP=V(Lt()),QP=V(ei());VP();YP();JP();hY=(0,QP.observer)(function(e){let{model:t}=e,{rowHeight:r,samples:n}=t,i=Math.min(Math.max(r,8),14),o=r>=8,a=20,u=ZP(n?.map(l=>(0,XP.measureText)(l.label,i)).map(l=>o?l:a)||[],0);return Pb.default.createElement(KP,{...e},Pb.default.createElement(HP,{model:t,labelWidth:u,svgFontSize:i}))}),Xd=hY});var uR=b((jie,aR)=>{aR.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var xR=b((goe,wR)=>{"use strict";wR.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var Qu=b((_oe,SR)=>{SR.exports=JBrowseExports["@jbrowse/core/ui"]});var RR={};fp(RR,{renderSvg:()=>qY});async function qY(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,PR.getContainingView)(e),u=`mafclip-${i}`;return Wr.default.createElement(Wr.default.Fragment,null,Wr.default.createElement("defs",null,Wr.default.createElement("clipPath",{id:u},Wr.default.createElement("rect",{x:0,y:0,width:a,height:n}))),Wr.default.createElement("g",{clipPath:`url(#${u})`},Wr.default.createElement("g",{id:"snpcov"},await r(t)),Wr.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},Wr.default.createElement(Xd,{model:e,orientation:"left",exportSVG:!0}))))}var Wr,PR,MR=pt(()=>{"use strict";Wr=V(Ye()),PR=V(Lt());Rb()});var ZR=b(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:!0});Ub.default=LY;var YR=Eo();function LY(e,t="",r=5e3){let n=[e];for(;n.length;){let i=n.pop();for(let[o,a]of Object.entries(i)){if(t.length>r)return(0,YR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return(0,YR.hashCode)(t)}});var JR=b(rs=>{"use strict";var NY=rs&&rs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rs,"__esModule",{value:!0});rs.adapterConfigCacheKey=zY;var DY=NY(ZR());function zY(e={}){return`${(0,DY.default)(e)}`}});var QR=b(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.getAdapter=XR;ns.freeAdapterResources=UY;ns.clearAdapterCache=WY;var BY=JR(),$i={};async function XR(e,t,r){let n=(0,BY.adapterConfigCacheKey)(r);if(!$i[n]){let o=r?.type;if(!o)throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(r)}`);let a=e.getAdapterType(o);if(!a)throw new Error(`unknown data adapter type ${o}`);let u=a.configSchema.create(r,{pluginManager:e}),l=XR.bind(null,e,t),s=await a.getAdapterClass(),c=new s(u,l,e);$i[n]={dataAdapter:c,sessionIds:new Set([t])}}let i=$i[n];return i.sessionIds.add(t),i}function UY(e){let t=0,r=Object.keys(e);if(r.length===1&&r[0]==="sessionId"){let{sessionId:n}=e;Object.entries($i).forEach(([i,o])=>{o.sessionIds.delete(n),o.sessionIds.size===0&&(t+=1,delete $i[i])})}else Object.values($i).forEach(n=>{let i=e.regions||(e.region?[e.region]:[]);for(let o of i)o.refName!==void 0&&n.dataAdapter.freeResources(o)});return t}function WY(){$i={}}});var eM=b(Hb=>{"use strict";Object.defineProperty(Hb,"__esModule",{value:!0});var Wb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};Hb.default=Wb});var rM=b(Gb=>{"use strict";Object.defineProperty(Gb,"__esModule",{value:!0});Gb.default=Vb;var tM=e=>typeof e=="object"&&e!==null,HY=e=>tM(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function Vb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{i.forEach(o=>{t(o),tM(o)&&Vb(o,t,r)})};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),HY(i)&&(Array.isArray(i)?n(i):Vb(i,t,r))}});var iM=b(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.UNSUPPORTED=Le.UNKNOWN=void 0;Le.getTrackAssemblyNames=VY;Le.getConfAssemblyNames=nM;Le.getRpcSessionId=GY;Le.getParentRenderProps=$Y;Le.getBlob=KY;Le.getBlobMap=YY;Le.setBlobMap=ZY;Le.storeBlobLocation=XY;Le.makeIndex=QY;Le.makeIndexType=eZ;Le.getFileName=tZ;Le.guessAdapter=rZ;Le.guessTrackType=nZ;Le.generateUnsupportedTrackConf=iZ;Le.generateUnknownTrackConf=oZ;Le.getTrackName=aZ;var va=vt(),is=Eo(),ma=Wm();function VY(e){return nM(e.configuration)}function nM(e){let t=(0,ma.readConfObject)(e,"assemblyNames");if(!t){let r=(0,va.getParent)(e);if("sequence"in r)return[(0,ma.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function GY(e){let t;for(let r=e;!(0,va.isRoot)(r);r=(0,va.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t}function $Y(e){for(let t=(0,va.getParent)(e);!(0,va.isRoot)(t);t=(0,va.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Le.UNKNOWN="UNKNOWN";Le.UNSUPPORTED="UNSUPPORTED";var ip={};function KY(e){return ip[e]}function YY(){return ip}function ZY(e){ip=e}var JY=0;function XY(e){if("blob"in e){let t=`b${+Date.now()}-${JY++}`;return ip[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function QY(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function eZ(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function tZ(e){let t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return n?.name||t?.slice(t.lastIndexOf("/")+1)||r?.slice(r.replace(/\\/g,"/").lastIndexOf("/")+1)||""}function rZ(e,t,r,n){if(n){let{pluginManager:i}=(0,is.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,l,s)=>{})(e,t,r);if(a)return a}return{type:Le.UNKNOWN}}function nZ(e,t){if(t){let r=(0,is.getSession)(t),i=(0,is.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function iZ(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,is.objectHash)(n),n}function oZ(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unknown)`,description:`Could not determine track type for "${t}"`,category:r,trackId:""};return n.trackId=(0,is.objectHash)(n),n}function aZ(e,t){let r=(0,ma.readConfObject)(e,"name");if(!r&&(0,ma.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,ma.readConfObject)(n,"displayName")||(0,ma.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var uM=b(os=>{"use strict";var aM=os&&os.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(os,"__esModule",{value:!0});var uZ=aM(eM()),sZ=aM(rM()),oM=iM(),op=kc(),$b=class extends uZ.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,oM.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,op.isAppRootModel)(n)||t.internetAccountPreAuthorization)return t;let i=n.findAppropriateInternetAccount(t);return i&&r!=="MainThreadRpcDriver"&&(t.internetAccountPreAuthorization=await i.getPreAuthorizationInformation(t)),t}async deserializeArguments(t,r){return t.blobMap&&(0,oM.setBlobMap)(t.blobMap),t}async serializeReturn(t,r,n){return t}async deserializeReturn(t,r,n){var i;let o;try{o=await t}catch(a){if((0,op.isAuthNeededException)(a)){let u=(i=this.pluginManager.rootModel)===null||i===void 0?void 0:i.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(a.url).origin}`,{},a.url);throw new op.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,sZ.default)(t,i=>{(0,op.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};os.default=$b});var sM=b(Yb=>{"use strict";Object.defineProperty(Yb,"__esModule",{value:!0});var cZ=Lm(),Kb=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,cZ.stringToJexlExpression)(r),string:r};throw new Error(`invalid inputFilter string "${r}"`)})}passes(...t){for(let r of this.filterChain)if(!r.expr.evalSync({feature:t[0]}))return!1;return!0}toJSON(){return{filters:this.filterChain.map(t=>t.string)}}static fromJSON(t){return new e(t)}};Yb.default=Kb});var lM=b(as=>{"use strict";var cM=as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(as,"__esModule",{value:!0});var lZ=cM(uM()),fZ=Eo(),dZ=cM(sM()),Zb=class extends lZ.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new dZ.default({filters:t.filters}):void 0}}async serializeArguments(t,r){var n,i,o;let u=(i=(n=this.pluginManager.rootModel)===null||n===void 0?void 0:n.session)===null||i===void 0?void 0:i.assemblyManager;if(!u)throw new Error("no assembly manager");let l=await(0,fZ.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};as.default=Zb});var hZ={};fp(hZ,{default:()=>up});var wM=V(gg());var _g="1.2.3";var n0=V($r());var Yy=V(oh()),Zy=V(Cs()),Ua=V(Lt()),Jy=V(sh()),Ls=V(ks()),Xy=V(qs()),Qy=V(Iy());var Ht=null;try{Ht=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 Se(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}Se.prototype.__isLong__;Object.defineProperty(Se.prototype,"__isLong__",{value:!0});function ct(e){return(e&&e.__isLong__)===!0}function jy(e){var t=Math.clz32(e&-e);return e?31-t:t}Se.isLong=ct;var Fy={},Ly={};function mi(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=Ly[e],n)?n:(r=me(e,0,!0),i&&(Ly[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=Fy[e],n)?n:(r=me(e,e<0?-1:0,!1),i&&(Fy[e]=r),r))}Se.fromInt=mi;function Vt(e,t){if(isNaN(e))return t?Xr:ar;if(t){if(e<0)return Xr;if(e>=By)return Hy}else{if(e<=-Dy)return At;if(e+1>=Dy)return Wy}return e<0?Vt(-e,t).neg():me(e%so|0,e/so|0,t)}Se.fromNumber=Vt;function me(e,t,r){return new Se(e,t,r)}Se.fromBits=me;var Fs=Math.pow;function xh(e,t,r){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(r=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?Xr:ar;if(r=r||10,r<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return xh(e.substring(1),t,r).neg();for(var i=Vt(Fs(r,8)),o=ar,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+u),r);if(u<8){var s=Vt(Fs(r,u));o=o.mul(s).add(Vt(l))}else o=o.mul(i),o=o.add(Vt(l))}return o.unsigned=t,o}Se.fromString=xh;function Gt(e,t){return typeof e=="number"?Vt(e,t):typeof e=="string"?xh(e,t):me(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Se.fromValue=Gt;var Ny=65536,mq=1<<24,so=Ny*Ny,By=so*so,Dy=By/2,zy=mi(mq),ar=mi(0);Se.ZERO=ar;var Xr=mi(0,!0);Se.UZERO=Xr;var uo=mi(1);Se.ONE=uo;var Uy=mi(1,!0);Se.UONE=Uy;var wh=mi(-1);Se.NEG_ONE=wh;var Wy=me(-1,2147483647,!1);Se.MAX_VALUE=Wy;var Hy=me(-1,-1,!0);Se.MAX_UNSIGNED_VALUE=Hy;var At=me(0,-2147483648,!1);Se.MIN_VALUE=At;var U=Se.prototype;U.toInt=function(){return this.unsigned?this.low>>>0:this.low};U.toNumber=function(){return this.unsigned?(this.high>>>0)*so+(this.low>>>0):this.high*so+(this.low>>>0)};U.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(At)){var r=Vt(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=Vt(Fs(t,6),this.unsigned),a=this,u="";;){var l=a.div(o),s=a.sub(l.mul(o)).toInt()>>>0,c=s.toString(t);if(a=l,a.isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}};U.getHighBits=function(){return this.high};U.getHighBitsUnsigned=function(){return this.high>>>0};U.getLowBits=function(){return this.low};U.getLowBitsUnsigned=function(){return this.low>>>0};U.getNumBitsAbs=function(){if(this.isNegative())return this.eq(At)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return this.high!=0?r+33:r+1};U.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};U.isZero=function(){return this.high===0&&this.low===0};U.eqz=U.isZero;U.isNegative=function(){return!this.unsigned&&this.high<0};U.isPositive=function(){return this.unsigned||this.high>=0};U.isOdd=function(){return(this.low&1)===1};U.isEven=function(){return(this.low&1)===0};U.equals=function(t){return ct(t)||(t=Gt(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};U.eq=U.equals;U.notEquals=function(t){return!this.eq(t)};U.neq=U.notEquals;U.ne=U.notEquals;U.lessThan=function(t){return this.comp(t)<0};U.lt=U.lessThan;U.lessThanOrEqual=function(t){return this.comp(t)<=0};U.lte=U.lessThanOrEqual;U.le=U.lessThanOrEqual;U.greaterThan=function(t){return this.comp(t)>0};U.gt=U.greaterThan;U.greaterThanOrEqual=function(t){return this.comp(t)>=0};U.gte=U.greaterThanOrEqual;U.ge=U.greaterThanOrEqual;U.compare=function(t){if(ct(t)||(t=Gt(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?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};U.comp=U.compare;U.negate=function(){return!this.unsigned&&this.eq(At)?At:this.not().add(uo)};U.neg=U.negate;U.add=function(t){ct(t)||(t=Gt(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,s=t.low&65535,c=0,d=0,p=0,f=0;return f+=o+s,p+=f>>>16,f&=65535,p+=i+l,d+=p>>>16,p&=65535,d+=n+u,c+=d>>>16,d&=65535,c+=r+a,c&=65535,me(p<<16|f,c<<16|d,this.unsigned)};U.subtract=function(t){return ct(t)||(t=Gt(t)),this.add(t.neg())};U.sub=U.subtract;U.multiply=function(t){if(this.isZero())return this;if(ct(t)||(t=Gt(t)),Ht){var r=Ht.mul(this.low,this.high,t.low,t.high);return me(r,Ht.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Xr:ar;if(this.eq(At))return t.isOdd()?At:ar;if(t.eq(At))return this.isOdd()?At:ar;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(zy)&&t.lt(zy))return Vt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,u=t.high>>>16,l=t.high&65535,s=t.low>>>16,c=t.low&65535,d=0,p=0,f=0,h=0;return h+=a*c,f+=h>>>16,h&=65535,f+=o*c,p+=f>>>16,f&=65535,f+=a*s,p+=f>>>16,f&=65535,p+=i*c,d+=p>>>16,p&=65535,p+=o*s,d+=p>>>16,p&=65535,p+=a*l,d+=p>>>16,p&=65535,d+=n*c+i*s+o*l+a*u,d&=65535,me(f<<16|h,d<<16|p,this.unsigned)};U.mul=U.multiply;U.divide=function(t){if(ct(t)||(t=Gt(t)),t.isZero())throw Error("division by zero");if(Ht){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Ht.div_u:Ht.div_s)(this.low,this.high,t.low,t.high);return me(r,Ht.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Xr:ar;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Xr;if(t.gt(this.shru(1)))return Uy;o=Xr}else{if(this.eq(At)){if(t.eq(uo)||t.eq(wh))return At;if(t.eq(At))return uo;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(ar)?t.isNegative()?uo:wh:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(At))return this.unsigned?Xr:ar;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=ar}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(n)/Math.LN2),l=u<=48?1:Fs(2,u-48),s=Vt(n),c=s.mul(t);c.isNegative()||c.gt(i);)n-=l,s=Vt(n,this.unsigned),c=s.mul(t);s.isZero()&&(s=uo),o=o.add(s),i=i.sub(c)}return o};U.div=U.divide;U.modulo=function(t){if(ct(t)||(t=Gt(t)),Ht){var r=(this.unsigned?Ht.rem_u:Ht.rem_s)(this.low,this.high,t.low,t.high);return me(r,Ht.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};U.mod=U.modulo;U.rem=U.modulo;U.not=function(){return me(~this.low,~this.high,this.unsigned)};U.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};U.clz=U.countLeadingZeros;U.countTrailingZeros=function(){return this.low?jy(this.low):jy(this.high)+32};U.ctz=U.countTrailingZeros;U.and=function(t){return ct(t)||(t=Gt(t)),me(this.low&t.low,this.high&t.high,this.unsigned)};U.or=function(t){return ct(t)||(t=Gt(t)),me(this.low|t.low,this.high|t.high,this.unsigned)};U.xor=function(t){return ct(t)||(t=Gt(t)),me(this.low^t.low,this.high^t.high,this.unsigned)};U.shiftLeft=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?me(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):me(0,this.low<<t-32,this.unsigned)};U.shl=U.shiftLeft;U.shiftRight=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?me(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):me(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};U.shr=U.shiftRight;U.shiftRightUnsigned=function(t){return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?me(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?me(this.high,0,this.unsigned):me(this.high>>>t-32,0,this.unsigned)};U.shru=U.shiftRightUnsigned;U.shr_u=U.shiftRightUnsigned;U.rotateLeft=function(t){var r;return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?me(this.high,this.low,this.unsigned):t<32?(r=32-t,me(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,me(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};U.rotl=U.rotateLeft;U.rotateRight=function(t){var r;return ct(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?me(this.high,this.low,this.unsigned):t<32?(r=32-t,me(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,me(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};U.rotr=U.rotateRight;U.toSigned=function(){return this.unsigned?me(this.low,this.high,!1):this};U.toUnsigned=function(){return this.unsigned?this:me(this.low,this.high,!0)};U.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};U.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};U.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};Se.fromBytes=function(t,r,n){return n?Se.fromBytesLE(t,r):Se.fromBytesBE(t,r)};Se.fromBytesLE=function(t,r){return new Se(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Se.fromBytesBE=function(t,r){return new Se(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};typeof BigInt=="function"&&(Se.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),i=Number(BigInt.asIntN(32,t>>BigInt(32)));return me(n,i,r)},Se.fromValue=function(t,r){return typeof t=="bigint"?fromBigInt(t,r):Gt(t,r)},U.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});var Vy=Se;var Ba=class{blockPosition;dataPosition;constructor(t,r){this.blockPosition=t,this.dataPosition=r}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}};function vi(e){let t=[],r={},n=e.split(/\s*(;|\(|\)|,|:)\s*/);for(let i=0;i<n.length;i++){let o=n[i],a={};switch(o){case"(":r.children=[a],t.push(r),r=a;break;case",":t.at(-1)?.children.push(a),r=a;break;case")":r=t.pop();break;case":":break;default:{let u=n[i-1];u===")"||u==="("||u===","?r.name=o:u===":"&&(r.length=Number.parseFloat(o))}}}return r}function vq(e){return typeof e[0]=="string"}function _n(e){return vq(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function Gy(e){let t=e.split(" "),r=[];for(let n=0;n<t.length;){let i=t[n++];if(i==="i"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}if(i==="s"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}else i==="d"?r.push({type:i,row:+t[n++]}):i==="g"?r.push({type:i,row:+t[n++],gapLen:+t[n++]}):i==="G"&&r.push({type:i,row:+t[n++],gapSubstring:t[n++]})}return r}function $y(e,t){let r=0,n=[],i=new TextDecoder("utf8");for(;r<e.length;){let o=e.indexOf(10,r);if(o===-1)break;let a=e.subarray(r,o),u=i.decode(a).trim();if(u){let l=t(u);l&&n.push(l)}r=o+1}return n}var Ky=(e=0)=>+(+e).toFixed(1),Wa=class extends Zy.BaseFeatureDataAdapter{setupP;cache=new Qy.default({cache:new Jy.default({maxSize:50}),fill:async({nextEntry:t,firstEntry:r},n,i)=>{let a=await(0,Ls.openLocation)(this.getConf("tafGzLocation")).read(t.virtualOffset.blockPosition-r.virtualOffset.blockPosition,r.virtualOffset.blockPosition),l=(await(0,Yy.unzip)(a)).slice(r.virtualOffset.dataPosition);return this.getChunk(l,{statusCallback:i,signal:n})}});async getRefNames(){let t=await this.setup();return Object.keys(t)}async getChunk(t,r){let{statusCallback:n=()=>{}}=r||{},i={},o=[],a,u=0,l=0;if($y(t,s=>{if(u++%100===0&&n(`Processing ${Ky(l/1e6)}/${Ky(t.length/1e6)}Mb`),l+=s.length,s){let[c,d]=s.split(" ; ");if(d){for(let f of Gy(d))if(f.type==="i"){o.splice(f.row,0,f),i[f.asm]||(i[f.asm]={start:f.start,strand:f.strand,srcSize:f.length,chr:f.ref,data:""});let h=i[f.asm];h.data+=" ".repeat(Math.max(0,u-h.data.length-1))}else if(f.type==="s"){i[f.asm]||(i[f.asm]={start:f.start,strand:f.strand,srcSize:f.length,chr:f.ref,data:""});let h=i[f.asm];h.data+=" ".repeat(Math.max(0,u-h.data.length-1)),o[f.row]=f}else f.type==="d"&&o.splice(f.row,1);a||(a=o[0])}let p=c.length;for(let f=0;f<p;f++){let h=c[f],m=o[f];m&&(i[m.asm].data+=h)}}}),a){let s=i[a.asm];return{uniqueId:`${s.start}-${s.data.length}`,start:s.start,end:s.start+s.data.length,strand:s.strand,alignments:i,seq:s.data}}}setupPre(){return this.setupP||(this.setupP=this.readTaiFile().catch(t=>{throw this.setupP=void 0,t})),this.setupP}setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,Ua.updateStatus)("Downloading index",r,()=>this.setupPre())}async readTaiFile(){let r=(await(0,Ls.openLocation)(this.getConf("taiLocation")).readFile("utf8")).split(`
7
- `).map(u=>u.trim()).filter(u=>!!u),n={},i="",o=0,a=0;for(let u of r){let[l,s,c]=u.split(" "),d=a+ +c,p=l==="*"?i:l.split(".").at(-1),f=Vy.fromNumber(d),h=f.shiftRightUnsigned(16),m=f.and(65535),g=new Ba(h.toNumber(),m.toNumber());n[p]||(n[p]=[],i="",o=0,a=0);let _=+s+o;n[p].push({chrStart:_,virtualOffset:g}),i=p,o=_,a=d}return n}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,Xy.ObservableCreate)(async i=>{try{let o=await this.setup(),a=await(0,Ua.updateStatus)("Downloading alignments",n,()=>this.getLines(t,o));a?i.next(new Ua.SimpleFeature({...a,refName:t.refName})):console.error("no feature found"),n(""),i.complete()}catch(o){i.error(o)}})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ls.openLocation)(r).readFile("utf8");return{samples:_n(this.getConf("samples")),tree:n?vi(n):void 0}}async getLines(t,r){let n=r[t.refName];if(n){let i,o;for(let a=0;a<n.length;a++)if(n[a].chrStart>=t.start){i=n[Math.max(a-1,0)];break}for(let a=0;a<n.length;a++)if(t.end<=n[a].chrStart){o=n[a+1];break}if(o=o??n.at(-1),i&&o)return this.cache.get(`${JSON.stringify(o)}_${JSON.stringify(i)}`,{nextEntry:o,firstEntry:i})}}freeResources(){}};var t0=V(yn());var bq=(0,t0.ConfigurationSchema)("BgzipTaffyAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},tafGzLocation:{type:"fileLocation",description:"bgzip taffy file",defaultValue:{uri:"/path/to/my.taf",locationType:"UriLocation"}},taiLocation:{type:"fileLocation",description:"taffy index",defaultValue:{uri:"/path/to/my.taf.gz.tai",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),r0=bq;function Sh(e){return e.addAdapterType(()=>new n0.AdapterType({name:"BgzipTaffyAdapter",AdapterClass:Wa,configSchema:r0}))}var x0=V($r());var v0=V(Cs()),Ws=V(Lt()),b0=V(ks()),g0=V(qs()),_0=V(vt());var Oh=function(e,t){return Oh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Oh(e,t)};function Ha(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Oh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Eh(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function co(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function lo(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Mr(e){return typeof e=="function"}function Ns(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ds=Ns(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
5
+ `):"",this.name="UnsubscriptionError",this.errors=r}})});var Zr=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.arrRemove=void 0;function xF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}Bc.arrRemove=xF});var Ft=b(Ct=>{"use strict";var _O=Ct&&Ct.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},wO=Ct&&Ct.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},xO=Ct&&Ct.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isSubscription=Ct.EMPTY_SUBSCRIPTION=Ct.Subscription=void 0;var ku=Me(),dm=fm(),SO=Zr(),pm=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=_O(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(v){t={error:v}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(ku.isFunction(c))try{c()}catch(v){o=v instanceof dm.UnsubscriptionError?v.errors:[v]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=_O(d),f=p.next();!f.done;f=p.next()){var h=f.value;try{OO(h)}catch(v){o=o??[],v instanceof dm.UnsubscriptionError?o=xO(xO([],wO(o)),wO(v.errors)):o.push(v)}}}catch(v){n={error:v}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new dm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)OO(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&SO.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&SO.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Ct.Subscription=pm;Ct.EMPTY_SUBSCRIPTION=pm.EMPTY;function SF(e){return e instanceof pm||e&&"closed"in e&&ku.isFunction(e.remove)&&ku.isFunction(e.add)&&ku.isFunction(e.unsubscribe)}Ct.isSubscription=SF;function OO(e){ku.isFunction(e)?e():e.unsubscribe()}});var Po=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.config=void 0;zc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var hm=b(kr=>{"use strict";var EO=kr&&kr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},AO=kr&&kr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(kr,"__esModule",{value:!0});kr.timeoutProvider=void 0;kr.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=kr.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,AO([e,t],EO(r))):setTimeout.apply(void 0,AO([e,t],EO(r)))},clearTimeout:function(e){var t=kr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var vm=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.reportUnhandledError=void 0;var OF=Po(),EF=hm();function AF(e){EF.timeoutProvider.setTimeout(function(){var t=OF.config.onUnhandledError;if(t)t(e);else throw e})}Uc.reportUnhandledError=AF});var ut=b(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.noop=void 0;function PF(){}Wc.noop=PF});var PO=b(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.createNotification=Cr.nextNotification=Cr.errorNotification=Cr.COMPLETE_NOTIFICATION=void 0;Cr.COMPLETE_NOTIFICATION=function(){return Vc("C",void 0,void 0)}();function TF(e){return Vc("E",void 0,e)}Cr.errorNotification=TF;function RF(e){return Vc("N",e,void 0)}Cr.nextNotification=RF;function Vc(e,t,r){return{kind:e,value:t,error:r}}Cr.createNotification=Vc});var $c=b(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.captureError=To.errorContext=void 0;var TO=Po(),Ei=null;function MF(e){if(TO.config.useDeprecatedSynchronousErrorHandling){var t=!Ei;if(t&&(Ei={errorThrown:!1,error:null}),e(),t){var r=Ei,n=r.errorThrown,i=r.error;if(Ei=null,n)throw i}}else e()}To.errorContext=MF;function kF(e){TO.config.useDeprecatedSynchronousErrorHandling&&Ei&&(Ei.errorThrown=!0,Ei.error=e)}To.captureError=kF});var Ro=b(cr=>{"use strict";var kO=cr&&cr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(cr,"__esModule",{value:!0});cr.EMPTY_OBSERVER=cr.SafeSubscriber=cr.Subscriber=void 0;var CF=Me(),RO=Ft(),ym=Po(),qF=vm(),MO=ut(),mm=PO(),IF=hm(),jF=$c(),CO=function(e){kO(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,RO.isSubscription(r)&&r.add(n)):n.destination=cr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new qO(r,n,i)},t.prototype.next=function(r){this.isStopped?gm(mm.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?gm(mm.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?gm(mm.COMPLETE_NOTIFICATION,this):(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(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(RO.Subscription);cr.Subscriber=CO;var LF=Function.prototype.bind;function bm(e,t){return LF.call(e,t)}var FF=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Hc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Hc(n)}else Hc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Hc(r)}},e}(),qO=function(e){kO(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(CF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&ym.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&bm(r.next,u),error:r.error&&bm(r.error,u),complete:r.complete&&bm(r.complete,u)}):a=r}return o.destination=new FF(a),o}return t}(CO);cr.SafeSubscriber=qO;function Hc(e){ym.config.useDeprecatedSynchronousErrorHandling?jF.captureError(e):qF.reportUnhandledError(e)}function NF(e){throw e}function gm(e,t){var r=ym.config.onStoppedNotification;r&&IF.timeoutProvider.setTimeout(function(){return r(e,t)})}cr.EMPTY_OBSERVER={closed:!0,next:MO.noop,error:NF,complete:MO.noop}});var Cu=b(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.observable=void 0;Gc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var st=b(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.identity=void 0;function DF(e){return e}Kc.identity=DF});var qu=b(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.pipeFromArray=Mo.pipe=void 0;var BF=st();function zF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return IO(e)}Mo.pipe=zF;function IO(e){return e.length===0?BF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Mo.pipeFromArray=IO});var Ce=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.Observable=void 0;var wm=Ro(),UF=Ft(),WF=Cu(),VF=qu(),$F=Po(),_m=Me(),HF=$c(),GF=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=ZF(t)?t:new wm.SafeSubscriber(t,r,n);return HF.errorContext(function(){var a=i,u=a.operator,l=a.source;o.add(u?u.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=jO(r),new r(function(i,o){var a=new wm.SafeSubscriber({next:function(u){try{t(u)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[WF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return VF.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=jO(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();Zc.Observable=GF;function jO(e){var t;return(t=e??$F.config.Promise)!==null&&t!==void 0?t:Promise}function KF(e){return e&&_m.isFunction(e.next)&&_m.isFunction(e.error)&&_m.isFunction(e.complete)}function ZF(e){return e&&e instanceof wm.Subscriber||KF(e)&&UF.isSubscription(e)}});var G=b(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.operate=ko.hasLift=void 0;var YF=Me();function LO(e){return YF.isFunction(e?.lift)}ko.hasLift=LO;function JF(e){return function(t){if(LO(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}ko.operate=JF});var ee=b(Pn=>{"use strict";var XF=Pn&&Pn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.OperatorSubscriber=Pn.createOperatorSubscriber=void 0;var QF=Ro();function eN(e,t,r,n,i){return new FO(e,t,r,n,i)}Pn.createOperatorSubscriber=eN;var FO=function(e){XF(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(QF.Subscriber);Pn.OperatorSubscriber=FO});var xm=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.refCount=void 0;var tN=G(),rN=ee();function nN(){return tN.operate(function(e,t){var r=null;e._refCount++;var n=rN.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var i=e._connection,o=r;r=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}Yc.refCount=nN});var Iu=b(Co=>{"use strict";var iN=Co&&Co.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Co,"__esModule",{value:!0});Co.ConnectableObservable=void 0;var oN=Ce(),NO=Ft(),aN=xm(),uN=ee(),sN=G(),cN=function(e){iN(t,e);function t(r,n){var i=e.call(this)||this;return i.source=r,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,sN.hasLift(r)&&(i.lift=r.lift),i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new NO.Subscription;var i=this.getSubject();n.add(this.source.subscribe(uN.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(o){r._teardown(),i.error(o)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=NO.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return aN.refCount()(this)},t}(oN.Observable);Co.ConnectableObservable=cN});var DO=b(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.performanceTimestampProvider=void 0;ju.performanceTimestampProvider={now:function(){return(ju.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Sm=b(lr=>{"use strict";var BO=lr&&lr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},zO=lr&&lr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(lr,"__esModule",{value:!0});lr.animationFrameProvider=void 0;var lN=Ft();lr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=lr.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new lN.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lr.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,zO([],BO(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lr.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,zO([],BO(e)))},delegate:void 0}});var VO=b(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.animationFrames=void 0;var fN=Ce(),dN=DO(),UO=Sm();function pN(e){return e?WO(e):hN}Jc.animationFrames=pN;function WO(e){return new fN.Observable(function(t){var r=e||dN.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=UO.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&UO.animationFrameProvider.cancelAnimationFrame(i)}})}var hN=WO()});var Om=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.ObjectUnsubscribedError=void 0;var vN=An();Xc.ObjectUnsubscribedError=vN.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ct=b(qr=>{"use strict";var HO=qr&&qr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),mN=qr&&qr.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(qr,"__esModule",{value:!0});qr.AnonymousSubject=qr.Subject=void 0;var $O=Ce(),Am=Ft(),bN=Om(),gN=Zr(),Em=$c(),GO=function(e){HO(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new Pm(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new bN.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Em.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=mN(n.currentObservers),u=a.next();!u.done;u=a.next()){var l=u.value;l.next(r)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Em.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;Em.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,u=i.observers;return o||a?Am.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Am.Subscription(function(){n.currentObservers=null,gN.arrRemove(u,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new $O.Observable;return r.source=this,r},t.create=function(r,n){return new Pm(r,n)},t}($O.Observable);qr.Subject=GO;var Pm=function(e){HO(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Am.EMPTY_SUBSCRIPTION},t}(GO);qr.AnonymousSubject=Pm});var Tm=b(qo=>{"use strict";var yN=qo&&qo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qo,"__esModule",{value:!0});qo.BehaviorSubject=void 0;var _N=ct(),wN=function(e){yN(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(_N.Subject);qo.BehaviorSubject=wN});var Qc=b(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.dateTimestampProvider=void 0;Lu.dateTimestampProvider={now:function(){return(Lu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var el=b(Io=>{"use strict";var xN=Io&&Io.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Io,"__esModule",{value:!0});Io.ReplaySubject=void 0;var SN=ct(),ON=Qc(),EN=function(e){xN(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=ON.dateTimestampProvider);var o=e.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return t.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,u=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+l)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,u=a.slice(),l=0;l<u.length&&!r.closed;l+=o?1:2)r.next(u[l]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,u=(a?1:2)*n;if(n<1/0&&u<o.length&&o.splice(0,o.length-u),!a){for(var l=i.now(),s=0,c=1;c<o.length&&o[c]<=l;c+=2)s=c;s&&o.splice(0,s+1)}},t}(SN.Subject);Io.ReplaySubject=EN});var tl=b(jo=>{"use strict";var AN=jo&&jo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(jo,"__esModule",{value:!0});jo.AsyncSubject=void 0;var PN=ct(),TN=function(e){AN(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n._hasValue,a=n._value,u=n.thrownError,l=n.isStopped,s=n._isComplete;i?r.error(u):(l||s)&&(o&&r.next(a),r.complete())},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=!0)},t.prototype.complete=function(){var r=this,n=r._hasValue,i=r._value,o=r._isComplete;o||(this._isComplete=!0,n&&e.prototype.next.call(this,i),e.prototype.complete.call(this))},t}(PN.Subject);jo.AsyncSubject=TN});var KO=b(Lo=>{"use strict";var RN=Lo&&Lo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.Action=void 0;var MN=Ft(),kN=function(e){RN(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(MN.Subscription);Lo.Action=kN});var JO=b(Ir=>{"use strict";var ZO=Ir&&Ir.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},YO=Ir&&Ir.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.intervalProvider=void 0;Ir.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Ir.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,YO([e,t],ZO(r))):setInterval.apply(void 0,YO([e,t],ZO(r)))},clearInterval:function(e){var t=Ir.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var No=b(Fo=>{"use strict";var CN=Fo&&Fo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.AsyncAction=void 0;var qN=KO(),XO=JO(),IN=Zr(),jN=function(e){CN(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return t.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),XO.intervalProvider.setInterval(r.flush.bind(r,this),i)},t.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&XO.intervalProvider.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,IN.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(qN.Action);Fo.AsyncAction=jN});var eE=b(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TestTools=Do.Immediate=void 0;var LN=1,Rm,rl={};function QO(e){return e in rl?(delete rl[e],!0):!1}Do.Immediate={setImmediate:function(e){var t=LN++;return rl[t]=!0,Rm||(Rm=Promise.resolve()),Rm.then(function(){return QO(t)&&e()}),t},clearImmediate:function(e){QO(e)}};Do.TestTools={pending:function(){return Object.keys(rl).length}}});var rE=b(jr=>{"use strict";var FN=jr&&jr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},NN=jr&&jr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(jr,"__esModule",{value:!0});jr.immediateProvider=void 0;var tE=eE(),DN=tE.Immediate.setImmediate,BN=tE.Immediate.clearImmediate;jr.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=jr.immediateProvider.delegate;return(r?.setImmediate||DN).apply(void 0,NN([],FN(e)))},clearImmediate:function(e){var t=jr.immediateProvider.delegate;return(t?.clearImmediate||BN)(e)},delegate:void 0}});var iE=b(Bo=>{"use strict";var zN=Bo&&Bo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.AsapAction=void 0;var UN=No(),nE=rE(),WN=function(e){zN(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=nE.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&(nE.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(UN.AsyncAction);Bo.AsapAction=WN});var Mm=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.Scheduler=void 0;var VN=Qc(),$N=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=VN.dateTimestampProvider.now,e}();nl.Scheduler=$N});var Uo=b(zo=>{"use strict";var HN=zo&&zo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(zo,"__esModule",{value:!0});zo.AsyncScheduler=void 0;var oE=Mm(),GN=function(e){HN(t,e);function t(r,n){n===void 0&&(n=oE.Scheduler.now);var i=e.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},t}(oE.Scheduler);zo.AsyncScheduler=GN});var aE=b(Wo=>{"use strict";var KN=Wo&&Wo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wo,"__esModule",{value:!0});Wo.AsapScheduler=void 0;var ZN=Uo(),YN=function(e){KN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(ZN.AsyncScheduler);Wo.AsapScheduler=YN});var uE=b(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.asap=Ai.asapScheduler=void 0;var JN=iE(),XN=aE();Ai.asapScheduler=new XN.AsapScheduler(JN.AsapAction);Ai.asap=Ai.asapScheduler});var qt=b(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.async=Pi.asyncScheduler=void 0;var QN=No(),eD=Uo();Pi.asyncScheduler=new eD.AsyncScheduler(QN.AsyncAction);Pi.async=Pi.asyncScheduler});var sE=b(Vo=>{"use strict";var tD=Vo&&Vo.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.QueueAction=void 0;var rD=No(),nD=function(e){tD(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.flush(this),0)},t}(rD.AsyncAction);Vo.QueueAction=nD});var cE=b($o=>{"use strict";var iD=$o&&$o.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($o,"__esModule",{value:!0});$o.QueueScheduler=void 0;var oD=Uo(),aD=function(e){iD(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(oD.AsyncScheduler);$o.QueueScheduler=aD});var lE=b(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.queue=Ti.queueScheduler=void 0;var uD=sE(),sD=cE();Ti.queueScheduler=new sD.QueueScheduler(uD.QueueAction);Ti.queue=Ti.queueScheduler});var dE=b(Ho=>{"use strict";var cD=Ho&&Ho.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.AnimationFrameAction=void 0;var lD=No(),fE=Sm(),fD=function(e){cD(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i}return t.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),i!==null&&i>0?e.prototype.requestAsyncId.call(this,r,n,i):(r.actions.push(this),r._scheduled||(r._scheduled=fE.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,i){var o;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,i);var a=r.actions;n!=null&&n===r._scheduled&&((o=a[a.length-1])===null||o===void 0?void 0:o.id)!==n&&(fE.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(lD.AsyncAction);Ho.AnimationFrameAction=fD});var pE=b(Go=>{"use strict";var dD=Go&&Go.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Go,"__esModule",{value:!0});Go.AnimationFrameScheduler=void 0;var pD=Uo(),hD=function(e){dD(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n;r?n=r.id:(n=this._scheduled,this._scheduled=void 0);var i=this.actions,o;r=r||i.shift();do if(o=r.execute(r.state,r.delay))break;while((r=i[0])&&r.id===n&&i.shift());if(this._active=!1,o){for(;(r=i[0])&&r.id===n&&i.shift();)r.unsubscribe();throw o}},t}(pD.AsyncScheduler);Go.AnimationFrameScheduler=hD});var hE=b(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.animationFrame=Ri.animationFrameScheduler=void 0;var vD=dE(),mD=pE();Ri.animationFrameScheduler=new mD.AnimationFrameScheduler(vD.AnimationFrameAction);Ri.animationFrame=Ri.animationFrameScheduler});var bE=b(Tn=>{"use strict";var vE=Tn&&Tn.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.VirtualAction=Tn.VirtualTimeScheduler=void 0;var bD=No(),gD=Ft(),yD=Uo(),_D=function(e){vE(t,e);function t(r,n){r===void 0&&(r=mE),n===void 0&&(n=1/0);var i=e.call(this,r,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return t.prototype.flush=function(){for(var r=this,n=r.actions,i=r.maxFrames,o,a;(a=n[0])&&a.delay<=i&&(n.shift(),this.frame=a.delay,!(o=a.execute(a.state,a.delay))););if(o){for(;a=n.shift();)a.unsubscribe();throw o}},t.frameTimeFactor=10,t}(yD.AsyncScheduler);Tn.VirtualTimeScheduler=_D;var mE=function(e){vE(t,e);function t(r,n,i){i===void 0&&(i=r.index+=1);var o=e.call(this,r,n)||this;return o.scheduler=r,o.work=n,o.index=i,o.active=!0,o.index=r.index=i,o}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}else return gD.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,i){i===void 0&&(i=0),this.delay=r.frame+i;var o=r.actions;return o.push(this),o.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,i){i===void 0&&(i=0)},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(bD.AsyncAction);Tn.VirtualAction=mE});var fr=b(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.empty=Mi.EMPTY=void 0;var gE=Ce();Mi.EMPTY=new gE.Observable(function(e){return e.complete()});function wD(e){return e?xD(e):Mi.EMPTY}Mi.empty=wD;function xD(e){return new gE.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Fu=b(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.isScheduler=void 0;var SD=Me();function OD(e){return e&&SD.isFunction(e.schedule)}il.isScheduler=OD});var It=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.popNumber=Rn.popScheduler=Rn.popResultSelector=void 0;var ED=Me(),AD=Fu();function km(e){return e[e.length-1]}function PD(e){return ED.isFunction(km(e))?e.pop():void 0}Rn.popResultSelector=PD;function TD(e){return AD.isScheduler(km(e))?e.pop():void 0}Rn.popScheduler=TD;function RD(e,t){return typeof km(e)=="number"?e.pop():t}Rn.popNumber=RD});var al=b(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.isArrayLike=void 0;ol.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var Cm=b(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.isPromise=void 0;var MD=Me();function kD(e){return MD.isFunction(e?.then)}ul.isPromise=kD});var qm=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.isInteropObservable=void 0;var CD=Cu(),qD=Me();function ID(e){return qD.isFunction(e[CD.observable])}sl.isInteropObservable=ID});var Im=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.isAsyncIterable=void 0;var jD=Me();function LD(e){return Symbol.asyncIterator&&jD.isFunction(e?.[Symbol.asyncIterator])}cl.isAsyncIterable=LD});var jm=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.createInvalidObservableTypeError=void 0;function FD(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.")}ll.createInvalidObservableTypeError=FD});var Lm=b(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.iterator=Ko.getSymbolIterator=void 0;function yE(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Ko.getSymbolIterator=yE;Ko.iterator=yE()});var Fm=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.isIterable=void 0;var ND=Lm(),DD=Me();function BD(e){return DD.isFunction(e?.[ND.iterator])}fl.isIterable=BD});var dl=b(Jt=>{"use strict";var zD=Jt&&Jt.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Zo=Jt&&Jt.__await||function(e){return this instanceof Zo?(this.v=e,this):new Zo(e)},UD=Jt&&Jt.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(p){n[p]&&(i[p]=function(f){return new Promise(function(h,v){o.push([p,f,h,v])>1||u(p,f)})})}function u(p,f){try{l(n[p](f))}catch(h){d(o[0][3],h)}}function l(p){p.value instanceof Zo?Promise.resolve(p.value.v).then(s,c):d(o[0][2],p)}function s(p){u("next",p)}function c(p){u("throw",p)}function d(p,f){p(f),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.isReadableStreamLike=Jt.readableStreamLikeToAsyncGenerator=void 0;var WD=Me();function VD(e){return UD(this,arguments,function(){var r,n,i,o;return zD(this,function(a){switch(a.label){case 0:r=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Zo(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,Zo(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Zo(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Jt.readableStreamLikeToAsyncGenerator=VD;function $D(e){return WD.isFunction(e?.getReader)}Jt.isReadableStreamLike=$D});var pe=b(De=>{"use strict";var HD=De&&De.__awaiter||function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function u(c){try{s(n.next(c))}catch(d){a(d)}}function l(c){try{s(n.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((n=n.apply(e,t||[])).next())})},GD=De&&De.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},KD=De&&De.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Nm=="function"?Nm(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,l){a=e[o](a),i(u,l,a.done,a.value)})}}function i(o,a,u,l){Promise.resolve(l).then(function(s){o({value:s,done:u})},a)}},Nm=De&&De.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(De,"__esModule",{value:!0});De.fromReadableStreamLike=De.fromAsyncIterable=De.fromIterable=De.fromPromise=De.fromArrayLike=De.fromInteropObservable=De.innerFrom=void 0;var ZD=al(),YD=Cm(),Yo=Ce(),JD=qm(),XD=Im(),QD=jm(),e5=Fm(),_E=dl(),t5=Me(),r5=vm(),n5=Cu();function i5(e){if(e instanceof Yo.Observable)return e;if(e!=null){if(JD.isInteropObservable(e))return wE(e);if(ZD.isArrayLike(e))return xE(e);if(YD.isPromise(e))return SE(e);if(XD.isAsyncIterable(e))return Dm(e);if(e5.isIterable(e))return OE(e);if(_E.isReadableStreamLike(e))return EE(e)}throw QD.createInvalidObservableTypeError(e)}De.innerFrom=i5;function wE(e){return new Yo.Observable(function(t){var r=e[n5.observable]();if(t5.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}De.fromInteropObservable=wE;function xE(e){return new Yo.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}De.fromArrayLike=xE;function SE(e){return new Yo.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,r5.reportUnhandledError)})}De.fromPromise=SE;function OE(e){return new Yo.Observable(function(t){var r,n;try{for(var i=Nm(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()})}De.fromIterable=OE;function Dm(e){return new Yo.Observable(function(t){o5(e,t).catch(function(r){return t.error(r)})})}De.fromAsyncIterable=Dm;function EE(e){return Dm(_E.readableStreamLikeToAsyncGenerator(e))}De.fromReadableStreamLike=EE;function o5(e,t){var r,n,i,o;return HD(this,void 0,void 0,function(){var a,u;return GD(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=KD(e),l.label=1;case 1:return[4,r.next()];case 2:if(n=l.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=l.sent(),i={error:u},[3,11];case 6:return l.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:l.sent(),l.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]}})})}});var Yr=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.executeSchedule=void 0;function a5(e,t,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}pl.executeSchedule=a5});var Nu=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.observeOn=void 0;var Bm=Yr(),u5=G(),s5=ee();function c5(e,t){return t===void 0&&(t=0),u5.operate(function(r,n){r.subscribe(s5.createOperatorSubscriber(n,function(i){return Bm.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return Bm.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return Bm.executeSchedule(n,e,function(){return n.error(i)},t)}))})}hl.observeOn=c5});var Du=b(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.subscribeOn=void 0;var l5=G();function f5(e,t){return t===void 0&&(t=0),l5.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}vl.subscribeOn=f5});var AE=b(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.scheduleObservable=void 0;var d5=pe(),p5=Nu(),h5=Du();function v5(e,t){return d5.innerFrom(e).pipe(h5.subscribeOn(t),p5.observeOn(t))}ml.scheduleObservable=v5});var PE=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.schedulePromise=void 0;var m5=pe(),b5=Nu(),g5=Du();function y5(e,t){return m5.innerFrom(e).pipe(g5.subscribeOn(t),b5.observeOn(t))}bl.schedulePromise=y5});var TE=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.scheduleArray=void 0;var _5=Ce();function w5(e,t){return new _5.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}gl.scheduleArray=w5});var zm=b(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.scheduleIterable=void 0;var x5=Ce(),S5=Lm(),O5=Me(),RE=Yr();function E5(e,t){return new x5.Observable(function(r){var n;return RE.executeSchedule(r,t,function(){n=e[S5.iterator](),RE.executeSchedule(r,t,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(u){r.error(u);return}a?r.complete():r.next(o)},0,!0)}),function(){return O5.isFunction(n?.return)&&n.return()}})}yl.scheduleIterable=E5});var Um=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.scheduleAsyncIterable=void 0;var A5=Ce(),ME=Yr();function P5(e,t){if(!e)throw new Error("Iterable cannot be null");return new A5.Observable(function(r){ME.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();ME.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}_l.scheduleAsyncIterable=P5});var kE=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.scheduleReadableStreamLike=void 0;var T5=Um(),R5=dl();function M5(e,t){return T5.scheduleAsyncIterable(R5.readableStreamLikeToAsyncGenerator(e),t)}wl.scheduleReadableStreamLike=M5});var Wm=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.scheduled=void 0;var k5=AE(),C5=PE(),q5=TE(),I5=zm(),j5=Um(),L5=qm(),F5=Cm(),N5=al(),D5=Fm(),B5=Im(),z5=jm(),U5=dl(),W5=kE();function V5(e,t){if(e!=null){if(L5.isInteropObservable(e))return k5.scheduleObservable(e,t);if(N5.isArrayLike(e))return q5.scheduleArray(e,t);if(F5.isPromise(e))return C5.schedulePromise(e,t);if(B5.isAsyncIterable(e))return j5.scheduleAsyncIterable(e,t);if(D5.isIterable(e))return I5.scheduleIterable(e,t);if(U5.isReadableStreamLike(e))return W5.scheduleReadableStreamLike(e,t)}throw z5.createInvalidObservableTypeError(e)}xl.scheduled=V5});var Jr=b(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.from=void 0;var $5=Wm(),H5=pe();function G5(e,t){return t?$5.scheduled(e,t):H5.innerFrom(e)}Sl.from=G5});var El=b(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.of=void 0;var K5=It(),Z5=Jr();function Y5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=K5.popScheduler(e);return Z5.from(e,r)}Ol.of=Y5});var Vm=b(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.throwError=void 0;var J5=Ce(),X5=Me();function Q5(e,t){var r=X5.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new J5.Observable(t?function(i){return t.schedule(n,0,i)}:n)}Al.throwError=Q5});var Pl=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.observeNotification=Xr.Notification=Xr.NotificationKind=void 0;var e6=fr(),t6=El(),r6=Vm(),n6=Me(),i6;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(i6=Xr.NotificationKind||(Xr.NotificationKind={}));var o6=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return CE(this,t)},e.prototype.do=function(t,r,n){var i=this,o=i.kind,a=i.value,u=i.error;return o==="N"?t?.(a):o==="E"?r?.(u):n?.()},e.prototype.accept=function(t,r,n){var i;return n6.isFunction((i=t)===null||i===void 0?void 0:i.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,i=t.error,o=r==="N"?t6.of(n):r==="E"?r6.throwError(function(){return i}):r==="C"?e6.EMPTY:0;if(!o)throw new TypeError("Unexpected notification kind "+r);return o},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();Xr.Notification=o6;function CE(e,t){var r,n,i,o=e,a=o.kind,u=o.value,l=o.error;if(typeof a!="string")throw new TypeError('Invalid notification, missing "kind"');a==="N"?(r=t.next)===null||r===void 0||r.call(t,u):a==="E"?(n=t.error)===null||n===void 0||n.call(t,l):(i=t.complete)===null||i===void 0||i.call(t)}Xr.observeNotification=CE});var IE=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.isObservable=void 0;var a6=Ce(),qE=Me();function u6(e){return!!e&&(e instanceof a6.Observable||qE.isFunction(e.lift)&&qE.isFunction(e.subscribe))}Tl.isObservable=u6});var Mn=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.EmptyError=void 0;var s6=An();Rl.EmptyError=s6.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var jE=b(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.lastValueFrom=void 0;var c6=Mn();function l6(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=!1,a;e.subscribe({next:function(u){a=u,o=!0},error:i,complete:function(){o?n(a):r?n(t.defaultValue):i(new c6.EmptyError)}})})}Ml.lastValueFrom=l6});var LE=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.firstValueFrom=void 0;var f6=Mn(),d6=Ro();function p6(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new d6.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new f6.EmptyError)}});e.subscribe(o)})}kl.firstValueFrom=p6});var $m=b(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.ArgumentOutOfRangeError=void 0;var h6=An();Cl.ArgumentOutOfRangeError=h6.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var Hm=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.NotFoundError=void 0;var v6=An();ql.NotFoundError=v6.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var Gm=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.SequenceError=void 0;var m6=An();Il.SequenceError=m6.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var Ll=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.isValidDate=void 0;function b6(e){return e instanceof Date&&!isNaN(e)}jl.isValidDate=b6});var Fl=b(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.timeout=ki.TimeoutError=void 0;var g6=qt(),y6=Ll(),_6=G(),w6=pe(),x6=An(),S6=ee(),O6=Yr();ki.TimeoutError=x6.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function E6(e,t){var r=y6.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?A6:o,u=r.scheduler,l=u===void 0?t??g6.asyncScheduler:u,s=r.meta,c=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return _6.operate(function(d,p){var f,h,v=null,g=0,y=function(w){h=O6.executeSchedule(p,l,function(){try{f.unsubscribe(),w6.innerFrom(a({meta:c,lastValue:v,seen:g})).subscribe(p)}catch(_){p.error(_)}},w)};f=d.subscribe(S6.createOperatorSubscriber(p,function(w){h?.unsubscribe(),g++,p.next(v=w),i>0&&y(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),v=null})),!g&&y(n!=null?typeof n=="number"?n:+n-l.now():i)})}ki.timeout=E6;function A6(e){throw new ki.TimeoutError(e)}});var kn=b(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.map=void 0;var P6=G(),T6=ee();function R6(e,t){return P6.operate(function(r,n){var i=0;r.subscribe(T6.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}Nl.map=R6});var qn=b(Cn=>{"use strict";var M6=Cn&&Cn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},k6=Cn&&Cn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.mapOneOrManyArgs=void 0;var C6=kn(),q6=Array.isArray;function I6(e,t){return q6(t)?e.apply(void 0,k6([],M6(t))):e(t)}function j6(e){return C6.map(function(t){return I6(e,t)})}Cn.mapOneOrManyArgs=j6});var Zm=b(In=>{"use strict";var L6=In&&In.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},FE=In&&In.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(In,"__esModule",{value:!0});In.bindCallbackInternals=void 0;var F6=Fu(),N6=Ce(),D6=Du(),B6=qn(),z6=Nu(),U6=tl();function Km(e,t,r,n){if(r)if(F6.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Km(e,t,n).apply(this,i).pipe(B6.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Km(e,t).apply(this,i).pipe(D6.subscribeOn(n),z6.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new U6.AsyncSubject,l=!0;return new N6.Observable(function(s){var c=u.subscribe(s);if(l){l=!1;var d=!1,p=!1;t.apply(i,FE(FE([],L6(o)),[function(){for(var f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];if(e){var v=f.shift();if(v!=null){u.error(v);return}}u.next(1<f.length?f:f[0]),p=!0,d&&u.complete()}])),p&&u.complete(),d=!0}return c})}}In.bindCallbackInternals=Km});var NE=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.bindCallback=void 0;var W6=Zm();function V6(e,t,r){return W6.bindCallbackInternals(!1,e,t,r)}Dl.bindCallback=V6});var DE=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.bindNodeCallback=void 0;var $6=Zm();function H6(e,t,r){return $6.bindCallbackInternals(!0,e,t,r)}Bl.bindNodeCallback=H6});var Ym=b(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.argsArgArrayOrObject=void 0;var G6=Array.isArray,K6=Object.getPrototypeOf,Z6=Object.prototype,Y6=Object.keys;function J6(e){if(e.length===1){var t=e[0];if(G6(t))return{args:t,keys:null};if(X6(t)){var r=Y6(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}zl.argsArgArrayOrObject=J6;function X6(e){return e&&typeof e=="object"&&K6(e)===Z6}});var Jm=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.createObject=void 0;function Q6(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Ul.createObject=Q6});var Wl=b(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.combineLatestInit=Jo.combineLatest=void 0;var e3=Ce(),t3=Ym(),UE=Jr(),WE=st(),r3=qn(),BE=It(),n3=Jm(),i3=ee(),o3=Yr();function a3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=BE.popScheduler(e),n=BE.popResultSelector(e),i=t3.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return UE.from([],r);var u=new e3.Observable(VE(o,r,a?function(l){return n3.createObject(a,l)}:WE.identity));return n?u.pipe(r3.mapOneOrManyArgs(n)):u}Jo.combineLatest=a3;function VE(e,t,r){return r===void 0&&(r=WE.identity),function(n){zE(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,l=function(c){zE(t,function(){var d=UE.from(e[c],t),p=!1;d.subscribe(i3.createOperatorSubscriber(n,function(f){o[c]=f,p||(p=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)l(s)},n)}}Jo.combineLatestInit=VE;function zE(e,t,r){e?o3.executeSchedule(r,e,t):t()}});var $l=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.mergeInternals=void 0;var u3=pe(),s3=Yr(),$E=ee();function c3(e,t,r,n,i,o,a,u){var l=[],s=0,c=0,d=!1,p=function(){d&&!l.length&&!s&&t.complete()},f=function(v){return s<n?h(v):l.push(v)},h=function(v){o&&t.next(v),s++;var g=!1;u3.innerFrom(r(v,c++)).subscribe($E.createOperatorSubscriber(t,function(y){i?.(y),o?f(y):t.next(y)},function(){g=!0},void 0,function(){if(g)try{s--;for(var y=function(){var w=l.shift();a?s3.executeSchedule(t,a,function(){return h(w)}):h(w)};l.length&&s<n;)y();p()}catch(w){t.error(w)}}))};return e.subscribe($E.createOperatorSubscriber(t,f,function(){d=!0,p()})),function(){u?.()}}Vl.mergeInternals=c3});var Qr=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.mergeMap=void 0;var l3=kn(),f3=pe(),d3=G(),p3=$l(),h3=Me();function HE(e,t,r){return r===void 0&&(r=1/0),h3.isFunction(t)?HE(function(n,i){return l3.map(function(o,a){return t(n,o,i,a)})(f3.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),d3.operate(function(n,i){return p3.mergeInternals(n,i,e,r)}))}Hl.mergeMap=HE});var Bu=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.mergeAll=void 0;var v3=Qr(),m3=st();function b3(e){return e===void 0&&(e=1/0),v3.mergeMap(m3.identity,e)}Gl.mergeAll=b3});var Zl=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.concatAll=void 0;var g3=Bu();function y3(){return g3.mergeAll(1)}Kl.concatAll=y3});var zu=b(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.concat=void 0;var _3=Zl(),w3=It(),x3=Jr();function S3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _3.concatAll()(x3.from(e,w3.popScheduler(e)))}Yl.concat=S3});var Uu=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.defer=void 0;var O3=Ce(),E3=pe();function A3(e){return new O3.Observable(function(t){E3.innerFrom(e()).subscribe(t)})}Jl.defer=A3});var GE=b(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.connectable=void 0;var P3=ct(),T3=Ce(),R3=Uu(),M3={connector:function(){return new P3.Subject},resetOnDisconnect:!0};function k3(e,t){t===void 0&&(t=M3);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new T3.Observable(function(l){return a.subscribe(l)});return u.connect=function(){return(!r||r.closed)&&(r=R3.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}Xl.connectable=k3});var KE=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.forkJoin=void 0;var C3=Ce(),q3=Ym(),I3=pe(),j3=It(),L3=ee(),F3=qn(),N3=Jm();function D3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=j3.popResultSelector(e),n=q3.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new C3.Observable(function(u){var l=i.length;if(!l){u.complete();return}for(var s=new Array(l),c=l,d=l,p=function(h){var v=!1;I3.innerFrom(i[h]).subscribe(L3.createOperatorSubscriber(u,function(g){v||(v=!0,d--),s[h]=g},function(){return c--},void 0,function(){(!c||!v)&&(d||u.next(o?N3.createObject(o,s):s),u.complete())}))},f=0;f<l;f++)p(f)});return r?a.pipe(F3.mapOneOrManyArgs(r)):a}Ql.forkJoin=D3});var YE=b(Xo=>{"use strict";var B3=Xo&&Xo.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};Object.defineProperty(Xo,"__esModule",{value:!0});Xo.fromEvent=void 0;var z3=pe(),U3=Ce(),W3=Qr(),V3=al(),Ci=Me(),$3=qn(),H3=["addListener","removeListener"],G3=["addEventListener","removeEventListener"],K3=["on","off"];function Xm(e,t,r,n){if(Ci.isFunction(r)&&(n=r,r=void 0),n)return Xm(e,t,r).pipe($3.mapOneOrManyArgs(n));var i=B3(J3(e)?G3.map(function(u){return function(l){return e[u](t,l,r)}}):Z3(e)?H3.map(ZE(e,t)):Y3(e)?K3.map(ZE(e,t)):[],2),o=i[0],a=i[1];if(!o&&V3.isArrayLike(e))return W3.mergeMap(function(u){return Xm(u,t,r)})(z3.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new U3.Observable(function(u){var l=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return u.next(1<s.length?s:s[0])};return o(l),function(){return a(l)}})}Xo.fromEvent=Xm;function ZE(e,t){return function(r){return function(n){return e[r](t,n)}}}function Z3(e){return Ci.isFunction(e.addListener)&&Ci.isFunction(e.removeListener)}function Y3(e){return Ci.isFunction(e.on)&&Ci.isFunction(e.off)}function J3(e){return Ci.isFunction(e.addEventListener)&&Ci.isFunction(e.removeEventListener)}});var XE=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.fromEventPattern=void 0;var X3=Ce(),Q3=Me(),e8=qn();function JE(e,t,r){return r?JE(e,t).pipe(e8.mapOneOrManyArgs(r)):new X3.Observable(function(n){var i=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return n.next(a.length===1?a[0]:a)},o=e(i);return Q3.isFunction(t)?function(){return t(i,o)}:void 0})}ef.fromEventPattern=JE});var eA=b(Qo=>{"use strict";var t8=Qo&&Qo.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,i=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1],o=s;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(s);break}o[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(c){s=[6,c],i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Qo,"__esModule",{value:!0});Qo.generate=void 0;var QE=st(),r8=Fu(),n8=Uu(),i8=zm();function o8(e,t,r,n,i){var o,a,u,l;arguments.length===1?(o=e,l=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?QE.identity:a,i=o.scheduler):(l=e,!n||r8.isScheduler(n)?(u=QE.identity,i=n):u=n);function s(){var c;return t8(this,function(d){switch(d.label){case 0:c=l,d.label=1;case 1:return!t||t(c)?[4,u(c)]:[3,4];case 2:d.sent(),d.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return n8.defer(i?function(){return i8.scheduleIterable(s(),i)}:s)}Qo.generate=o8});var tA=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.iif=void 0;var a8=Uu();function u8(e,t,r){return a8.defer(function(){return e()?t:r})}tf.iif=u8});var jn=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.timer=void 0;var s8=Ce(),c8=qt(),l8=Fu(),f8=Ll();function d8(e,t,r){e===void 0&&(e=0),r===void 0&&(r=c8.async);var n=-1;return t!=null&&(l8.isScheduler(t)?r=t:n=t),new s8.Observable(function(i){var o=f8.isValidDate(e)?+e-r.now():e;o<0&&(o=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}rf.timer=d8});var Qm=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.interval=void 0;var p8=qt(),h8=jn();function v8(e,t){return e===void 0&&(e=0),t===void 0&&(t=p8.asyncScheduler),e<0&&(e=0),h8.timer(e,e,t)}nf.interval=v8});var nA=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.merge=void 0;var m8=Bu(),b8=pe(),g8=fr(),rA=It(),y8=Jr();function _8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=rA.popScheduler(e),n=rA.popNumber(e,1/0),i=e;return i.length?i.length===1?b8.innerFrom(i[0]):m8.mergeAll(n)(y8.from(i,r)):g8.EMPTY}of.merge=_8});var eb=b(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.never=qi.NEVER=void 0;var w8=Ce(),x8=ut();qi.NEVER=new w8.Observable(x8.noop);function S8(){return qi.NEVER}qi.never=S8});var ea=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.argsOrArgArray=void 0;var O8=Array.isArray;function E8(e){return e.length===1&&O8(e[0])?e[0]:e}af.argsOrArgArray=E8});var tb=b(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.onErrorResumeNext=void 0;var A8=Ce(),P8=ea(),T8=ee(),iA=ut(),R8=pe();function M8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=P8.argsOrArgArray(e);return new A8.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=R8.innerFrom(r[i++])}catch{o();return}var u=new T8.OperatorSubscriber(n,void 0,iA.noop,iA.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}uf.onErrorResumeNext=M8});var oA=b(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.pairs=void 0;var k8=Jr();function C8(e,t){return k8.from(Object.entries(e),t)}sf.pairs=C8});var aA=b(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.not=void 0;function q8(e,t){return function(r,n){return!e.call(t,r,n)}}cf.not=q8});var Ii=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.filter=void 0;var I8=G(),j8=ee();function L8(e,t){return I8.operate(function(r,n){var i=0;r.subscribe(j8.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}lf.filter=L8});var cA=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.partition=void 0;var F8=aA(),uA=Ii(),sA=pe();function N8(e,t,r){return[uA.filter(t,r)(sA.innerFrom(e)),uA.filter(F8.not(t,r))(sA.innerFrom(e))]}ff.partition=N8});var rb=b(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.raceInit=ta.race=void 0;var D8=Ce(),lA=pe(),B8=ea(),z8=ee();function U8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=B8.argsOrArgArray(e),e.length===1?lA.innerFrom(e[0]):new D8.Observable(fA(e))}ta.race=U8;function fA(e){return function(t){for(var r=[],n=function(o){r.push(lA.innerFrom(e[o]).subscribe(z8.createOperatorSubscriber(t,function(a){if(r){for(var u=0;u<r.length;u++)u!==o&&r[u].unsubscribe();r=null}t.next(a)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}ta.raceInit=fA});var dA=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.range=void 0;var W8=Ce(),V8=fr();function $8(e,t,r){if(t==null&&(t=e,e=0),t<=0)return V8.EMPTY;var n=t+e;return new W8.Observable(r?function(i){var o=e;return r.schedule(function(){o<n?(i.next(o++),this.schedule()):i.complete()})}:function(i){for(var o=e;o<n&&!i.closed;)i.next(o++);i.complete()})}df.range=$8});var pA=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.using=void 0;var H8=Ce(),G8=pe(),K8=fr();function Z8(e,t){return new H8.Observable(function(r){var n=e(),i=t(n),o=i?G8.innerFrom(i):K8.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}pf.using=Z8});var hf=b(Ln=>{"use strict";var Y8=Ln&&Ln.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},J8=Ln&&Ln.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.zip=void 0;var X8=Ce(),Q8=pe(),eB=ea(),tB=fr(),rB=ee(),nB=It();function iB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=nB.popResultSelector(e),n=eB.argsOrArgArray(e);return n.length?new X8.Observable(function(i){var o=n.map(function(){return[]}),a=n.map(function(){return!1});i.add(function(){o=a=null});for(var u=function(s){Q8.innerFrom(n[s]).subscribe(rB.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(p){return p.length})){var d=o.map(function(p){return p.shift()});i.next(r?r.apply(void 0,J8([],Y8(d))):d),o.some(function(p,f){return!p.length&&a[f]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},l=0;!i.closed&&l<n.length;l++)u(l);return function(){o=a=null}}):tB.EMPTY}Ln.zip=iB});var vA=b(hA=>{"use strict";Object.defineProperty(hA,"__esModule",{value:!0})});var nb=b(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.audit=void 0;var oB=G(),aB=pe(),mA=ee();function uB(e){return oB.operate(function(t,r){var n=!1,i=null,o=null,a=!1,u=function(){if(o?.unsubscribe(),o=null,n){n=!1;var s=i;i=null,r.next(s)}a&&r.complete()},l=function(){o=null,a&&r.complete()};t.subscribe(mA.createOperatorSubscriber(r,function(s){n=!0,i=s,o||aB.innerFrom(e(s)).subscribe(o=mA.createOperatorSubscriber(r,u,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}vf.audit=uB});var bA=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.auditTime=void 0;var sB=qt(),cB=nb(),lB=jn();function fB(e,t){return t===void 0&&(t=sB.asyncScheduler),cB.audit(function(){return lB.timer(e,t)})}mf.auditTime=fB});var yA=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.buffer=void 0;var dB=G(),pB=ut(),gA=ee(),hB=pe();function vB(e){return dB.operate(function(t,r){var n=[];return t.subscribe(gA.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),hB.innerFrom(e).subscribe(gA.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},pB.noop)),function(){n=null}})}bf.buffer=vB});var _A=b(ra=>{"use strict";var ib=ra&&ra.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ra,"__esModule",{value:!0});ra.bufferCount=void 0;var mB=G(),bB=ee(),gB=Zr();function yB(e,t){return t===void 0&&(t=null),t=t??e,mB.operate(function(r,n){var i=[],o=0;r.subscribe(bB.createOperatorSubscriber(n,function(a){var u,l,s,c,d=null;o++%t===0&&i.push([]);try{for(var p=ib(i),f=p.next();!f.done;f=p.next()){var h=f.value;h.push(a),e<=h.length&&(d=d??[],d.push(h))}}catch(y){u={error:y}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(u)throw u.error}}if(d)try{for(var v=ib(d),g=v.next();!g.done;g=v.next()){var h=g.value;gB.arrRemove(i,h),n.next(h)}}catch(y){s={error:y}}finally{try{g&&!g.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var l=ib(i),s=l.next();!s.done;s=l.next()){var c=s.value;n.next(c)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}ra.bufferCount=yB});var xA=b(na=>{"use strict";var _B=na&&na.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(na,"__esModule",{value:!0});na.bufferTime=void 0;var wB=Ft(),xB=G(),SB=ee(),OB=Zr(),EB=qt(),AB=It(),wA=Yr();function PB(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=AB.popScheduler(n))!==null&&t!==void 0?t:EB.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return xB.operate(function(l,s){var c=[],d=!1,p=function(v){var g=v.buffer,y=v.subs;y.unsubscribe(),OB.arrRemove(c,v),s.next(g),d&&f()},f=function(){if(c){var v=new wB.Subscription;s.add(v);var g=[],y={buffer:g,subs:v};c.push(y),wA.executeSchedule(v,o,function(){return p(y)},e)}};a!==null&&a>=0?wA.executeSchedule(s,o,f,a,!0):d=!0,f();var h=SB.createOperatorSubscriber(s,function(v){var g,y,w=c.slice();try{for(var _=_B(w),x=_.next();!x.done;x=_.next()){var O=x.value,E=O.buffer;E.push(v),u<=E.length&&p(O)}}catch(P){g={error:P}}finally{try{x&&!x.done&&(y=_.return)&&y.call(_)}finally{if(g)throw g.error}}},function(){for(;c?.length;)s.next(c.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return c=null});l.subscribe(h)})}na.bufferTime=PB});var EA=b(ia=>{"use strict";var TB=ia&&ia.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ia,"__esModule",{value:!0});ia.bufferToggle=void 0;var RB=Ft(),MB=G(),SA=pe(),ob=ee(),OA=ut(),kB=Zr();function CB(e,t){return MB.operate(function(r,n){var i=[];SA.innerFrom(e).subscribe(ob.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new RB.Subscription,l=function(){kB.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(SA.innerFrom(t(o)).subscribe(ob.createOperatorSubscriber(n,l,OA.noop)))},OA.noop)),r.subscribe(ob.createOperatorSubscriber(n,function(o){var a,u;try{for(var l=TB(i),s=l.next();!s.done;s=l.next()){var c=s.value;c.push(o)}}catch(d){a={error:d}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}ia.bufferToggle=CB});var PA=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.bufferWhen=void 0;var qB=G(),IB=ut(),AA=ee(),jB=pe();function LB(e){return qB.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),jB.innerFrom(e()).subscribe(i=AA.createOperatorSubscriber(r,o,IB.noop))};o(),t.subscribe(AA.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}gf.bufferWhen=LB});var RA=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.catchError=void 0;var FB=pe(),NB=ee(),DB=G();function TA(e){return DB.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(NB.createOperatorSubscriber(r,void 0,void 0,function(a){o=FB.innerFrom(e(a,TA(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}yf.catchError=TA});var ab=b(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.scanInternals=void 0;var BB=ee();function zB(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(BB.createOperatorSubscriber(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}_f.scanInternals=zB});var oa=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.reduce=void 0;var UB=ab(),WB=G();function VB(e,t){return WB.operate(UB.scanInternals(e,t,arguments.length>=2,!1,!0))}wf.reduce=VB});var ub=b(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.toArray=void 0;var $B=oa(),HB=G(),GB=function(e,t){return e.push(t),e};function KB(){return HB.operate(function(e,t){$B.reduce(GB,[])(e).subscribe(t)})}xf.toArray=KB});var sb=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.joinAllInternals=void 0;var ZB=st(),YB=qn(),JB=qu(),XB=Qr(),QB=ub();function ez(e,t){return JB.pipe(QB.toArray(),XB.mergeMap(function(r){return e(r)}),t?YB.mapOneOrManyArgs(t):ZB.identity)}Sf.joinAllInternals=ez});var cb=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.combineLatestAll=void 0;var tz=Wl(),rz=sb();function nz(e){return rz.joinAllInternals(tz.combineLatest,e)}Of.combineLatestAll=nz});var MA=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.combineAll=void 0;var iz=cb();Ef.combineAll=iz.combineLatestAll});var IA=b(Fn=>{"use strict";var kA=Fn&&Fn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},CA=Fn&&Fn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.combineLatest=void 0;var oz=Wl(),az=G(),uz=ea(),sz=qn(),cz=qu(),lz=It();function qA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lz.popResultSelector(e);return r?cz.pipe(qA.apply(void 0,CA([],kA(e))),sz.mapOneOrManyArgs(r)):az.operate(function(n,i){oz.combineLatestInit(CA([n],kA(uz.argsOrArgArray(e))))(i)})}Fn.combineLatest=qA});var jA=b(Nn=>{"use strict";var fz=Nn&&Nn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},dz=Nn&&Nn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.combineLatestWith=void 0;var pz=IA();function hz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return pz.combineLatest.apply(void 0,dz([],fz(e)))}Nn.combineLatestWith=hz});var lb=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.concatMap=void 0;var LA=Qr(),vz=Me();function mz(e,t){return vz.isFunction(t)?LA.mergeMap(e,t,1):LA.mergeMap(e,1)}Af.concatMap=mz});var NA=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.concatMapTo=void 0;var FA=lb(),bz=Me();function gz(e,t){return bz.isFunction(t)?FA.concatMap(function(){return e},t):FA.concatMap(function(){return e})}Pf.concatMapTo=gz});var DA=b(Dn=>{"use strict";var yz=Dn&&Dn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},_z=Dn&&Dn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.concat=void 0;var wz=G(),xz=Zl(),Sz=It(),Oz=Jr();function Ez(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Sz.popScheduler(e);return wz.operate(function(n,i){xz.concatAll()(Oz.from(_z([n],yz(e)),r)).subscribe(i)})}Dn.concat=Ez});var BA=b(Bn=>{"use strict";var Az=Bn&&Bn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Pz=Bn&&Bn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.concatWith=void 0;var Tz=DA();function Rz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Tz.concat.apply(void 0,Pz([],Az(e)))}Bn.concatWith=Rz});var zA=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.fromSubscribable=void 0;var Mz=Ce();function kz(e){return new Mz.Observable(function(t){return e.subscribe(t)})}Tf.fromSubscribable=kz});var Mf=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.connect=void 0;var Cz=ct(),qz=pe(),Iz=G(),jz=zA(),Lz={connector:function(){return new Cz.Subject}};function Fz(e,t){t===void 0&&(t=Lz);var r=t.connector;return Iz.operate(function(n,i){var o=r();qz.innerFrom(e(jz.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}Rf.connect=Fz});var UA=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.count=void 0;var Nz=oa();function Dz(e){return Nz.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}kf.count=Dz});var VA=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.debounce=void 0;var Bz=G(),zz=ut(),WA=ee(),Uz=pe();function Wz(e){return Bz.operate(function(t,r){var n=!1,i=null,o=null,a=function(){if(o?.unsubscribe(),o=null,n){n=!1;var u=i;i=null,r.next(u)}};t.subscribe(WA.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=WA.createOperatorSubscriber(r,a,zz.noop),Uz.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Cf.debounce=Wz});var $A=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.debounceTime=void 0;var Vz=qt(),$z=G(),Hz=ee();function Gz(e,t){return t===void 0&&(t=Vz.asyncScheduler),$z.operate(function(r,n){var i=null,o=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var s=o;o=null,n.next(s)}};function l(){var s=a+e,c=t.now();if(c<s){i=this.schedule(void 0,s-c),n.add(i);return}u()}r.subscribe(Hz.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(l,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}qf.debounceTime=Gz});var Wu=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.defaultIfEmpty=void 0;var Kz=G(),Zz=ee();function Yz(e){return Kz.operate(function(t,r){var n=!1;t.subscribe(Zz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}If.defaultIfEmpty=Yz});var Vu=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.take=void 0;var Jz=fr(),Xz=G(),Qz=ee();function e4(e){return e<=0?function(){return Jz.EMPTY}:Xz.operate(function(t,r){var n=0;t.subscribe(Qz.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}jf.take=e4});var fb=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.ignoreElements=void 0;var t4=G(),r4=ee(),n4=ut();function i4(){return t4.operate(function(e,t){e.subscribe(r4.createOperatorSubscriber(t,n4.noop))})}Lf.ignoreElements=i4});var db=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.mapTo=void 0;var o4=kn();function a4(e){return o4.map(function(){return e})}Ff.mapTo=a4});var pb=b(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.delayWhen=void 0;var u4=zu(),HA=Vu(),s4=fb(),c4=db(),l4=Qr(),f4=pe();function GA(e,t){return t?function(r){return u4.concat(t.pipe(HA.take(1),s4.ignoreElements()),r.pipe(GA(e)))}:l4.mergeMap(function(r,n){return f4.innerFrom(e(r,n)).pipe(HA.take(1),c4.mapTo(r))})}Nf.delayWhen=GA});var KA=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.delay=void 0;var d4=qt(),p4=pb(),h4=jn();function v4(e,t){t===void 0&&(t=d4.asyncScheduler);var r=h4.timer(e,t);return p4.delayWhen(function(){return r})}Df.delay=v4});var ZA=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.dematerialize=void 0;var m4=Pl(),b4=G(),g4=ee();function y4(){return b4.operate(function(e,t){e.subscribe(g4.createOperatorSubscriber(t,function(r){return m4.observeNotification(r,t)}))})}Bf.dematerialize=y4});var JA=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.distinct=void 0;var _4=G(),YA=ee(),w4=ut(),x4=pe();function S4(e,t){return _4.operate(function(r,n){var i=new Set;r.subscribe(YA.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&x4.innerFrom(t).subscribe(YA.createOperatorSubscriber(n,function(){return i.clear()},w4.noop))})}zf.distinct=S4});var hb=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.distinctUntilChanged=void 0;var O4=st(),E4=G(),A4=ee();function P4(e,t){return t===void 0&&(t=O4.identity),e=e??T4,E4.operate(function(r,n){var i,o=!0;r.subscribe(A4.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}Uf.distinctUntilChanged=P4;function T4(e,t){return e===t}});var XA=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.distinctUntilKeyChanged=void 0;var R4=hb();function M4(e,t){return R4.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Wf.distinctUntilKeyChanged=M4});var $u=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.throwIfEmpty=void 0;var k4=Mn(),C4=G(),q4=ee();function I4(e){return e===void 0&&(e=j4),C4.operate(function(t,r){var n=!1;t.subscribe(q4.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Vf.throwIfEmpty=I4;function j4(){return new k4.EmptyError}});var eP=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.elementAt=void 0;var QA=$m(),L4=Ii(),F4=$u(),N4=Wu(),D4=Vu();function B4(e,t){if(e<0)throw new QA.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(L4.filter(function(i,o){return o===e}),D4.take(1),r?N4.defaultIfEmpty(t):F4.throwIfEmpty(function(){return new QA.ArgumentOutOfRangeError}))}}$f.elementAt=B4});var tP=b(zn=>{"use strict";var z4=zn&&zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},U4=zn&&zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zn,"__esModule",{value:!0});zn.endWith=void 0;var W4=zu(),V4=El();function $4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return W4.concat(r,V4.of.apply(void 0,U4([],z4(e))))}}zn.endWith=$4});var rP=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.every=void 0;var H4=G(),G4=ee();function K4(e,t){return H4.operate(function(r,n){var i=0;r.subscribe(G4.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Hf.every=K4});var vb=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.exhaustMap=void 0;var Z4=kn(),nP=pe(),Y4=G(),iP=ee();function oP(e,t){return t?function(r){return r.pipe(oP(function(n,i){return nP.innerFrom(e(n,i)).pipe(Z4.map(function(o,a){return t(n,o,i,a)}))}))}:Y4.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(iP.createOperatorSubscriber(n,function(u){o||(o=iP.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),nP.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}Gf.exhaustMap=oP});var mb=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.exhaustAll=void 0;var J4=vb(),X4=st();function Q4(){return J4.exhaustMap(X4.identity)}Kf.exhaustAll=Q4});var aP=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.exhaust=void 0;var eU=mb();Zf.exhaust=eU.exhaustAll});var uP=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.expand=void 0;var tU=G(),rU=$l();function nU(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,tU.operate(function(n,i){return rU.mergeInternals(n,i,e,t,void 0,!0,r)})}Yf.expand=nU});var sP=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.finalize=void 0;var iU=G();function oU(e){return iU.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Jf.finalize=oU});var bb=b(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.createFind=aa.find=void 0;var aU=G(),uU=ee();function sU(e,t){return aU.operate(cP(e,t,"value"))}aa.find=sU;function cP(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(uU.createOperatorSubscriber(o,function(u){var l=a++;e.call(t,u,l,i)&&(o.next(n?l:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}aa.createFind=cP});var lP=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.findIndex=void 0;var cU=G(),lU=bb();function fU(e,t){return cU.operate(lU.createFind(e,t,"index"))}Xf.findIndex=fU});var fP=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.first=void 0;var dU=Mn(),pU=Ii(),hU=Vu(),vU=Wu(),mU=$u(),bU=st();function gU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?pU.filter(function(i,o){return e(i,o,n)}):bU.identity,hU.take(1),r?vU.defaultIfEmpty(t):mU.throwIfEmpty(function(){return new dU.EmptyError}))}}Qf.first=gU});var pP=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.groupBy=void 0;var yU=Ce(),_U=pe(),wU=ct(),xU=G(),dP=ee();function SU(e,t,r,n){return xU.operate(function(i,o){var a;!t||typeof t=="function"?a=t:(r=t.duration,a=t.element,n=t.connector);var u=new Map,l=function(h){u.forEach(h),h(o)},s=function(h){return l(function(v){return v.error(h)})},c=0,d=!1,p=new dP.OperatorSubscriber(o,function(h){try{var v=e(h),g=u.get(v);if(!g){u.set(v,g=n?n():new wU.Subject);var y=f(v,g);if(o.next(y),r){var w=dP.createOperatorSubscriber(g,function(){g.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(v)});p.add(_U.innerFrom(r(y)).subscribe(w))}}g.next(a?a(h):h)}catch(_){s(_)}},function(){return l(function(h){return h.complete()})},s,function(){return u.clear()},function(){return d=!0,c===0});i.subscribe(p);function f(h,v){var g=new yU.Observable(function(y){c++;var w=v.subscribe(y);return function(){w.unsubscribe(),--c===0&&d&&p.unsubscribe()}});return g.key=h,g}})}ed.groupBy=SU});var hP=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.isEmpty=void 0;var OU=G(),EU=ee();function AU(){return OU.operate(function(e,t){e.subscribe(EU.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}td.isEmpty=AU});var gb=b(ua=>{"use strict";var PU=ua&&ua.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ua,"__esModule",{value:!0});ua.takeLast=void 0;var TU=fr(),RU=G(),MU=ee();function kU(e){return e<=0?function(){return TU.EMPTY}:RU.operate(function(t,r){var n=[];t.subscribe(MU.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=PU(n),u=a.next();!u.done;u=a.next()){var l=u.value;r.next(l)}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}ua.takeLast=kU});var vP=b(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.last=void 0;var CU=Mn(),qU=Ii(),IU=gb(),jU=$u(),LU=Wu(),FU=st();function NU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?qU.filter(function(i,o){return e(i,o,n)}):FU.identity,IU.takeLast(1),r?LU.defaultIfEmpty(t):jU.throwIfEmpty(function(){return new CU.EmptyError}))}}rd.last=NU});var mP=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.materialize=void 0;var yb=Pl(),DU=G(),BU=ee();function zU(){return DU.operate(function(e,t){e.subscribe(BU.createOperatorSubscriber(t,function(r){t.next(yb.Notification.createNext(r))},function(){t.next(yb.Notification.createComplete()),t.complete()},function(r){t.next(yb.Notification.createError(r)),t.complete()}))})}nd.materialize=zU});var bP=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.max=void 0;var UU=oa(),WU=Me();function VU(e){return UU.reduce(WU.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}id.max=VU});var gP=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.flatMap=void 0;var $U=Qr();od.flatMap=$U.mergeMap});var _P=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.mergeMapTo=void 0;var yP=Qr(),HU=Me();function GU(e,t,r){return r===void 0&&(r=1/0),HU.isFunction(t)?yP.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),yP.mergeMap(function(){return e},r))}ad.mergeMapTo=GU});var wP=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.mergeScan=void 0;var KU=G(),ZU=$l();function YU(e,t,r){return r===void 0&&(r=1/0),KU.operate(function(n,i){var o=t;return ZU.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}ud.mergeScan=YU});var SP=b(Un=>{"use strict";var JU=Un&&Un.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},XU=Un&&Un.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Un,"__esModule",{value:!0});Un.merge=void 0;var QU=G(),eW=Bu(),xP=It(),tW=Jr();function rW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xP.popScheduler(e),n=xP.popNumber(e,1/0);return QU.operate(function(i,o){eW.mergeAll(n)(tW.from(XU([i],JU(e)),r)).subscribe(o)})}Un.merge=rW});var OP=b(Wn=>{"use strict";var nW=Wn&&Wn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},iW=Wn&&Wn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.mergeWith=void 0;var oW=SP();function aW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return oW.merge.apply(void 0,iW([],nW(e)))}Wn.mergeWith=aW});var EP=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.min=void 0;var uW=oa(),sW=Me();function cW(e){return uW.reduce(sW.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}sd.min=cW});var ld=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.multicast=void 0;var lW=Iu(),AP=Me(),fW=Mf();function dW(e,t){var r=AP.isFunction(e)?e:function(){return e};return AP.isFunction(t)?fW.connect(t,{connector:r}):function(n){return new lW.ConnectableObservable(n,r)}}cd.multicast=dW});var TP=b(Lr=>{"use strict";var pW=Lr&&Lr.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},hW=Lr&&Lr.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.onErrorResumeNext=Lr.onErrorResumeNextWith=void 0;var vW=ea(),mW=tb();function PP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=vW.argsOrArgArray(e);return function(n){return mW.onErrorResumeNext.apply(void 0,hW([n],pW(r)))}}Lr.onErrorResumeNextWith=PP;Lr.onErrorResumeNext=PP});var RP=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.pairwise=void 0;var bW=G(),gW=ee();function yW(){return bW.operate(function(e,t){var r,n=!1;e.subscribe(gW.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}fd.pairwise=yW});var MP=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.pluck=void 0;var _W=kn();function wW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return _W.map(function(n){for(var i=n,o=0;o<r;o++){var a=i?.[e[o]];if(typeof a<"u")i=a;else return}return i})}dd.pluck=wW});var kP=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.publish=void 0;var xW=ct(),SW=ld(),OW=Mf();function EW(e){return e?function(t){return OW.connect(e)(t)}:function(t){return SW.multicast(new xW.Subject)(t)}}pd.publish=EW});var CP=b(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.publishBehavior=void 0;var AW=Tm(),PW=Iu();function TW(e){return function(t){var r=new AW.BehaviorSubject(e);return new PW.ConnectableObservable(t,function(){return r})}}hd.publishBehavior=TW});var qP=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.publishLast=void 0;var RW=tl(),MW=Iu();function kW(){return function(e){var t=new RW.AsyncSubject;return new MW.ConnectableObservable(e,function(){return t})}}vd.publishLast=kW});var jP=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.publishReplay=void 0;var CW=el(),qW=ld(),IP=Me();function IW(e,t,r,n){r&&!IP.isFunction(r)&&(n=r);var i=IP.isFunction(r)?r:void 0;return function(o){return qW.multicast(new CW.ReplaySubject(e,t,n),i)(o)}}md.publishReplay=IW});var LP=b(Vn=>{"use strict";var jW=Vn&&Vn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},LW=Vn&&Vn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.raceWith=void 0;var FW=rb(),NW=G(),DW=st();function BW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?NW.operate(function(r,n){FW.raceInit(LW([r],jW(e)))(n)}):DW.identity}Vn.raceWith=BW});var NP=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.repeat=void 0;var zW=fr(),UW=G(),FP=ee(),WW=pe(),VW=jn();function $W(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return zW.EMPTY}:UW.operate(function(i,o){var a=0,u,l=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?VW.timer(n):WW.innerFrom(n(a)),d=FP.createOperatorSubscriber(o,function(){d.unsubscribe(),s()});c.subscribe(d)}else s()},s=function(){var c=!1;u=i.subscribe(FP.createOperatorSubscriber(o,void 0,function(){++a<r?u?l():c=!0:o.complete()})),c&&l()};s()})}bd.repeat=$W});var BP=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.repeatWhen=void 0;var HW=pe(),GW=ct(),KW=G(),DP=ee();function ZW(e){return KW.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,l=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new GW.Subject,HW.innerFrom(e(o)).subscribe(DP.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){u=!1,n=t.subscribe(DP.createOperatorSubscriber(r,void 0,function(){u=!0,!l()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}gd.repeatWhen=ZW});var UP=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.retry=void 0;var YW=G(),zP=ee(),JW=st(),XW=jn(),QW=pe();function e7(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,i=t.delay,o=t.resetOnSuccess,a=o===void 0?!1:o;return n<=0?JW.identity:YW.operate(function(u,l){var s=0,c,d=function(){var p=!1;c=u.subscribe(zP.createOperatorSubscriber(l,function(f){a&&(s=0),l.next(f)},void 0,function(f){if(s++<n){var h=function(){c?(c.unsubscribe(),c=null,d()):p=!0};if(i!=null){var v=typeof i=="number"?XW.timer(i):QW.innerFrom(i(f,s)),g=zP.createOperatorSubscriber(l,function(){g.unsubscribe(),h()},function(){l.complete()});v.subscribe(g)}else h()}else l.error(f)})),p&&(c.unsubscribe(),c=null,d())};d()})}yd.retry=e7});var VP=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.retryWhen=void 0;var t7=pe(),r7=ct(),n7=G(),WP=ee();function i7(e){return n7.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(WP.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new r7.Subject,t7.innerFrom(e(o)).subscribe(WP.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}_d.retryWhen=i7});var _b=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.sample=void 0;var o7=pe(),a7=G(),u7=ut(),$P=ee();function s7(e){return a7.operate(function(t,r){var n=!1,i=null;t.subscribe($P.createOperatorSubscriber(r,function(o){n=!0,i=o})),o7.innerFrom(e).subscribe($P.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},u7.noop))})}wd.sample=s7});var HP=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.sampleTime=void 0;var c7=qt(),l7=_b(),f7=Qm();function d7(e,t){return t===void 0&&(t=c7.asyncScheduler),l7.sample(f7.interval(e,t))}xd.sampleTime=d7});var GP=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.scan=void 0;var p7=G(),h7=ab();function v7(e,t){return p7.operate(h7.scanInternals(e,t,arguments.length>=2,!0))}Sd.scan=v7});var ZP=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.sequenceEqual=void 0;var m7=G(),b7=ee(),g7=pe();function y7(e,t){return t===void 0&&(t=function(r,n){return r===n}),m7.operate(function(r,n){var i=KP(),o=KP(),a=function(l){n.next(l),n.complete()},u=function(l,s){var c=b7.createOperatorSubscriber(n,function(d){var p=s.buffer,f=s.complete;p.length===0?f?a(!1):l.buffer.push(d):!t(d,p.shift())&&a(!1)},function(){l.complete=!0;var d=s.complete,p=s.buffer;d&&a(p.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),g7.innerFrom(e).subscribe(u(o,i))})}Od.sequenceEqual=y7;function KP(){return{buffer:[],complete:!1}}});var xb=b($n=>{"use strict";var _7=$n&&$n.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},w7=$n&&$n.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty($n,"__esModule",{value:!0});$n.share=void 0;var YP=pe(),x7=ct(),JP=Ro(),S7=G();function O7(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new x7.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,l=u===void 0?!0:u;return function(s){var c,d,p,f=0,h=!1,v=!1,g=function(){d?.unsubscribe(),d=void 0},y=function(){g(),c=p=void 0,h=v=!1},w=function(){var _=c;y(),_?.unsubscribe()};return S7.operate(function(_,x){f++,!v&&!h&&g();var O=p=p??r();x.add(function(){f--,f===0&&!v&&!h&&(d=wb(w,l))}),O.subscribe(x),!c&&f>0&&(c=new JP.SafeSubscriber({next:function(E){return O.next(E)},error:function(E){v=!0,g(),d=wb(y,i,E),O.error(E)},complete:function(){h=!0,g(),d=wb(y,a),O.complete()}}),YP.innerFrom(_).subscribe(c))})(s)}}$n.share=O7;function wb(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t!==!1){var i=new JP.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return YP.innerFrom(t.apply(void 0,w7([],_7(r)))).subscribe(i)}}});var XP=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.shareReplay=void 0;var E7=el(),A7=xb();function P7(e,t,r){var n,i,o,a,u=!1;return e&&typeof e=="object"?(n=e.bufferSize,a=n===void 0?1/0:n,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,u=o===void 0?!1:o,r=e.scheduler):a=e??1/0,A7.share({connector:function(){return new E7.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}Ed.shareReplay=P7});var QP=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.single=void 0;var T7=Mn(),R7=Gm(),M7=Hm(),k7=G(),C7=ee();function q7(e){return k7.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(C7.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new R7.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new M7.NotFoundError("No matching values"):new T7.EmptyError)}))})}Ad.single=q7});var eT=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.skip=void 0;var I7=Ii();function j7(e){return I7.filter(function(t,r){return e<=r})}Pd.skip=j7});var tT=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.skipLast=void 0;var L7=st(),F7=G(),N7=ee();function D7(e){return e<=0?L7.identity:F7.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(N7.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,l=n[u];n[u]=o,r.next(l)}})),function(){n=null}})}Td.skipLast=D7});var nT=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.skipUntil=void 0;var B7=G(),rT=ee(),z7=pe(),U7=ut();function W7(e){return B7.operate(function(t,r){var n=!1,i=rT.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},U7.noop);z7.innerFrom(e).subscribe(i),t.subscribe(rT.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}Rd.skipUntil=W7});var iT=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.skipWhile=void 0;var V7=G(),$7=ee();function H7(e){return V7.operate(function(t,r){var n=!1,i=0;t.subscribe($7.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}Md.skipWhile=H7});var aT=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.startWith=void 0;var oT=zu(),G7=It(),K7=G();function Z7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=G7.popScheduler(e);return K7.operate(function(n,i){(r?oT.concat(e,n,r):oT.concat(e,n)).subscribe(i)})}kd.startWith=Z7});var Hu=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.switchMap=void 0;var Y7=pe(),J7=G(),uT=ee();function X7(e,t){return J7.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(uT.createOperatorSubscriber(n,function(l){i?.unsubscribe();var s=0,c=o++;Y7.innerFrom(e(l,c)).subscribe(i=uT.createOperatorSubscriber(n,function(d){return n.next(t?t(l,d,c,s++):d)},function(){i=null,u()}))},function(){a=!0,u()}))})}Cd.switchMap=X7});var sT=b(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.switchAll=void 0;var Q7=Hu(),eV=st();function tV(){return Q7.switchMap(eV.identity)}qd.switchAll=tV});var lT=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.switchMapTo=void 0;var cT=Hu(),rV=Me();function nV(e,t){return rV.isFunction(t)?cT.switchMap(function(){return e},t):cT.switchMap(function(){return e})}Id.switchMapTo=nV});var fT=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.switchScan=void 0;var iV=Hu(),oV=G();function aV(e,t){return oV.operate(function(r,n){var i=t;return iV.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}jd.switchScan=aV});var dT=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.takeUntil=void 0;var uV=G(),sV=ee(),cV=pe(),lV=ut();function fV(e){return uV.operate(function(t,r){cV.innerFrom(e).subscribe(sV.createOperatorSubscriber(r,function(){return r.complete()},lV.noop)),!r.closed&&t.subscribe(r)})}Ld.takeUntil=fV});var pT=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.takeWhile=void 0;var dV=G(),pV=ee();function hV(e,t){return t===void 0&&(t=!1),dV.operate(function(r,n){var i=0;r.subscribe(pV.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Fd.takeWhile=hV});var hT=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.tap=void 0;var vV=Me(),mV=G(),bV=ee(),gV=st();function yV(e,t,r){var n=vV.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?mV.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(bV.createOperatorSubscriber(o,function(l){var s;(s=n.next)===null||s===void 0||s.call(n,l),o.next(l)},function(){var l;u=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},function(l){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,l),o.error(l)},function(){var l,s;u&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):gV.identity}Nd.tap=yV});var Sb=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.throttle=void 0;var _V=G(),vT=ee(),wV=pe();function xV(e,t){return _V.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,l=u===void 0?!1:u,s=!1,c=null,d=null,p=!1,f=function(){d?.unsubscribe(),d=null,l&&(g(),p&&n.complete())},h=function(){d=null,p&&n.complete()},v=function(y){return d=wV.innerFrom(e(y)).subscribe(vT.createOperatorSubscriber(n,f,h))},g=function(){if(s){s=!1;var y=c;c=null,n.next(y),!p&&v(y)}};r.subscribe(vT.createOperatorSubscriber(n,function(y){s=!0,c=y,!(d&&!d.closed)&&(a?g():v(y))},function(){p=!0,!(l&&s&&d&&!d.closed)&&n.complete()}))})}Dd.throttle=xV});var mT=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.throttleTime=void 0;var SV=qt(),OV=Sb(),EV=jn();function AV(e,t,r){t===void 0&&(t=SV.asyncScheduler);var n=EV.timer(e,t);return OV.throttle(function(){return n},r)}Bd.throttleTime=AV});var gT=b(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.TimeInterval=sa.timeInterval=void 0;var PV=qt(),TV=G(),RV=ee();function MV(e){return e===void 0&&(e=PV.asyncScheduler),TV.operate(function(t,r){var n=e.now();t.subscribe(RV.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new bT(i,a))}))})}sa.timeInterval=MV;var bT=function(){function e(t,r){this.value=t,this.interval=r}return e}();sa.TimeInterval=bT});var yT=b(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.timeoutWith=void 0;var kV=qt(),CV=Ll(),qV=Fl();function IV(e,t,r){var n,i,o;if(r=r??kV.async,CV.isValidDate(e)?n=e:typeof e=="number"&&(i=e),t)o=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return qV.timeout({first:n,each:i,scheduler:r,with:o})}zd.timeoutWith=IV});var _T=b(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.timestamp=void 0;var jV=Qc(),LV=kn();function FV(e){return e===void 0&&(e=jV.dateTimestampProvider),LV.map(function(t){return{value:t,timestamp:e.now()}})}Ud.timestamp=FV});var ST=b(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.window=void 0;var wT=ct(),NV=G(),xT=ee(),DV=ut(),BV=pe();function zV(e){return NV.operate(function(t,r){var n=new wT.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(xT.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),BV.innerFrom(e).subscribe(xT.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new wT.Subject)},DV.noop,i)),function(){n?.unsubscribe(),n=null}})}Wd.window=zV});var ET=b(ca=>{"use strict";var UV=ca&&ca.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ca,"__esModule",{value:!0});ca.windowCount=void 0;var OT=ct(),WV=G(),VV=ee();function $V(e,t){t===void 0&&(t=0);var r=t>0?t:e;return WV.operate(function(n,i){var o=[new OT.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(VV.createOperatorSubscriber(i,function(l){var s,c;try{for(var d=UV(o),p=d.next();!p.done;p=d.next()){var f=p.value;f.next(l)}}catch(g){s={error:g}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}var h=u-e+1;if(h>=0&&h%r===0&&o.shift().complete(),++u%r===0){var v=new OT.Subject;o.push(v),i.next(v.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(l){for(;o.length>0;)o.shift().error(l);i.error(l)},function(){a=null,o=null}))})}ca.windowCount=$V});var PT=b(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.windowTime=void 0;var HV=ct(),GV=qt(),KV=Ft(),ZV=G(),YV=ee(),JV=Zr(),XV=It(),AT=Yr();function QV(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=XV.popScheduler(n))!==null&&t!==void 0?t:GV.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return ZV.operate(function(l,s){var c=[],d=!1,p=function(g){var y=g.window,w=g.subs;y.complete(),w.unsubscribe(),JV.arrRemove(c,g),d&&f()},f=function(){if(c){var g=new KV.Subscription;s.add(g);var y=new HV.Subject,w={window:y,subs:g,seen:0};c.push(w),s.next(y.asObservable()),AT.executeSchedule(g,o,function(){return p(w)},e)}};a!==null&&a>=0?AT.executeSchedule(s,o,f,a,!0):d=!0,f();var h=function(g){return c.slice().forEach(g)},v=function(g){h(function(y){var w=y.window;return g(w)}),g(s),s.unsubscribe()};return l.subscribe(YV.createOperatorSubscriber(s,function(g){h(function(y){y.window.next(g),u<=++y.seen&&p(y)})},function(){return v(function(g){return g.complete()})},function(g){return v(function(y){return y.error(g)})})),function(){c=null}})}Vd.windowTime=QV});var MT=b(la=>{"use strict";var e$=la&&la.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(la,"__esModule",{value:!0});la.windowToggle=void 0;var t$=ct(),r$=Ft(),n$=G(),TT=pe(),Ob=ee(),RT=ut(),i$=Zr();function o$(e,t){return n$.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};TT.innerFrom(e).subscribe(Ob.createOperatorSubscriber(n,function(a){var u=new t$.Subject;i.push(u);var l=new r$.Subscription,s=function(){i$.arrRemove(i,u),u.complete(),l.unsubscribe()},c;try{c=TT.innerFrom(t(a))}catch(d){o(d);return}n.next(u.asObservable()),l.add(c.subscribe(Ob.createOperatorSubscriber(n,s,RT.noop,o)))},RT.noop)),r.subscribe(Ob.createOperatorSubscriber(n,function(a){var u,l,s=i.slice();try{for(var c=e$(s),d=c.next();!d.done;d=c.next()){var p=d.value;p.next(a)}}catch(f){u={error:f}}finally{try{d&&!d.done&&(l=c.return)&&l.call(c)}finally{if(u)throw u.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},o,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}la.windowToggle=o$});var CT=b($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.windowWhen=void 0;var a$=ct(),u$=G(),kT=ee(),s$=pe();function c$(e){return u$.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new a$.Subject,r.next(n.asObservable());var u;try{u=s$.innerFrom(e())}catch(l){o(l);return}u.subscribe(i=kT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(kT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}$d.windowWhen=c$});var LT=b(Hn=>{"use strict";var qT=Hn&&Hn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},IT=Hn&&Hn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.withLatestFrom=void 0;var l$=G(),jT=ee(),f$=pe(),d$=st(),p$=ut(),h$=It();function v$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=h$.popResultSelector(e);return l$.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),l=!1,s=function(d){f$.innerFrom(e[d]).subscribe(jT.createOperatorSubscriber(i,function(p){a[d]=p,!l&&!u[d]&&(u[d]=!0,(l=u.every(d$.identity))&&(u=null))},p$.noop))},c=0;c<o;c++)s(c);n.subscribe(jT.createOperatorSubscriber(i,function(d){if(l){var p=IT([d],qT(a));i.next(r?r.apply(void 0,IT([],qT(p))):p)}}))})}Hn.withLatestFrom=v$});var FT=b(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.zipAll=void 0;var m$=hf(),b$=sb();function g$(e){return b$.joinAllInternals(m$.zip,e)}Hd.zipAll=g$});var NT=b(Gn=>{"use strict";var y$=Gn&&Gn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},_$=Gn&&Gn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.zip=void 0;var w$=hf(),x$=G();function S$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x$.operate(function(r,n){w$.zip.apply(void 0,_$([r],y$(e))).subscribe(n)})}Gn.zip=S$});var DT=b(Kn=>{"use strict";var O$=Kn&&Kn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},E$=Kn&&Kn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.zipWith=void 0;var A$=NT();function P$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A$.zip.apply(void 0,E$([],O$(e)))}Kn.zipWith=P$});var HT=b(m=>{"use strict";var T$=m&&m.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),R$=m&&m.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&T$(t,e,r)};Object.defineProperty(m,"__esModule",{value:!0});m.interval=m.iif=m.generate=m.fromEventPattern=m.fromEvent=m.from=m.forkJoin=m.empty=m.defer=m.connectable=m.concat=m.combineLatest=m.bindNodeCallback=m.bindCallback=m.UnsubscriptionError=m.TimeoutError=m.SequenceError=m.ObjectUnsubscribedError=m.NotFoundError=m.EmptyError=m.ArgumentOutOfRangeError=m.firstValueFrom=m.lastValueFrom=m.isObservable=m.identity=m.noop=m.pipe=m.NotificationKind=m.Notification=m.Subscriber=m.Subscription=m.Scheduler=m.VirtualAction=m.VirtualTimeScheduler=m.animationFrameScheduler=m.animationFrame=m.queueScheduler=m.queue=m.asyncScheduler=m.async=m.asapScheduler=m.asap=m.AsyncSubject=m.ReplaySubject=m.BehaviorSubject=m.Subject=m.animationFrames=m.observable=m.ConnectableObservable=m.Observable=void 0;m.filter=m.expand=m.exhaustMap=m.exhaustAll=m.exhaust=m.every=m.endWith=m.elementAt=m.distinctUntilKeyChanged=m.distinctUntilChanged=m.distinct=m.dematerialize=m.delayWhen=m.delay=m.defaultIfEmpty=m.debounceTime=m.debounce=m.count=m.connect=m.concatWith=m.concatMapTo=m.concatMap=m.concatAll=m.combineLatestWith=m.combineLatestAll=m.combineAll=m.catchError=m.bufferWhen=m.bufferToggle=m.bufferTime=m.bufferCount=m.buffer=m.auditTime=m.audit=m.config=m.NEVER=m.EMPTY=m.scheduled=m.zip=m.using=m.timer=m.throwError=m.range=m.race=m.partition=m.pairs=m.onErrorResumeNext=m.of=m.never=m.merge=void 0;m.switchMap=m.switchAll=m.subscribeOn=m.startWith=m.skipWhile=m.skipUntil=m.skipLast=m.skip=m.single=m.shareReplay=m.share=m.sequenceEqual=m.scan=m.sampleTime=m.sample=m.refCount=m.retryWhen=m.retry=m.repeatWhen=m.repeat=m.reduce=m.raceWith=m.publishReplay=m.publishLast=m.publishBehavior=m.publish=m.pluck=m.pairwise=m.onErrorResumeNextWith=m.observeOn=m.multicast=m.min=m.mergeWith=m.mergeScan=m.mergeMapTo=m.mergeMap=m.flatMap=m.mergeAll=m.max=m.materialize=m.mapTo=m.map=m.last=m.isEmpty=m.ignoreElements=m.groupBy=m.first=m.findIndex=m.find=m.finalize=void 0;m.zipWith=m.zipAll=m.withLatestFrom=m.windowWhen=m.windowToggle=m.windowTime=m.windowCount=m.window=m.toArray=m.timestamp=m.timeoutWith=m.timeout=m.timeInterval=m.throwIfEmpty=m.throttleTime=m.throttle=m.tap=m.takeWhile=m.takeUntil=m.takeLast=m.take=m.switchScan=m.switchMapTo=void 0;var M$=Ce();Object.defineProperty(m,"Observable",{enumerable:!0,get:function(){return M$.Observable}});var k$=Iu();Object.defineProperty(m,"ConnectableObservable",{enumerable:!0,get:function(){return k$.ConnectableObservable}});var C$=Cu();Object.defineProperty(m,"observable",{enumerable:!0,get:function(){return C$.observable}});var q$=VO();Object.defineProperty(m,"animationFrames",{enumerable:!0,get:function(){return q$.animationFrames}});var I$=ct();Object.defineProperty(m,"Subject",{enumerable:!0,get:function(){return I$.Subject}});var j$=Tm();Object.defineProperty(m,"BehaviorSubject",{enumerable:!0,get:function(){return j$.BehaviorSubject}});var L$=el();Object.defineProperty(m,"ReplaySubject",{enumerable:!0,get:function(){return L$.ReplaySubject}});var F$=tl();Object.defineProperty(m,"AsyncSubject",{enumerable:!0,get:function(){return F$.AsyncSubject}});var BT=uE();Object.defineProperty(m,"asap",{enumerable:!0,get:function(){return BT.asap}});Object.defineProperty(m,"asapScheduler",{enumerable:!0,get:function(){return BT.asapScheduler}});var zT=qt();Object.defineProperty(m,"async",{enumerable:!0,get:function(){return zT.async}});Object.defineProperty(m,"asyncScheduler",{enumerable:!0,get:function(){return zT.asyncScheduler}});var UT=lE();Object.defineProperty(m,"queue",{enumerable:!0,get:function(){return UT.queue}});Object.defineProperty(m,"queueScheduler",{enumerable:!0,get:function(){return UT.queueScheduler}});var WT=hE();Object.defineProperty(m,"animationFrame",{enumerable:!0,get:function(){return WT.animationFrame}});Object.defineProperty(m,"animationFrameScheduler",{enumerable:!0,get:function(){return WT.animationFrameScheduler}});var VT=bE();Object.defineProperty(m,"VirtualTimeScheduler",{enumerable:!0,get:function(){return VT.VirtualTimeScheduler}});Object.defineProperty(m,"VirtualAction",{enumerable:!0,get:function(){return VT.VirtualAction}});var N$=Mm();Object.defineProperty(m,"Scheduler",{enumerable:!0,get:function(){return N$.Scheduler}});var D$=Ft();Object.defineProperty(m,"Subscription",{enumerable:!0,get:function(){return D$.Subscription}});var B$=Ro();Object.defineProperty(m,"Subscriber",{enumerable:!0,get:function(){return B$.Subscriber}});var $T=Pl();Object.defineProperty(m,"Notification",{enumerable:!0,get:function(){return $T.Notification}});Object.defineProperty(m,"NotificationKind",{enumerable:!0,get:function(){return $T.NotificationKind}});var z$=qu();Object.defineProperty(m,"pipe",{enumerable:!0,get:function(){return z$.pipe}});var U$=ut();Object.defineProperty(m,"noop",{enumerable:!0,get:function(){return U$.noop}});var W$=st();Object.defineProperty(m,"identity",{enumerable:!0,get:function(){return W$.identity}});var V$=IE();Object.defineProperty(m,"isObservable",{enumerable:!0,get:function(){return V$.isObservable}});var $$=jE();Object.defineProperty(m,"lastValueFrom",{enumerable:!0,get:function(){return $$.lastValueFrom}});var H$=LE();Object.defineProperty(m,"firstValueFrom",{enumerable:!0,get:function(){return H$.firstValueFrom}});var G$=$m();Object.defineProperty(m,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return G$.ArgumentOutOfRangeError}});var K$=Mn();Object.defineProperty(m,"EmptyError",{enumerable:!0,get:function(){return K$.EmptyError}});var Z$=Hm();Object.defineProperty(m,"NotFoundError",{enumerable:!0,get:function(){return Z$.NotFoundError}});var Y$=Om();Object.defineProperty(m,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Y$.ObjectUnsubscribedError}});var J$=Gm();Object.defineProperty(m,"SequenceError",{enumerable:!0,get:function(){return J$.SequenceError}});var X$=Fl();Object.defineProperty(m,"TimeoutError",{enumerable:!0,get:function(){return X$.TimeoutError}});var Q$=fm();Object.defineProperty(m,"UnsubscriptionError",{enumerable:!0,get:function(){return Q$.UnsubscriptionError}});var eH=NE();Object.defineProperty(m,"bindCallback",{enumerable:!0,get:function(){return eH.bindCallback}});var tH=DE();Object.defineProperty(m,"bindNodeCallback",{enumerable:!0,get:function(){return tH.bindNodeCallback}});var rH=Wl();Object.defineProperty(m,"combineLatest",{enumerable:!0,get:function(){return rH.combineLatest}});var nH=zu();Object.defineProperty(m,"concat",{enumerable:!0,get:function(){return nH.concat}});var iH=GE();Object.defineProperty(m,"connectable",{enumerable:!0,get:function(){return iH.connectable}});var oH=Uu();Object.defineProperty(m,"defer",{enumerable:!0,get:function(){return oH.defer}});var aH=fr();Object.defineProperty(m,"empty",{enumerable:!0,get:function(){return aH.empty}});var uH=KE();Object.defineProperty(m,"forkJoin",{enumerable:!0,get:function(){return uH.forkJoin}});var sH=Jr();Object.defineProperty(m,"from",{enumerable:!0,get:function(){return sH.from}});var cH=YE();Object.defineProperty(m,"fromEvent",{enumerable:!0,get:function(){return cH.fromEvent}});var lH=XE();Object.defineProperty(m,"fromEventPattern",{enumerable:!0,get:function(){return lH.fromEventPattern}});var fH=eA();Object.defineProperty(m,"generate",{enumerable:!0,get:function(){return fH.generate}});var dH=tA();Object.defineProperty(m,"iif",{enumerable:!0,get:function(){return dH.iif}});var pH=Qm();Object.defineProperty(m,"interval",{enumerable:!0,get:function(){return pH.interval}});var hH=nA();Object.defineProperty(m,"merge",{enumerable:!0,get:function(){return hH.merge}});var vH=eb();Object.defineProperty(m,"never",{enumerable:!0,get:function(){return vH.never}});var mH=El();Object.defineProperty(m,"of",{enumerable:!0,get:function(){return mH.of}});var bH=tb();Object.defineProperty(m,"onErrorResumeNext",{enumerable:!0,get:function(){return bH.onErrorResumeNext}});var gH=oA();Object.defineProperty(m,"pairs",{enumerable:!0,get:function(){return gH.pairs}});var yH=cA();Object.defineProperty(m,"partition",{enumerable:!0,get:function(){return yH.partition}});var _H=rb();Object.defineProperty(m,"race",{enumerable:!0,get:function(){return _H.race}});var wH=dA();Object.defineProperty(m,"range",{enumerable:!0,get:function(){return wH.range}});var xH=Vm();Object.defineProperty(m,"throwError",{enumerable:!0,get:function(){return xH.throwError}});var SH=jn();Object.defineProperty(m,"timer",{enumerable:!0,get:function(){return SH.timer}});var OH=pA();Object.defineProperty(m,"using",{enumerable:!0,get:function(){return OH.using}});var EH=hf();Object.defineProperty(m,"zip",{enumerable:!0,get:function(){return EH.zip}});var AH=Wm();Object.defineProperty(m,"scheduled",{enumerable:!0,get:function(){return AH.scheduled}});var PH=fr();Object.defineProperty(m,"EMPTY",{enumerable:!0,get:function(){return PH.EMPTY}});var TH=eb();Object.defineProperty(m,"NEVER",{enumerable:!0,get:function(){return TH.NEVER}});R$(vA(),m);var RH=Po();Object.defineProperty(m,"config",{enumerable:!0,get:function(){return RH.config}});var MH=nb();Object.defineProperty(m,"audit",{enumerable:!0,get:function(){return MH.audit}});var kH=bA();Object.defineProperty(m,"auditTime",{enumerable:!0,get:function(){return kH.auditTime}});var CH=yA();Object.defineProperty(m,"buffer",{enumerable:!0,get:function(){return CH.buffer}});var qH=_A();Object.defineProperty(m,"bufferCount",{enumerable:!0,get:function(){return qH.bufferCount}});var IH=xA();Object.defineProperty(m,"bufferTime",{enumerable:!0,get:function(){return IH.bufferTime}});var jH=EA();Object.defineProperty(m,"bufferToggle",{enumerable:!0,get:function(){return jH.bufferToggle}});var LH=PA();Object.defineProperty(m,"bufferWhen",{enumerable:!0,get:function(){return LH.bufferWhen}});var FH=RA();Object.defineProperty(m,"catchError",{enumerable:!0,get:function(){return FH.catchError}});var NH=MA();Object.defineProperty(m,"combineAll",{enumerable:!0,get:function(){return NH.combineAll}});var DH=cb();Object.defineProperty(m,"combineLatestAll",{enumerable:!0,get:function(){return DH.combineLatestAll}});var BH=jA();Object.defineProperty(m,"combineLatestWith",{enumerable:!0,get:function(){return BH.combineLatestWith}});var zH=Zl();Object.defineProperty(m,"concatAll",{enumerable:!0,get:function(){return zH.concatAll}});var UH=lb();Object.defineProperty(m,"concatMap",{enumerable:!0,get:function(){return UH.concatMap}});var WH=NA();Object.defineProperty(m,"concatMapTo",{enumerable:!0,get:function(){return WH.concatMapTo}});var VH=BA();Object.defineProperty(m,"concatWith",{enumerable:!0,get:function(){return VH.concatWith}});var $H=Mf();Object.defineProperty(m,"connect",{enumerable:!0,get:function(){return $H.connect}});var HH=UA();Object.defineProperty(m,"count",{enumerable:!0,get:function(){return HH.count}});var GH=VA();Object.defineProperty(m,"debounce",{enumerable:!0,get:function(){return GH.debounce}});var KH=$A();Object.defineProperty(m,"debounceTime",{enumerable:!0,get:function(){return KH.debounceTime}});var ZH=Wu();Object.defineProperty(m,"defaultIfEmpty",{enumerable:!0,get:function(){return ZH.defaultIfEmpty}});var YH=KA();Object.defineProperty(m,"delay",{enumerable:!0,get:function(){return YH.delay}});var JH=pb();Object.defineProperty(m,"delayWhen",{enumerable:!0,get:function(){return JH.delayWhen}});var XH=ZA();Object.defineProperty(m,"dematerialize",{enumerable:!0,get:function(){return XH.dematerialize}});var QH=JA();Object.defineProperty(m,"distinct",{enumerable:!0,get:function(){return QH.distinct}});var e9=hb();Object.defineProperty(m,"distinctUntilChanged",{enumerable:!0,get:function(){return e9.distinctUntilChanged}});var t9=XA();Object.defineProperty(m,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return t9.distinctUntilKeyChanged}});var r9=eP();Object.defineProperty(m,"elementAt",{enumerable:!0,get:function(){return r9.elementAt}});var n9=tP();Object.defineProperty(m,"endWith",{enumerable:!0,get:function(){return n9.endWith}});var i9=rP();Object.defineProperty(m,"every",{enumerable:!0,get:function(){return i9.every}});var o9=aP();Object.defineProperty(m,"exhaust",{enumerable:!0,get:function(){return o9.exhaust}});var a9=mb();Object.defineProperty(m,"exhaustAll",{enumerable:!0,get:function(){return a9.exhaustAll}});var u9=vb();Object.defineProperty(m,"exhaustMap",{enumerable:!0,get:function(){return u9.exhaustMap}});var s9=uP();Object.defineProperty(m,"expand",{enumerable:!0,get:function(){return s9.expand}});var c9=Ii();Object.defineProperty(m,"filter",{enumerable:!0,get:function(){return c9.filter}});var l9=sP();Object.defineProperty(m,"finalize",{enumerable:!0,get:function(){return l9.finalize}});var f9=bb();Object.defineProperty(m,"find",{enumerable:!0,get:function(){return f9.find}});var d9=lP();Object.defineProperty(m,"findIndex",{enumerable:!0,get:function(){return d9.findIndex}});var p9=fP();Object.defineProperty(m,"first",{enumerable:!0,get:function(){return p9.first}});var h9=pP();Object.defineProperty(m,"groupBy",{enumerable:!0,get:function(){return h9.groupBy}});var v9=fb();Object.defineProperty(m,"ignoreElements",{enumerable:!0,get:function(){return v9.ignoreElements}});var m9=hP();Object.defineProperty(m,"isEmpty",{enumerable:!0,get:function(){return m9.isEmpty}});var b9=vP();Object.defineProperty(m,"last",{enumerable:!0,get:function(){return b9.last}});var g9=kn();Object.defineProperty(m,"map",{enumerable:!0,get:function(){return g9.map}});var y9=db();Object.defineProperty(m,"mapTo",{enumerable:!0,get:function(){return y9.mapTo}});var _9=mP();Object.defineProperty(m,"materialize",{enumerable:!0,get:function(){return _9.materialize}});var w9=bP();Object.defineProperty(m,"max",{enumerable:!0,get:function(){return w9.max}});var x9=Bu();Object.defineProperty(m,"mergeAll",{enumerable:!0,get:function(){return x9.mergeAll}});var S9=gP();Object.defineProperty(m,"flatMap",{enumerable:!0,get:function(){return S9.flatMap}});var O9=Qr();Object.defineProperty(m,"mergeMap",{enumerable:!0,get:function(){return O9.mergeMap}});var E9=_P();Object.defineProperty(m,"mergeMapTo",{enumerable:!0,get:function(){return E9.mergeMapTo}});var A9=wP();Object.defineProperty(m,"mergeScan",{enumerable:!0,get:function(){return A9.mergeScan}});var P9=OP();Object.defineProperty(m,"mergeWith",{enumerable:!0,get:function(){return P9.mergeWith}});var T9=EP();Object.defineProperty(m,"min",{enumerable:!0,get:function(){return T9.min}});var R9=ld();Object.defineProperty(m,"multicast",{enumerable:!0,get:function(){return R9.multicast}});var M9=Nu();Object.defineProperty(m,"observeOn",{enumerable:!0,get:function(){return M9.observeOn}});var k9=TP();Object.defineProperty(m,"onErrorResumeNextWith",{enumerable:!0,get:function(){return k9.onErrorResumeNextWith}});var C9=RP();Object.defineProperty(m,"pairwise",{enumerable:!0,get:function(){return C9.pairwise}});var q9=MP();Object.defineProperty(m,"pluck",{enumerable:!0,get:function(){return q9.pluck}});var I9=kP();Object.defineProperty(m,"publish",{enumerable:!0,get:function(){return I9.publish}});var j9=CP();Object.defineProperty(m,"publishBehavior",{enumerable:!0,get:function(){return j9.publishBehavior}});var L9=qP();Object.defineProperty(m,"publishLast",{enumerable:!0,get:function(){return L9.publishLast}});var F9=jP();Object.defineProperty(m,"publishReplay",{enumerable:!0,get:function(){return F9.publishReplay}});var N9=LP();Object.defineProperty(m,"raceWith",{enumerable:!0,get:function(){return N9.raceWith}});var D9=oa();Object.defineProperty(m,"reduce",{enumerable:!0,get:function(){return D9.reduce}});var B9=NP();Object.defineProperty(m,"repeat",{enumerable:!0,get:function(){return B9.repeat}});var z9=BP();Object.defineProperty(m,"repeatWhen",{enumerable:!0,get:function(){return z9.repeatWhen}});var U9=UP();Object.defineProperty(m,"retry",{enumerable:!0,get:function(){return U9.retry}});var W9=VP();Object.defineProperty(m,"retryWhen",{enumerable:!0,get:function(){return W9.retryWhen}});var V9=xm();Object.defineProperty(m,"refCount",{enumerable:!0,get:function(){return V9.refCount}});var $9=_b();Object.defineProperty(m,"sample",{enumerable:!0,get:function(){return $9.sample}});var H9=HP();Object.defineProperty(m,"sampleTime",{enumerable:!0,get:function(){return H9.sampleTime}});var G9=GP();Object.defineProperty(m,"scan",{enumerable:!0,get:function(){return G9.scan}});var K9=ZP();Object.defineProperty(m,"sequenceEqual",{enumerable:!0,get:function(){return K9.sequenceEqual}});var Z9=xb();Object.defineProperty(m,"share",{enumerable:!0,get:function(){return Z9.share}});var Y9=XP();Object.defineProperty(m,"shareReplay",{enumerable:!0,get:function(){return Y9.shareReplay}});var J9=QP();Object.defineProperty(m,"single",{enumerable:!0,get:function(){return J9.single}});var X9=eT();Object.defineProperty(m,"skip",{enumerable:!0,get:function(){return X9.skip}});var Q9=tT();Object.defineProperty(m,"skipLast",{enumerable:!0,get:function(){return Q9.skipLast}});var eG=nT();Object.defineProperty(m,"skipUntil",{enumerable:!0,get:function(){return eG.skipUntil}});var tG=iT();Object.defineProperty(m,"skipWhile",{enumerable:!0,get:function(){return tG.skipWhile}});var rG=aT();Object.defineProperty(m,"startWith",{enumerable:!0,get:function(){return rG.startWith}});var nG=Du();Object.defineProperty(m,"subscribeOn",{enumerable:!0,get:function(){return nG.subscribeOn}});var iG=sT();Object.defineProperty(m,"switchAll",{enumerable:!0,get:function(){return iG.switchAll}});var oG=Hu();Object.defineProperty(m,"switchMap",{enumerable:!0,get:function(){return oG.switchMap}});var aG=lT();Object.defineProperty(m,"switchMapTo",{enumerable:!0,get:function(){return aG.switchMapTo}});var uG=fT();Object.defineProperty(m,"switchScan",{enumerable:!0,get:function(){return uG.switchScan}});var sG=Vu();Object.defineProperty(m,"take",{enumerable:!0,get:function(){return sG.take}});var cG=gb();Object.defineProperty(m,"takeLast",{enumerable:!0,get:function(){return cG.takeLast}});var lG=dT();Object.defineProperty(m,"takeUntil",{enumerable:!0,get:function(){return lG.takeUntil}});var fG=pT();Object.defineProperty(m,"takeWhile",{enumerable:!0,get:function(){return fG.takeWhile}});var dG=hT();Object.defineProperty(m,"tap",{enumerable:!0,get:function(){return dG.tap}});var pG=Sb();Object.defineProperty(m,"throttle",{enumerable:!0,get:function(){return pG.throttle}});var hG=mT();Object.defineProperty(m,"throttleTime",{enumerable:!0,get:function(){return hG.throttleTime}});var vG=$u();Object.defineProperty(m,"throwIfEmpty",{enumerable:!0,get:function(){return vG.throwIfEmpty}});var mG=gT();Object.defineProperty(m,"timeInterval",{enumerable:!0,get:function(){return mG.timeInterval}});var bG=Fl();Object.defineProperty(m,"timeout",{enumerable:!0,get:function(){return bG.timeout}});var gG=yT();Object.defineProperty(m,"timeoutWith",{enumerable:!0,get:function(){return gG.timeoutWith}});var yG=_T();Object.defineProperty(m,"timestamp",{enumerable:!0,get:function(){return yG.timestamp}});var _G=ub();Object.defineProperty(m,"toArray",{enumerable:!0,get:function(){return _G.toArray}});var wG=ST();Object.defineProperty(m,"window",{enumerable:!0,get:function(){return wG.window}});var xG=ET();Object.defineProperty(m,"windowCount",{enumerable:!0,get:function(){return xG.windowCount}});var SG=PT();Object.defineProperty(m,"windowTime",{enumerable:!0,get:function(){return SG.windowTime}});var OG=MT();Object.defineProperty(m,"windowToggle",{enumerable:!0,get:function(){return OG.windowToggle}});var EG=CT();Object.defineProperty(m,"windowWhen",{enumerable:!0,get:function(){return EG.windowWhen}});var AG=LT();Object.defineProperty(m,"withLatestFrom",{enumerable:!0,get:function(){return AG.withLatestFrom}});var PG=FT();Object.defineProperty(m,"zipAll",{enumerable:!0,get:function(){return PG.zipAll}});var TG=DT();Object.defineProperty(m,"zipWith",{enumerable:!0,get:function(){return TG.zipWith}})});var Ab=b(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.checkAbortSignal=KT;ji.abortBreakPoint=MG;ji.makeAbortError=ZT;ji.observeAbortSignal=kG;ji.isAbortException=CG;var GT=HT(),Eb=class extends Error{};function KT(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw ZT()}}function RG(e){return new Promise(t=>setTimeout(t,e))}async function MG(e){await RG(1),KT(e)}function ZT(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Eb("aborted");return e.code="ERR_ABORTED",e}function kG(e){return e?(0,GT.fromEvent)(e,"abort"):new GT.Observable}function CG(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var YT=b(Tb=>{"use strict";Object.defineProperty(Tb,"__esModule",{value:!0});Tb.makeAbortableReaction=jG;var qG=_c(),Gu=bt(),IG=Ab(),Pb=qv();function jG(e,t,r,n,i,o,a){let u;function l(s){(0,IG.isAbortException)(s)||(console.error(s),(0,Gu.isAlive)(e)&&a(s))}(0,Gu.addDisposer)(e,(0,qG.reaction)(()=>{try{return t(e)}catch(s){l(s);return}},async(s,c)=>{if(u&&(0,Pb.stopStopToken)(u),!!(0,Gu.isAlive)(e)){u=(0,Pb.createStopToken)(),i(u);try{let d=await r(s,u,e,c);(0,Gu.isAlive)(e)&&o(d)}catch(d){l(d)}}},n)),(0,Gu.addDisposer)(e,()=>{u&&(0,Pb.stopStopToken)(u)})}});var Au=b(j=>{"use strict";var LG=j&&j.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Fi=j&&j.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&LG(t,e,r)},JT=j&&j.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0});j.makeAbortableReaction=j.blobToDataURL=j.isFeature=j.SimpleFeature=j.defaultCodonTable=j.defaultStops=j.defaultStarts=j.rIC=j.complementTable=j.isElectron=void 0;j.useDebounce=zG;j.useWidthSetter=UG;j.useDebouncedCallback=WG;j.findParentThat=QT;j.springAnimate=VG;j.findParentThatIs=Zu;j.getSession=$G;j.getContainingView=eR;j.getContainingTrack=HG;j.getContainingDisplay=GG;j.assembleLocString=KG;j.assembleLocStringFast=tR;j.parseLocStringOneBased=rR;j.parseLocString=Rb;j.compareLocs=nR;j.compareLocStrings=ZG;j.clamp=YG;j.bpToPx=Mb;j.radToDeg=eK;j.degToRad=tK;j.polarToCartesian=rK;j.cartesianToPolar=nK;j.featureSpanPx=iK;j.bpSpanPx=iR;j.iterMap=oK;j.findLastIndex=aK;j.findLast=uK;j.renameRegionIfNeeded=oR;j.renameRegionsIfNeeded=sK;j.minmax=cK;j.shorten=aR;j.shorten2=lK;j.stringify=fK;j.revcom=dK;j.reverse=pK;j.complement=hK;j.measureText=uR;j.getFrame=mK;j.generateCodonTable=bK;j.updateStatus=kb;j.updateStatus2=gK;j.hashCode=sR;j.objectHash=yK;j.bytesForRegions=_K;j.isSupportedIndexingAdapter=wK;j.getBpDisplayStr=xK;j.getProgressDisplayStr=SK;j.toLocale=fa;j.getTickDisplayStr=OK;j.getViewParams=EK;j.getLayoutId=AK;j.useLocalStorage=PK;j.getUriLink=cR;j.getStr=lR;j.coarseStripHTML=fR;j.linkify=TK;j.measureGridWidth=RK;j.getEnv=MK;j.localStorageGetItem=qb;j.localStorageSetItem=dR;j.max=pR;j.min=kK;j.sum=hR;j.avg=CK;j.groupBy=qK;j.notEmpty=IK;j.mergeIntervals=vR;j.gatherOverlaps=jK;j.stripAlpha=LK;j.getStrokeProps=FK;j.getFillProps=NK;j.renderToStaticMarkup=DK;j.isGzip=mR;j.fetchAndMaybeUnzip=bR;j.fetchAndMaybeUnzipText=BK;j.isObject=gR;j.localStorageGetNumber=zK;j.localStorageGetBoolean=UK;j.localStorageSetBoolean=WK;j.forEachWithStopTokenCheck=VK;j.testAdapter=$K;var Li=Ge(),FG=Rx(),NG=JT(Mx()),dr=bt(),DG=ec(),BG=Cx(),Cb=Jx(),XT=qv(),Ku=Rc();Fi(Rc(),j);Fi(nO(),j);Fi(iO(),j);Fi(oO(),j);Fi(am(),j);Fi(bO(),j);function zG(e,t){let[r,n]=(0,Li.useState)(e);return(0,Li.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function UG(e,t){let[r,{width:n}]=(0,NG.default)();return(0,Li.useEffect)(()=>{n&&(0,dr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function WG(e,t=400){let r=(0,Li.useRef)(null),n=(0,Li.useRef)(null);return(0,Li.useEffect)(()=>{n.current&&clearTimeout(n.current)},[]),function(...o){r.current=o,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current&&e(...r.current)},t)}}function QT(e,t){if(!(0,dr.hasParent)(e))throw new Error("node does not have parent");let r=(0,dr.getParent)(e);for(;r&&(0,dr.isAlive)(r);){if(t(r))return r;if((0,dr.hasParent)(r))r=(0,dr.getParent)(r);else break}throw new Error("no matching node found")}function VG(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function c(d){let p=Date.now(),f=d.lastPosition,h=d.lastTime||p,v=d.lastVelocity||0;p>h+64&&(h=p);let g=Math.floor(p-h);for(let O=0;O<g;++O){let E=-o*(f-t),P=-a*v,A=(E+P)/1;v+=A*1/1e3,f+=v*1/1e3}let y=Math.abs(v)<=i,w=o!==0?Math.abs(t-f)<=i:!0;(u&&o!==0?e<t?f>t:f<t:!1)||y&&w?(r(t),n()):(r(f),s=requestAnimationFrame(()=>{c({lastPosition:f,lastTime:p,lastVelocity:v})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Zu(e,t){return QT(e,t)}function $G(e){try{return Zu(e,Ku.isSessionModel)}catch{throw new Error("no session model found!")}}function eR(e){try{return Zu(e,Ku.isViewModel)}catch{throw new Error("no containing view found")}}function HG(e){try{return Zu(e,Ku.isTrackModel)}catch{throw new Error("no containing track found")}}function GG(e){try{return Zu(e,Ku.isDisplayModel)}catch{throw new Error("no containing display found")}}function KG(e){return tR(e,fa)}function tR(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",l;i!==void 0?l=`:${t(i+1)}`:o!==void 0?l=":1":l="";let s;o!==void 0?s=i!==void 0&&i+1===o?"":`..${t(o)}`:s=i!==void 0?"..":"";let c="";return a&&(c="[rev]"),`${u}${n}${l}${s}${c}`}function rR(e,t){if(!e)throw new Error("no location string provided, could not parse");let r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,"")),e=e.replace(/\s/,"");let n=/({(.+)})?(.+)/.exec(e);if(!n)throw new Error(`invalid location string: "${e}"`);let[,,i,o]=n,a=i,u=o;if(!a&&u.startsWith("{}"))throw new Error(`no assembly name was provided in location "${u}"`);let l=u.lastIndexOf(":");if(l===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,l),c=u.slice(l+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(c){let d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),p=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(d){let[,f,,,,h]=d;if(f!==void 0&&h!==void 0)return{assemblyName:a,refName:s,start:+f.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(p){let[,f,,,h]=p;if(f!==void 0)return h?{assemblyName:a,refName:s,start:+f.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+f.replaceAll(",",""),end:+f.replaceAll(",",""),reversed:r}}else throw new Error(`could not parse range "${c}" on location "${e}"`)}else return{assemblyName:a,refName:s,reversed:r};else if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`unknown reference sequence name in location "${e}"`)}function Rb(e,t){let r=rR(e,t);return typeof r.start=="number"&&(r.start-=1),r}function nR(e,t){let r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;let n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(e.start!==void 0&&t.start!==void 0){let i=e.start-t.start;if(i)return i}if(e.end!==void 0&&t.end!==void 0){let i=e.end-t.end;if(i)return i}return 0}function ZG(e,t,r){let n=Rb(e,r),i=Rb(t,r);return nR(n,i)}function YG(e,t,r){return e<t?t:e>r?r:e}function JG(e){return Math.round(e*10)/10}function Mb(e,{reversed:t,end:r=0,start:n=0},i){return JG((t?r-e:e-n)/i)}var XG=180/Math.PI,QG=Math.PI/180;function eK(e){return e*XG%360}function tK(e){return e*QG%(2*Math.PI)}function rK(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function nK(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function iK(e,t,r){return iR(e.get("start"),e.get("end"),t,r)}function iR(e,t,r,n){let i=Mb(e,r,n),o=Mb(t,r,n);return r.reversed?[o,i]:[i,o]}function oK(e,t,r){let n=Array.from({length:r||0}),i=0;for(let o of e)n[i]=t(o),i+=1;return n}function aK(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function uK(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function oR(e,t){if((0,dr.isStateTreeNode)(t)&&!(0,dr.isAlive)(t))return t;if(e?.[t.refName]){t=(0,dr.isStateTreeNode)(t)?{...(0,dr.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function sK(e,t){let{regions:r=[],adapterConfig:n}=t;if(!t.sessionId)throw new Error("sessionId is required");let i=r.map(a=>a.assemblyName),o=Object.fromEntries(await Promise.all([...new Set(i)].map(async a=>[a,await e.getRefNameMapForAdapter(n,a,t)])));return{...t,regions:r.map((a,u)=>oR(o[i[u]],a))}}function cK(e,t){return[Math.min(e,t),Math.max(e,t)]}function aR(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function lK(e,t=70){return e.length>t?`${e.slice(0,t)}...`:e}function fK({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${aR(e)}:${fa(t)}${n?" (out of bounds)":""}`:""].join("")}j.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");j.complementTable={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"};function dK(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=j.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function pK(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function hK(e){var t;let r="";for(let n of e)r+=(t=j.complementTable[n])!==null&&t!==void 0?t:n;return r}j.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var vK=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function uR(e,t=10){var r;let n=.5279276315789471,i=String(e),o=0;for(let a=0;a<i.length;a++){let u=i.charCodeAt(a);o+=(r=vK[u])!==null&&r!==void 0?r:n}return o*t}function mK(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}j.defaultStarts=["ATG"];j.defaultStops=["TAA","TAG","TGA"];j.defaultCodonTable={TCA:"S",TCC:"S",TCG:"S",TCT:"S",TTC:"F",TTT:"F",TTA:"L",TTG:"L",TAC:"Y",TAT:"Y",TAA:"*",TAG:"*",TGC:"C",TGT:"C",TGA:"*",TGG:"W",CTA:"L",CTC:"L",CTG:"L",CTT:"L",CCA:"P",CCC:"P",CCG:"P",CCT:"P",CAC:"H",CAT:"H",CAA:"Q",CAG:"Q",CGA:"R",CGC:"R",CGG:"R",CGT:"R",ATA:"I",ATC:"I",ATT:"I",ATG:"M",ACA:"T",ACC:"T",ACG:"T",ACT:"T",AAC:"N",AAT:"N",AAA:"K",AAG:"K",AGC:"S",AGT:"S",AGA:"R",AGG:"R",GTA:"V",GTC:"V",GTG:"V",GTT:"V",GCA:"A",GCC:"A",GCG:"A",GCT:"A",GAC:"D",GAT:"D",GAA:"E",GAG:"E",GGA:"G",GGC:"G",GGG:"G",GGT:"G"};function bK(e){let t={};for(let r of Object.keys(e)){let n=e[r],i=[];for(let o=0;o<3;o++){let a=r.charAt(o);i[o]=[],i[o][0]=a.toUpperCase(),i[o][1]=a.toLowerCase()}for(let o=0;o<2;o++){let a=i[0][o];for(let u=0;u<2;u++){let l=i[1][u];for(let s=0;s<2;s++){let c=i[2][s],d=a+l+c;t[d]=n}}}}return t}async function kb(e,t,r){t(e);let n=await r();return t(""),n}async function gK(e,t,r,n){t(e);let i=await n();return(0,XT.checkStopToken)(r),t(""),i}function sR(e){let t=0;if(e.length===0)return t;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}function yK(e){return`${sR(JSON.stringify(e))}`}async function _K(e,t){return(await Promise.all(e.map(n=>t.blocksForRange(n.refName,n.start,n.end)))).flat().map(n=>({start:n.minv.blockPosition,end:n.maxv.blockPosition+65535})).reduce((n,i)=>n+i.end-i.start,0)}function wK(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function xK(e){return Math.floor(e/1e6)>0?`${Zn(e/1e6)}Mbp`:Math.floor(e/1e3)>0?`${Zn(e/1e3)}Kbp`:`${Math.floor(e)}bp`}function Zn(e){return fa(Number.parseFloat(e.toPrecision(3)))}function SK(e,t){return Math.floor(t/1e6)>0?`${Zn(e/1e6)}/${Zn(t/1e6)}Mb`:Math.floor(t/1e3)>0?`${Zn(e/1e3)}/${Zn(t/1e3)}Kb`:`${Zn(e)}/${Zn(t)}}bytes`}function fa(e){return e.toLocaleString("en-US")}function OK(e,t){return Math.floor(t/1e3)>0?`${fa(Number.parseFloat((e/1e6).toFixed(2)))}M`:fa(Math.floor(e))}function EK(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=eR(e),o=r?.contentBlocks[0]||{},a=n?.contentBlocks[0]||{},u=n?.contentBlocks[1]||{};return{offsetPx:t?0:i-a.offsetPx,offsetPx1:t?0:i-u.offsetPx,start:o.start,end:o.end}}function AK({sessionId:e,layoutId:t}){return`${e}-${t}`}function PK(e,t){let[r,n]=(0,Li.useState)(()=>{if(typeof window>"u")return t;try{let o=window.localStorage.getItem(e);return o?JSON.parse(o):t}catch(o){return console.error(o),t}});return[r,o=>{try{let a=o instanceof Function?o(r):o;n(a),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(a))}catch(a){console.error(a)}}]}function cR(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function lR(e){return gR(e)?(0,Ku.isUriLocation)(e)?cR(e):JSON.stringify(e):String(e)}function fR(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function TK(e){let t=/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;return e.replaceAll(t,`$1<a href='$2' target="_blank">$2</a>`)}function RK(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return pR(e.map(u=>lR(u)).map(u=>a?fR(u):u).map(u=>uR(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function MK(e){return(0,dr.getEnv)(e)}function qb(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function dR(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function pR(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function kK(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function hR(e){let t=0;for(let r of e)t+=r;return t}function CK(e){return hR(e)/e.length}function qK(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function IK(e){return e!=null}function vR(e,t=5e3){if(e.length<=1)return e;let r=[],n=null;e=e.sort((i,o)=>i.start-o.start),r.push(e[0]);for(let i=1;i<e.length;i++)n=r.at(-1),n.end+t<e[i].start-t?r.push(e[i]):n.end<e[i].end&&(n.end=Math.max(n.end,e[i].end),r.pop(),r.push(n));return r}function jK(e,t=5e3){let r={};for(let n of e)r[n.refName]||(r[n.refName]=[]),r[n.refName].push(n);return Object.values(r).flatMap(n=>vR(n.sort((i,o)=>i.start-o.start),t))}function LK(e){return(0,Cb.colord)(e).alpha(1).toHex()}function FK(e){let t=(0,Cb.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function NK(e){let t=(0,Cb.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function DK(e){let t=document.createElement("div");return(0,DG.flushSync)(()=>{(0,BG.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function mR(e){return e[0]===31&&e[1]===139&&e[2]===8}async function bR(e,t={}){let{statusCallback:r=()=>{}}=t,n=await kb("Downloading file",r,()=>e.readFile(t));return mR(n)?await kb("Unzipping",r,()=>(0,FG.unzip)(n)):n}async function BK(e,t){let r=await bR(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function gR(e){return typeof e=="object"&&e!==null}function zK(e,t){var r;return+((r=qb(e))!==null&&r!==void 0?r:t)}function UK(e,t){return!!JSON.parse(qb(e)||JSON.stringify(t))}function WK(e,t){dR(e,JSON.stringify(t))}function VK(e,t,r,n=400){let i=performance.now(),o=0;for(let a of e)performance.now()-i>n&&((0,XT.checkStopToken)(t),i=performance.now()),r(a,o++)}function $K(e,t,r,n){return t.test(e)&&!r||r===n}var yR=yO();Object.defineProperty(j,"SimpleFeature",{enumerable:!0,get:function(){return JT(yR).default}});Object.defineProperty(j,"isFeature",{enumerable:!0,get:function(){return yR.isFeature}});var HK=sm();Object.defineProperty(j,"blobToDataURL",{enumerable:!0,get:function(){return HK.blobToDataURL}});var GK=YT();Object.defineProperty(j,"makeAbortableReaction",{enumerable:!0,get:function(){return GK.makeAbortableReaction}});Fi(Ab(),j)});var wR=b(Ib=>{"use strict";Object.defineProperty(Ib,"__esModule",{value:!0});Ib.default=KK;var _R=Au();function KK(e,t="",r=5e3){let n=[e];for(;n.length;){let i=n.pop();for(let[o,a]of Object.entries(i)){if(t.length>r)return(0,_R.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return`adp-${(0,_R.hashCode)(t)}`}});var xR=b(Yu=>{"use strict";var ZK=Yu&&Yu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.adapterConfigCacheKey=JK;var YK=ZK(wR());function JK(e={}){return`${(0,YK.default)(e)}`}});var OR=b(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.getAdapter=SR;Ju.freeAdapterResources=QK;Ju.clearAdapterCache=eZ;var XK=xR(),Ni={};async function SR(e,t,r){let n=(0,XK.adapterConfigCacheKey)(r);if(!Ni[n]){let o=r?.type;if(!o)throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(r)}`);let a=e.getAdapterType(o);if(!a)throw new Error(`unknown data adapter type ${o}`);let u=a.configSchema.create(r,{pluginManager:e}),l=SR.bind(null,e,t),s=await a.getAdapterClass(),c=new s(u,l,e);Ni[n]={dataAdapter:c,sessionIds:new Set([t])}}let i=Ni[n];return i.sessionIds.add(t),i}function QK(e){let t=Object.keys(e);if(t.length===1&&t[0]==="sessionId"){let{sessionId:r}=e;for(let[n,i]of Object.entries(Ni))i.sessionIds.delete(r),i.sessionIds.size===0&&delete Ni[n]}else for(let r of Object.values(Ni)){let n=e.regions||(e.region?[e.region]:[]);for(let i of n)i.refName!==void 0&&r.dataAdapter.freeResources(i)}}function eZ(){Ni={}}});var ER=b(Lb=>{"use strict";Object.defineProperty(Lb,"__esModule",{value:!0});var jb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};Lb.default=jb});var PR=b(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});Nb.default=Fb;var AR=e=>typeof e=="object"&&e!==null,tZ=e=>AR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function Fb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{for(let o of i)t(o),AR(o)&&Fb(o,t,r)};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),tZ(i)&&(Array.isArray(i)?n(i):Fb(i,t,r))}});var RR=b(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.UNSUPPORTED=Ue.UNKNOWN=void 0;Ue.getTrackAssemblyNames=rZ;Ue.getConfAssemblyNames=TR;Ue.getRpcSessionId=nZ;Ue.getParentRenderProps=iZ;Ue.getBlob=oZ;Ue.getBlobMap=aZ;Ue.setBlobMap=uZ;Ue.storeBlobLocation=cZ;Ue.makeIndex=lZ;Ue.makeIndexType=fZ;Ue.getFileName=dZ;Ue.guessAdapter=pZ;Ue.guessTrackType=hZ;Ue.generateUnsupportedTrackConf=vZ;Ue.generateUnknownTrackConf=mZ;Ue.getTrackName=bZ;var pa=bt(),Xu=Au(),da=Yv();function rZ(e){return TR(e.configuration)}function TR(e){let t=(0,da.readConfObject)(e,"assemblyNames");if(!t){let r=(0,pa.getParent)(e);if("sequence"in r)return[(0,da.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function nZ(e){let t;for(let r=e;!(0,pa.isRoot)(r);r=(0,pa.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t}function iZ(e){for(let t=(0,pa.getParent)(e);!(0,pa.isRoot)(t);t=(0,pa.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Ue.UNKNOWN="UNKNOWN";Ue.UNSUPPORTED="UNSUPPORTED";var Gd={};function oZ(e){return Gd[e]}function aZ(){return Gd}function uZ(e){Gd=e}var sZ=0;function cZ(e){if("blob"in e){let t=`b${+Date.now()}-${sZ++}`;return Gd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function lZ(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function fZ(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function dZ(e){let t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return n?.name||t?.slice(t.lastIndexOf("/")+1)||r?.slice(r.replace(/\\/g,"/").lastIndexOf("/")+1)||""}function pZ(e,t,r,n){if(n){let{pluginManager:i}=(0,Xu.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,l,s)=>{})(e,t,r);if(a)return a}return{type:Ue.UNKNOWN}}function hZ(e,t){if(t){let r=(0,Xu.getSession)(t),i=(0,Xu.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function vZ(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,Xu.objectHash)(n),n}function mZ(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unknown)`,description:`Could not determine track type for "${t}"`,category:r,trackId:""};return n.trackId=(0,Xu.objectHash)(n),n}function bZ(e,t){let r=(0,da.readConfObject)(e,"name");if(!r&&(0,da.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,da.readConfObject)(n,"displayName")||(0,da.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var CR=b(Qu=>{"use strict";var kR=Qu&&Qu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qu,"__esModule",{value:!0});var gZ=kR(ER()),yZ=kR(PR()),MR=RR(),Kd=Rc(),Db=class extends gZ.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,MR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Kd.isAppRootModel)(n)||t.internetAccountPreAuthorization)return t;let i=n.findAppropriateInternetAccount(t);return i&&r!=="MainThreadRpcDriver"&&(t.internetAccountPreAuthorization=await i.getPreAuthorizationInformation(t)),t}async deserializeArguments(t,r){return t.blobMap&&(0,MR.setBlobMap)(t.blobMap),t}async serializeReturn(t,r,n){return t}async deserializeReturn(t,r,n){var i;let o;try{o=await t}catch(a){if((0,Kd.isAuthNeededException)(a)){let u=(i=this.pluginManager.rootModel)===null||i===void 0?void 0:i.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(a.url).origin}`,{},a.url);throw new Kd.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,yZ.default)(t,i=>{(0,Kd.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Qu.default=Db});var qR=b(zb=>{"use strict";Object.defineProperty(zb,"__esModule",{value:!0});var _Z=Vv(),Bb=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,_Z.stringToJexlExpression)(r),string:r};throw new Error(`invalid inputFilter string "${r}"`)})}passes(...t){for(let r of this.filterChain)if(!r.expr.evalSync({feature:t[0]}))return!1;return!0}toJSON(){return{filters:this.filterChain.map(t=>t.string)}}static fromJSON(t){return new e(t)}};zb.default=Bb});var jR=b(es=>{"use strict";var IR=es&&es.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(es,"__esModule",{value:!0});var wZ=IR(CR()),xZ=Au(),SZ=IR(qR()),Ub=class extends wZ.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new SZ.default({filters:t.filters}):void 0}}async serializeArguments(t,r){var n,i,o;let u=(i=(n=this.pluginManager.rootModel)===null||n===void 0?void 0:n.session)===null||i===void 0?void 0:i.assemblyManager;if(!u)throw new Error("no assembly manager");let l=await(0,xZ.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};es.default=Ub});var EZ={};is(EZ,{default:()=>Yd});var HR=D(eg());var tg="1.2.4";var C_=D(Nr());var iC=D(ya(),1);var Ky=D(Np(),1);function eC(e){let t=0;for(let r of e)t+=r.length;return t}function Dp(e){let t=new Uint8Array(eC(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}var{Z_SYNC_FLUSH:tC,Inflate:rC}=Ky.default;async function ws(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new rC,{strm:t}=n,n.push(o,tC),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return Dp(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}var nC=D(ya(),1);var E_=D(xs()),Ba=D(Wt()),A_=D(Up()),Ts=D(Ss()),P_=D(Os()),T_=D(l_());var Vt=null;try{Vt=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 Te(e,t,r){this.low=e|0,this.high=t|0,this.unsigned=!!r}Te.prototype.__isLong__;Object.defineProperty(Te.prototype,"__isLong__",{value:!0});function lt(e){return(e&&e.__isLong__)===!0}function f_(e){var t=Math.clz32(e&-e);return e?31-t:t}Te.isLong=lt;var d_={},p_={};function ui(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=p_[e],n)?n:(r=xe(e,0,!0),i&&(p_[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=d_[e],n)?n:(r=xe(e,e<0?-1:0,!1),i&&(d_[e]=r),r))}Te.fromInt=ui;function $t(e,t){if(isNaN(e))return t?Wr:er;if(t){if(e<0)return Wr;if(e>=b_)return __}else{if(e<=-v_)return At;if(e+1>=v_)return y_}return e<0?$t(-e,t).neg():xe(e%to|0,e/to|0,t)}Te.fromNumber=$t;function xe(e,t,r){return new Te(e,t,r)}Te.fromBits=xe;var Ps=Math.pow;function rh(e,t,r){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(r=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?Wr:er;if(r=r||10,r<2||36<r)throw RangeError("radix");var n;if((n=e.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return rh(e.substring(1),t,r).neg();for(var i=$t(Ps(r,8)),o=er,a=0;a<e.length;a+=8){var u=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+u),r);if(u<8){var s=$t(Ps(r,u));o=o.mul(s).add($t(l))}else o=o.mul(i),o=o.add($t(l))}return o.unsigned=t,o}Te.fromString=rh;function Ht(e,t){return typeof e=="number"?$t(e,t):typeof e=="string"?rh(e,t):xe(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Te.fromValue=Ht;var h_=65536,AC=1<<24,to=h_*h_,b_=to*to,v_=b_/2,m_=ui(AC),er=ui(0);Te.ZERO=er;var Wr=ui(0,!0);Te.UZERO=Wr;var eo=ui(1);Te.ONE=eo;var g_=ui(1,!0);Te.UONE=g_;var th=ui(-1);Te.NEG_ONE=th;var y_=xe(-1,2147483647,!1);Te.MAX_VALUE=y_;var __=xe(-1,-1,!0);Te.MAX_UNSIGNED_VALUE=__;var At=xe(0,-2147483648,!1);Te.MIN_VALUE=At;var N=Te.prototype;N.toInt=function(){return this.unsigned?this.low>>>0:this.low};N.toNumber=function(){return this.unsigned?(this.high>>>0)*to+(this.low>>>0):this.high*to+(this.low>>>0)};N.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(At)){var r=$t(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var o=$t(Ps(t,6),this.unsigned),a=this,u="";;){var l=a.div(o),s=a.sub(l.mul(o)).toInt()>>>0,c=s.toString(t);if(a=l,a.isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}};N.getHighBits=function(){return this.high};N.getHighBitsUnsigned=function(){return this.high>>>0};N.getLowBits=function(){return this.low};N.getLowBitsUnsigned=function(){return this.low>>>0};N.getNumBitsAbs=function(){if(this.isNegative())return this.eq(At)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,r=31;r>0&&(t&1<<r)==0;r--);return this.high!=0?r+33:r+1};N.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};N.isZero=function(){return this.high===0&&this.low===0};N.eqz=N.isZero;N.isNegative=function(){return!this.unsigned&&this.high<0};N.isPositive=function(){return this.unsigned||this.high>=0};N.isOdd=function(){return(this.low&1)===1};N.isEven=function(){return(this.low&1)===0};N.equals=function(t){return lt(t)||(t=Ht(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};N.eq=N.equals;N.notEquals=function(t){return!this.eq(t)};N.neq=N.notEquals;N.ne=N.notEquals;N.lessThan=function(t){return this.comp(t)<0};N.lt=N.lessThan;N.lessThanOrEqual=function(t){return this.comp(t)<=0};N.lte=N.lessThanOrEqual;N.le=N.lessThanOrEqual;N.greaterThan=function(t){return this.comp(t)>0};N.gt=N.greaterThan;N.greaterThanOrEqual=function(t){return this.comp(t)>=0};N.gte=N.greaterThanOrEqual;N.ge=N.greaterThanOrEqual;N.compare=function(t){if(lt(t)||(t=Ht(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?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};N.comp=N.compare;N.negate=function(){return!this.unsigned&&this.eq(At)?At:this.not().add(eo)};N.neg=N.negate;N.add=function(t){lt(t)||(t=Ht(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,s=t.low&65535,c=0,d=0,p=0,f=0;return f+=o+s,p+=f>>>16,f&=65535,p+=i+l,d+=p>>>16,p&=65535,d+=n+u,c+=d>>>16,d&=65535,c+=r+a,c&=65535,xe(p<<16|f,c<<16|d,this.unsigned)};N.subtract=function(t){return lt(t)||(t=Ht(t)),this.add(t.neg())};N.sub=N.subtract;N.multiply=function(t){if(this.isZero())return this;if(lt(t)||(t=Ht(t)),Vt){var r=Vt.mul(this.low,this.high,t.low,t.high);return xe(r,Vt.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Wr:er;if(this.eq(At))return t.isOdd()?At:er;if(t.eq(At))return this.isOdd()?At:er;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(m_)&&t.lt(m_))return $t(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,u=t.high>>>16,l=t.high&65535,s=t.low>>>16,c=t.low&65535,d=0,p=0,f=0,h=0;return h+=a*c,f+=h>>>16,h&=65535,f+=o*c,p+=f>>>16,f&=65535,f+=a*s,p+=f>>>16,f&=65535,p+=i*c,d+=p>>>16,p&=65535,p+=o*s,d+=p>>>16,p&=65535,p+=a*l,d+=p>>>16,p&=65535,d+=n*c+i*s+o*l+a*u,d&=65535,xe(f<<16|h,d<<16|p,this.unsigned)};N.mul=N.multiply;N.divide=function(t){if(lt(t)||(t=Ht(t)),t.isZero())throw Error("division by zero");if(Vt){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var r=(this.unsigned?Vt.div_u:Vt.div_s)(this.low,this.high,t.low,t.high);return xe(r,Vt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Wr:er;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Wr;if(t.gt(this.shru(1)))return g_;o=Wr}else{if(this.eq(At)){if(t.eq(eo)||t.eq(th))return At;if(t.eq(At))return eo;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(er)?t.isNegative()?eo:th:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(At))return this.unsigned?Wr:er;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=er}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(n)/Math.LN2),l=u<=48?1:Ps(2,u-48),s=$t(n),c=s.mul(t);c.isNegative()||c.gt(i);)n-=l,s=$t(n,this.unsigned),c=s.mul(t);s.isZero()&&(s=eo),o=o.add(s),i=i.sub(c)}return o};N.div=N.divide;N.modulo=function(t){if(lt(t)||(t=Ht(t)),Vt){var r=(this.unsigned?Vt.rem_u:Vt.rem_s)(this.low,this.high,t.low,t.high);return xe(r,Vt.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};N.mod=N.modulo;N.rem=N.modulo;N.not=function(){return xe(~this.low,~this.high,this.unsigned)};N.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};N.clz=N.countLeadingZeros;N.countTrailingZeros=function(){return this.low?f_(this.low):f_(this.high)+32};N.ctz=N.countTrailingZeros;N.and=function(t){return lt(t)||(t=Ht(t)),xe(this.low&t.low,this.high&t.high,this.unsigned)};N.or=function(t){return lt(t)||(t=Ht(t)),xe(this.low|t.low,this.high|t.high,this.unsigned)};N.xor=function(t){return lt(t)||(t=Ht(t)),xe(this.low^t.low,this.high^t.high,this.unsigned)};N.shiftLeft=function(t){return lt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?xe(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):xe(0,this.low<<t-32,this.unsigned)};N.shl=N.shiftLeft;N.shiftRight=function(t){return lt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?xe(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):xe(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};N.shr=N.shiftRight;N.shiftRightUnsigned=function(t){return lt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?xe(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?xe(this.high,0,this.unsigned):xe(this.high>>>t-32,0,this.unsigned)};N.shru=N.shiftRightUnsigned;N.shr_u=N.shiftRightUnsigned;N.rotateLeft=function(t){var r;return lt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?xe(this.high,this.low,this.unsigned):t<32?(r=32-t,xe(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,xe(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};N.rotl=N.rotateLeft;N.rotateRight=function(t){var r;return lt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?xe(this.high,this.low,this.unsigned):t<32?(r=32-t,xe(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,xe(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};N.rotr=N.rotateRight;N.toSigned=function(){return this.unsigned?xe(this.low,this.high,!1):this};N.toUnsigned=function(){return this.unsigned?this:xe(this.low,this.high,!0)};N.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};N.toBytesLE=function(){var t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};N.toBytesBE=function(){var t=this.high,r=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,r>>>24,r>>>16&255,r>>>8&255,r&255]};Te.fromBytes=function(t,r,n){return n?Te.fromBytesLE(t,r):Te.fromBytesBE(t,r)};Te.fromBytesLE=function(t,r){return new Te(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)};Te.fromBytesBE=function(t,r){return new Te(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)};typeof BigInt=="function"&&(Te.fromBigInt=function(t,r){var n=Number(BigInt.asIntN(32,t)),i=Number(BigInt.asIntN(32,t>>BigInt(32)));return xe(n,i,r)},Te.fromValue=function(t,r){return typeof t=="bigint"?Te.fromBigInt(t,r):Ht(t,r)},N.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});var w_=Te;var Da=class{blockPosition;dataPosition;constructor(t,r){this.blockPosition=t,this.dataPosition=r}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(t){return this.blockPosition-t.blockPosition||this.dataPosition-t.dataPosition}};function si(e){let t=[],r={},n=e.split(/\s*(;|\(|\)|,|:)\s*/);for(let i=0;i<n.length;i++){let o=n[i],a={};switch(o){case"(":r.children=[a],t.push(r),r=a;break;case",":t.at(-1)?.children.push(a),r=a;break;case")":r=t.pop();break;case":":break;default:{let u=n[i-1];u===")"||u==="("||u===","?r.name=o:u===":"&&(r.length=Number.parseFloat(o))}}}return r}function PC(e){return typeof e[0]=="string"}function un(e){return PC(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function x_(e){let t=e.split(" "),r=[];for(let n=0;n<t.length;){let i=t[n++];if(i==="i"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}if(i==="s"){let o=+t[n++],[a,u]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:u,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}else i==="d"?r.push({type:i,row:+t[n++]}):i==="g"?r.push({type:i,row:+t[n++],gapLen:+t[n++]}):i==="G"&&r.push({type:i,row:+t[n++],gapSubstring:t[n++]})}return r}function S_(e,t){let r=0,n=[],i=new TextDecoder("utf8");for(;r<e.length;){let o=e.indexOf(10,r);if(o===-1)break;let a=e.subarray(r,o),u=i.decode(a).trim();if(u){let l=t(u);l&&n.push(l)}r=o+1}return n}var O_=(e=0)=>+(+e).toFixed(1),za=class extends E_.BaseFeatureDataAdapter{setupP;cache=new T_.default({cache:new A_.default({maxSize:50}),fill:async({nextEntry:t,firstEntry:r},n,i)=>{let a=await(0,Ts.openLocation)(this.getConf("tafGzLocation")).read(t.virtualOffset.blockPosition-r.virtualOffset.blockPosition,r.virtualOffset.blockPosition),l=(await ws(a)).slice(r.virtualOffset.dataPosition);return this.getChunk(l,{statusCallback:i,signal:n})}});async getRefNames(){let t=await this.setup();return Object.keys(t)}async getChunk(t,r){let{statusCallback:n=()=>{}}=r||{},i={},o=[],a,u=0,l=0;if(S_(t,s=>{if(u++%100===0&&n(`Processing ${O_(l/1e6)}/${O_(t.length/1e6)}Mb`),l+=s.length,s){let[c,d]=s.split(" ; ");if(d){for(let f of x_(d))if(f.type==="i"){o.splice(f.row,0,f),i[f.asm]||(i[f.asm]={start:f.start,strand:f.strand,srcSize:f.length,chr:f.ref,data:""});let h=i[f.asm];h.data+=" ".repeat(Math.max(0,u-h.data.length-1))}else if(f.type==="s"){i[f.asm]||(i[f.asm]={start:f.start,strand:f.strand,srcSize:f.length,chr:f.ref,data:""});let h=i[f.asm];h.data+=" ".repeat(Math.max(0,u-h.data.length-1)),o[f.row]=f}else f.type==="d"&&o.splice(f.row,1);a||(a=o[0])}let p=c.length;for(let f=0;f<p;f++){let h=c[f],v=o[f];v&&(i[v.asm].data+=h)}}}),a){let s=i[a.asm];return{uniqueId:`${s.start}-${s.data.length}`,start:s.start,end:s.start+s.data.length,strand:s.strand,alignments:i,seq:s.data}}}setupPre(){return this.setupP||(this.setupP=this.readTaiFile().catch(t=>{throw this.setupP=void 0,t})),this.setupP}setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,Ba.updateStatus)("Downloading index",r,()=>this.setupPre())}async readTaiFile(){let r=(await(0,Ts.openLocation)(this.getConf("taiLocation")).readFile("utf8")).split(`
6
+ `).map(u=>u.trim()).filter(u=>!!u),n={},i="",o=0,a=0;for(let u of r){let[l,s,c]=u.split(" "),d=a+ +c,p=l==="*"?i:l.split(".").at(-1),f=w_.fromNumber(d),h=f.shiftRightUnsigned(16),v=f.and(65535),g=new Da(h.toNumber(),v.toNumber());n[p]||(n[p]=[],i="",o=0,a=0);let y=+s+o;n[p].push({chrStart:y,virtualOffset:g}),i=p,o=y,a=d}return n}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,P_.ObservableCreate)(async i=>{try{let o=await this.setup(),a=await(0,Ba.updateStatus)("Downloading alignments",n,()=>this.getLines(t,o));a?i.next(new Ba.SimpleFeature({...a,refName:t.refName})):console.error("no feature found"),n(""),i.complete()}catch(o){i.error(o)}})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,Ts.openLocation)(r).readFile("utf8");return{samples:un(this.getConf("samples")),tree:n?si(n):void 0}}async getLines(t,r){let n=r[t.refName];if(n){let i,o;for(let a=0;a<n.length;a++)if(n[a].chrStart>=t.start){i=n[Math.max(a-1,0)];break}for(let a=0;a<n.length;a++)if(t.end<=n[a].chrStart){o=n[a+1];break}if(o=o??n.at(-1),i&&o)return this.cache.get(`${JSON.stringify(o)}_${JSON.stringify(i)}`,{nextEntry:o,firstEntry:i})}}freeResources(){}};var M_=D(sn());var TC=(0,M_.ConfigurationSchema)("BgzipTaffyAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},tafGzLocation:{type:"fileLocation",description:"bgzip taffy file",defaultValue:{uri:"/path/to/my.taf",locationType:"UriLocation"}},taiLocation:{type:"fileLocation",description:"taffy index",defaultValue:{uri:"/path/to/my.taf.gz.tai",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),k_=TC;function nh(e){return e.addAdapterType(()=>new C_.AdapterType({name:"BgzipTaffyAdapter",AdapterClass:za,configSchema:k_}))}var J_=D(Nr());var $_=D(xs()),$a=D(Wt()),H_=D(Ss()),G_=D(Os()),K_=D(bt());var ih=function(e,t){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ih(e,t)};function Ua(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ih(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function oh(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ro(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function no(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function yr(e){return typeof e=="function"}function Rs(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ms=Rs(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
8
7
  `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
9
- `):"",this.name="UnsubscriptionError",this.errors=r}});function Ah(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var zs=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=Eh(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Mr(c))try{c()}catch(m){o=m instanceof Ds?m.errors:[m]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=Eh(d),f=p.next();!f.done;f=p.next()){var h=f.value;try{o0(h)}catch(m){o=o??[],m instanceof Ds?o=lo(lo([],co(o)),co(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new Ds(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)o0(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Ah(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Ah(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var FJ=zs.EMPTY;function a0(e){return e instanceof zs||e&&"closed"in e&&Mr(e.remove)&&Mr(e.add)&&Mr(e.unsubscribe)}function o0(e){Mr(e)?e():e.unsubscribe()}var wn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var fo={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=fo.delegate;return i?.setTimeout?i.setTimeout.apply(i,lo([e,t],co(r))):setTimeout.apply(void 0,lo([e,t],co(r)))},clearTimeout:function(e){var t=fo.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function u0(e){fo.setTimeout(function(){var t=wn.onUnhandledError;if(t)t(e);else throw e})}function Th(){}var s0=function(){return Ph("C",void 0,void 0)}();function c0(e){return Ph("E",void 0,e)}function l0(e){return Ph("N",e,void 0)}function Ph(e,t,r){return{kind:e,value:t,error:r}}var Rh=null;function f0(e){wn.useDeprecatedSynchronousErrorHandling&&Rh&&(Rh.errorThrown=!0,Rh.error=e)}var kh=function(e){Ha(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,a0(r)&&r.add(n)):n.destination=wq,n}return t.create=function(r,n,i){return new qh(r,n,i)},t.prototype.next=function(r){this.isStopped?Ch(l0(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Ch(c0(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Ch(s0,this):(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(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(zs);var gq=Function.prototype.bind;function Mh(e,t){return gq.call(e,t)}var _q=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Bs(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Bs(n)}else Bs(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Bs(r)}},e}(),qh=function(e){Ha(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(Mr(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&wn.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Mh(r.next,u),error:r.error&&Mh(r.error,u),complete:r.complete&&Mh(r.complete,u)}):a=r}return o.destination=new _q(a),o}return t}(kh);function Bs(e){wn.useDeprecatedSynchronousErrorHandling?f0(e):u0(e)}function yq(e){throw e}function Ch(e,t){var r=wn.onStoppedNotification;r&&fo.setTimeout(function(){return r(e,t)})}var wq={closed:!0,next:Th,error:yq,complete:Th};function xq(e){return Mr(e?.lift)}function Us(e){return function(t){if(xq(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function d0(e,t,r,n,i){return new Sq(e,t,r,n,i)}var Sq=function(e){Ha(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(kh);var p0=Ns(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Va(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new qh({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new p0)}});e.subscribe(o)})}function h0(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(d0(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}function m0(e,t){return Us(h0(e,t,arguments.length>=2,!1,!0))}var Oq=function(e,t){return e.push(t),e};function Ga(){return Us(function(e,t){m0(Oq,[])(e).subscribe(t)})}var $a=class extends v0.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,_0.getSnapshot)(this.config),type:"BigBedAdapter"})).dataAdapter}}async setupPre(){return this.setupP||(this.setupP=this.setup().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async getRefNames(){let{adapter:t}=await this.setup();return t.getRefNames()}async getHeader(){let{adapter:t}=await this.setup();return t.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,g0.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(),a=await(0,Ws.updateStatus)("Downloading alignment",n,()=>Va(o.getFeatures(t).pipe(Ga())));for(let u of a){let s=u.get("mafBlock").split(";"),c,d=[],p={},f=[];for(let h of s)h.startsWith("s")&&(c?(d.push(h.split(/ +/)[6]),f.push(h)):(c=h.split(/ +/)[6],d.push(c),f.push(h)));for(let h=0;h<f.length;h++){let g=f[h].split(/ +/),_=g[1].split("."),w=_[0],y=_[1];p[w]={chr:y,start:+g[1],srcSize:+g[2],strand:g[3]==="+"?1:-1,unknown:+g[4],data:d[h]}}i.next(new Ws.SimpleFeature({id:u.id(),data:{start:u.get("start"),end:u.get("end"),refName:u.get("refName"),seq:d[0],alignments:p}}))}i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,b0.openLocation)(r).readFile("utf8");return{samples:_n(this.getConf("samples")),tree:n?vi(n):void 0}}freeResources(){}};var y0=V(yn());var Eq=(0,y0.ConfigurationSchema)("BigMafAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bigBedLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bb",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),w0=Eq;function Ih(e){return e.addAdapterType(()=>new x0.AdapterType({name:"BigMafAdapter",AdapterClass:$a,configSchema:w0}))}var qR=V($r());var xt=V(Ye()),eR=V(q1()),tR=V(FP()),Qd=V(Lt()),rR=V(ei()),nR=V(iu());Rb();var mY=(0,nR.makeStyles)()({cursor:{pointerEvents:"none"}}),vY=(0,rR.observer)(function(e){let{model:t}=e,{classes:r}=mY(),{pluginManager:n}=(0,Qd.getEnv)(t),{rowHeight:i,height:o,scrollTop:a,samples:u}=t,l=(0,xt.useRef)(null),s=n.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[d,p]=(0,xt.useState)(),[f,h]=(0,xt.useState)(),{width:m}=(0,Qd.getContainingView)(t);return xt.default.createElement("div",{ref:l,onMouseMove:g=>{let _=l.current?.getBoundingClientRect(),w=_?.top||0,y=_?.left||0;p(g.clientY-w),h(g.clientX-y)},onMouseLeave:()=>{p(void 0),h(void 0)}},xt.default.createElement(c,{...e}),xt.default.createElement(Xd,{model:t}),d&&u?xt.default.createElement("div",{style:{position:"relative"}},xt.default.createElement("svg",{className:r.cursor,width:m,height:o,style:{position:"absolute",top:a}},xt.default.createElement("line",{x1:0,x2:m,y1:d-a,y2:d-a,stroke:"black"}),xt.default.createElement("line",{x1:f,x2:f,y1:0,y2:o,stroke:"black"})),xt.default.createElement(eR.default,null,xt.default.createElement(tR.default,{html:Object.entries(u[Math.floor(d/i)]||{}).filter(([g])=>g!=="color"&&g!=="id").map(([g,_])=>`${g}:${_}`).join(`
10
- `)}))):null)}),iR=vY;var oR=V(yn());function Mb(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,oR.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var rp=V(yn()),pa=V(Lt()),CR=V(uR());function ep(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tp(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function bY(e,t){return e.parent===t.parent?1:2}function gY(e){return e.reduce(_Y,0)/e.length}function _Y(e,t){return e+t.x}function yY(e){return 1+e.reduce(wY,0)}function wY(e,t){return Math.max(e,t.y)}function xY(e){for(var t;t=e.children;)e=t[0];return e}function SY(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Cb(){var e=bY,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(p){var f=p.children;f?(p.x=gY(f),p.y=yY(f)):(p.x=a?u+=e(p,a):0,p.y=0,a=p)});var l=xY(o),s=SY(o),c=l.x-e(l,s)/2,d=s.x+e(s,l)/2;return o.eachAfter(n?function(p){p.x=(p.x-o.x)*t,p.y=(o.y-p.y)*r}:function(p){p.x=(p.x-c)/(d-c)*t,p.y=(1-(o.y?p.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function OY(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function sR(){return this.eachAfter(OY)}function cR(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function lR(e,t){for(var r=this,n=[r],i,o,a=-1;r=n.pop();)if(e.call(t,r,++a,this),i=r.children)for(o=i.length-1;o>=0;--o)n.push(i[o]);return this}function fR(e,t){for(var r=this,n=[r],i=[],o,a,u,l=-1;r=n.pop();)if(i.push(r),o=r.children)for(a=0,u=o.length;a<u;++a)n.push(o[a]);for(;r=i.pop();)e.call(t,r,++l,this);return this}function dR(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function pR(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function hR(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function mR(e){for(var t=this,r=EY(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function EY(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function vR(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function bR(){return Array.from(this)}function gR(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function _R(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*yR(){var e=this,t,r=[e],n,i,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,o=n.length;i<o;++i)r.push(n[i]);while(r.length)}function da(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=PY)):t===void 0&&(t=TY);for(var r=new Xu(e),n,i=[r],o,a,u,l;n=i.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,u=l-1;u>=0;--u)i.push(o=a[u]=new Xu(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(MY)}function AY(){return da(this).eachBefore(RY)}function TY(e){return e.children}function PY(e){return Array.isArray(e)?e[1]:null}function RY(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function MY(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Xu(e){this.data=e,this.depth=this.height=0,this.parent=null}Xu.prototype=da.prototype={constructor:Xu,count:sR,each:cR,eachAfter:fR,eachBefore:lR,find:dR,sum:pR,sort:hR,path:mR,ancestors:vR,descendants:bR,leaves:gR,links:_R,copy:AY,[Symbol.iterator]:yR};var Ib=V(xR()),kR=V(qc()),ri=V(vt());var Qt=V(Ye()),OR=V(Qu()),er=V(Oc()),ER=V(ei()),AR=V(iu()),CY=(0,AR.makeStyles)()({root:{width:500}}),kY=(0,ER.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=CY(),[i,o]=(0,Qt.useState)(`${t.rowHeight}`),[a,u]=(0,Qt.useState)(`${t.rowProportion}`);return Qt.default.createElement(OR.Dialog,{open:!0,onClose:r,title:"Set row height"},Qt.default.createElement(er.DialogContent,{className:n.root},Qt.default.createElement(er.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Qt.default.createElement(er.TextField,{value:i,helperText:"Enter row height",onChange:l=>{o(l.target.value)}}),Qt.default.createElement(er.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{u(l.target.value)}}),Qt.default.createElement(er.DialogActions,null,Qt.default.createElement(er.Button,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,onClick:()=>{t.setRowProportion(+a),t.setRowHeight(+i),r()}},"Submit"),Qt.default.createElement(er.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel"))))}),TR=kY;function kb(e){return(e.data.length||0)+(e.children&&tp(e.children,kb)||0)}function qb(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{qb(n,t,r)})}function jb(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return ri.types.compose("LinearMafDisplay",n,ri.types.model({type:ri.types.literal("LinearMafDisplay"),configuration:(0,rp.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80})).volatile(()=>({prefersOffset:!0,volatileSamples:void 0,volatileTree:void 0})).actions(i=>({setRowHeight(o){i.rowHeight=o},setRowProportion(o){i.rowProportion=o},setShowAllLetters(o){i.showAllLetters=o},setMismatchRendering(o){i.mismatchRendering=o},setSamples({samples:o,tree:a}){(0,Ib.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,Ib.default)(a,i.volatileTree)||(i.volatileTree=a)}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,rp.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,pa.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?da(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>ep(o.data.length||1,a.data.length||1)):void 0}})).views(i=>({get hierarchy(){let o=i.root;if(o){let a=i.treeAreaWidth;return Cb().size([this.totalHeight,a]).separation(()=>1)(o),qb(o,o.data.length=0,a/kb(o)),o}else return},get samples(){return this.rowNames?_n(this.rowNames):i.volatileSamples},get totalHeight(){return this.samples?this.samples.length*i.rowHeight:1},get leaves(){return i.root?.leaves()},get rowNames(){return this.leaves?.map(o=>o.data.name)}})).views(i=>{let{trackMenuItems:o,renderProps:a}=i;return{get treeWidth(){return i.hierarchy?i.treeAreaWidth:0},renderProps(){let{showAllLetters:u,rendererConfig:l,samples:s,rowHeight:c,rowProportion:d,mismatchRendering:p}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:l,samples:s,rowHeight:c,rowProportion:d,showAllLetters:u,mismatchRendering:p}},trackMenuItems(){return[...o(),{label:"Set feature height",type:"subMenu",subMenu:[{label:"Normal",onClick:()=>{i.setRowHeight(15),i.setRowProportion(.8)}},{label:"Compact",onClick:()=>{i.setRowHeight(8),i.setRowProportion(.9)}},{label:"Manually set height",onClick:()=>{(0,pa.getSession)(i).queueDialog(u=>[TR,{model:i,handleClose:u}])}}]},{label:"Show all letters",type:"checkbox",checked:i.showAllLetters,onClick:()=>{i.setShowAllLetters(!i.showAllLetters)}},{label:"Draw mismatches as single color",type:"checkbox",checked:!i.mismatchRendering,onClick:()=>{i.setMismatchRendering(!i.mismatchRendering)}}]}}}).actions(i=>({afterCreate(){(0,ri.addDisposer)(i,(0,kR.autorun)(async()=>{try{let{rpcManager:o}=(0,pa.getSession)(i),a=(0,CR.getRpcSessionId)(i),u=await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:l=>{(0,ri.isAlive)(i)&&i.setMessage(l)}});i.setSamples(u)}catch(o){console.error(o),(0,pa.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(MR(),RR));return u(i,a,o)}}})}function Fb(e){e.addDisplayType(()=>{let t=Mb(e),r=jb(t,e);return new qR.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:iR,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var NR=V($r()),np=V(Lt());var FR=V(Qu()),es=V(Lt());var Lb=V(Lt());function IR(e){return Object.fromEntries(Object.entries(Nb(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function Nb(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Hr(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function jR(){let e=(0,Lb.measureText)("A"),t=(0,Lb.measureText)("M")-2;return{charWidth:e,charHeight:t}}function LR({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:l,rowProportion:s,features:c}=t,d=r[0],p=(d.end-d.start)/n,f=i*s,h=(0,FR.createJBrowseTheme)(a),m=Nb(h),g=IR(h),{charHeight:_}=jR(),w=new Map(l.map((R,C)=>[R.id,C])),y=1/n,x=.4,O=i/2,A=f/2,T=(i-f)/2;e.font="bold 10px Courier New,monospace";for(let R of c.values()){let[C]=(0,es.featureSpanPx)(R,d,n),M=R.get("alignments"),P=R.get("seq").toLowerCase(),N=Object.entries(M);for(let[k,I]of N){let W=I.data,j=W.toLowerCase(),D=w.get(k);if(D===void 0)continue;let F=i*D;e.beginPath(),e.fillStyle="black";for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){if(j[q]==="-"){let $=C+y*B;e.moveTo($,F+O),e.lineTo($+y+x,F+O)}B++}if(e.stroke(),!o){e.fillStyle="lightgrey";for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){let $=j[q],X=C+y*B;P[q]===$&&$!=="-"&&$!==" "&&Hr(e,X,T+F,y+x,f,p),B++}}for(let q=0,B=0;q<j.length;q++){let $=j[q];if(P[q]!=="-"){if($!=="-"){let X=C+y*B;P[q]!==$&&$!==" "?Hr(e,X,T+F,y+x,f,p,u?m[$]??"black":"orange"):o&&Hr(e,X,T+F,y+x,f,p,u?m[$]??"black":"lightblue")}B++}}let z=10;if(y>=z){for(let q=0,B=0;q<j.length;q++)if(P[q]!=="-"){let $=C+y*B,X=(y-z)/2+1,he=j[q];(o||P[q]!==he)&&he!=="-"&&(e.fillStyle=u?g[he]??"white":"black",i>_&&e.fillText(W[q]||"",$+X,A+F+3)),B++}}}}for(let R of c.values()){let[C]=(0,es.featureSpanPx)(R,d,n),M=R.get("alignments"),P=R.get("seq").toLowerCase();for(let[N,k]of Object.entries(M)){let W=k.data.toLowerCase(),j=w.get(N);if(j===void 0)continue;let D=i*j;for(let F=0,z=0;F<W.length;F++){let q="";for(;P[F]==="-";)W[F]!=="-"&&W[F]!==" "&&(q+=W[F]),F++;if(q.length>0){let B=C+y*z-1;if(q.length>10){let $=`${q.length}`;if(n>10)Hr(e,B-1,D,2,f,p,"purple");else if(f>_){let X=(0,es.measureText)($),he=5;Hr(e,B-X/2-he,D,X+2*he,f,p,"purple"),e.fillStyle="white",e.fillText($,B-X/2,D+f)}else Hr(e,B-2,D,2*2,f,p,"purple")}else Hr(e,B,T+D,1,f,p,"purple"),n<.2&&i>5&&(Hr(e,B-2,T+D,5,1,p),Hr(e,B-2,T+D+f-1,5,1,p))}z++}}}}var ts=class extends NR.FeatureRendererType{getExpandedRegion(t){let{start:r,end:n}=t,i=1;return{...t,start:Math.floor(Math.max(r-i,0)),end:Math.ceil(n+i)}}async render(t){let{statusCallback:r=()=>{},regions:n,bpPerPx:i,samples:o,rowHeight:a}=t,u=n[0],l=o.length*a+100,s=(u.end-u.start)/i,c=await this.getFeatures(t),d=await(0,np.renderToAbstractCanvas)(s,l,t,async f=>{await(0,np.updateStatus)("Rendering alignment",r,()=>{LR({ctx:f,renderArgs:{...t,features:c}})})});return{...await super.render({...t,...d,width:s,height:l}),...d,features:new Map,width:s,height:l,containsNoTransferables:!0}}};var DR=V(Ye()),zR=V(Qu()),BR=V(ei()),IY=(0,BR.observer)(function(e){return DR.default.createElement(zR.PrerenderedCanvas,{...e})}),UR=IY;var WR=V(yn());var jY=(0,WR.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),HR=jY;function Db(e){e.addRendererType(()=>new ts({name:"LinearMafRenderer",ReactComponent:UR,configSchema:HR,pluginManager:e}))}var $R=V($r()),KR=V(vt());var ce=V(Ye()),ln=V(Qu()),ha=V(Lt()),Fe=V(Oc()),VR=V(vt()),GR=V(iu()),FY=(0,GR.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function zb({model:e}){let{classes:t}=FY(),[r,n]=(0,ce.useState)(""),[i,o]=(0,ce.useState)(),[a,u]=(0,ce.useState)(),[l,s]=(0,ce.useState)(),[c,d]=(0,ce.useState)(),[p,f]=(0,ce.useState)("MAF track"),[h,m]=(0,ce.useState)("BigMafAdapter"),[g,_]=(0,ce.useState)("TBI"),w=(0,VR.getRoot)(e);return ce.default.createElement(Fe.Paper,{className:t.paper},ce.default.createElement(Fe.Paper,null,c?ce.default.createElement(ln.ErrorMessage,{error:c}):null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"File type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:y=>{m(y.target.value)}},["BigMafAdapter","MafTabixAdapter"].map(y=>ce.default.createElement(Fe.FormControlLabel,{key:y,value:y,control:ce.default.createElement(Fe.Radio,null),checked:h===y,label:y})))),h==="BigMafAdapter"?ce.default.createElement(ln.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:y=>{o(y)}}):h==="MafTabixAdapter"?ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(Fe.FormControl,null,ce.default.createElement(Fe.FormLabel,null,"Index type"),ce.default.createElement(Fe.RadioGroup,{value:h,onChange:y=>{_(y.target.value)}},["TBI","CSI"].map(y=>ce.default.createElement(Fe.FormControlLabel,{key:y,value:y,control:ce.default.createElement(Fe.Radio,null),checked:g===y,label:y})))),ce.default.createElement(ln.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(ln.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:y=>{u(y)}})):ce.default.createElement(ce.default.Fragment,null,ce.default.createElement(ln.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:y=>{o(y)}}),ce.default.createElement(ln.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:y=>{u(y)}}))),ce.default.createElement("div",null,ce.default.createElement(ln.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:w,setLocation:y=>{s(y)}}),ce.default.createElement(Fe.TextField,{multiline:!0,rows:10,value:r,onChange:y=>{n(y.target.value)},helperText:"Sample names (optional if .nh supplied, required if not)",placeholder:"Enter sample names from the MAF file, one per line, or JSON formatted array of samples",variant:"outlined",fullWidth:!0})),ce.default.createElement(Fe.TextField,{value:p,helperText:"Track name",onChange:y=>{f(y.target.value)}}),ce.default.createElement(Fe.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let y=(0,ha.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let O=[`${p.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,y.adminMode?"":"-sessionTrack"].join("");(0,ha.isSessionWithAddTracks)(y)&&(y.addTrackConf({trackId:O,type:"MafTrack",name:p,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:x,nhLocation:l}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:l,index:{indexType:g,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(O)),e.clearData(),(0,ha.isSessionModelWithWidgets)(y)&&y.hideWidget(e)}catch(y){d(y)}}},"Submit"))}function Bb(e){e.addAddTrackWorkflowType(()=>new $R.AddTrackWorkflowType({name:"MAF track",ReactComponent:zb,stateModel:KR.types.model({})}))}var fM=V(QR()),dM=V(lM()),Jb=class extends dM.default{name="MafGetSamples";async execute(t,r){let n=this.pluginManager,i=await this.deserializeArguments(t,r),{regions:o,adapterConfig:a,sessionId:u}=i,{dataAdapter:l}=await(0,fM.getAdapter)(n,u,a);return l.getSamples(o,i)}};function Xb(e){e.addRpcMethod(()=>new Jb(e))}var gM=V($r());var pM=V(Cs()),ba=V(Lt()),hM=V(ks()),mM=V(qs()),vM=V(vt());var us=class extends pM.BaseFeatureDataAdapter{setupP;async setupPre(){let t=this.config;if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,vM.getSnapshot)(t),type:"BedTabixAdapter"})).dataAdapter}}async setupPre2(){return this.setupP||(this.setupP=this.setupPre().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,ba.updateStatus)("Downloading index",r,()=>this.setupPre2())}async getRefNames(t){let{adapter:r}=await this.setup(t);return r.getRefNames()}async getHeader(t){let{adapter:r}=await this.setup(t);return r.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,mM.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,ba.updateStatus)("Downloading alignments",n,()=>Va(o.getFeatures(t).pipe(Ga())));await(0,ba.updateStatus)("Processing alignments",n,()=>{let u="",l=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),d={};for(let p=0;p<c.length;p++){let f=c[p],h=f.split(":")[5],m=f.split(":"),g=m[0].split("."),[_,w="",...y]=g,x,O="";g.length===2?(x=_,O=w):Number.isNaN(+w)?(x=_,O=[w,...y].join(".")):(x=`${_}.${w}`,O=y.join(".")),x&&(u=u||x,d[x]={chr:O,start:+m[1],srcSize:+m[2],strand:m[3]==="-"?-1:1,unknown:+m[4],data:h})}i.next(new ba.SimpleFeature({id:s.id(),data:{start:s.get("start"),end:s.get("end"),refName:s.get("refName"),name:s.get("name"),score:s.get("score"),alignments:d,seq:d[l||t.assemblyName]?.data||d[u]?.data}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,hM.openLocation)(r).readFile("utf8");return{samples:_n(this.getConf("samples")),tree:n?vi(n):void 0}}freeResources(){}};var Qb=V(yn());var pZ=(0,Qb.ConfigurationSchema)("MafTabixAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bedGzLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi",locationType:"UriLocation"}},refAssemblyName:{type:"string",defaultValue:""},index:(0,Qb.ConfigurationSchema)("Index",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi"}},indexType:{type:"string",defaultValue:"TBI"}}),nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),bM=pZ;function eg(e){return e.addAdapterType(()=>new gM.AdapterType({name:"MafTabixAdapter",AdapterClass:us,configSchema:bM}))}var ap=V($r());var _M=V(yn()),yM=V($r());function tg(e){return(0,_M.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,yM.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function rg(e){return e.addTrackType(()=>{let t=tg(e);return new ap.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,ap.createBaseTrackModel)(e,"MafTrack",t)})})}var up=class extends wM.default{name="MafViewerPlugin";version=_g;install(t){Ih(t),rg(t),Fb(t),Db(t),eg(t),Sh(t),Bb(t),Xb(t)}configure(t){}};return vg(hZ);})();
8
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function ah(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ks=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var u=oh(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(v){t={error:v}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(yr(c))try{c()}catch(v){o=v instanceof Ms?v.errors:[v]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=oh(d),f=p.next();!f.done;f=p.next()){var h=f.value;try{I_(h)}catch(v){o=o??[],v instanceof Ms?o=no(no([],ro(o)),ro(v.errors)):o.push(v)}}}catch(v){n={error:v}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new Ms(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)I_(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&ah(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&ah(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var oJ=ks.EMPTY;function j_(e){return e instanceof ks||e&&"closed"in e&&yr(e.remove)&&yr(e.add)&&yr(e.unsubscribe)}function I_(e){yr(e)?e():e.unsubscribe()}var cn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var io={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=io.delegate;return i?.setTimeout?i.setTimeout.apply(i,no([e,t],ro(r))):setTimeout.apply(void 0,no([e,t],ro(r)))},clearTimeout:function(e){var t=io.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function L_(e){io.setTimeout(function(){var t=cn.onUnhandledError;if(t)t(e);else throw e})}function uh(){}var F_=function(){return sh("C",void 0,void 0)}();function N_(e){return sh("E",void 0,e)}function D_(e){return sh("N",e,void 0)}function sh(e,t,r){return{kind:e,value:t,error:r}}var ch=null;function B_(e){cn.useDeprecatedSynchronousErrorHandling&&ch&&(ch.errorThrown=!0,ch.error=e)}var dh=function(e){Ua(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,j_(r)&&r.add(n)):n.destination=CC,n}return t.create=function(r,n,i){return new ph(r,n,i)},t.prototype.next=function(r){this.isStopped?fh(D_(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?fh(N_(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?fh(F_,this):(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(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ks);var RC=Function.prototype.bind;function lh(e,t){return RC.call(e,t)}var MC=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Cs(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Cs(n)}else Cs(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Cs(r)}},e}(),ph=function(e){Ua(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(yr(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&cn.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&lh(r.next,u),error:r.error&&lh(r.error,u),complete:r.complete&&lh(r.complete,u)}):a=r}return o.destination=new MC(a),o}return t}(dh);function Cs(e){cn.useDeprecatedSynchronousErrorHandling?B_(e):L_(e)}function kC(e){throw e}function fh(e,t){var r=cn.onStoppedNotification;r&&io.setTimeout(function(){return r(e,t)})}var CC={closed:!0,next:uh,error:kC,complete:uh};function qC(e){return yr(e?.lift)}function qs(e){return function(t){if(qC(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function z_(e,t,r,n,i){return new IC(e,t,r,n,i)}var IC=function(e){Ua(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(dh);var U_=Rs(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Wa(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new ph({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new U_)}});e.subscribe(o)})}function W_(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(z_(a,function(c){var d=s++;l=u?e(l,c,d):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}function V_(e,t){return qs(W_(e,t,arguments.length>=2,!1,!0))}var jC=function(e,t){return e.push(t),e};function Va(){return qs(function(e,t){V_(jC,[])(e).subscribe(t)})}var Ha=class extends $_.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,K_.getSnapshot)(this.config),type:"BigBedAdapter"})).dataAdapter}}async setupPre(){return this.setupP||(this.setupP=this.setup().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async getRefNames(){let{adapter:t}=await this.setup();return t.getRefNames()}async getHeader(){let{adapter:t}=await this.setup();return t.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,G_.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(),a=await(0,$a.updateStatus)("Downloading alignments",n,()=>Wa(o.getFeatures(t).pipe(Va())));await(0,$a.updateStatus)("Processing alignments",n,()=>{for(let u of a){let s=u.get("mafBlock").split(";"),c,d=[],p={},f=[];for(let h of s)h.startsWith("s")&&(c?(d.push(h.split(/ +/)[6]),f.push(h)):(c=h.split(/ +/)[6],d.push(c),f.push(h)));for(let h=0;h<f.length;h++){let g=f[h].split(/ +/),y=g[1].split("."),w=y[0],_=y[1];p[w]={chr:_,start:+g[1],srcSize:+g[2],strand:g[3]==="+"?1:-1,unknown:+g[4],data:d[h]}}i.next(new $a.SimpleFeature({id:u.id(),data:{start:u.get("start"),end:u.get("end"),refName:u.get("refName"),seq:d[0],alignments:p}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,H_.openLocation)(r).readFile("utf8");return{samples:un(this.getConf("samples")),tree:n?si(n):void 0}}freeResources(){}};var Z_=D(sn());var LC=(0,Z_.ConfigurationSchema)("BigMafAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bigBedLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bb",locationType:"UriLocation"}},nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0}),Y_=LC;function hh(e){return e.addAdapterType(()=>new J_.AdapterType({name:"BigMafAdapter",AdapterClass:Ha,configSchema:Y_}))}var ix=D(Nr());var wt=D(Ge()),S1=D(oo()),O1=D(s1()),bc=D(Wt()),E1=D(mn()),A1=D(nu());rv();var qI=(0,A1.makeStyles)()({cursor:{pointerEvents:"none"}}),II=(0,E1.observer)(function(e){let{model:t}=e,{classes:r}=qI(),{pluginManager:n}=(0,bc.getEnv)(t),{rowHeight:i,height:o,scrollTop:a,samples:u}=t,l=(0,wt.useRef)(null),s=n.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[d,p]=(0,wt.useState)(),[f,h]=(0,wt.useState)(),{width:v}=(0,bc.getContainingView)(t);return wt.default.createElement("div",{ref:l,onMouseMove:g=>{let y=l.current?.getBoundingClientRect(),w=y?.top||0,_=y?.left||0;p(g.clientY-w),h(g.clientX-_)},onMouseLeave:()=>{p(void 0),h(void 0)}},wt.default.createElement(c,{...e}),wt.default.createElement(mc,{model:t}),d&&u?wt.default.createElement("div",{style:{position:"relative"}},wt.default.createElement("svg",{className:r.cursor,width:v,height:o,style:{position:"absolute",top:a}},wt.default.createElement("line",{x1:0,x2:v,y1:d-a,y2:d-a,stroke:"black"}),wt.default.createElement("line",{x1:f,x2:f,y1:0,y2:o,stroke:"black"})),wt.default.createElement(O1.default,null,wt.default.createElement(S1.SanitizedHTML,{html:Object.entries(u[Math.floor(d/i)]||{}).filter(([g])=>g!=="color"&&g!=="id").map(([g,y])=>`${g}:${y}`).join(`
9
+ `)}))):null)}),P1=II;var T1=D(sn());function nv(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,T1.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var tx=D(Ge()),wc=D(sn()),Sr=D(Wt()),rx=D(M1());function gc(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yc(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function jI(e,t){return e.parent===t.parent?1:2}function LI(e){return e.reduce(FI,0)/e.length}function FI(e,t){return e+t.x}function NI(e){return 1+e.reduce(DI,0)}function DI(e,t){return Math.max(e,t.y)}function BI(e){for(var t;t=e.children;)e=t[0];return e}function zI(e){for(var t;t=e.children;)e=t[t.length-1];return e}function iv(){var e=jI,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(p){var f=p.children;f?(p.x=LI(f),p.y=NI(f)):(p.x=a?u+=e(p,a):0,p.y=0,a=p)});var l=BI(o),s=zI(o),c=l.x-e(l,s)/2,d=s.x+e(s,l)/2;return o.eachAfter(n?function(p){p.x=(p.x-o.x)*t,p.y=(o.y-p.y)*r}:function(p){p.x=(p.x-c)/(d-c)*t,p.y=(1-(o.y?p.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function UI(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function k1(){return this.eachAfter(UI)}function C1(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function q1(e,t){for(var r=this,n=[r],i,o,a=-1;r=n.pop();)if(e.call(t,r,++a,this),i=r.children)for(o=i.length-1;o>=0;--o)n.push(i[o]);return this}function I1(e,t){for(var r=this,n=[r],i=[],o,a,u,l=-1;r=n.pop();)if(i.push(r),o=r.children)for(a=0,u=o.length;a<u;++a)n.push(o[a]);for(;r=i.pop();)e.call(t,r,++l,this);return this}function j1(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function L1(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function F1(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function N1(e){for(var t=this,r=WI(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function WI(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function D1(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function B1(){return Array.from(this)}function z1(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function U1(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*W1(){var e=this,t,r=[e],n,i,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,o=n.length;i<o;++i)r.push(n[i]);while(r.length)}function _o(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=HI)):t===void 0&&(t=$I);for(var r=new iu(e),n,i=[r],o,a,u,l;n=i.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,u=l-1;u>=0;--u)i.push(o=a[u]=new iu(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(KI)}function VI(){return _o(this).eachBefore(GI)}function $I(e){return e.children}function HI(e){return Array.isArray(e)?e[1]:null}function GI(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function KI(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function iu(e){this.data=e,this.depth=this.height=0,this.parent=null}iu.prototype=_o.prototype={constructor:iu,count:k1,each:C1,eachAfter:I1,eachBefore:q1,find:j1,sum:L1,sort:F1,path:N1,ancestors:D1,descendants:B1,leaves:z1,links:U1,copy:VI,[Symbol.iterator]:W1};var uv=D($1()),nx=D(_c()),gn=D(bt());function ov(e){return(e.data.length||0)+(e.children&&yc(e.children,ov)||0)}function av(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{av(n,t,r)})}var QI=(0,tx.lazy)(()=>Promise.resolve().then(()=>(J1(),Y1)));function sv(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return gn.types.compose("LinearMafDisplay",n,gn.types.model({type:gn.types.literal("LinearMafDisplay"),configuration:(0,wc.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80})).volatile(()=>({prefersOffset:!0,volatileSamples:void 0,volatileTree:void 0})).actions(i=>({setRowHeight(o){i.rowHeight=o},setRowProportion(o){i.rowProportion=o},setShowAllLetters(o){i.showAllLetters=o},setMismatchRendering(o){i.mismatchRendering=o},setSamples({samples:o,tree:a}){(0,uv.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,uv.default)(a,i.volatileTree)||(i.volatileTree=a)}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,wc.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,Sr.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?_o(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>gc(o.data.length||1,a.data.length||1)):void 0}})).views(i=>({get hierarchy(){let o=i.root;if(o){let a=i.treeAreaWidth;return iv().size([this.totalHeight,a]).separation(()=>1)(o),av(o,o.data.length=0,a/ov(o)),o}else return},get samples(){if(this.rowNames){let o=i.volatileSamples?Object.fromEntries(i.volatileSamples.map(a=>[a.id,a])):void 0;return un(this.rowNames).map(a=>({...a,label:o?.[a.id]?.label||a.label,color:o?.[a.id]?.color||a.color}))}else return i.volatileSamples},get totalHeight(){return this.samples?this.samples.length*i.rowHeight:1},get leaves(){return i.root?.leaves()},get rowNames(){return this.leaves?.map(o=>o.data.name)}})).views(i=>{let{trackMenuItems:o,renderProps:a}=i;return{get treeWidth(){return i.hierarchy?i.treeAreaWidth:0},renderProps(){let{showAllLetters:u,rendererConfig:l,samples:s,rowHeight:c,rowProportion:d,mismatchRendering:p}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:l,samples:s,rowHeight:c,rowProportion:d,showAllLetters:u,mismatchRendering:p}},trackMenuItems(){return[...o(),{label:"Set feature height",type:"subMenu",subMenu:[{label:"Normal",onClick:()=>{i.setRowHeight(15),i.setRowProportion(.8)}},{label:"Compact",onClick:()=>{i.setRowHeight(8),i.setRowProportion(.9)}},{label:"Manually set height",onClick:()=>{(0,Sr.getSession)(i).queueDialog(u=>[QI,{model:i,handleClose:u}])}}]},{label:"Show all letters",type:"checkbox",checked:i.showAllLetters,onClick:()=>{i.setShowAllLetters(!i.showAllLetters)}},{label:"Draw mismatches as single color",type:"checkbox",checked:!i.mismatchRendering,onClick:()=>{i.setMismatchRendering(!i.mismatchRendering)}}]}}}).views(i=>({get svgFontSize(){return Math.min(Math.max(i.rowHeight,8),14)},get canDisplayLabel(){return i.rowHeight>=7},get labelWidth(){return(0,Sr.max)(i.samples?.map(a=>(0,Sr.measureText)(a.label,this.svgFontSize)).map(a=>this.canDisplayLabel?a:20)||[],0)}})).actions(i=>({afterCreate(){(0,gn.addDisposer)(i,(0,nx.autorun)(async()=>{try{let{rpcManager:o}=(0,Sr.getSession)(i),a=(0,rx.getRpcSessionId)(i);i.setSamples(await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:u=>{(0,gn.isAlive)(i)&&i.setMessage(u)}}))}catch(o){console.error(o),(0,Sr.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(ex(),Q1));return u(i,a,o)}}})}function cv(e){e.addDisplayType(()=>{let t=nv(e),r=sv(t,e);return new ix.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:P1,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var cx=D(Nr()),xc=D(Wt());var ux=D(oo()),ou=D(Wt());var lv=D(Wt());function ox(e){return Object.fromEntries(Object.entries(fv(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function fv(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Or(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function ax(){let e=(0,lv.measureText)("A"),t=(0,lv.measureText)("M")-2;return{charWidth:e,charHeight:t}}function sx({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:l,rowProportion:s,features:c}=t,d=r[0],p=(d.end-d.start)/n,f=i*s,h=(0,ux.createJBrowseTheme)(a),v=fv(h),g=ox(h),{charHeight:y}=ax(),w=new Map(l.map((A,q)=>[A.id,q])),_=1/n,x=.4,O=i/2,E=f/2,P=(i-f)/2;e.font="bold 10px Courier New,monospace";for(let A of c.values()){let[q]=(0,ou.featureSpanPx)(A,d,n),k=A.get("alignments"),C=A.get("seq").toLowerCase(),W=Object.entries(k);for(let[B,M]of W){let R=M.data,z=R.toLowerCase(),L=w.get(B);if(L===void 0)continue;let T=i*L,I=P+T;e.beginPath(),e.fillStyle="black";for(let Y=0,F=0,Q=z.length;Y<Q;Y++)if(C[Y]!=="-"){if(z[Y]==="-"){let le=q+_*F;e.moveTo(le,T+O),e.lineTo(le+_+x,T+O)}F++}if(e.stroke(),!o){e.fillStyle="lightgrey";for(let Y=0,F=0,Q=z.length;Y<Q;Y++)if(C[Y]!=="-"){let le=z[Y],U=q+_*F;C[Y]===le&&le!=="-"&&le!==" "&&Or(e,U,I,_+x,f,p),F++}}for(let Y=0,F=0,Q=z.length;Y<Q;Y++){let le=z[Y];if(C[Y]!=="-"){if(le!=="-"){let U=q+_*F;C[Y]!==le&&le!==" "?Or(e,U,I,_+x,f,p,u?v[le]??"black":"orange"):o&&Or(e,U,I,_+x,f,p,u?v[le]??"black":"lightblue")}F++}}let V=10;if(_>=V){for(let Y=0,F=0,Q=z.length;Y<Q;Y++)if(C[Y]!=="-"){let le=q+_*F,U=(_-V)/2+1,Z=z[Y];(o||C[Y]!==Z)&&Z!=="-"&&(e.fillStyle=u?g[Z]??"white":"black",i>y&&e.fillText(R[Y]||"",le+U,E+T+3)),F++}}}}for(let A of c.values()){let[q]=(0,ou.featureSpanPx)(A,d,n),k=A.get("alignments"),C=A.get("seq").toLowerCase();for(let[W,B]of Object.entries(k)){let R=B.data.toLowerCase(),z=w.get(W);if(z===void 0)continue;let L=i*z,T=P+L;for(let I=0,V=0,Y=R.length;I<Y;I++){let F="";for(;C[I]==="-";)R[I]!=="-"&&R[I]!==" "&&(F+=R[I]),I++;if(F.length>0){let Q=q+_*V-1;if(F.length>10){let le=`${F.length}`;if(n>10)Or(e,Q-1,T,2,f,p,"purple");else if(f>y){let U=(0,ou.measureText)(le,10),Z=2;Or(e,Q-U/2-Z,T,U+2*Z,f,p,"purple"),e.fillStyle="white",e.fillText(le,Q-U/2,L+f)}else Or(e,Q-2,T,2*2,f,p,"purple")}else Or(e,Q,T,1,f,p,"purple"),n<.2&&i>5&&(Or(e,Q-2,T,5,1,p),Or(e,Q-2,T+f-1,5,1,p))}V++}}}}var au=class extends cx.FeatureRendererType{getExpandedRegion(t){let{start:r,end:n}=t,i=1;return{...t,start:Math.floor(Math.max(r-i,0)),end:Math.ceil(n+i)}}async render(t){let{statusCallback:r=()=>{},regions:n,bpPerPx:i,samples:o,rowHeight:a}=t,u=n[0],l=o.length*a+100,s=(u.end-u.start)/i,c=await this.getFeatures(t),d=await(0,xc.updateStatus)("Rendering alignment",r,()=>(0,xc.renderToAbstractCanvas)(s,l,t,f=>{sx({ctx:f,renderArgs:{...t,features:c}})}));return{...await super.render({...t,...d,width:s,height:l}),...d,features:new Map,width:s,height:l,containsNoTransferables:!0}}};var lx=D(Ge()),fx=D(oo()),dx=D(mn()),e2=(0,dx.observer)(function(e){return lx.default.createElement(fx.PrerenderedCanvas,{...e})}),px=e2;var hx=D(sn());var t2=(0,hx.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),vx=t2;function dv(e){e.addRendererType(()=>new au({name:"LinearMafRenderer",ReactComponent:px,configSchema:vx,pluginManager:e}))}var gx=D(Nr()),yx=D(bt());var ge=D(Ge()),$r=D(oo()),wo=D(Wt()),Be=D(pc()),mx=D(bt()),bx=D(nu()),r2=(0,bx.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function pv({model:e}){let{classes:t}=r2(),[r,n]=(0,ge.useState)(""),[i,o]=(0,ge.useState)(),[a,u]=(0,ge.useState)(),[l,s]=(0,ge.useState)(),[c,d]=(0,ge.useState)(),[p,f]=(0,ge.useState)("MAF track"),[h,v]=(0,ge.useState)("BigMafAdapter"),[g,y]=(0,ge.useState)("TBI"),w=(0,mx.getRoot)(e);return ge.default.createElement(Be.Paper,{className:t.paper},ge.default.createElement(Be.Paper,null,c?ge.default.createElement($r.ErrorMessage,{error:c}):null,ge.default.createElement(Be.FormControl,null,ge.default.createElement(Be.FormLabel,null,"File type"),ge.default.createElement(Be.RadioGroup,{value:h,onChange:_=>{v(_.target.value)}},["BigMafAdapter","MafTabixAdapter"].map(_=>ge.default.createElement(Be.FormControlLabel,{key:_,value:_,control:ge.default.createElement(Be.Radio,null),checked:h===_,label:_})))),h==="BigMafAdapter"?ge.default.createElement($r.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:_=>{o(_)}}):h==="MafTabixAdapter"?ge.default.createElement(ge.default.Fragment,null,ge.default.createElement(Be.FormControl,null,ge.default.createElement(Be.FormLabel,null,"Index type"),ge.default.createElement(Be.RadioGroup,{value:h,onChange:_=>{y(_.target.value)}},["TBI","CSI"].map(_=>ge.default.createElement(Be.FormControlLabel,{key:_,value:_,control:ge.default.createElement(Be.Radio,null),checked:g===_,label:_})))),ge.default.createElement($r.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:_=>{o(_)}}),ge.default.createElement($r.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:_=>{u(_)}})):ge.default.createElement(ge.default.Fragment,null,ge.default.createElement($r.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:_=>{o(_)}}),ge.default.createElement($r.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:_=>{u(_)}}))),ge.default.createElement("div",null,ge.default.createElement($r.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:w,setLocation:_=>{s(_)}}),ge.default.createElement(Be.TextField,{multiline:!0,rows:10,value:r,onChange:_=>{n(_.target.value)},helperText:"Sample names (optional if .nh supplied, required if not)",placeholder:"Enter sample names from the MAF file, one per line, or JSON formatted array of samples",variant:"outlined",fullWidth:!0})),ge.default.createElement(Be.TextField,{value:p,helperText:"Track name",onChange:_=>{f(_.target.value)}}),ge.default.createElement(Be.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let _=(0,wo.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let O=[`${p.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,_.adminMode?"":"-sessionTrack"].join("");(0,wo.isSessionWithAddTracks)(_)&&(_.addTrackConf({trackId:O,type:"MafTrack",name:p,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:x,nhLocation:l}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:l,index:{indexType:g,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(O)),e.clearData(),(0,wo.isSessionModelWithWidgets)(_)&&_.hideWidget(e)}catch(_){d(_)}}},"Submit"))}function hv(e){e.addAddTrackWorkflowType(()=>new gx.AddTrackWorkflowType({name:"MAF track",ReactComponent:pv,stateModel:yx.types.model({})}))}var LR=D(OR()),FR=D(jR()),Wb=class extends FR.default{name="MafGetSamples";async execute(t,r){let n=this.pluginManager,i=await this.deserializeArguments(t,r),{regions:o,adapterConfig:a,sessionId:u}=i,{dataAdapter:l}=await(0,LR.getAdapter)(n,u,a);return l.getSamples(o,i)}};function Vb(e){e.addRpcMethod(()=>new Wb(e))}var WR=D(Nr());var NR=D(xs()),ha=D(Wt()),DR=D(Ss()),BR=D(Os()),zR=D(bt());var ts=class extends NR.BaseFeatureDataAdapter{setupP;async setupPre(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,zR.getSnapshot)(this.config),type:"BedTabixAdapter"})).dataAdapter}}async setupPre2(){return this.setupP||(this.setupP=this.setupPre().catch(t=>{throw this.setupP=void 0,t})),this.setupP}async setup(t){let{statusCallback:r=()=>{}}=t||{};return(0,ha.updateStatus)("Downloading index",r,()=>this.setupPre2())}async getRefNames(t){let{adapter:r}=await this.setup(t);return r.getRefNames()}async getHeader(t){let{adapter:r}=await this.setup(t);return r.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,BR.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,ha.updateStatus)("Downloading alignments",n,()=>Wa(o.getFeatures(t).pipe(Va())));await(0,ha.updateStatus)("Processing alignments",n,()=>{let u="",l=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),d={},p=c.length;for(let f=0;f<p;f++){let h=c[f],v=h.split(":")[5],g=h.split(":"),y=g[0].split("."),[w,_="",...x]=y,O,E="";y.length===2?(O=w,E=_):Number.isNaN(+_)?(O=w,E=[_,...x].join(".")):(O=`${w}.${_}`,E=x.join(".")),O&&(u=u||O,d[O]={chr:E,start:+g[1],srcSize:+g[2],strand:g[3]==="-"?-1:1,unknown:+g[4],data:v})}i.next(new ha.SimpleFeature({id:s.id(),data:{start:s.get("start"),end:s.get("end"),refName:s.get("refName"),name:s.get("name"),score:s.get("score"),alignments:d,seq:d[l||t.assemblyName]?.data||d[u]?.data}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,DR.openLocation)(r).readFile("utf8");return{samples:un(this.getConf("samples")),tree:n?si(n):void 0}}freeResources(){}};var $b=D(sn());var OZ=(0,$b.ConfigurationSchema)("MafTabixAdapter",{samples:{type:"frozen",description:"string[] or {id:string,label:string,color?:string}[]",defaultValue:[]},bedGzLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi",locationType:"UriLocation"}},refAssemblyName:{type:"string",defaultValue:""},index:(0,$b.ConfigurationSchema)("Index",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my.bed.gz.tbi"}},indexType:{type:"string",defaultValue:"TBI"}}),nhLocation:{type:"fileLocation",description:"newick tree",defaultValue:{uri:"/path/to/my.nh",locationType:"UriLocation"}}},{explicitlyTyped:!0,preProcessSnapshot:e=>e.uri?{...e,...e.nhUri?{nhLocation:{uri:e.nhUri,baseUri:e.baseUri}}:{},bedGzLocation:{uri:e.uri,baseUri:e.baseUri},index:{location:{uri:`${e.uri}.tbi`,baseUri:e.baseUri}}}:e}),UR=OZ;function Hb(e){return e.addAdapterType(()=>new WR.AdapterType({name:"MafTabixAdapter",AdapterClass:ts,configSchema:UR}))}var Zd=D(Nr());var VR=D(sn()),$R=D(Nr());function Gb(e){return(0,VR.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,$R.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function Kb(e){return e.addTrackType(()=>{let t=Gb(e);return new Zd.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,Zd.createBaseTrackModel)(e,"MafTrack",t)})})}var Yd=class extends HR.default{name="MafViewerPlugin";version=tg;install(t){hh(t),Kb(t),cv(t),dv(t),Hb(t),nh(t),hv(t),Vb(t)}configure(t){}};return Xb(EZ);})();
11
10
  /*! Bundled license information:
12
11
 
13
12
  tabbable/dist/index.esm.js:
@@ -16,18 +15,6 @@ tabbable/dist/index.esm.js:
16
15
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
17
16
  *)
18
17
 
19
- dompurify/dist/purify.cjs.js:
20
- (*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE *)
21
-
22
- escape-html/index.js:
23
- (*!
24
- * escape-html
25
- * Copyright(c) 2012-2013 TJ Holowaychuk
26
- * Copyright(c) 2015 Andreas Lubbe
27
- * Copyright(c) 2015 Tiancheng "Timothy" Gu
28
- * MIT Licensed
29
- *)
30
-
31
18
  canvas2svg/canvas2svg.js:
32
19
  (*!!
33
20
  * Canvas 2 Svg v1.0.15