jbrowse-plugin-mafviewer 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/BigMafAdapter/BigMafAdapter.js +39 -28
- package/dist/BigMafAdapter/BigMafAdapter.js.map +1 -1
- package/dist/LinearMafDisplay/components/Crosshairs.js +1 -1
- package/dist/LinearMafDisplay/components/Crosshairs.js.map +1 -1
- package/dist/LinearMafDisplay/components/MAFTooltip.d.ts +2 -3
- package/dist/LinearMafDisplay/components/MAFTooltip.js +6 -19
- package/dist/LinearMafDisplay/components/MAFTooltip.js.map +1 -1
- package/dist/LinearMafDisplay/stateModel.d.ts +8 -0
- package/dist/LinearMafDisplay/stateModel.js +10 -0
- package/dist/LinearMafDisplay/stateModel.js.map +1 -1
- package/dist/LinearMafDisplay/util.d.ts +20 -0
- package/dist/LinearMafDisplay/util.js +29 -0
- package/dist/LinearMafDisplay/util.js.map +1 -1
- package/dist/LinearMafRenderer/LinearMafRenderer.d.ts +3 -0
- package/dist/LinearMafRenderer/LinearMafRenderer.js +1 -2
- package/dist/LinearMafRenderer/LinearMafRenderer.js.map +1 -1
- package/dist/LinearMafRenderer/components/ReactComponent.d.ts +3 -0
- package/dist/LinearMafRenderer/components/ReactComponent.js +41 -2
- package/dist/LinearMafRenderer/components/ReactComponent.js.map +1 -1
- package/dist/LinearMafRenderer/components/util.d.ts +1 -0
- package/dist/LinearMafRenderer/components/util.js +13 -0
- package/dist/LinearMafRenderer/components/util.js.map +1 -0
- package/dist/LinearMafRenderer/makeImageData.d.ts +4 -5
- package/dist/LinearMafRenderer/makeImageData.js +28 -146
- package/dist/LinearMafRenderer/makeImageData.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/features.d.ts +21 -0
- package/dist/LinearMafRenderer/rendering/features.js +58 -0
- package/dist/LinearMafRenderer/rendering/features.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/gaps.d.ts +12 -0
- package/dist/LinearMafRenderer/rendering/gaps.js +35 -0
- package/dist/LinearMafRenderer/rendering/gaps.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/index.d.ts +8 -0
- package/dist/LinearMafRenderer/rendering/index.js +10 -0
- package/dist/LinearMafRenderer/rendering/index.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/insertions.d.ts +14 -0
- package/dist/LinearMafRenderer/rendering/insertions.js +84 -0
- package/dist/LinearMafRenderer/rendering/insertions.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/matches.d.ts +13 -0
- package/dist/LinearMafRenderer/rendering/matches.js +41 -0
- package/dist/LinearMafRenderer/rendering/matches.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/mismatches.d.ts +13 -0
- package/dist/LinearMafRenderer/rendering/mismatches.js +47 -0
- package/dist/LinearMafRenderer/rendering/mismatches.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/spatialIndex.d.ts +60 -0
- package/dist/LinearMafRenderer/rendering/spatialIndex.js +99 -0
- package/dist/LinearMafRenderer/rendering/spatialIndex.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/text.d.ts +12 -0
- package/dist/LinearMafRenderer/rendering/text.js +42 -0
- package/dist/LinearMafRenderer/rendering/text.js.map +1 -0
- package/dist/LinearMafRenderer/rendering/types.d.ts +67 -0
- package/dist/LinearMafRenderer/rendering/types.js +15 -0
- package/dist/LinearMafRenderer/rendering/types.js.map +1 -0
- package/dist/MafTabixAdapter/MafTabixAdapter.js +48 -22
- package/dist/MafTabixAdapter/MafTabixAdapter.js.map +1 -1
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +7 -8
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +4 -4
- package/dist/out.js +34520 -0
- package/dist/out.js.map +7 -0
- package/dist/util/fastaUtils.js.map +1 -1
- package/package.json +5 -3
- package/src/BigMafAdapter/BigMafAdapter.ts +49 -28
- package/src/LinearMafDisplay/components/Crosshairs.tsx +1 -7
- package/src/LinearMafDisplay/components/MAFTooltip.tsx +14 -33
- package/src/LinearMafDisplay/stateModel.ts +10 -0
- package/src/LinearMafDisplay/util.ts +57 -0
- package/src/LinearMafRenderer/LinearMafRenderer.ts +1 -2
- package/src/LinearMafRenderer/components/ReactComponent.tsx +70 -2
- package/src/LinearMafRenderer/components/util.ts +13 -0
- package/src/LinearMafRenderer/makeImageData.ts +49 -196
- package/src/LinearMafRenderer/rendering/features.ts +138 -0
- package/src/LinearMafRenderer/rendering/gaps.ts +71 -0
- package/src/LinearMafRenderer/rendering/index.ts +9 -0
- package/src/LinearMafRenderer/rendering/insertions.ts +170 -0
- package/src/LinearMafRenderer/rendering/matches.ts +79 -0
- package/src/LinearMafRenderer/rendering/mismatches.ts +125 -0
- package/src/LinearMafRenderer/rendering/spatialIndex.ts +136 -0
- package/src/LinearMafRenderer/rendering/text.ts +72 -0
- package/src/LinearMafRenderer/rendering/types.ts +81 -0
- package/src/MafTabixAdapter/MafTabixAdapter.ts +77 -22
- package/src/util/fastaUtils.ts +2 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
"use strict";var JBrowsePluginMafViewer=(()=>{var aM=Object.create;var cs=Object.defineProperty;var uM=Object.getOwnPropertyDescriptor;var sM=Object.getOwnPropertyNames;var cM=Object.getPrototypeOf,lM=Object.prototype.hasOwnProperty;var mt=(e,t)=>()=>(e&&(t=e(e=0)),t);var g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ls=(e,t)=>{for(var r in t)cs(e,r,{get:t[r],enumerable:!0})},eg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sM(t))!lM.call(e,i)&&i!==r&&cs(e,i,{get:()=>t[i],enumerable:!(n=uM(t,i))||n.enumerable});return e};var N=(e,t,r)=>(r=e!=null?aM(cM(e)):{},eg(t||!e||!e.__esModule?cs(r,"default",{value:e,enumerable:!0}):r,e)),tg=e=>eg(cs({},"__esModule",{value:!0}),e);var ng=g((FZ,rg)=>{rg.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Br=g((DZ,og)=>{og.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var zr=g(bt=>{"use strict";var dM=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function pM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}bt.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)pM(r,n)&&(e[n]=r[n])}}return e};bt.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)}};bt.setTyped=function(e){e?(bt.Buf8=Uint8Array,bt.Buf16=Uint16Array,bt.Buf32=Int32Array,bt.assign(bt,hM)):(bt.Buf8=Array,bt.Buf16=Array,bt.Buf32=Array,bt.assign(bt,vM))};bt.setTyped(dM)});var Tg=g(Zi=>{"use strict";var mM=zr(),bM=4,ag=0,ug=1,gM=2;function Ki(e){for(var t=e.length;--t>=0;)e[t]=0}var yM=0,pg=1,_M=2,wM=3,xM=258,cp=29,Ca=256,Pa=Ca+1+cp,$i=30,lp=19,hg=2*Pa+1,ri=15,np=16,SM=7,fp=256,vg=16,mg=17,bg=18,up=[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],OM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],gg=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],EM=512,Ur=new Array((Pa+2)*2);Ki(Ur);var Aa=new Array($i*2);Ki(Aa);var Ta=new Array(EM);Ki(Ta);var Ra=new Array(xM-wM+1);Ki(Ra);var dp=new Array(cp);Ki(dp);var ds=new Array($i);Ki(ds);function ip(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 yg,_g,wg;function op(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function xg(e){return e<256?Ta[e]:Ta[256+(e>>>7)]}function Ma(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Pt(e,t,r){e.bi_valid>np-r?(e.bi_buf|=t<<e.bi_valid&65535,Ma(e,e.bi_buf),e.bi_buf=t>>np-e.bi_valid,e.bi_valid+=r-np):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function mr(e,t,r){Pt(e,r[t*2],r[t*2+1])}function Sg(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function AM(e){e.bi_valid===16?(Ma(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 PM(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,f,p,d,h,v=0;for(p=0;p<=ri;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<hg;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]++,d=0,c>=u&&(d=a[c-u]),h=r[c*2],e.opt_len+=h*(p+d),o&&(e.static_len+=h*(i[c*2+1]+d)));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;)f=e.heap[--s],!(f>n)&&(r[f*2+1]!==p&&(e.opt_len+=(p-r[f*2+1])*r[f*2],r[f*2+1]=p),c--)}}function Og(e,t,r){var n=new Array(ri+1),i=0,o,a;for(o=1;o<=ri;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]=Sg(n[u]++,u))}}function TM(){var e,t,r,n,i,o=new Array(ri+1);for(r=0,n=0;n<cp-1;n++)for(dp[n]=r,e=0;e<1<<up[n];e++)Ra[r++]=n;for(Ra[r-1]=n,i=0,n=0;n<16;n++)for(ds[n]=i,e=0;e<1<<fs[n];e++)Ta[i++]=n;for(i>>=7;n<$i;n++)for(ds[n]=i<<7,e=0;e<1<<fs[n]-7;e++)Ta[256+i++]=n;for(t=0;t<=ri;t++)o[t]=0;for(e=0;e<=143;)Ur[e*2+1]=8,e++,o[8]++;for(;e<=255;)Ur[e*2+1]=9,e++,o[9]++;for(;e<=279;)Ur[e*2+1]=7,e++,o[7]++;for(;e<=287;)Ur[e*2+1]=8,e++,o[8]++;for(Og(Ur,Pa+1,o),e=0;e<$i;e++)Aa[e*2+1]=5,Aa[e*2]=Sg(e,5);yg=new ip(Ur,up,Ca+1,Pa,ri),_g=new ip(Aa,fs,0,$i,ri),wg=new ip(new Array(0),OM,0,lp,SM)}function Eg(e){var t;for(t=0;t<Pa;t++)e.dyn_ltree[t*2]=0;for(t=0;t<$i;t++)e.dyn_dtree[t*2]=0;for(t=0;t<lp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[fp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Ag(e){e.bi_valid>8?Ma(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 RM(e,t,r,n){Ag(e),n&&(Ma(e,r),Ma(e,~r)),mM.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function sg(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 ap(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&sg(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!sg(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function cg(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?mr(e,i,t):(a=Ra[i],mr(e,a+Ca+1,t),u=up[a],u!==0&&(i-=dp[a],Pt(e,i,u)),n--,a=xg(n),mr(e,a,r),u=fs[a],u!==0&&(n-=ds[a],Pt(e,n,u)));while(o<e.last_lit);mr(e,fp,t)}function sp(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=hg,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--)ap(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ap(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++,ap(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],PM(e,t),Og(r,l,e.bl_count)}function lg(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[vg*2]++):u<=10?e.bl_tree[mg*2]++:e.bl_tree[bg*2]++,u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4))}function fg(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 mr(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(mr(e,o,e.bl_tree),u--),mr(e,vg,e.bl_tree),Pt(e,u-3,2)):u<=10?(mr(e,mg,e.bl_tree),Pt(e,u-3,3)):(mr(e,bg,e.bl_tree),Pt(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 MM(e){var t;for(lg(e,e.dyn_ltree,e.l_desc.max_code),lg(e,e.dyn_dtree,e.d_desc.max_code),sp(e,e.bl_desc),t=lp-1;t>=3&&e.bl_tree[gg[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function CM(e,t,r,n){var i;for(Pt(e,t-257,5),Pt(e,r-1,5),Pt(e,n-4,4),i=0;i<n;i++)Pt(e,e.bl_tree[gg[i]*2+1],3);fg(e,e.dyn_ltree,t-1),fg(e,e.dyn_dtree,r-1)}function kM(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 ug;for(r=32;r<Ca;r++)if(e.dyn_ltree[r*2]!==0)return ug;return ag}var dg=!1;function qM(e){dg||(TM(),dg=!0),e.l_desc=new op(e.dyn_ltree,yg),e.d_desc=new op(e.dyn_dtree,_g),e.bl_desc=new op(e.bl_tree,wg),e.bi_buf=0,e.bi_valid=0,Eg(e)}function Pg(e,t,r,n){Pt(e,(yM<<1)+(n?1:0),3),RM(e,t,r,!0)}function IM(e){Pt(e,pg<<1,3),mr(e,fp,Ur),AM(e)}function jM(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===gM&&(e.strm.data_type=kM(e)),sp(e,e.l_desc),sp(e,e.d_desc),a=MM(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?Pg(e,t,r,n):e.strategy===bM||o===i?(Pt(e,(pg<<1)+(n?1:0),3),cg(e,Ur,Aa)):(Pt(e,(_M<<1)+(n?1:0),3),CM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),cg(e,e.dyn_ltree,e.dyn_dtree)),Eg(e),n&&Ag(e)}function LM(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[(Ra[r]+Ca+1)*2]++,e.dyn_dtree[xg(t)*2]++),e.last_lit===e.lit_bufsize-1}Zi._tr_init=qM;Zi._tr_stored_block=Pg;Zi._tr_flush_block=jM;Zi._tr_tally=LM;Zi._tr_align=IM});var pp=g((GZ,Rg)=>{"use strict";function FM(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}Rg.exports=FM});var hp=g(($Z,Mg)=>{"use strict";function NM(){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 DM=NM();function BM(e,t,r,n){var i=DM,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Mg.exports=BM});var ps=g((KZ,Cg)=>{"use strict";Cg.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 Bg=g(yr=>{"use strict";var gt=zr(),Ut=Tg(),jg=pp(),rn=hp(),zM=ps(),ai=0,UM=1,WM=3,sn=4,kg=5,gr=0,qg=1,Wt=-2,VM=-3,vp=-5,HM=-1,GM=1,hs=2,$M=3,KM=4,ZM=0,YM=2,gs=8,XM=9,JM=15,QM=8,eC=29,tC=256,bp=tC+1+eC,rC=30,nC=19,iC=2*bp+1,oC=15,we=3,an=258,er=an+we+1,aC=32,ys=42,gp=69,vs=73,ms=91,bs=103,ni=113,qa=666,Ye=1,Ia=2,ii=3,Ji=4,uC=3;function un(e,t){return e.msg=zM[t],t}function Ig(e){return(e<<1)-(e>4?9:0)}function on(e){for(var t=e.length;--t>=0;)e[t]=0}function nn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(gt.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 ut(e,t){Ut._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,nn(e.strm)}function Oe(e,t){e.pending_buf[e.pending++]=t}function ka(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function sC(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,gt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=jg(e.adler,t,i,r):e.state.wrap===2&&(e.adler=rn(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Lg(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-er?e.strstart-(e.w_size-er):0,s=e.window,c=e.w_mask,f=e.prev,p=e.strstart+an,d=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]!==d||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=an-(p-n),n=p-an,o>a){if(e.match_start=t,a=o,o>=u)break;d=s[n+a-1],h=s[n+a]}}while((t=f[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function oi(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-er)){gt.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=sC(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<er&&e.strm.avail_in!==0)}function cC(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(oi(e),e.lookahead===0&&t===ai)return Ye;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,ut(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-er&&(ut(e,!1),e.strm.avail_out===0))return Ye}return e.insert=0,t===sn?(ut(e,!0),e.strm.avail_out===0?ii:Ji):(e.strstart>e.block_start&&(ut(e,!1),e.strm.avail_out===0),Ye)}function mp(e,t){for(var r,n;;){if(e.lookahead<er){if(oi(e),e.lookahead<er&&t===ai)return Ye;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-er&&(e.match_length=Lg(e,r)),e.match_length>=we)if(n=Ut._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=Ut._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(ut(e,!1),e.strm.avail_out===0))return Ye}return e.insert=e.strstart<we-1?e.strstart:we-1,t===sn?(ut(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(ut(e,!1),e.strm.avail_out===0)?Ye:Ia}function Yi(e,t){for(var r,n,i;;){if(e.lookahead<er){if(oi(e),e.lookahead<er&&t===ai)return Ye;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-er&&(e.match_length=Lg(e,r),e.match_length<=5&&(e.strategy===GM||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=Ut._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&&(ut(e,!1),e.strm.avail_out===0))return Ye}else if(e.match_available){if(n=Ut._tr_tally(e,0,e.window[e.strstart-1]),n&&ut(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ye}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ut._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<we-1?e.strstart:we-1,t===sn?(ut(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(ut(e,!1),e.strm.avail_out===0)?Ye:Ia}function lC(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=an){if(oi(e),e.lookahead<=an&&t===ai)return Ye;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+an;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=an-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(r=Ut._tr_tally(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Ut._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ut(e,!1),e.strm.avail_out===0))return Ye}return e.insert=0,t===sn?(ut(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(ut(e,!1),e.strm.avail_out===0)?Ye:Ia}function fC(e,t){for(var r;;){if(e.lookahead===0&&(oi(e),e.lookahead===0)){if(t===ai)return Ye;break}if(e.match_length=0,r=Ut._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ut(e,!1),e.strm.avail_out===0))return Ye}return e.insert=0,t===sn?(ut(e,!0),e.strm.avail_out===0?ii:Ji):e.last_lit&&(ut(e,!1),e.strm.avail_out===0)?Ye:Ia}function br(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 Xi;Xi=[new br(0,0,0,0,cC),new br(4,4,8,4,mp),new br(4,5,16,8,mp),new br(4,6,32,32,mp),new br(4,4,16,16,Yi),new br(8,16,32,32,Yi),new br(8,16,128,128,Yi),new br(8,32,128,256,Yi),new br(32,128,258,1024,Yi),new br(32,258,258,4096,Yi)];function dC(e){e.window_size=2*e.w_size,on(e.head),e.max_lazy_match=Xi[e.level].max_lazy,e.good_match=Xi[e.level].good_length,e.nice_match=Xi[e.level].nice_length,e.max_chain_length=Xi[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 pC(){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 gt.Buf16(iC*2),this.dyn_dtree=new gt.Buf16((2*rC+1)*2),this.bl_tree=new gt.Buf16((2*nC+1)*2),on(this.dyn_ltree),on(this.dyn_dtree),on(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new gt.Buf16(oC+1),this.heap=new gt.Buf16(2*bp+1),on(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new gt.Buf16(2*bp+1),on(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 Fg(e){var t;return!e||!e.state?un(e,Wt):(e.total_in=e.total_out=0,e.data_type=YM,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ys:ni,e.adler=t.wrap===2?0:1,t.last_flush=ai,Ut._tr_init(t),gr)}function Ng(e){var t=Fg(e);return t===gr&&dC(e.state),t}function hC(e,t){return!e||!e.state||e.state.wrap!==2?Wt:(e.state.gzhead=t,gr)}function Dg(e,t,r,n,i,o){if(!e)return Wt;var a=1;if(t===HM&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>XM||r!==gs||n<8||n>15||t<0||t>9||o<0||o>KM)return un(e,Wt);n===8&&(n=9);var u=new pC;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 gt.Buf8(u.w_size*2),u.head=new gt.Buf16(u.hash_size),u.prev=new gt.Buf16(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new gt.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,Ng(e)}function vC(e,t){return Dg(e,t,gs,JM,QM,ZM)}function mC(e,t){var r,n,i,o;if(!e||!e.state||t>kg||t<0)return e?un(e,Wt):Wt;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===qa&&t!==sn)return un(e,e.avail_out===0?vp:Wt);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ys)if(n.wrap===2)e.adler=0,Oe(n,31),Oe(n,139),Oe(n,8),n.gzhead?(Oe(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)),Oe(n,n.gzhead.time&255),Oe(n,n.gzhead.time>>8&255),Oe(n,n.gzhead.time>>16&255),Oe(n,n.gzhead.time>>24&255),Oe(n,n.level===9?2:n.strategy>=hs||n.level<2?4:0),Oe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Oe(n,n.gzhead.extra.length&255),Oe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=rn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=gp):(Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,n.level===9?2:n.strategy>=hs||n.level<2?4:0),Oe(n,uC),n.status=ni);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|=aC),a+=31-a%31,n.status=ni,ka(n,a),n.strstart!==0&&(ka(n,e.adler>>>16),ka(n,e.adler&65535)),e.adler=1}if(n.status===gp)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=rn(e.adler,n.pending_buf,n.pending-i,i)),nn(e),i=n.pending,n.pending===n.pending_buf_size));)Oe(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=rn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=vs)}else n.status=vs;if(n.status===vs)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=rn(e.adler,n.pending_buf,n.pending-i,i)),nn(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,Oe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=rn(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=ms)}else n.status=ms;if(n.status===ms)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=rn(e.adler,n.pending_buf,n.pending-i,i)),nn(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,Oe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=rn(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&&nn(e),n.pending+2<=n.pending_buf_size&&(Oe(n,e.adler&255),Oe(n,e.adler>>8&255),e.adler=0,n.status=ni)):n.status=ni),n.pending!==0){if(nn(e),e.avail_out===0)return n.last_flush=-1,gr}else if(e.avail_in===0&&Ig(t)<=Ig(r)&&t!==sn)return un(e,vp);if(n.status===qa&&e.avail_in!==0)return un(e,vp);if(e.avail_in!==0||n.lookahead!==0||t!==ai&&n.status!==qa){var l=n.strategy===hs?fC(n,t):n.strategy===$M?lC(n,t):Xi[n.level].func(n,t);if((l===ii||l===Ji)&&(n.status=qa),l===Ye||l===ii)return e.avail_out===0&&(n.last_flush=-1),gr;if(l===Ia&&(t===UM?Ut._tr_align(n):t!==kg&&(Ut._tr_stored_block(n,0,0,!1),t===WM&&(on(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),nn(e),e.avail_out===0))return n.last_flush=-1,gr}return t!==sn?gr:n.wrap<=0?qg:(n.wrap===2?(Oe(n,e.adler&255),Oe(n,e.adler>>8&255),Oe(n,e.adler>>16&255),Oe(n,e.adler>>24&255),Oe(n,e.total_in&255),Oe(n,e.total_in>>8&255),Oe(n,e.total_in>>16&255),Oe(n,e.total_in>>24&255)):(ka(n,e.adler>>>16),ka(n,e.adler&65535)),nn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?gr:qg)}function bC(e){var t;return!e||!e.state?Wt:(t=e.state.status,t!==ys&&t!==gp&&t!==vs&&t!==ms&&t!==bs&&t!==ni&&t!==qa?un(e,Wt):(e.state=null,t===ni?un(e,VM):gr))}function gC(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!==ys||n.lookahead))return Wt;for(a===1&&(e.adler=jg(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(on(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new gt.Buf8(n.w_size),gt.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,oi(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,oi(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,gr}yr.deflateInit=vC;yr.deflateInit2=Dg;yr.deflateReset=Ng;yr.deflateResetKeep=Fg;yr.deflateSetHeader=hC;yr.deflate=mC;yr.deflateEnd=bC;yr.deflateSetDictionary=gC;yr.deflateInfo="pako deflate (from Nodeca project)"});var yp=g(Qi=>{"use strict";var _s=zr(),zg=!0,Ug=!0;try{String.fromCharCode.apply(null,[0])}catch{zg=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Ug=!1}var ja=new _s.Buf8(256);for(Wr=0;Wr<256;Wr++)ja[Wr]=Wr>=252?6:Wr>=248?5:Wr>=240?4:Wr>=224?3:Wr>=192?2:1;var Wr;ja[254]=ja[254]=1;Qi.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 _s.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 Wg(e,t){if(t<65534&&(e.subarray&&Ug||!e.subarray&&zg))return String.fromCharCode.apply(null,_s.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}Qi.buf2binstring=function(e){return Wg(e,e.length)};Qi.binstring2buf=function(e){for(var t=new _s.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};Qi.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=ja[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 Wg(u,n)};Qi.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+ja[e[r]]>t?r:t}});var _p=g((XZ,Vg)=>{"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}Vg.exports=yC});var Kg=g(Na=>{"use strict";var La=Bg(),Fa=zr(),xp=yp(),Sp=ps(),_C=_p(),$g=Object.prototype.toString,wC=0,wp=4,eo=0,Hg=1,Gg=2,xC=-1,SC=0,OC=8;function ui(e){if(!(this instanceof ui))return new ui(e);this.options=Fa.assign({level:xC,method:OC,chunkSize:16384,windowBits:15,memLevel:8,strategy:SC,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 _C,this.strm.avail_out=0;var r=La.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==eo)throw new Error(Sp[r]);if(t.header&&La.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=xp.string2buf(t.dictionary):$g.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=La.deflateSetDictionary(this.strm,n),r!==eo)throw new Error(Sp[r]);this._dict_set=!0}}ui.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?wp:wC,typeof e=="string"?r.input=xp.string2buf(e):$g.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 Fa.Buf8(n),r.next_out=0,r.avail_out=n),i=La.deflate(r,o),i!==Hg&&i!==eo)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===wp||o===Gg))&&(this.options.to==="string"?this.onData(xp.buf2binstring(Fa.shrinkBuf(r.output,r.next_out))):this.onData(Fa.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Hg);return o===wp?(i=La.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===eo):(o===Gg&&(this.onEnd(eo),r.avail_out=0),!0)};ui.prototype.onData=function(e){this.chunks.push(e)};ui.prototype.onEnd=function(e){e===eo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Fa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Op(e,t){var r=new ui(t);if(r.push(e,!0),r.err)throw r.msg||Sp[r.err];return r.result}function EC(e,t){return t=t||{},t.raw=!0,Op(e,t)}function AC(e,t){return t=t||{},t.gzip=!0,Op(e,t)}Na.Deflate=ui;Na.deflate=Op;Na.deflateRaw=EC;Na.gzip=AC});var Yg=g((QZ,Zg)=>{"use strict";var ws=30,PC=12;Zg.exports=function(t,r){var n,i,o,a,u,l,s,c,f,p,d,h,v,b,y,_,w,x,S,E,P,R,q,M,I;n=t.state,i=t.next_in,M=t.input,o=i+(t.avail_in-5),a=t.next_out,I=t.output,u=a-(r-t.avail_out),l=a+(t.avail_out-257),s=n.dmax,c=n.wsize,f=n.whave,p=n.wnext,d=n.window,h=n.hold,v=n.bits,b=n.lencode,y=n.distcode,_=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{v<15&&(h+=M[i++]<<v,v+=8,h+=M[i++]<<v,v+=8),x=b[h&_];t:for(;;){if(S=x>>>24,h>>>=S,v-=S,S=x>>>16&255,S===0)I[a++]=x&65535;else if(S&16){E=x&65535,S&=15,S&&(v<S&&(h+=M[i++]<<v,v+=8),E+=h&(1<<S)-1,h>>>=S,v-=S),v<15&&(h+=M[i++]<<v,v+=8,h+=M[i++]<<v,v+=8),x=y[h&w];r:for(;;){if(S=x>>>24,h>>>=S,v-=S,S=x>>>16&255,S&16){if(P=x&65535,S&=15,v<S&&(h+=M[i++]<<v,v+=8,v<S&&(h+=M[i++]<<v,v+=8)),P+=h&(1<<S)-1,P>s){t.msg="invalid distance too far back",n.mode=ws;break e}if(h>>>=S,v-=S,S=a-u,P>S){if(S=P-S,S>f&&n.sane){t.msg="invalid distance too far back",n.mode=ws;break e}if(R=0,q=d,p===0){if(R+=c-S,S<E){E-=S;do I[a++]=d[R++];while(--S);R=a-P,q=I}}else if(p<S){if(R+=c+p-S,S-=p,S<E){E-=S;do I[a++]=d[R++];while(--S);if(R=0,p<E){S=p,E-=S;do I[a++]=d[R++];while(--S);R=a-P,q=I}}}else if(R+=p-S,S<E){E-=S;do I[a++]=d[R++];while(--S);R=a-P,q=I}for(;E>2;)I[a++]=q[R++],I[a++]=q[R++],I[a++]=q[R++],E-=3;E&&(I[a++]=q[R++],E>1&&(I[a++]=q[R++]))}else{R=a-P;do I[a++]=I[R++],I[a++]=I[R++],I[a++]=I[R++],E-=3;while(E>2);E&&(I[a++]=I[R++],E>1&&(I[a++]=I[R++]))}}else if((S&64)===0){x=y[(x&65535)+(h&(1<<S)-1)];continue r}else{t.msg="invalid distance code",n.mode=ws;break e}break}}else if((S&64)===0){x=b[(x&65535)+(h&(1<<S)-1)];continue t}else if(S&32){n.mode=PC;break e}else{t.msg="invalid literal/length code",n.mode=ws;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 ny=g((eY,ry)=>{"use strict";var Xg=zr(),to=15,Jg=852,Qg=592,ey=0,Ep=1,ty=2,TC=[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],RC=[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],MC=[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],CC=[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];ry.exports=function(t,r,n,i,o,a,u,l){var s=l.bits,c=0,f=0,p=0,d=0,h=0,v=0,b=0,y=0,_=0,w=0,x,S,E,P,R,q=null,M=0,I,B=new Xg.Buf16(to+1),U=new Xg.Buf16(to+1),T=null,C=0,V,j,A;for(c=0;c<=to;c++)B[c]=0;for(f=0;f<i;f++)B[r[n+f]]++;for(h=s,d=to;d>=1&&B[d]===0;d--);if(h>d&&(h=d),d===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p<d&&B[p]===0;p++);for(h<p&&(h=p),y=1,c=1;c<=to;c++)if(y<<=1,y-=B[c],y<0)return-1;if(y>0&&(t===ey||d!==1))return-1;for(U[1]=0,c=1;c<to;c++)U[c+1]=U[c]+B[c];for(f=0;f<i;f++)r[n+f]!==0&&(u[U[r[n+f]]++]=f);if(t===ey?(q=T=u,I=19):t===Ep?(q=TC,M-=257,T=RC,C-=257,I=256):(q=MC,T=CC,I=-1),w=0,f=0,c=p,R=a,v=h,b=0,E=-1,_=1<<h,P=_-1,t===Ep&&_>Jg||t===ty&&_>Qg)return 1;for(;;){V=c-b,u[f]<I?(j=0,A=u[f]):u[f]>I?(j=T[C+u[f]],A=q[M+u[f]]):(j=96,A=0),x=1<<c-b,S=1<<v,p=S;do S-=x,o[R+(w>>b)+S]=V<<24|j<<16|A|0;while(S!==0);for(x=1<<c-1;w&x;)x>>=1;if(x!==0?(w&=x-1,w+=x):w=0,f++,--B[c]===0){if(c===d)break;c=r[n+u[f]]}if(c>h&&(w&P)!==E){for(b===0&&(b=h),R+=p,v=c-b,y=1<<v;v+b<d&&(y-=B[v+b],!(y<=0));)v++,y<<=1;if(_+=1<<v,t===Ep&&_>Jg||t===ty&&_>Qg)return 1;E=w&P,o[E]=h<<24|v<<16|R-a|0}}return w!==0&&(o[R+w]=c-b<<24|64<<16|0),l.bits=h,0}});var Ny=g(tr=>{"use strict";var Ft=zr(),Cp=pp(),_r=hp(),kC=Yg(),Da=ny(),qC=0,Ry=1,My=2,iy=4,IC=5,xs=6,si=0,jC=1,LC=2,Vt=-2,Cy=-3,kp=-4,FC=-5,oy=8,ky=1,ay=2,uy=3,sy=4,cy=5,ly=6,fy=7,dy=8,py=9,hy=10,Es=11,Vr=12,Ap=13,vy=14,Pp=15,my=16,by=17,gy=18,yy=19,Ss=20,Os=21,_y=22,wy=23,xy=24,Sy=25,Oy=26,Tp=27,Ey=28,Ay=29,Le=30,qp=31,NC=32,DC=852,BC=592,zC=15,UC=zC;function Py(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function WC(){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 qy(e){var t;return!e||!e.state?Vt:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=ky,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(DC),t.distcode=t.distdyn=new Ft.Buf32(BC),t.sane=1,t.back=-1,si)}function Iy(e){var t;return!e||!e.state?Vt:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,qy(e))}function jy(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))?Vt:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Iy(e))}function Ly(e,t){var r,n;return e?(n=new WC,e.state=n,n.window=null,r=jy(e,t),r!==si&&(e.state=null),r):Vt}function VC(e){return Ly(e,UC)}var Ty=!0,Rp,Mp;function HC(e){if(Ty){var t;for(Rp=new Ft.Buf32(512),Mp=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(Da(Ry,e.lens,0,288,Rp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Da(My,e.lens,0,32,Mp,0,e.work,{bits:5}),Ty=!1}e.lencode=Rp,e.lenbits=9,e.distcode=Mp,e.distbits=5}function Fy(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 GC(e,t){var r,n,i,o,a,u,l,s,c,f,p,d,h,v,b=0,y,_,w,x,S,E,P,R,q=new Ft.Buf8(4),M,I,B=[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 Vt;r=e.state,r.mode===Vr&&(r.mode=Ap),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,f=u,p=l,R=si;e:for(;;)switch(r.mode){case ky:if(r.wrap===0){r.mode=Ap;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=_r(r.check,q,2,0),s=0,c=0,r.mode=ay;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)!==oy){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?hy:Vr,s=0,c=0;break;case ay:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==oy){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=_r(r.check,q,2,0)),s=0,c=0,r.mode=uy;case uy: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=_r(r.check,q,4,0)),s=0,c=0,r.mode=sy;case sy: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=_r(r.check,q,2,0)),s=0,c=0,r.mode=cy;case cy: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=_r(r.check,q,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=ly;case ly:if(r.flags&1024&&(d=r.length,d>u&&(d=u),d&&(r.head&&(P=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,d,P)),r.flags&512&&(r.check=_r(r.check,n,d,o)),u-=d,o+=d,r.length-=d),r.length))break e;r.length=0,r.mode=fy;case fy:if(r.flags&2048){if(u===0)break e;d=0;do P=n[o+d++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P));while(P&&d<u);if(r.flags&512&&(r.check=_r(r.check,n,d,o)),u-=d,o+=d,P)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=dy;case dy:if(r.flags&4096){if(u===0)break e;d=0;do P=n[o+d++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P));while(P&&d<u);if(r.flags&512&&(r.check=_r(r.check,n,d,o)),u-=d,o+=d,P)break e}else r.head&&(r.head.comment=null);r.mode=py;case py: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=Vr;break;case hy:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=Py(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,LC;e.adler=r.check=1,r.mode=Vr;case Vr:if(t===IC||t===xs)break e;case Ap:if(r.last){s>>>=c&7,c-=c&7,r.mode=Tp;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=vy;break;case 1:if(HC(r),r.mode=Ss,t===xs){s>>>=2,c-=2;break e}break;case 2:r.mode=by;break;case 3:e.msg="invalid block type",r.mode=Le}s>>>=2,c-=2;break;case vy: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=Pp,t===xs)break e;case Pp:r.mode=my;case my:if(d=r.length,d){if(d>u&&(d=u),d>l&&(d=l),d===0)break e;Ft.arraySet(i,n,o,d,a),u-=d,o+=d,l-=d,a+=d,r.length-=d;break}r.mode=Vr;break;case by: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=gy;case gy:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[B[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[B[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},R=Da(qC,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid code lengths set",r.mode=Le;break}r.have=0,r.mode=yy;case yy:for(;r.have<r.nlen+r.ndist;){for(;b=r.lencode[s&(1<<r.lenbits)-1],y=b>>>24,_=b>>>16&255,w=b&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w<16)s>>>=y,c-=y,r.lens[r.have++]=w;else{if(w===16){for(I=y+2;c<I;){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],d=3+(s&3),s>>>=2,c-=2}else if(w===17){for(I=y+3;c<I;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=y,c-=y,P=0,d=3+(s&7),s>>>=3,c-=3}else{for(I=y+7;c<I;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=y,c-=y,P=0,d=11+(s&127),s>>>=7,c-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Le;break}for(;d--;)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,M={bits:r.lenbits},R=Da(Ry,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,R){e.msg="invalid literal/lengths set",r.mode=Le;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},R=Da(My,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,R){e.msg="invalid distances set",r.mode=Le;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,kC(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===Vr&&(r.back=-1);break}for(r.back=0;b=r.lencode[s&(1<<r.lenbits)-1],y=b>>>24,_=b>>>16&255,w=b&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(_&&(_&240)===0){for(x=y,S=_,E=w;b=r.lencode[E+((s&(1<<x+S)-1)>>x)],y=b>>>24,_=b>>>16&255,w=b&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=Oy;break}if(_&32){r.back=-1,r.mode=Vr;break}if(_&64){e.msg="invalid literal/length code",r.mode=Le;break}r.extra=_&15,r.mode=_y;case _y:if(r.extra){for(I=r.extra;c<I;){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=wy;case wy:for(;b=r.distcode[s&(1<<r.distbits)-1],y=b>>>24,_=b>>>16&255,w=b&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((_&240)===0){for(x=y,S=_,E=w;b=r.distcode[E+((s&(1<<x+S)-1)>>x)],y=b>>>24,_=b>>>16&255,w=b&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,_&64){e.msg="invalid distance code",r.mode=Le;break}r.offset=w,r.extra=_&15,r.mode=xy;case xy:if(r.extra){for(I=r.extra;c<I;){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=Sy;case Sy:if(l===0)break e;if(d=p-l,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Le;break}d>r.wnext?(d-=r.wnext,h=r.wsize-d):h=r.wnext-d,d>r.length&&(d=r.length),v=r.window}else v=i,h=a-r.offset,d=r.length;d>l&&(d=l),l-=d,r.length-=d;do i[a++]=v[h++];while(--d);r.length===0&&(r.mode=Os);break;case Oy:if(l===0)break e;i[a++]=r.length,l--,r.mode=Os;break;case Tp: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?_r(r.check,i,p,a-p):Cp(r.check,i,p,a-p)),p=l,(r.flags?s:Py(s))!==r.check){e.msg="incorrect data check",r.mode=Le;break}s=0,c=0}r.mode=Ey;case Ey: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=Ay;case Ay:R=jC;break e;case Le:R=Cy;break e;case qp:return kp;case NC:default:return Vt}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<Tp||t!==iy))&&Fy(e,e.output,e.next_out,p-e.avail_out)?(r.mode=qp,kp):(f-=e.avail_in,p-=e.avail_out,e.total_in+=f,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=r.flags?_r(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===Vr?128:0)+(r.mode===Ss||r.mode===Pp?256:0),(f===0&&p===0||t===iy)&&R===si&&(R=FC),R)}function $C(e){if(!e||!e.state)return Vt;var t=e.state;return t.window&&(t.window=null),e.state=null,si}function KC(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Vt:(r.head=t,t.done=!1,si)}function ZC(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==Es)?Vt:n.mode===Es&&(i=1,i=Cp(i,t,r,0),i!==n.check)?Cy:(o=Fy(e,t,r,r),o?(n.mode=qp,kp):(n.havedict=1,si))}tr.inflateReset=Iy;tr.inflateReset2=jy;tr.inflateResetKeep=qy;tr.inflateInit=VC;tr.inflateInit2=Ly;tr.inflate=GC;tr.inflateEnd=$C;tr.inflateGetHeader=KC;tr.inflateSetDictionary=ZC;tr.inflateInfo="pako inflate (from Nodeca project)"});var Ip=g((rY,Dy)=>{"use strict";Dy.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 zy=g((nY,By)=>{"use strict";function YC(){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}By.exports=YC});var Wy=g(za=>{"use strict";var ro=Ny(),Ba=zr(),As=yp(),$e=Ip(),jp=ps(),XC=_p(),JC=zy(),Uy=Object.prototype.toString;function ci(e){if(!(this instanceof ci))return new ci(e);this.options=Ba.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 XC,this.strm.avail_out=0;var r=ro.inflateInit2(this.strm,t.windowBits);if(r!==$e.Z_OK)throw new Error(jp[r]);if(this.header=new JC,ro.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=As.string2buf(t.dictionary):Uy.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ro.inflateSetDictionary(this.strm,t.dictionary),r!==$e.Z_OK)))throw new Error(jp[r])}ci.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=As.binstring2buf(e):Uy.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 Ba.Buf8(n),r.next_out=0,r.avail_out=n),o=ro.inflate(r,$e.Z_NO_FLUSH),o===$e.Z_NEED_DICT&&i&&(o=ro.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=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&&Ba.arraySet(r.output,r.output,u,l,0),this.onData(s)):this.onData(Ba.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=ro.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)};ci.prototype.onData=function(e){this.chunks.push(e)};ci.prototype.onEnd=function(e){e===$e.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ba.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Lp(e,t){var r=new ci(t);if(r.push(e,!0),r.err)throw r.msg||jp[r.err];return r.result}function QC(e,t){return t=t||{},t.raw=!0,Lp(e,t)}za.Inflate=ci;za.inflate=Lp;za.inflateRaw=QC;za.ungzip=Lp});var Fp=g((oY,Hy)=>{"use strict";var ek=zr().assign,tk=Kg(),rk=Wy(),nk=Ip(),Vy={};ek(Vy,tk,rk,nk);Hy.exports=Vy});var Ts=g((yY,$y)=>{$y.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var yt=g((_Y,Ky)=>{Ky.exports=JBrowseExports["@jbrowse/core/util"]});var zp=g(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});var Dp=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()])}};Bp.default=Dp});var Rs=g((xY,Zy)=>{Zy.exports=JBrowseExports["@jbrowse/core/util/io"]});var Ms=g((SY,Yy)=>{Yy.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var r_=g(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});function Xy(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 uk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sk(e,t,r){return t=no(t),lk(e,t_()?Reflect.construct(t,r||[],no(e).constructor):t.apply(e,r))}function Vp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jy(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,hk(n.key),n)}}function Hp(e,t,r){return t&&Jy(e.prototype,t),r&&Jy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qy(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=vk(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 Up(){return Up=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=fk(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},Up.apply(null,arguments)}function no(e){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},no(e)}function ck(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&&Wp(e,t)}function t_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t_=function(){return!!e})()}function lk(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 uk(e)}function Wp(e,t){return Wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Wp(e,t)}function fk(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=no(e))!==null;);return e}function dk(e,t,r,n){var i=Up(no(1&n?e.prototype:e),t,r);return 2&n&&typeof i=="function"?function(o){return i.apply(r,o)}:i}function pk(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 hk(e){var t=pk(e,"string");return typeof t=="symbol"?t:t+""}function vk(e,t){if(e){if(typeof e=="string")return Xy(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)?Xy(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function mk(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 bk(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 e_=function(){function e(){Vp(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(f){Promise.resolve().then(function(){throw f})}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 Vp(this,t),r=sk(this,t),r.listeners||e_.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 ck(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)),dk(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 Cs;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 Cs;function o(){i.abort(this.reason),a()}function a(){var c=Qy(n),f;try{for(c.s();!(f=c.n()).done;){var p=f.value;p.removeEventListener("abort",o)}}catch(d){c.e(d)}finally{c.f()}}var u=Qy(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}}])}(e_),Cs=function(){function e(){Vp(this,e),Object.defineProperty(this,"signal",{value:new Gp,writable:!0,configurable:!0})}return Hp(e,[{key:"abort",value:function(r){var n=bk(r),i=mk(n);this.signal.reason=n,this.signal.dispatchEvent(i)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Cs.prototype[Symbol.toStringTag]="AbortController",Gp.prototype[Symbol.toStringTag]="AbortSignal");function gk(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 yk(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(!gk({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,d){var h;d&&d.signal&&(h=d.signal,delete d.signal);var v=new i(p,d);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,d){var h=l&&l.prototype.isPrototypeOf(p)?p.signal:d?d.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 b=new Promise(function(y,_){h.addEventListener("abort",function(){return _(v)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([b,s(p,d)])}return s(p,d)};return{fetch:c,Request:l}}Ua.AbortController=Cs;Ua.AbortSignal=Gp;Ua.abortableFetch=yk});var $p=g(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.AbortSignal=io.AbortController=void 0;var n_=r_(),ks=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")},_k=typeof ks().AbortController>"u"?n_.AbortController:ks().AbortController;io.AbortController=_k;var wk=typeof ks().AbortController>"u"?n_.AbortSignal:ks().AbortSignal;io.AbortSignal=wk});var i_=g(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});var xk=$p(),Kp=class{},Zp=class{constructor(){this.signals=new Set,this.abortController=new xk.AbortController}addSignal(t=new Kp){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()}};Yp.default=Zp});var o_=g(Jp=>{"use strict";Object.defineProperty(Jp,"__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)})}};Jp.default=Xp});var u_=g(Wa=>{"use strict";var a_=Wa&&Wa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wa,"__esModule",{value:!0});var Sk=$p(),Ok=a_(i_()),Ek=a_(o_()),Qp=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 Ok.default,a=new Ek.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 Sk.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}};Wa.default=Qp});var s_=g(Va=>{"use strict";var Ak=Va&&Va.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Va,"__esModule",{value:!0});var Pk=Ak(u_());Va.default=Pk.default});var ln=g(($Y,P_)=>{P_.exports=JBrowseExports["@jbrowse/core/configuration"]});var _t=g((JY,C_)=>{C_.exports=JBrowseExports["mobx-state-tree"]});var Fe=g((uJ,Y_)=>{Y_.exports=JBrowseExports.react});var dn=g((sJ,X_)=>{X_.exports=JBrowseExports["@jbrowse/core/ui"]});var lo=g((cJ,J_)=>{J_.exports=JBrowseExports["@mui/material"]});var xr=g((lJ,Q_)=>{Q_.exports=JBrowseExports["mobx-react"]});var fo=g((fJ,e0)=>{e0.exports=JBrowseExports["tss-react/mui"]});var hh=g((pJ,n0)=>{n0.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var Us=g((bJ,c0)=>{c0.exports=JBrowseExports["react/jsx-runtime"]});function Ws(){return typeof window<"u"}function Sr(e){return l0(e)?(e.nodeName||"").toLowerCase():"#document"}function st(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(l0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function l0(e){return Ws()?e instanceof Node||e instanceof st(e).Node:!1}function Re(e){return Ws()?e instanceof Element||e instanceof st(e).Element:!1}function Ne(e){return Ws()?e instanceof HTMLElement||e instanceof st(e).HTMLElement:!1}function vo(e){return!Ws()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof st(e).ShadowRoot}function mo(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function f0(e){return["table","td","th"].includes(Sr(e))}function Ja(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Vs(e){let t=bo(),r=Re(e)?xt(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 d0(e){let t=nr(e);for(;Ne(t)&&!or(t);){if(Vs(t))return t;if(Ja(t))return null;t=nr(t)}return null}function bo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function or(e){return["html","body","#document"].includes(Sr(e))}function xt(e){return st(e).getComputedStyle(e)}function Qa(e){return Re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nr(e){if(Sr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||vo(e)&&e.host||ir(e);return vo(t)?t.host:t}function p0(e){let t=nr(e);return or(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&mo(t)?t:p0(t)}function Rt(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=st(i);if(o){let u=Hs(a);return t.concat(a,a.visualViewport||[],mo(i)?i:[],u&&r?Rt(u):[])}return t.concat(i,Rt(i,[],r))}function Hs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var eu=mt(()=>{});function Gs(e,t,r){return He(e,St(t,r))}function Mt(e,t){return typeof e=="function"?e(t):e}function Ct(e){return e.split("-")[0]}function Kt(e){return e.split("-")[1]}function $s(e){return e==="x"?"y":"x"}function Ks(e){return e==="y"?"height":"width"}function Zt(e){return["top","bottom"].includes(Ct(e))?"y":"x"}function Zs(e){return $s(Zt(e))}function bh(e,t,r){r===void 0&&(r=!1);let n=Kt(e),i=Zs(e),o=Ks(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ru(a)),[a,ru(a)]}function v0(e){let t=ru(e);return[tu(e),t,tu(t)]}function tu(e){return e.replace(/start|end/g,t=>Vk[t])}function Hk(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 m0(e,t,r,n){let i=Kt(e),o=Hk(Ct(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(tu)))),o}function ru(e){return e.replace(/left|right|bottom|top/g,t=>Wk[t])}function Gk(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ys(e){return typeof e!="number"?Gk(e):{top:e,right:e,bottom:e,left:e}}function Gr(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,h0,mh,St,He,hi,pn,ar,Wk,Vk,go=mt(()=>{vh=["top","right","bottom","left"],h0=["start","end"],mh=vh.reduce((e,t)=>e.concat(t,t+"-"+h0[0],t+"-"+h0[1]),[]),St=Math.min,He=Math.max,hi=Math.round,pn=Math.floor,ar=e=>({x:e,y:e}),Wk={left:"right",right:"left",bottom:"top",top:"bottom"},Vk={start:"end",end:"start"}});var $k,Xs,g0,yo,Js,Qs,Kk,y0,_0,w0,x0,Zk,Yk,S0,Xk,Jk,Qk,eq,tq,rq,nq,b0,iq,oq,gh,yh,aq,uq,_o,O0,_h,wh=mt(()=>{$k=["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])"],Xs=$k.join(","),g0=typeof Element>"u",yo=g0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Js=!g0&&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},Qs=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},Kk=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},y0=function(t,r,n){if(Qs(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Xs));return r&&yo.call(t,Xs)&&i.unshift(t),i=i.filter(n),i},_0=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Qs(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=yo.call(a,Xs);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!Qs(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,n);n.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},w0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},x0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Kk(t))&&!w0(t)?0:t.tabIndex},Zk=function(t,r){var n=x0(t);return n<0&&r&&!w0(t)?0:n},Yk=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},S0=function(t){return t.tagName==="INPUT"},Xk=function(t){return S0(t)&&t.type==="hidden"},Jk=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},Qk=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},eq=function(t){if(!t.name)return!0;var r=t.form||Js(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=Qk(i,t.form);return!o||o===t},tq=function(t){return S0(t)&&t.type==="radio"},rq=function(t){return tq(t)&&!eq(t)},nq=function(t){var r,n=t&&Js(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,f;n=Js(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},b0=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},iq=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=yo.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yo.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=Js(t);if(l&&!l.shadowRoot&&i(l)===!0)return b0(t);t.assignedSlot?t=t.assignedSlot:!l&&s!==t.ownerDocument?t=s.host:t=l}t=u}if(nq(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return b0(t);return!1},oq=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 yo.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},gh=function(t,r){return!(r.disabled||Qs(r)||Xk(r)||iq(r,t)||Jk(r)||oq(r))},yh=function(t,r){return!(rq(r)||x0(r)<0||!gh(t,r))},aq=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},uq=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,l=Zk(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(Yk).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},_o=function(t,r){r=r||{};var n;return r.getShadowRoot?n=_0([t],r.includeContainer,{filter:yh.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:aq}):n=y0(t,r.includeContainer,yh.bind(null,r)),uq(n)},O0=function(t,r){r=r||{};var n;return r.getShadowRoot?n=_0([t],r.includeContainer,{filter:gh.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=y0(t,r.includeContainer,gh.bind(null,r)),n},_h=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return yo.call(t,Xs)===!1?!1:yh(r,t)}});function tc(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function rc(){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(tc())||e.test(rc())}function P0(){return tc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function T0(){return rc().includes("jsdom/")}function ur(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 Je(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&vo(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function sr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function nc(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 R0(e){return e.matches("html,body")}function nt(e){return e?.ownerDocument||document}function ic(e){return Ne(e)&&e.matches(sq)}function oc(e){return e?e.getAttribute("role")==="combobox"&&ic(e):!1}function M0(e){if(!e||T0())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function nu(e){return e?e.hasAttribute(E0)?e:e.querySelector("["+E0+"]")||e:null}function mi(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 C0(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),mi(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 rt(e){e.preventDefault(),e.stopPropagation()}function k0(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 T0()?!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 bi(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Qe(e){let t=wo.useRef(e);return me(()=>{t.current=e}),t}function qe(e){let t=wo.useRef(()=>{});return vq(()=>{t.current=e}),wo.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 ec(e,t,r){return Math.floor(e/t)!==r}function vi(e,t){return t<0||t>=e.current.length}function iu(e,t){return tt(e,{disabledIndices:t})}function ac(e,t){return tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tt(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&&hn(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:f=!1}=t,p=c;if(r.key===cq){if(f&&rt(r),c===-1)p=s;else if(p=tt(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<l||p<0)){let d=c%a,h=s%a,v=s-(h-d);h===d?p=s:p=h>d?v:v-a}vi(e,p)&&(p=c)}if(r.key===lq&&(f&&rt(r),c===-1?p=l:(p=tt(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(p=tt(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),vi(e,p)&&(p=c)),n==="both"){let d=pn(c/a);r.key===(o?xh:Sh)&&(f&&rt(r),c%a!==a-1?(p=tt(e,{startingIndex:c,disabledIndices:u}),i&&ec(p,a,d)&&(p=tt(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(p=tt(e,{startingIndex:c-c%a-1,disabledIndices:u})),ec(p,a,d)&&(p=c)),r.key===(o?Sh:xh)&&(f&&rt(r),c%a!==0?(p=tt(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&ec(p,a,d)&&(p=tt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(p=tt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),ec(p,a,d)&&(p=c));let h=pn(s/a)===d;vi(e,p)&&(i&&h?p=r.key===(o?Sh:xh)?s:tt(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 f=0;f<u;f++)for(let p=0;p<l;p++)c.push(i+f+p*t);i%t+u<=t&&c.every(f=>n[f]==null)?(c.forEach(f=>{n[f]=a}),s=!0):i++}}),[...n]}function Ch(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 kh(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function hn(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);let n=e.current[t];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function q0(e,t){let r=_o(e,xo()),n=r.length;if(n===0)return;let i=ur(nt(e)),o=r.indexOf(i),a=o===-1?t===1?0:n-1:o+t;return r[a]}function qh(e){return q0(nt(e).body,1)||e}function Ih(e){return q0(nt(e).body,-1)||e}function So(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Je(r,n)}function I0(e){_o(e,xo()).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 wo,A0,E0,sq,xh,Sh,cq,lq,fq,dq,me,pq,hq,vq,xo,j0=mt(()=>{eu();wo=N(Fe(),1),A0=N(Fe(),1);go();wh();E0="data-floating-ui-focusable",sq="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",xh="ArrowLeft",Sh="ArrowRight",cq="ArrowUp",lq="ArrowDown";fq=typeof document<"u",dq=function(){},me=fq?A0.useLayoutEffect:dq,pq={...wo};hq=pq.useInsertionEffect,vq=hq||(e=>e());xo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"})});var uc=g((EJ,L0)=>{L0.exports=JBrowseExports["react-dom"]});function F0(e,t,r){let{reference:n,floating:i}=e,o=Zt(t),a=Zs(t),u=Ks(a),l=Ct(t),s=o==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,p=n[u]/2-i[u]/2,d;switch(l){case"top":d={x:c,y:n.y-i.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-i.width,y:f};break;default:d={x:n.x,y:n.y}}switch(Kt(t)){case"start":d[a]-=p*(r&&s?-1:1);break;case"end":d[a]+=p*(r&&s?-1:1);break}return d}async function vn(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:f="floating",altBoundary:p=!1,padding:d=0}=Mt(t,e),h=Ys(d),b=u[p?f==="floating"?"reference":"floating":f],y=Gr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:s,rootBoundary:c,strategy:l})),_=f==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),x=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Gr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-S.top+h.top)/x.y,bottom:(S.bottom-y.bottom+h.bottom)/x.y,left:(y.left-S.left+h.left)/x.x,right:(S.right-y.right+h.right)/x.x}}function mq(e,t,r){return(e?[...r.filter(i=>Kt(i)===e),...r.filter(i=>Kt(i)!==e)]:r.filter(i=>Ct(i)===i)).filter(i=>e?Kt(i)===e||(t?tu(i)!==i:!1):!0)}function N0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function D0(e){return vh.some(t=>e[t]>=0)}function H0(e){let t=St(...e.map(o=>o.left)),r=St(...e.map(o=>o.top)),n=He(...e.map(o=>o.right)),i=He(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function bq(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=>Gr(H0(i)))}async function gq(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Ct(r),u=Kt(r),l=Zt(r)==="y",s=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,f=Mt(t,e),{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&typeof h=="number"&&(d=u==="end"?h*-1:h),l?{x:d*c,y:p*s}:{x:p*s,y:d*c}}var B0,z0,U0,W0,V0,G0,$0,K0,Z0,Y0,X0=mt(()=>{go();go();B0=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:f}=F0(s,n,l),p=n,d={},h=0;for(let v=0;v<u.length;v++){let{name:b,fn:y}=u[v],{x:_,y:w,data:x,reset:S}=await y({x:c,y:f,initialPlacement:n,placement:p,strategy:i,middlewareData:d,rects:s,platform:a,elements:{reference:e,floating:t}});c=_??c,f=w??f,d={...d,[b]:{...d[b],...x}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(s=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=F0(s,p,l)),v=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};z0=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}=Mt(e,t)||{};if(s==null)return{};let f=Ys(c),p={x:r,y:n},d=Zs(i),h=Ks(d),v=await a.getDimensions(s),b=d==="y",y=b?"top":"left",_=b?"bottom":"right",w=b?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[d]-p[d]-o.floating[h],S=p[d]-o.reference[d],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),P=E?E[w]:0;(!P||!await(a.isElement==null?void 0:a.isElement(E)))&&(P=u.floating[w]||o.floating[h]);let R=x/2-S/2,q=P/2-v[h]/2-1,M=St(f[y],q),I=St(f[_],q),B=M,U=P-v[h]-I,T=P/2-v[h]/2+R,C=Gs(B,T,U),V=!l.arrow&&Kt(i)!=null&&T!==C&&o.reference[h]/2-(T<B?M:I)-v[h]/2<0,j=V?T<B?T-B:T-U:0;return{[d]:p[d]+j,data:{[d]:C,centerOffset:T-C-j,...V&&{alignmentOffset:j}},reset:V}}});U0=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:f,allowedPlacements:p=mh,autoAlignment:d=!0,...h}=Mt(e,t),v=f!==void 0||p===mh?mq(f||null,d,p):p,b=await vn(t,h),y=((r=a.autoPlacement)==null?void 0:r.index)||0,_=v[y];if(_==null)return{};let w=bh(_,o,await(l.isRTL==null?void 0:l.isRTL(s.floating)));if(u!==_)return{reset:{placement:v[0]}};let x=[b[Ct(_)],b[w[0]],b[w[1]]],S=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:_,overflows:x}],E=v[y+1];if(E)return{data:{index:y+1,overflows:S},reset:{placement:E}};let P=S.map(M=>{let I=Kt(M.placement);return[M.placement,I&&c?M.overflows.slice(0,2).reduce((B,U)=>B+U,0):M.overflows[0],M.overflows]}).sort((M,I)=>M[1]-I[1]),q=((i=P.filter(M=>M[2].slice(0,Kt(M[0])?2:3).every(I=>I<=0))[0])==null?void 0:i[0])||P[0][0];return q!==u?{data:{index:y+1,overflows:S},reset:{placement:q}}:{}}}},W0=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:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...b}=Mt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let y=Ct(i),_=Zt(u),w=Ct(u)===u,x=await(l.isRTL==null?void 0:l.isRTL(s.floating)),S=p||(w||!v?[ru(u)]:v0(u)),E=h!=="none";!p&&E&&S.push(...m0(u,v,h,x));let P=[u,...S],R=await vn(t,b),q=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&q.push(R[y]),f){let T=bh(i,a,x);q.push(R[T[0]],R[T[1]])}if(M=[...M,{placement:i,overflows:q}],!q.every(T=>T<=0)){var I,B;let T=(((I=o.flip)==null?void 0:I.index)||0)+1,C=P[T];if(C&&(!(f==="alignment"?_!==Zt(C):!1)||M.every(A=>A.overflows[0]>0&&Zt(A.placement)===_)))return{data:{index:T,overflows:M},reset:{placement:C}};let V=(B=M.filter(j=>j.overflows[0]<=0).sort((j,A)=>j.overflows[1]-A.overflows[1])[0])==null?void 0:B.placement;if(!V)switch(d){case"bestFit":{var U;let j=(U=M.filter(A=>{if(E){let k=Zt(A.placement);return k===_||k==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(k=>k>0).reduce((k,W)=>k+W,0)]).sort((A,k)=>A[1]-k[1])[0])==null?void 0:U[0];j&&(V=j);break}case"initialPlacement":V=u;break}if(i!==V)return{reset:{placement:V}}}return{}}}};V0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Mt(e,t);switch(n){case"referenceHidden":{let o=await vn(t,{...i,elementContext:"reference"}),a=N0(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:D0(a)}}}case"escaped":{let o=await vn(t,{...i,altBoundary:!0}),a=N0(o,r.floating);return{data:{escapedOffsets:a,escaped:D0(a)}}}default:return{}}}}};G0=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}=Mt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),f=bq(c),p=Gr(H0(c)),d=Ys(u);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&s!=null)return f.find(b=>l>b.left-d.left&&l<b.right+d.right&&s>b.top-d.top&&s<b.bottom+d.bottom)||p;if(f.length>=2){if(Zt(r)==="y"){let M=f[0],I=f[f.length-1],B=Ct(r)==="top",U=M.top,T=I.bottom,C=B?M.left:I.left,V=B?M.right:I.right,j=V-C,A=T-U;return{top:U,bottom:T,left:C,right:V,width:j,height:A,x:C,y:U}}let b=Ct(r)==="left",y=He(...f.map(M=>M.right)),_=St(...f.map(M=>M.left)),w=f.filter(M=>b?M.left===_:M.right===y),x=w[0].top,S=w[w.length-1].bottom,E=_,P=y,R=P-E,q=S-x;return{top:x,bottom:S,left:E,right:P,width:R,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}}:{}}}};$0=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 gq(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}}}}},K0=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:b=>{let{x:y,y:_}=b;return{x:y,y:_}}},...l}=Mt(e,t),s={x:r,y:n},c=await vn(t,l),f=Zt(Ct(i)),p=$s(f),d=s[p],h=s[f];if(o){let b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",_=d+c[b],w=d-c[y];d=Gs(_,d,w)}if(a){let b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",_=h+c[b],w=h-c[y];h=Gs(_,h,w)}let v=u.fn({...t,[p]:d,[f]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:o,[f]:a}}}}}},Z0=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}=Mt(e,t),c={x:r,y:n},f=Zt(i),p=$s(f),d=c[p],h=c[f],v=Mt(u,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){let w=p==="y"?"height":"width",x=o.reference[p]-o.floating[w]+b.mainAxis,S=o.reference[p]+o.reference[w]-b.mainAxis;d<x?d=x:d>S&&(d=S)}if(s){var y,_;let w=p==="y"?"width":"height",x=["top","left"].includes(Ct(i)),S=o.reference[f]-o.floating[w]+(x&&((y=a.offset)==null?void 0:y[f])||0)+(x?0:b.crossAxis),E=o.reference[f]+o.reference[w]+(x?0:((_=a.offset)==null?void 0:_[f])||0)-(x?b.crossAxis:0);h<S?h=S:h>E&&(h=E)}return{[p]:d,[f]:h}}}},Y0=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}=Mt(e,t),c=await vn(t,s),f=Ct(i),p=Kt(i),d=Zt(i)==="y",{width:h,height:v}=o.floating,b,y;f==="top"||f==="bottom"?(b=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(y=f,b=p==="end"?"top":"bottom");let _=v-c.top-c.bottom,w=h-c.left-c.right,x=St(v-c[b],_),S=St(h-c[y],w),E=!t.middlewareData.shift,P=x,R=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=_),E&&!p){let M=He(c.left,0),I=He(c.right,0),B=He(c.top,0),U=He(c.bottom,0);d?R=h-2*(M!==0||I!==0?M+I:He(c.left,c.right)):P=v-2*(B!==0||U!==0?B+U:He(c.top,c.bottom))}await l({...t,availableWidth:R,availableHeight:P});let q=await a.getDimensions(u.floating);return h!==q.width||v!==q.height?{reset:{rects:!0}}:{}}}}});function ew(e){let t=xt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Ne(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=hi(r)!==o||hi(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Fh(e){return Re(e)?e:e.contextElement}function Oo(e){let t=Fh(e);if(!Ne(t))return ar(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=ew(t),a=(o?hi(r.width):r.width)/n,u=(o?hi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function tw(e){let t=st(e);return!bo()||!t.visualViewport?yq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _q(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==st(e)?!1:t}function gi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Fh(e),a=ar(1);t&&(n?Re(n)&&(a=Oo(n)):a=Oo(e));let u=_q(o,r,n)?tw(o):ar(0),l=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){let p=st(o),d=n&&Re(n)?st(n):n,h=p,v=Hs(h);for(;v&&n&&d!==h;){let b=Oo(v),y=v.getBoundingClientRect(),_=xt(v),w=y.left+(v.clientLeft+parseFloat(_.paddingLeft))*b.x,x=y.top+(v.clientTop+parseFloat(_.paddingTop))*b.y;l*=b.x,s*=b.y,c*=b.x,f*=b.y,l+=w,s+=x,h=st(v),v=Hs(h)}}return Gr({width:c,height:f,x:l,y:s})}function Nh(e,t){let r=Qa(e).scrollLeft;return t?t.left+r:gi(ir(e)).left+r}function rw(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 wq(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=ir(n),u=t?Ja(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},s=ar(1),c=ar(0),f=Ne(n);if((f||!f&&!o)&&((Sr(n)!=="body"||mo(a))&&(l=Qa(n)),Ne(n))){let d=gi(n);s=Oo(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}let p=a&&!f&&!o?rw(a,l,!0):ar(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 xq(e){return Array.from(e.getClientRects())}function Sq(e){let t=ir(e),r=Qa(e),n=e.ownerDocument.body,i=He(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=He(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+Nh(e),u=-r.scrollTop;return xt(n).direction==="rtl"&&(a+=He(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function Oq(e,t){let r=st(e),n=ir(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;let s=bo();(!s||s&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function Eq(e,t){let r=gi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Ne(e)?Oo(e):ar(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 J0(e,t,r){let n;if(t==="viewport")n=Oq(e,r);else if(t==="document")n=Sq(ir(e));else if(Re(t))n=Eq(t,r);else{let i=tw(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Gr(n)}function nw(e,t){let r=nr(e);return r===t||!Re(r)||or(r)?!1:xt(r).position==="fixed"||nw(r,t)}function Aq(e,t){let r=t.get(e);if(r)return r;let n=Rt(e,[],!1).filter(u=>Re(u)&&Sr(u)!=="body"),i=null,o=xt(e).position==="fixed",a=o?nr(e):e;for(;Re(a)&&!or(a);){let u=xt(a),l=Vs(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||mo(a)&&!l&&nw(e,a))?n=n.filter(c=>c!==a):i=u,a=nr(a)}return t.set(e,n),n}function Pq(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Ja(t)?[]:Aq(t,this._c):[].concat(r),n],u=a[0],l=a.reduce((s,c)=>{let f=J0(t,c,i);return s.top=He(f.top,s.top),s.right=St(f.right,s.right),s.bottom=St(f.bottom,s.bottom),s.left=He(f.left,s.left),s},J0(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Tq(e){let{width:t,height:r}=ew(e);return{width:t,height:r}}function Rq(e,t,r){let n=Ne(t),i=ir(t),o=r==="fixed",a=gi(e,!0,o,t),u={scrollLeft:0,scrollTop:0},l=ar(0);function s(){l.x=Nh(i)}if(n||!n&&!o)if((Sr(t)!=="body"||mo(i))&&(u=Qa(t)),n){let d=gi(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&s();o&&!n&&i&&s();let c=i&&!n&&!o?rw(i,u):ar(0),f=a.left+u.scrollLeft-l.x-c.x,p=a.top+u.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function Lh(e){return xt(e).position==="static"}function Q0(e,t){if(!Ne(e)||xt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ir(e)===r&&(r=r.ownerDocument.body),r}function iw(e,t){let r=st(e);if(Ja(e))return r;if(!Ne(e)){let i=nr(e);for(;i&&!or(i);){if(Re(i)&&!Lh(i))return i;i=nr(i)}return r}let n=Q0(e,t);for(;n&&f0(n)&&Lh(n);)n=Q0(n,t);return n&&or(n)&&Lh(n)&&!Vs(n)?r:n||d0(e)||r}function Cq(e){return xt(e).direction==="rtl"}function ow(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kq(e,t){let r=null,n,i=ir(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:f,width:p,height:d}=s;if(u||t(),!p||!d)return;let h=pn(f),v=pn(i.clientWidth-(c+p)),b=pn(i.clientHeight-(f+d)),y=pn(c),w={rootMargin:-h+"px "+-v+"px "+-b+"px "+-y+"px",threshold:He(0,St(1,l))||1},x=!0;function S(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&&!ow(s,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(S,{...w,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,w)}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?Rt(s):[],...Rt(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),o&&y.addEventListener("resize",r)});let f=s&&u?kq(s,r):null,p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[_]=y;_&&_.target===s&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),r()}),s&&!l&&d.observe(s),d.observe(t));let h,v=l?gi(e):null;l&&b();function b(){let y=gi(e);v&&!ow(v,y)&&r(),v=y,h=requestAnimationFrame(b)}return r(),()=>{var y;c.forEach(_=>{i&&_.removeEventListener("scroll",r),o&&_.removeEventListener("resize",r)}),f?.(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(h)}}var yq,Mq,sc,yi,aw,uw,sw,cw,lw,fw,Bh,dw,pw,ou,zh=mt(()=>{X0();go();eu();eu();yq=ar(0);Mq=async function(e){let t=this.getOffsetParent||iw,r=this.getDimensions,n=await r(e.floating);return{reference:Rq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};sc={convertOffsetParentRelativeRectToViewportRelativeRect:wq,getDocumentElement:ir,getClippingRect:Pq,getOffsetParent:iw,getElementRects:Mq,getClientRects:xq,getDimensions:Tq,getScale:Oo,isElement:Re,isRTL:Cq};yi=vn,aw=$0,uw=U0,sw=K0,cw=W0,lw=Y0,fw=V0,Bh=z0,dw=G0,pw=Z0,ou=(e,t,r)=>{let n=new Map,i={platform:sc,...r},o={...i.platform,_c:n};return B0(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 bw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hw(e,t){let r=bw(e);return Math.round(t*r)/r}function Uh(e){let t=Ze.useRef(e);return cc(()=>{t.current=e}),t}function gw(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,f]=Ze.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=Ze.useState(n);lc(p,n)||d(n);let[h,v]=Ze.useState(null),[b,y]=Ze.useState(null),_=Ze.useCallback(A=>{A!==E.current&&(E.current=A,v(A))},[]),w=Ze.useCallback(A=>{A!==P.current&&(P.current=A,y(A))},[]),x=o||h,S=a||b,E=Ze.useRef(null),P=Ze.useRef(null),R=Ze.useRef(c),q=l!=null,M=Uh(l),I=Uh(i),B=Uh(s),U=Ze.useCallback(()=>{if(!E.current||!P.current)return;let A={placement:t,strategy:r,middleware:p};I.current&&(A.platform=I.current),ou(E.current,P.current,A).then(k=>{let W={...k,isPositioned:B.current!==!1};T.current&&!lc(R.current,W)&&(R.current=W,mw.flushSync(()=>{f(W)}))})},[p,t,r,I,B]);cc(()=>{s===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[s]);let T=Ze.useRef(!1);cc(()=>(T.current=!0,()=>{T.current=!1}),[]),cc(()=>{if(x&&(E.current=x),S&&(P.current=S),x&&S){if(M.current)return M.current(x,S,U);U()}},[x,S,U,M,q]);let C=Ze.useMemo(()=>({reference:E,floating:P,setReference:_,setFloating:w}),[_,w]),V=Ze.useMemo(()=>({reference:x,floating:S}),[x,S]),j=Ze.useMemo(()=>{let A={position:r,left:0,top:0};if(!V.floating)return A;let k=hw(V.floating,c.x),W=hw(V.floating,c.y);return u?{...A,transform:"translate("+k+"px, "+W+"px)",...bw(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:W}},[r,u,V.floating,c.x,c.y]);return Ze.useMemo(()=>({...c,update:U,refs:C,elements:V,floatingStyles:j}),[c,U,C,V,j])}var Ze,vw,mw,qq,Iq,cc,jq,fc,yw,_w,ww,xw,Sw,Ow,Ew,Aw,Wh=mt(()=>{zh();zh();Ze=N(Fe(),1),vw=N(Fe(),1),mw=N(uc(),1),qq=typeof document<"u",Iq=function(){},cc=qq?vw.useLayoutEffect:Iq;jq=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):{}}}},fc=(e,t)=>({...aw(e),options:[e,t]}),yw=(e,t)=>({...sw(e),options:[e,t]}),_w=(e,t)=>({...pw(e),options:[e,t]}),ww=(e,t)=>({...cw(e),options:[e,t]}),xw=(e,t)=>({...lw(e),options:[e,t]}),Sw=(e,t)=>({...uw(e),options:[e,t]}),Ow=(e,t)=>({...fw(e),options:[e,t]}),Ew=(e,t)=>({...dw(e),options:[e,t]}),Aw=(e,t)=>({...jq(e),options:[e,t]})});var m1={};ls(m1,{Composite:()=>Nq,CompositeItem:()=>Dq,FloatingArrow:()=>Vq,FloatingDelayGroup:()=>Zq,FloatingFocusManager:()=>cI,FloatingList:()=>Jw,FloatingNode:()=>Gq,FloatingOverlay:()=>fI,FloatingPortal:()=>iI,FloatingTree:()=>$q,NextFloatingDelayGroup:()=>Xq,arrow:()=>Aw,autoPlacement:()=>Sw,autoUpdate:()=>Dh,computePosition:()=>ou,detectOverflow:()=>yi,flip:()=>ww,getOverflowAncestors:()=>Rt,hide:()=>Ow,inline:()=>Ew,inner:()=>RI,limitShift:()=>_w,offset:()=>fc,platform:()=>sc,safePolygon:()=>qI,shift:()=>yw,size:()=>xw,useClick:()=>pI,useClientPoint:()=>vI,useDelayGroup:()=>Yq,useDelayGroupContext:()=>s1,useDismiss:()=>gI,useFloating:()=>yI,useFloatingNodeId:()=>Hq,useFloatingParentNodeId:()=>Oi,useFloatingPortalNode:()=>d1,useFloatingRootContext:()=>h1,useFloatingTree:()=>Ei,useFocus:()=>_I,useHover:()=>Kq,useId:()=>Po,useInnerOffset:()=>MI,useInteractions:()=>wI,useListItem:()=>Qw,useListNavigation:()=>SI,useMergeRefs:()=>Yw,useNextDelayGroup:()=>Jq,useRole:()=>EI,useTransitionStatus:()=>v1,useTransitionStyles:()=>PI,useTypeahead:()=>TI});function Yw(e){let t=O.useRef(void 0),r=O.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 O.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function Lq(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 Jw(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=O.useState(()=>new Set),a=O.useCallback(s=>{o(c=>new Set(c).add(s))},[]),u=O.useCallback(s=>{o(c=>{let f=new Set(c);return f.delete(s),f})},[]),l=O.useMemo(()=>{let s=new Map;return Array.from(i.keys()).sort(Lq).forEach((f,p)=>{s.set(f,p)}),s},[i]);return(0,Ce.jsx)(Xw.Provider,{value:O.useMemo(()=>({register:a,unregister:u,map:l,elementsRef:r,labelsRef:n}),[a,u,l,r,n]),children:t})}function Qw(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=O.useContext(Xw),[u,l]=O.useState(null),s=O.useRef(null),c=O.useCallback(f=>{if(s.current=f,u!==null&&(o.current[u]=f,a)){var p;let d=t!==void 0;a.current[u]=d?t:(p=f?.textContent)!=null?p:null}},[u,o,a,t]);return me(()=>{let f=s.current;if(f)return r(f),()=>{n(f)}},[r,n]),me(()=>{let f=s.current?i.get(s.current):null;f!=null&&l(f)},[i]),O.useMemo(()=>({ref:c,index:u??-1}),[u,c])}function e1(e,t){return typeof e=="function"?e(t):e?O.cloneElement(e,t):(0,Ce.jsx)("div",{...t})}function Uq(){let[e,t]=O.useState(()=>Rw?Mw():void 0);return me(()=>{e==null&&t(Mw())},[]),O.useEffect(()=>{Rw=!0},[]),e}function i1(){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 Hq(e){let t=Po(),r=Ei(),n=Oi(),i=e||n;return me(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function Gq(e){let{children:t,id:r}=e,n=Oi();return(0,Ce.jsx)(o1.Provider,{value:O.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function $q(e){let{children:t}=e,r=O.useRef([]),n=O.useCallback(a=>{r.current=[...r.current,a]},[]),i=O.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),[o]=O.useState(()=>i1());return(0,Ce.jsx)(a1.Provider,{value:O.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function Si(e){return"data-floating-ui-"+e}function it(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function au(e,t,r){if(r&&!bi(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 Hh(e){return typeof e=="function"?e():e}function Kq(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:f=0,move:p=!0}=t,d=Ei(),h=Oi(),v=Qe(s),b=Qe(l),y=Qe(r),_=Qe(f),w=O.useRef(),x=O.useRef(-1),S=O.useRef(),E=O.useRef(-1),P=O.useRef(!0),R=O.useRef(!1),q=O.useRef(()=>{}),M=O.useRef(!1),I=qe(()=>{var j;let A=(j=i.current.openEvent)==null?void 0:j.type;return A?.includes("mouse")&&A!=="mousedown"});O.useEffect(()=>{if(!u)return;function j(A){let{open:k}=A;k||(it(x),it(E),P.current=!0,M.current=!1)}return o.on("openchange",j),()=>{o.off("openchange",j)}},[u,o]),O.useEffect(()=>{if(!u||!v.current||!r)return;function j(k){I()&&n(!1,k,"hover")}let A=nt(a.floating).documentElement;return A.addEventListener("mouseleave",j),()=>{A.removeEventListener("mouseleave",j)}},[a.floating,r,n,u,v,I]);let B=O.useCallback(function(j,A,k){A===void 0&&(A=!0),k===void 0&&(k="hover");let W=au(b.current,"close",w.current);W&&!S.current?(it(x),x.current=window.setTimeout(()=>n(!1,j,k),W)):A&&(it(x),n(!1,j,k))},[b,n]),U=qe(()=>{q.current(),S.current=void 0}),T=qe(()=>{if(R.current){let j=nt(a.floating).body;j.style.pointerEvents="",j.removeAttribute(Cw),R.current=!1}}),C=qe(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);O.useEffect(()=>{if(!u)return;function j(F){if(it(x),P.current=!1,c&&!bi(w.current)||Hh(_.current)>0&&!au(b.current,"open"))return;let Z=au(b.current,"open",w.current);Z?x.current=window.setTimeout(()=>{y.current||n(!0,F,"hover")},Z):r||n(!0,F,"hover")}function A(F){if(C()){T();return}q.current();let Z=nt(a.floating);if(it(E),M.current=!1,v.current&&i.current.floatingContext){r||it(x),S.current=v.current({...i.current.floatingContext,tree:d,x:F.clientX,y:F.clientY,onClose(){T(),U(),C()||B(F,!0,"safe-polygon")}});let z=S.current;Z.addEventListener("mousemove",z),q.current=()=>{Z.removeEventListener("mousemove",z)};return}(w.current==="touch"?!Je(a.floating,F.relatedTarget):!0)&&B(F)}function k(F){C()||i.current.floatingContext&&(v.current==null||v.current({...i.current.floatingContext,tree:d,x:F.clientX,y:F.clientY,onClose(){T(),U(),C()||B(F)}})(F))}function W(){it(x)}function ce(F){C()||B(F,!1)}if(Re(a.domReference)){let F=a.domReference,Z=a.floating;return r&&F.addEventListener("mouseleave",k),p&&F.addEventListener("mousemove",j,{once:!0}),F.addEventListener("mouseenter",j),F.addEventListener("mouseleave",A),Z&&(Z.addEventListener("mouseleave",k),Z.addEventListener("mouseenter",W),Z.addEventListener("mouseleave",ce)),()=>{r&&F.removeEventListener("mouseleave",k),p&&F.removeEventListener("mousemove",j),F.removeEventListener("mouseenter",j),F.removeEventListener("mouseleave",A),Z&&(Z.removeEventListener("mouseleave",k),Z.removeEventListener("mouseenter",W),Z.removeEventListener("mouseleave",ce))}}},[a,u,e,c,p,B,U,T,n,r,y,d,b,v,i,C,_]),me(()=>{var j;if(u&&r&&(j=v.current)!=null&&(j=j.__options)!=null&&j.blockPointerEvents&&I()){R.current=!0;let k=a.floating;if(Re(a.domReference)&&k){var A;let W=nt(a.floating).body;W.setAttribute(Cw,"");let ce=a.domReference,F=d==null||(A=d.nodesRef.current.find(Z=>Z.id===h))==null||(A=A.context)==null?void 0:A.elements.floating;return F&&(F.style.pointerEvents=""),W.style.pointerEvents="none",ce.style.pointerEvents="auto",k.style.pointerEvents="auto",()=>{W.style.pointerEvents="",ce.style.pointerEvents="",k.style.pointerEvents=""}}}},[u,r,h,a,d,v,I]),me(()=>{r||(w.current=void 0,M.current=!1,U(),T())},[r,U,T]),O.useEffect(()=>()=>{U(),it(x),it(E),T()},[u,a.domReference,U,T]);let V=O.useMemo(()=>{function j(A){w.current=A.pointerType}return{onPointerDown:j,onPointerEnter:j,onMouseMove(A){let{nativeEvent:k}=A;function W(){!P.current&&!y.current&&n(!0,k,"hover")}c&&!bi(w.current)||r||Hh(_.current)===0||M.current&&A.movementX**2+A.movementY**2<2||(it(E),w.current==="touch"?W():(M.current=!0,E.current=window.setTimeout(W,Hh(_.current))))}}},[c,n,r,y,_]);return O.useMemo(()=>u?{reference:V}:{},[u,V])}function Zq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=O.useReducer((l,s)=>({...l,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=O.useRef(null),u=O.useCallback(l=>{o({currentId:l})},[]);return me(()=>{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,Ce.jsx)(u1.Provider,{value:O.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function Yq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,l=s1(),{currentId:s,setCurrentId:c,initialDelay:f,setState:p,timeoutMs:d}=l;return me(()=>{a&&s&&(p({delay:{open:1,close:au(f,"close")}}),s!==u&&n(!1))},[a,u,n,p,s,f]),me(()=>{function h(){n(!1),p({delay:f,currentId:null})}if(a&&s&&!r&&s===u){if(d){let v=window.setTimeout(h,d);return()=>{clearTimeout(v)}}h()}},[a,r,p,s,u,n,f,d]),me(()=>{a&&(c===Xh||!r||c(u))},[a,r,c,u]),l}function Xq(e){let{children:t,delay:r,timeoutMs:n=0}=e,i=O.useRef(r),o=O.useRef(r),a=O.useRef(null),u=O.useRef(null),l=O.useRef(-1);return(0,Ce.jsx)(c1.Provider,{value:O.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:n,currentContextRef:u,timeoutIdRef:l}),[n]),children:t})}function Jq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{enabled:o=!0}=t,a=O.useContext(c1),{currentIdRef:u,delayRef:l,timeoutMs:s,initialDelayRef:c,currentContextRef:f,hasProvider:p,timeoutIdRef:d}=a,[h,v]=O.useState(!1);return me(()=>{function b(){var y;v(!1),(y=f.current)==null||y.setIsInstantPhase(!1),u.current=null,f.current=null,l.current=c.current}if(o&&u.current&&!r&&u.current===i){if(v(!1),s)return d.current=window.setTimeout(b,s),()=>{clearTimeout(d.current)};b()}},[o,r,i,u,l,s,c,f,d]),me(()=>{if(!o||!r)return;let b=f.current,y=u.current;f.current={onOpenChange:n,setIsInstantPhase:v},u.current=i,l.current={open:0,close:au(c.current,"close")},y!==null&&y!==i?(it(d),v(!0),b?.setIsInstantPhase(!0),b?.onOpenChange(!1)):(v(!1),b?.setIsInstantPhase(!1))},[o,r,i,n,u,l,s,c,f,d]),me(()=>()=>{f.current=null},[f]),O.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:h}),[p,l,h])}function _i(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(kw);let o=()=>e?.focus({preventScroll:r});i?o():kw=requestAnimationFrame(o)}function Gh(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&vo(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Qq(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eI(e){return e?.ownerDocument||document}function qw(e){return e==="inert"?Ao.inert:e==="aria-hidden"?Ao["aria-hidden"]:Ao.none}function nI(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=rI(t,e),u=new Set,l=new Set(a),s=[];pc[i]||(pc[i]=new WeakMap);let c=pc[i];a.forEach(f),p(t),u.clear();function f(d){!d||u.has(d)||(u.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||[].forEach.call(d.children,h=>{if(Sr(h)!=="script")if(u.has(h))p(h);else{let v=o?h.getAttribute(o):null,b=v!==null&&v!=="false",y=qw(o),_=(y.get(h)||0)+1,w=(c.get(h)||0)+1;y.set(h,_),c.set(h,w),s.push(h),_===1&&b&&dc.add(h),w===1&&h.setAttribute(i,""),!b&&o&&h.setAttribute(o,o==="inert"?"":"true")}})}return $h++,()=>{s.forEach(d=>{let h=qw(o),b=(h.get(d)||0)-1,y=(c.get(d)||0)-1;h.set(d,b),c.set(d,y),b||(!dc.has(d)&&o&&d.removeAttribute(o),dc.delete(d)),y||d.removeAttribute(i)}),$h--,$h||(Ao.inert=new WeakMap,Ao["aria-hidden"]=new WeakMap,Ao.none=new WeakMap,dc=new WeakSet,pc={})}}function Iw(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=eI(e[0]).body;return nI(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}function d1(e){e===void 0&&(e={});let{id:t,root:r}=e,n=Po(),i=p1(),[o,a]=O.useState(null),u=O.useRef(null);return me(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),me(()=>{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(jw,""),l.appendChild(s),u.current=s,a(s)},[t,n]),me(()=>{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(jw,""),l=s||l,l.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function iI(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=d1({id:r,root:n}),[a,u]=O.useState(null),l=O.useRef(null),s=O.useRef(null),c=O.useRef(null),f=O.useRef(null),p=a?.modal,d=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return O.useEffect(()=>{if(!o||!i||p)return;function v(b){o&&So(b)&&(b.type==="focusin"?jh:I0)(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]),O.useEffect(()=>{o&&(d||jh(o))},[d,o]),(0,Ce.jsxs)(f1.Provider,{value:O.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Ce.jsx)(mc,{"data-type":"outside",ref:l,onFocus:v=>{if(So(v,o)){var b;(b=c.current)==null||b.focus()}else{let y=a?a.domReference:null,_=Ih(y);_?.focus()}}}),h&&o&&(0,Ce.jsx)("span",{"aria-owns":o.id,style:bc}),o&&xi.createPortal(t,o),h&&o&&(0,Ce.jsx)(mc,{"data-type":"outside",ref:s,onFocus:v=>{if(So(v,o)){var b;(b=f.current)==null||b.focus()}else{let y=a?a.domReference:null,_=qh(y);_?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,v.nativeEvent,"focus-out")}}})]})}function Lw(e){return O.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}function aI(e){wi=wi.filter(t=>t.isConnected),e&&Sr(e)!=="body"&&(wi.push(e),wi.length>oI&&(wi=wi.slice(-20)))}function Fw(){return wi.slice().reverse().find(e=>e.isConnected)}function uI(e){let t=xo();return _h(e,t)?e:_o(e,t)[0]||e}function Nw(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;let n=xo(),o=O0(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 cI(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:f=!0,outsideElementsInert:p=!1,getInsideElements:d=()=>[]}=e,{open:h,onOpenChange:v,events:b,dataRef:y,elements:{domReference:_,floating:w}}=t,x=qe(()=>{var G;return(G=y.current.floatingContext)==null?void 0:G.nodeId}),S=qe(d),E=typeof a=="number"&&a<0,P=oc(_)&&E,R=tI(),q=R?o:!0,M=!q||R&&p,I=Qe(i),B=Qe(a),U=Qe(u),T=Ei(),C=p1(),V=O.useRef(null),j=O.useRef(null),A=O.useRef(!1),k=O.useRef(!1),W=O.useRef(-1),ce=C!=null,F=nu(w),Z=qe(function(G){return G===void 0&&(G=F),G?_o(G,xo()):[]}),fe=qe(G=>{let oe=Z(G);return I.current.map(ue=>_&&ue==="reference"?_:F&&ue==="floating"?F:oe).filter(Boolean).flat()});O.useEffect(()=>{if(n||!s)return;function G(ue){if(ue.key==="Tab"){Je(F,ur(nt(F)))&&Z().length===0&&!P&&rt(ue);let ne=fe(),be=sr(ue);I.current[0]==="reference"&&be===_&&(rt(ue),ue.shiftKey?_i(ne[ne.length-1]):_i(ne[1])),I.current[1]==="floating"&&be===F&&ue.shiftKey&&(rt(ue),_i(ne[0]))}}let oe=nt(F);return oe.addEventListener("keydown",G),()=>{oe.removeEventListener("keydown",G)}},[n,_,F,s,I,P,Z,fe]),O.useEffect(()=>{if(n||!w)return;function G(oe){let ue=sr(oe),be=Z().indexOf(ue);be!==-1&&(W.current=be)}return w.addEventListener("focusin",G),()=>{w.removeEventListener("focusin",G)}},[n,w,Z]),O.useEffect(()=>{if(n||!f)return;function G(){k.current=!0,setTimeout(()=>{k.current=!1})}function oe(ue){let ne=ue.relatedTarget,be=ue.currentTarget,ve=sr(ue);queueMicrotask(()=>{let xe=x(),J=!(Je(_,ne)||Je(w,ne)||Je(ne,w)||Je(C?.portalNode,ne)||ne!=null&&ne.hasAttribute(Si("focus-guard"))||T&&(mi(T.nodesRef.current,xe).find(te=>{var se,le;return Je((se=te.context)==null?void 0:se.elements.floating,ne)||Je((le=te.context)==null?void 0:le.elements.domReference,ne)})||Ah(T.nodesRef.current,xe).find(te=>{var se,le,H;return[(se=te.context)==null?void 0:se.elements.floating,nu((le=te.context)==null?void 0:le.elements.floating)].includes(ne)||((H=te.context)==null?void 0:H.elements.domReference)===ne})));if(be===_&&F&&Nw(F,I),l&&be!==_&&!(ve!=null&&ve.isConnected)&&ur(nt(F))===nt(F).body){Ne(F)&&F.focus();let te=W.current,se=Z(),le=se[te]||se[se.length-1]||F;Ne(le)&&le.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(P||!s)&&ne&&J&&!k.current&&ne!==Fw()&&(A.current=!0,v(!1,ue,"focus-out"))})}if(w&&Ne(_))return _.addEventListener("focusout",oe),_.addEventListener("pointerdown",G),w.addEventListener("focusout",oe),()=>{_.removeEventListener("focusout",oe),_.removeEventListener("pointerdown",G),w.removeEventListener("focusout",oe)}},[n,_,w,F,s,T,C,v,f,l,Z,P,x,I,y]);let z=O.useRef(null),$=O.useRef(null),re=Lw([z,C?.beforeInsideRef]),ae=Lw([$,C?.afterInsideRef]);O.useEffect(()=>{var G,oe;if(n||!w)return;let ue=Array.from((C==null||(G=C.portalNode)==null?void 0:G.querySelectorAll("["+Si("portal")+"]"))||[]),ne=T?Ah(T.nodesRef.current,x()):[],be=T&&!s?ne.map(te=>{var se;return(se=te.context)==null?void 0:se.elements.floating}):[],ve=(oe=ne.find(te=>{var se;return oc(((se=te.context)==null?void 0:se.elements.domReference)||null)}))==null||(oe=oe.context)==null?void 0:oe.elements.domReference,xe=[w,ve,...ue,...be,...S(),V.current,j.current,z.current,$.current,C?.beforeOutsideRef.current,C?.afterOutsideRef.current,I.current.includes("reference")||P?_:null].filter(te=>te!=null),J=s||P?Iw(xe,!M,M):Iw(xe);return()=>{J()}},[n,_,w,s,I,C,P,q,M,T,x,S]),me(()=>{if(n||!Ne(F))return;let G=nt(F),oe=ur(G);queueMicrotask(()=>{let ue=fe(F),ne=B.current,be=(typeof ne=="number"?ue[ne]:ne.current)||F,ve=Je(F,oe);!E&&!ve&&h&&_i(be,{preventScroll:be===F})})},[n,h,F,E,fe,B]),me(()=>{if(n||!F)return;let G=nt(F),oe=ur(G);aI(oe);function ue(ve){let{reason:xe,event:J,nested:te}=ve;if(["hover","safe-polygon"].includes(xe)&&J.type==="mouseleave"&&(A.current=!0),xe==="outside-press")if(te)A.current=!1;else if(Ph(J)||Th(J))A.current=!1;else{let se=!1;document.createElement("div").focus({get preventScroll(){return se=!0,!1}}),se?A.current=!1:A.current=!0}}b.on("openchange",ue);let ne=G.createElement("span");ne.setAttribute("tabindex","-1"),ne.setAttribute("aria-hidden","true"),Object.assign(ne.style,bc),ce&&_&&_.insertAdjacentElement("afterend",ne);function be(){if(typeof U.current=="boolean"){let ve=_||Fw();return ve&&ve.isConnected?ve:ne}return U.current.current||ne}return()=>{b.off("openchange",ue);let ve=ur(G),xe=Je(w,ve)||T&&mi(T.nodesRef.current,x()).some(te=>{var se;return Je((se=te.context)==null?void 0:se.elements.floating,ve)}),J=be();queueMicrotask(()=>{let te=uI(J);U.current&&!A.current&&Ne(te)&&(!(te!==ve&&ve!==G.body)||xe)&&te.focus({preventScroll:!0}),ne.remove()})}},[n,w,F,U,y,b,T,ce,_,x]),O.useEffect(()=>{queueMicrotask(()=>{A.current=!1})},[n]),me(()=>{if(!n&&C)return C.setFocusManagerState({modal:s,closeOnFocusOut:f,open:h,onOpenChange:v,domReference:_}),()=>{C.setFocusManagerState(null)}},[n,C,s,h,v,f,_]),me(()=>{n||F&&Nw(F,I)},[n,F,I]);function X(G){return n||!c||!s?null:(0,Ce.jsx)(sI,{ref:G==="start"?V:j,onClick:oe=>v(!1,oe.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let ie=!n&&q&&(s?!P:!0)&&(ce||s);return(0,Ce.jsxs)(Ce.Fragment,{children:[ie&&(0,Ce.jsx)(mc,{"data-type":"inside",ref:re,onFocus:G=>{if(s){let ue=fe();_i(i[0]==="reference"?ue[0]:ue[ue.length-1])}else if(C!=null&&C.preserveTabOrder&&C.portalNode)if(A.current=!1,So(G,C.portalNode)){let ue=qh(_);ue?.focus()}else{var oe;(oe=C.beforeOutsideRef.current)==null||oe.focus()}}}),!P&&X("start"),r,X("end"),ie&&(0,Ce.jsx)(mc,{"data-type":"inside",ref:ae,onFocus:G=>{if(s)_i(fe()[0]);else if(C!=null&&C.preserveTabOrder&&C.portalNode)if(f&&(A.current=!0),So(G,C.portalNode)){let ue=Ih(_);ue?.focus()}else{var oe;(oe=C.afterOutsideRef.current)==null||oe.focus()}}})]})}function lI(){let e=tc(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,r=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=r.left?parseFloat(r.left):window.scrollX,u=r.top?parseFloat(r.top):window.scrollY;if(r.overflow="hidden",r.setProperty(Dw,o+"px"),o&&(r[i]=o+"px"),t){var l,s;let c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((s=window.visualViewport)==null?void 0:s.offsetTop)||0;Object.assign(r,{position:"fixed",top:-(u-Math.floor(f))+"px",left:-(a-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(r,{overflow:"",[i]:""}),r.removeProperty(Dw),t&&(Object.assign(r,{position:"",top:"",left:"",right:""}),window.scrollTo(a,u))}}function zw(e){return Ne(e.target)&&e.target.tagName==="BUTTON"}function dI(e){return Ne(e.target)&&e.target.tagName==="A"}function Uw(e){return ic(e)}function pI(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:f=!0}=t,p=O.useRef(),d=O.useRef(!1),h=O.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){let b=p.current;v.button===0&&u!=="click"&&(bi(b,!0)&&s||(r&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?n(!1,v.nativeEvent,"click"):(v.preventDefault(),n(!0,v.nativeEvent,"click"))))},onClick(v){let b=p.current;if(u==="mousedown"&&p.current){p.current=void 0;return}bi(b,!0)&&s||(r&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?n(!1,v.nativeEvent,"click"):n(!0,v.nativeEvent,"click"))},onKeyDown(v){p.current=void 0,!(v.defaultPrevented||!c||zw(v))&&(v.key===" "&&!Uw(o)&&(v.preventDefault(),d.current=!0),!dI(v)&&v.key==="Enter"&&n(!(r&&l),v.nativeEvent,"click"))},onKeyUp(v){v.defaultPrevented||!c||zw(v)||Uw(o)||v.key===" "&&d.current&&(d.current=!1,n(!(r&&l),v.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,f,l]);return O.useMemo(()=>a?{reference:h}:{},[a,h])}function hI(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,f=a.height,p=a.x,d=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,d-=n||0,c=0,f=0,!i||s?(c=t.axis==="y"?a.width:0,f=t.axis==="x"?a.height:0,p=u&&t.x!=null?t.x:p,d=l&&t.y!=null?t.y:d):i&&!s&&(f=t.axis==="x"?a.height:f,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:f,x:p,y:d,top:d,right:p+c,bottom:d+f,left:p}}}}function Ww(e){return e!=null&&e.clientX!=null}function vI(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,f=O.useRef(!1),p=O.useRef(null),[d,h]=O.useState(),[v,b]=O.useState([]),y=qe((E,P)=>{f.current||n.current.openEvent&&!Ww(n.current.openEvent)||a.setPositionReference(hI(o,{x:E,y:P,axis:l,dataRef:n,pointerType:d}))}),_=qe(E=>{s!=null||c!=null||(r?p.current||b([]):y(E.clientX,E.clientY))}),w=bi(d)?i:r,x=O.useCallback(()=>{if(!w||!u||s!=null||c!=null)return;let E=st(i);function P(R){let q=sr(R);Je(i,q)?(E.removeEventListener("mousemove",P),p.current=null):y(R.clientX,R.clientY)}if(!n.current.openEvent||Ww(n.current.openEvent)){E.addEventListener("mousemove",P);let R=()=>{E.removeEventListener("mousemove",P),p.current=null};return p.current=R,R}a.setPositionReference(o)},[w,u,s,c,i,n,a,o,y]);O.useEffect(()=>x(),[x,v]),O.useEffect(()=>{u&&!i&&(f.current=!1)},[u,i]),O.useEffect(()=>{!u&&r&&(f.current=!0)},[u,r]),me(()=>{u&&(s!=null||c!=null)&&(f.current=!1,y(s,c))},[u,s,c,y]);let S=O.useMemo(()=>{function E(P){let{pointerType:R}=P;h(R)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:_,onMouseEnter:_}},[_]);return O.useMemo(()=>u?{reference:S}:{},[u,S])}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:f="pointerdown",ancestorScroll:p=!1,bubbles:d,capture:h}=t,v=Ei(),b=qe(typeof l=="function"?l:()=>!1),y=typeof l=="function"?b:l,_=O.useRef(!1),{escapeKey:w,outsidePress:x}=Vw(d),{escapeKey:S,outsidePress:E}=Vw(h),P=O.useRef(!1),R=O.useRef(-1),q=qe(C=>{var V;if(!r||!a||!u||C.key!=="Escape"||P.current)return;let j=(V=o.current.floatingContext)==null?void 0:V.nodeId,A=v?mi(v.nodesRef.current,j):[];if(!w&&(C.stopPropagation(),A.length>0)){let k=!0;if(A.forEach(W=>{var ce;if((ce=W.context)!=null&&ce.open&&!W.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}n(!1,k0(C)?C.nativeEvent:C,"escape-key")}),M=qe(C=>{var V;let j=()=>{var A;q(C),(A=sr(C))==null||A.removeEventListener("keydown",j)};(V=sr(C))==null||V.addEventListener("keydown",j)}),I=qe(C=>{var V;let j=o.current.insideReactTree;o.current.insideReactTree=!1;let A=_.current;if(_.current=!1,s==="click"&&A||j||typeof y=="function"&&!y(C))return;let k=sr(C),W="["+Si("inert")+"]",ce=nt(i.floating).querySelectorAll(W),F=Re(k)?k:null;for(;F&&!or(F);){let $=nr(F);if(or($)||!Re($))break;F=$}if(ce.length&&Re(k)&&!R0(k)&&!Je(k,i.floating)&&Array.from(ce).every($=>!Je(F,$)))return;if(Ne(k)&&T){let $=or(k),re=xt(k),ae=/auto|scroll/,X=$||ae.test(re.overflowX),ie=$||ae.test(re.overflowY),G=X&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,oe=ie&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,ue=re.direction==="rtl",ne=oe&&(ue?C.offsetX<=k.offsetWidth-k.clientWidth:C.offsetX>k.clientWidth),be=G&&C.offsetY>k.clientHeight;if(ne||be)return}let Z=(V=o.current.floatingContext)==null?void 0:V.nodeId,fe=v&&mi(v.nodesRef.current,Z).some($=>{var re;return nc(C,(re=$.context)==null?void 0:re.elements.floating)});if(nc(C,i.floating)||nc(C,i.domReference)||fe)return;let z=v?mi(v.nodesRef.current,Z):[];if(z.length>0){let $=!0;if(z.forEach(re=>{var ae;if((ae=re.context)!=null&&ae.open&&!re.context.dataRef.current.__outsidePressBubbles){$=!1;return}}),!$)return}n(!1,C,"outside-press")}),B=qe(C=>{var V;let j=()=>{var A;I(C),(A=sr(C))==null||A.removeEventListener(s,j)};(V=sr(C))==null||V.addEventListener(s,j)});O.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=w,o.current.__outsidePressBubbles=x;let C=-1;function V(ce){n(!1,ce,"ancestor-scroll")}function j(){window.clearTimeout(C),P.current=!0}function A(){C=window.setTimeout(()=>{P.current=!1},bo()?5:0)}let k=nt(i.floating);u&&(k.addEventListener("keydown",S?M:q,S),k.addEventListener("compositionstart",j),k.addEventListener("compositionend",A)),y&&k.addEventListener(s,E?B:I,E);let W=[];return p&&(Re(i.domReference)&&(W=Rt(i.domReference)),Re(i.floating)&&(W=W.concat(Rt(i.floating))),!Re(i.reference)&&i.reference&&i.reference.contextElement&&(W=W.concat(Rt(i.reference.contextElement)))),W=W.filter(ce=>{var F;return ce!==((F=k.defaultView)==null?void 0:F.visualViewport)}),W.forEach(ce=>{ce.addEventListener("scroll",V,{passive:!0})}),()=>{u&&(k.removeEventListener("keydown",S?M:q,S),k.removeEventListener("compositionstart",j),k.removeEventListener("compositionend",A)),y&&k.removeEventListener(s,E?B:I,E),W.forEach(ce=>{ce.removeEventListener("scroll",V)}),window.clearTimeout(C)}},[o,i,u,y,s,r,n,p,a,w,x,q,S,M,I,E,B]),O.useEffect(()=>{o.current.insideReactTree=!1},[o,y,s]);let U=O.useMemo(()=>({onKeyDown:q,...c&&{[mI[f]]:C=>{n(!1,C.nativeEvent,"reference-press")},...f!=="click"&&{onClick(C){n(!1,C.nativeEvent,"reference-press")}}}}),[q,n,c,f]),T=O.useMemo(()=>({onKeyDown:q,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[bI[s]]:()=>{o.current.insideReactTree=!0},onBlurCapture(){v||(it(R),o.current.insideReactTree=!0,R.current=window.setTimeout(()=>{o.current.insideReactTree=!1}))}}),[q,s,o,v]);return O.useMemo(()=>a?{reference:U,floating:T}:{},[a,U,T])}function h1(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=Po(),o=O.useRef({}),[a]=O.useState(()=>i1()),u=Oi()!=null,[l,s]=O.useState(n.reference),c=qe((d,h,v)=>{o.current.openEvent=d?h:void 0,a.emit("openchange",{open:d,event:h,reason:v,nested:u}),r?.(d,h,v)}),f=O.useMemo(()=>({setPositionReference:s}),[]),p=O.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return O.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:p,events:a,floatingId:i,refs:f}),[t,c,p,a,i,f])}function yI(e){e===void 0&&(e={});let{nodeId:t}=e,r=h1({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=O.useState(null),[u,l]=O.useState(null),c=i?.domReference||o,f=O.useRef(null),p=Ei();me(()=>{c&&(f.current=c)},[c]);let d=gw({...e,elements:{...i,...u&&{reference:u}}}),h=O.useCallback(w=>{let x=Re(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(x),d.refs.setReference(x)},[d.refs]),v=O.useCallback(w=>{(Re(w)||w===null)&&(f.current=w,a(w)),(Re(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!Re(w))&&d.refs.setReference(w)},[d.refs]),b=O.useMemo(()=>({...d.refs,setReference:v,setPositionReference:h,domReference:f}),[d.refs,v,h]),y=O.useMemo(()=>({...d.elements,domReference:c}),[d.elements,c]),_=O.useMemo(()=>({...d,...n,refs:b,elements:y,nodeId:t}),[d,b,y,t,n]);return me(()=>{n.dataRef.current.floatingContext=_;let w=p?.nodesRef.current.find(x=>x.id===t);w&&(w.context=_)}),O.useMemo(()=>({...d,context:_,refs:b,elements:y}),[d,b,y,_])}function Kh(){return P0()&&Eh()}function _I(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=O.useRef(!1),c=O.useRef(-1),f=O.useRef(!0);O.useEffect(()=>{if(!u)return;let d=st(a.domReference);function h(){!r&&Ne(a.domReference)&&a.domReference===ur(nt(a.domReference))&&(s.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return d.addEventListener("blur",h),Kh()&&(d.addEventListener("keydown",v,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",h),Kh()&&(d.removeEventListener("keydown",v,!0),d.removeEventListener("pointerdown",b,!0))}},[a.domReference,r,u]),O.useEffect(()=>{if(!u)return;function d(h){let{reason:v}=h;(v==="reference-press"||v==="escape-key")&&(s.current=!0)}return i.on("openchange",d),()=>{i.off("openchange",d)}},[i,u]),O.useEffect(()=>()=>{it(c)},[]);let p=O.useMemo(()=>({onMouseLeave(){s.current=!1},onFocus(d){if(s.current)return;let h=sr(d.nativeEvent);if(l&&Re(h)){if(Kh()&&!d.relatedTarget){if(!f.current&&!ic(h))return}else if(!M0(h))return}n(!0,d.nativeEvent,"focus")},onBlur(d){s.current=!1;let h=d.relatedTarget,v=d.nativeEvent,b=Re(h)&&h.hasAttribute(Si("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var y;let _=ur(a.domReference?a.domReference.ownerDocument:document);!h&&_===a.domReference||Je((y=o.current.floatingContext)==null?void 0:y.refs.floating.current,_)||Je(a.domReference,_)||b||n(!1,v,"focus")})}}),[o,a.domReference,n,l]);return O.useMemo(()=>u?{reference:p}:{},[u,p])}function Zh(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[Pw]:a,[Tw]:u,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[Fq]:""},...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&&[Pw,Tw].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var f;(f=n.get(s))==null||f.push(c),a[s]=function(){for(var p,d=arguments.length,h=new Array(d),v=0;v<d;v++)h[v]=arguments[v];return(p=n.get(s))==null?void 0:p.map(b=>b(...h)).find(b=>b!==void 0)}}}else a[s]=c}),a),{})}}function wI(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=O.useCallback(u=>Zh(u,e,"reference"),t),o=O.useCallback(u=>Zh(u,e,"floating"),r),a=O.useCallback(u=>Zh(u,e,"item"),n);return O.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function gc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function vc(e,t){return gc(t,e===uu||e===mn,e===bn||e===gn)}function Yh(e,t,r){return gc(t,e===mn,r?e===bn:e===gn)||e==="Enter"||e===" "||e===""}function Hw(e,t,r){return gc(t,r?e===bn:e===gn,e===mn)}function Gw(e,t,r,n){let i=r?e===gn:e===bn,o=e===uu;return t==="both"||t==="horizontal"&&n&&n>1?e===xI:gc(t,i,o)}function SI(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:f=!1,loop:p=!1,nested:d=!1,rtl:h=!1,virtual:v=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:_=!0,disabledIndices:w=void 0,orientation:x="vertical",parentOrientation:S,cols:E=1,scrollItemIntoView:P=!0,virtualItemRef:R,itemSizes:q,dense:M=!1}=t,I=nu(i.floating),B=Qe(I),U=Oi(),T=Ei();me(()=>{e.dataRef.current.orientation=x},[e,x]);let C=qe(()=>{l(A.current===-1?null:A.current)}),V=oc(i.domReference),j=O.useRef(b),A=O.useRef(c??-1),k=O.useRef(null),W=O.useRef(!0),ce=O.useRef(C),F=O.useRef(!!i.floating),Z=O.useRef(r),fe=O.useRef(!1),z=O.useRef(!1),$=Qe(w),re=Qe(r),ae=Qe(P),X=Qe(c),[ie,G]=O.useState(),[oe,ue]=O.useState(),ne=qe(()=>{function H(he){if(v){var Pe;(Pe=he.id)!=null&&Pe.endsWith("-fui-option")&&(he.id=o+"-"+Math.random().toString(16).slice(2,10)),G(he.id),T?.events.emit("virtualfocus",he),R&&(R.current=he)}else _i(he,{sync:fe.current,preventScroll:!0})}let ee=a.current[A.current],Y=z.current;ee&&H(ee),(fe.current?he=>he():requestAnimationFrame)(()=>{let he=a.current[A.current]||ee;if(!he)return;ee||H(he);let Pe=ae.current;Pe&&ve&&(Y||!W.current)&&(he.scrollIntoView==null||he.scrollIntoView(typeof Pe=="boolean"?{block:"nearest",inline:"nearest"}:Pe))})});me(()=>{s&&(r&&i.floating?j.current&&c!=null&&(z.current=!0,A.current=c,C()):F.current&&(A.current=-1,ce.current()))},[s,r,i.floating,c,C]),me(()=>{if(s&&r&&i.floating)if(u==null){if(fe.current=!1,X.current!=null)return;if(F.current&&(A.current=-1,ne()),(!Z.current||!F.current)&&j.current&&(k.current!=null||j.current===!0&&k.current==null)){let H=0,ee=()=>{a.current[0]==null?(H<2&&(H?requestAnimationFrame:queueMicrotask)(ee),H++):(A.current=k.current==null||Yh(k.current,x,h)||d?iu(a,$.current):ac(a,$.current),k.current=null,C())};ee()}}else vi(a,u)||(A.current=u,ne(),z.current=!1)},[s,r,i.floating,u,X,d,a,x,h,C,ne,$]),me(()=>{var H;if(!s||i.floating||!T||v||!F.current)return;let ee=T.nodesRef.current,Y=(H=ee.find(Pe=>Pe.id===U))==null||(H=H.context)==null?void 0:H.elements.floating,pe=ur(nt(i.floating)),he=ee.some(Pe=>Pe.context&&Je(Pe.context.elements.floating,pe));Y&&!he&&W.current&&Y.focus({preventScroll:!0})},[s,i.floating,T,U,v]),me(()=>{if(!s||!T||!v||U)return;function H(ee){ue(ee.id),R&&(R.current=ee)}return T.events.on("virtualfocus",H),()=>{T.events.off("virtualfocus",H)}},[s,T,v,U,R]),me(()=>{ce.current=C,Z.current=r,F.current=!!i.floating}),me(()=>{r||(k.current=null,j.current=b)},[r,b]);let be=u!=null,ve=O.useMemo(()=>{function H(Y){if(!re.current)return;let pe=a.current.indexOf(Y);pe!==-1&&A.current!==pe&&(A.current=pe,C())}return{onFocus(Y){let{currentTarget:pe}=Y;fe.current=!0,H(pe)},onClick:Y=>{let{currentTarget:pe}=Y;return pe.focus({preventScroll:!0})},...y&&{onMouseMove(Y){let{currentTarget:pe}=Y;fe.current=!0,z.current=!1,H(pe)},onPointerLeave(Y){let{pointerType:pe}=Y;if(!(!W.current||pe==="touch")&&(fe.current=!0,A.current=-1,C(),!v)){var he;(he=B.current)==null||he.focus({preventScroll:!0})}}}}},[re,B,y,a,C,v]),xe=O.useCallback(()=>{var H;return S??(T==null||(H=T.nodesRef.current.find(ee=>ee.id===U))==null||(H=H.context)==null||(H=H.dataRef)==null?void 0:H.current.orientation)},[U,T,S]),J=qe(H=>{if(W.current=!1,fe.current=!0,H.which===229||!re.current&&H.currentTarget===B.current)return;if(d&&Gw(H.key,x,h,E)){vc(H.key,xe())||rt(H),n(!1,H.nativeEvent,"list-navigation"),Ne(i.domReference)&&(v?T?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let ee=A.current,Y=iu(a,w),pe=ac(a,w);if(V||(H.key==="Home"&&(rt(H),A.current=Y,C()),H.key==="End"&&(rt(H),A.current=pe,C())),E>1){let he=q||Array.from({length:a.current.length},()=>({width:1,height:1})),Pe=Mh(he,E,M),je=Pe.findIndex(_e=>_e!=null&&!hn(a,_e,w)),Bt=Pe.reduce((_e,ht,Qn)=>ht!=null&&!hn(a,ht,w)?Qn:_e,-1),Ot=Pe[Rh({current:Pe.map(_e=>_e!=null?a.current[_e]:null)},{event:H,orientation:x,loop:p,rtl:h,cols:E,disabledIndices:kh([...(typeof w!="function"?w:null)||a.current.map((_e,ht)=>hn(a,ht,w)?ht:void 0),void 0],Pe),minIndex:je,maxIndex:Bt,prevIndex:Ch(A.current>pe?Y:A.current,he,Pe,E,H.key===mn?"bl":H.key===(h?bn:gn)?"tr":"tl"),stopEvent:!0})];if(Ot!=null&&(A.current=Ot,C()),x==="both")return}if(vc(H.key,x)){if(rt(H),r&&!v&&ur(H.currentTarget.ownerDocument)===H.currentTarget){A.current=Yh(H.key,x,h)?Y:pe,C();return}Yh(H.key,x,h)?p?A.current=ee>=pe?f&&ee!==a.current.length?-1:Y:tt(a,{startingIndex:ee,disabledIndices:w}):A.current=Math.min(pe,tt(a,{startingIndex:ee,disabledIndices:w})):p?A.current=ee<=Y?f&&ee!==-1?a.current.length:pe:tt(a,{startingIndex:ee,decrement:!0,disabledIndices:w}):A.current=Math.max(Y,tt(a,{startingIndex:ee,decrement:!0,disabledIndices:w})),vi(a,A.current)&&(A.current=-1),C()}}),te=O.useMemo(()=>v&&r&&be&&{"aria-activedescendant":oe||ie},[v,r,be,oe,ie]),se=O.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...V?{}:te,onKeyDown:J,onPointerMove(){W.current=!0}}),[te,J,x,V]),le=O.useMemo(()=>{function H(Y){b==="auto"&&Ph(Y.nativeEvent)&&(j.current=!0)}function ee(Y){j.current=b,b==="auto"&&Th(Y.nativeEvent)&&(j.current=!0)}return{...te,onKeyDown(Y){W.current=!1;let pe=Y.key.startsWith("Arrow"),he=["Home","End"].includes(Y.key),Pe=pe||he,je=Hw(Y.key,x,h),Bt=Gw(Y.key,x,h,E),Ot=Hw(Y.key,xe(),h),_e=vc(Y.key,x),ht=(d?Ot:_e)||Y.key==="Enter"||Y.key.trim()==="";if(v&&r){let zt=T?.nodesRef.current.find(Ie=>Ie.parentId==null),Ae=T&&zt?C0(T.nodesRef.current,zt.id):null;if(Pe&&Ae&&R){let Ie=new KeyboardEvent("keydown",{key:Y.key,bubbles:!0});if(je||Bt){var Qn,Sa;let vr=((Qn=Ae.context)==null?void 0:Qn.elements.domReference)===Y.currentTarget,at=Bt&&!vr?(Sa=Ae.context)==null?void 0:Sa.elements.domReference:je?a.current.find(Vi=>Vi?.id===ie):null;at&&(rt(Y),at.dispatchEvent(Ie),ue(void 0))}if((_e||he)&&Ae.context&&Ae.context.open&&Ae.parentId&&Y.currentTarget!==Ae.context.elements.domReference){var Oa;rt(Y),(Oa=Ae.context.elements.domReference)==null||Oa.dispatchEvent(Ie);return}}return J(Y)}if(!(!r&&!_&&pe)){if(ht){let zt=vc(Y.key,xe());k.current=d&&zt?null:Y.key}if(d){Ot&&(rt(Y),r?(A.current=iu(a,$.current),C()):n(!0,Y.nativeEvent,"list-navigation"));return}_e&&(c!=null&&(A.current=c),rt(Y),!r&&_?n(!0,Y.nativeEvent,"list-navigation"):J(Y),r&&C())}},onFocus(){r&&!v&&(A.current=-1,C())},onPointerDown:ee,onPointerEnter:ee,onMouseDown:H,onClick:H}},[ie,te,E,J,$,b,a,d,C,n,r,_,x,xe,h,c,T,v,R]);return O.useMemo(()=>s?{reference:le,floating:se,item:ve}:{},[s,le,se,ve])}function EI(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=Po(),c=((r=o.domReference)==null?void 0:r.id)||s,f=O.useMemo(()=>{var _;return((_=nu(o.floating))==null?void 0:_.id)||a},[o.floating,a]),p=(n=OI.get(l))!=null?n:l,h=Oi()!=null,v=O.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":i?f: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,f,h,i,c,l]),b=O.useMemo(()=>{let _={id:f,...p&&{role:p}};return p==="tooltip"||l==="label"?_:{..._,...p==="menu"&&{"aria-labelledby":c}}},[p,f,c,l]),y=O.useCallback(_=>{let{active:w,selected:x}=_,S={role:"option",...w&&{id:f+"-fui-option"}};switch(l){case"select":return{...S,"aria-selected":w&&x};case"combobox":return{...S,"aria-selected":x}}return{}},[f,l]);return O.useMemo(()=>u?{reference:v,floating:b,item:y}:{},[u,v,b,y])}function Eo(e,t){return typeof e=="function"?e(t):e}function AI(e,t){let[r,n]=O.useState(e);return e&&!r&&n(!0),O.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function v1(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]=O.useState("unmounted"),s=AI(r,a);return!s&&u==="close"&&l("unmounted"),me(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{xi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:s,status:u}}function PI(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=O.useMemo(()=>({side:l,placement:u}),[l,u]),c=typeof a=="number",f=(c?a:a.open)||0,p=(c?a:a.close)||0,[d,h]=O.useState(()=>({...Eo(o,s),...Eo(r,s)})),{isMounted:v,status:b}=v1(e,{duration:a}),y=Qe(r),_=Qe(n),w=Qe(i),x=Qe(o);return me(()=>{let S=Eo(y.current,s),E=Eo(w.current,s),P=Eo(x.current,s),R=Eo(_.current,s)||Object.keys(S).reduce((q,M)=>(q[M]="",q),{});if(b==="initial"&&h(q=>({transitionProperty:q.transitionProperty,...P,...S})),b==="open"&&h({transitionProperty:Object.keys(R).map($w).join(","),transitionDuration:f+"ms",...P,...R}),b==="close"){let q=E||S;h({transitionProperty:Object.keys(q).map($w).join(","),transitionDuration:p+"ms",...P,...q})}},[p,w,y,_,x,f,b,s]),{isMounted:v,styles:d}}function TI(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:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=O.useRef(-1),v=O.useRef(""),b=O.useRef((r=d??a)!=null?r:-1),y=O.useRef(null),_=qe(u),w=qe(l),x=Qe(c),S=Qe(p);me(()=>{n&&(it(h),y.current=null,v.current="")},[n]),me(()=>{if(n&&v.current===""){var M;b.current=(M=d??a)!=null?M:-1}},[n,d,a]);let E=qe(M=>{M?i.current.typing||(i.current.typing=M,w(M)):i.current.typing&&(i.current.typing=M,w(M))}),P=qe(M=>{function I(V,j,A){let k=x.current?x.current(j,A):j.find(W=>W?.toLocaleLowerCase().indexOf(A.toLocaleLowerCase())===0);return k?V.indexOf(k):-1}let B=o.current;if(v.current.length>0&&v.current[0]!==" "&&(I(B,B,v.current)===-1?E(!1):M.key===" "&&rt(M)),B==null||S.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(rt(M),E(!0)),B.every(V=>{var j,A;return V?((j=V[0])==null?void 0:j.toLocaleLowerCase())!==((A=V[1])==null?void 0:A.toLocaleLowerCase()):!0})&&v.current===M.key&&(v.current="",b.current=y.current),v.current+=M.key,it(h),h.current=window.setTimeout(()=>{v.current="",b.current=y.current,E(!1)},f);let T=b.current,C=I(B,[...B.slice((T||0)+1),...B.slice(0,(T||0)+1)],v.current);C!==-1?(_(C),y.current=C):M.key!==" "&&(v.current="",E(!1))}),R=O.useMemo(()=>({onKeyDown:P}),[P]),q=O.useMemo(()=>({onKeyDown:P,onKeyUp(M){M.key===" "&&E(!1)}}),[P,E]);return O.useMemo(()=>s?{reference:R,floating:q}:{},[s,R,q])}function Kw(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function MI(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,l=qe(u),s=O.useRef(!1),c=O.useRef(null),f=O.useRef(null);O.useEffect(()=>{if(!i)return;function d(v){if(v.ctrlKey||!h||o.current==null)return;let b=v.deltaY,y=o.current.top>=-.5,_=o.current.bottom>=-.5,w=h.scrollHeight-h.clientHeight,x=b<0?-1:1,S=b<0?"max":"min";h.scrollHeight<=h.clientHeight||(!y&&b>0||!_&&b<0?(v.preventDefault(),xi.flushSync(()=>{l(E=>E+Math[S](b,w*x))})):/firefox/i.test(rc())&&(h.scrollTop+=b))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",d),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{c.current=null,f.current=null,h.removeEventListener("wheel",d)}},[i,r,n.floating,o,a,l]);let p=O.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let d=a?.current||n.floating;if(!(!o.current||!d||!s.current)){if(c.current!==null){let h=d.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&xi.flushSync(()=>l(v=>v+h))}requestAnimationFrame(()=>{c.current=d.scrollTop})}}}),[n.floating,l,o,a]);return O.useMemo(()=>i?{floating:p}:{},[i,p])}function CI(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 Zw(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,f]=t[u]||[0,0];s>=n!=f>=n&&r<=(c-l)*(n-s)/(f-s)+l&&(i=!i)}return i}function kI(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qI(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i={current:-1},o=!1,a=null,u=null,l=performance.now();function s(f,p){let d=performance.now(),h=d-l;if(a===null||u===null||h===0)return a=f,u=p,l=d,null;let v=f-a,b=p-u,_=Math.sqrt(v*v+b*b)/h;return a=f,u=p,l=d,_}let c=f=>{let{x:p,y:d,placement:h,elements:v,onClose:b,nodeId:y,tree:_}=f;return function(x){function S(){it(i),b()}if(it(i),!v.domReference||!v.floating||h==null||p==null||d==null)return;let{clientX:E,clientY:P}=x,R=[E,P],q=Qq(x),M=x.type==="mouseleave",I=Gh(v.floating,q),B=Gh(v.domReference,q),U=v.domReference.getBoundingClientRect(),T=v.floating.getBoundingClientRect(),C=h.split("-")[0],V=p>T.right-T.width/2,j=d>T.bottom-T.height/2,A=kI(R,U),k=T.width>U.width,W=T.height>U.height,ce=(k?U:T).left,F=(k?U:T).right,Z=(W?U:T).top,fe=(W?U:T).bottom;if(I&&(o=!0,!M))return;if(B&&(o=!1),B&&!M){o=!0;return}if(M&&Re(x.relatedTarget)&&Gh(v.floating,x.relatedTarget)||_&&CI(_.nodesRef.current,y).length)return;if(C==="top"&&d>=U.bottom-1||C==="bottom"&&d<=U.top+1||C==="left"&&p>=U.right-1||C==="right"&&p<=U.left+1)return S();let z=[];switch(C){case"top":z=[[ce,U.top+1],[ce,T.bottom-1],[F,T.bottom-1],[F,U.top+1]];break;case"bottom":z=[[ce,T.top+1],[ce,U.bottom-1],[F,U.bottom-1],[F,T.top+1]];break;case"left":z=[[T.right-1,fe],[T.right-1,Z],[U.left+1,Z],[U.left+1,fe]];break;case"right":z=[[U.right-1,fe],[U.right-1,Z],[T.left+1,Z],[T.left+1,fe]];break}function $(re){let[ae,X]=re;switch(C){case"top":{let ie=[k?ae+t/2:V?ae+t*4:ae-t*4,X+t+1],G=[k?ae-t/2:V?ae+t*4:ae-t*4,X+t+1],oe=[[T.left,V||k?T.bottom-t:T.top],[T.right,V?k?T.bottom-t:T.top:T.bottom-t]];return[ie,G,...oe]}case"bottom":{let ie=[k?ae+t/2:V?ae+t*4:ae-t*4,X-t],G=[k?ae-t/2:V?ae+t*4:ae-t*4,X-t],oe=[[T.left,V||k?T.top+t:T.bottom],[T.right,V?k?T.top+t:T.bottom:T.top+t]];return[ie,G,...oe]}case"left":{let ie=[ae+t+1,W?X+t/2:j?X+t*4:X-t*4],G=[ae+t+1,W?X-t/2:j?X+t*4:X-t*4];return[...[[j||W?T.right-t:T.left,T.top],[j?W?T.right-t:T.left:T.right-t,T.bottom]],ie,G]}case"right":{let ie=[ae-t,W?X+t/2:j?X+t*4:X-t*4],G=[ae-t,W?X-t/2:j?X+t*4:X-t*4],oe=[[j||W?T.left+t:T.right,T.top],[j?W?T.left+t:T.right:T.left+t,T.bottom]];return[ie,G,...oe]}}}if(!Zw([E,P],z)){if(o&&!A)return S();if(!M&&n){let re=s(x.clientX,x.clientY);if(re!==null&&re<.1)return S()}Zw([E,P],$([p,d]))?!o&&n&&(i.current=window.setTimeout(S,40)):S()}}};return c.__options={blockPointerEvents:r},c}var O,Ce,xi,Xw,Fq,Pw,Tw,bn,gn,uu,mn,t1,r1,n1,Vh,Nq,Dq,Bq,Rw,zq,Mw,Wq,Po,Vq,o1,a1,Oi,Ei,Cw,Xh,u1,s1,c1,kw,Ao,dc,pc,$h,tI,l1,rI,bc,mc,f1,jw,p1,oI,wi,sI,hc,Dw,Bw,fI,mI,bI,Vw,xI,OI,$w,RI,b1=mt(()=>{O=N(Fe());j0();Ce=N(Us());eu();wh();xi=N(uc());Wh();Wh();go();Xw=O.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});Fq="data-floating-ui-focusable",Pw="active",Tw="selected",bn="ArrowLeft",gn="ArrowRight",uu="ArrowUp",mn="ArrowDown";t1=O.createContext({activeIndex:0,onNavigate:()=>{}}),r1=[bn,gn],n1=[uu,mn],Vh=[...r1,...n1],Nq=O.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:f,dense:p=!1,...d}=t,[h,v]=O.useState(0),b=s??h,y=qe(c??v),_=O.useRef([]),w=n&&typeof n!="function"?n.props:{},x=O.useMemo(()=>({activeIndex:b,onNavigate:y}),[b,y]),S=u>1;function E(R){if(!Vh.includes(R.key))return;let q=b,M=iu(_,l),I=ac(_,l),B=a?bn:gn,U=a?gn:bn;if(S){let A=f||Array.from({length:_.current.length},()=>({width:1,height:1})),k=Mh(A,u,p),W=k.findIndex(Z=>Z!=null&&!hn(_,Z,l)),ce=k.reduce((Z,fe,z)=>fe!=null&&!hn(_,fe,l)?z:Z,-1),F=k[Rh({current:k.map(Z=>Z?_.current[Z]:null)},{event:R,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:kh([...(typeof l!="function"?l:null)||_.current.map((Z,fe)=>hn(_,fe,l)?fe:void 0),void 0],k),minIndex:W,maxIndex:ce,prevIndex:Ch(b>I?M:b,A,k,u,R.key===mn?"bl":R.key===B?"tr":"tl")})];F!=null&&(q=F)}let T={horizontal:[B],vertical:[mn],both:[B,mn]}[i],C={horizontal:[U],vertical:[uu],both:[U,uu]}[i],V=S?Vh:{horizontal:r1,vertical:n1,both:Vh}[i];if(q===b&&[...T,...C].includes(R.key)&&(o&&q===I&&T.includes(R.key)?q=M:o&&q===M&&C.includes(R.key)?q=I:q=tt(_,{startingIndex:q,decrement:C.includes(R.key),disabledIndices:l})),q!==b&&!vi(_,q)){var j;R.stopPropagation(),V.includes(R.key)&&R.preventDefault(),y(q),(j=_.current[q])==null||j.focus()}}let P={...d,...w,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(R){d.onKeyDown==null||d.onKeyDown(R),w.onKeyDown==null||w.onKeyDown(R),E(R)}};return(0,Ce.jsx)(t1.Provider,{value:x,children:(0,Ce.jsx)(Jw,{elementsRef:_,children:e1(n,P)})})}),Dq=O.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=O.useContext(t1),{ref:l,index:s}=Qw(),c=Yw([l,r,o.ref]),f=a===s,p={...i,...o,ref:c,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(d){i.onFocus==null||i.onFocus(d),o.onFocus==null||o.onFocus(d),u(s)}};return e1(n,p)}),Bq={...O},Rw=!1,zq=0,Mw=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zq++;Wq=Bq.useId,Po=Wq||Uq,Vq=O.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:f,stroke:p,d,style:{transform:h,...v}={},...b}=t,y=Po(),[_,w]=O.useState(!1);if(me(()=>{if(!i)return;xt(i).direction==="rtl"&&w(!0)},[i]),!i)return null;let[x,S]=n.split("-"),E=x==="top"||x==="bottom",P=f;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(P=null);let R=c*2,q=R/2,M=u/2*(s/-8+1),I=l/2*s/4,B=!!d,U=P&&S==="end"?"bottom":"top",T=P&&S==="end"?"right":"left";P&&_&&(T=S==="end"?"left":"right");let C=o?.x!=null?P||o.x:"",V=o?.y!=null?P||o.y:"",j=d||"M0,0"+(" H"+u)+(" L"+(u-M)+","+(l-I))+(" Q"+u/2+","+l+" "+M+","+(l-I))+" Z",A={top:B?"rotate(180deg)":"",left:B?"rotate(90deg)":"rotate(-90deg)",bottom:B?"":"rotate(180deg)",right:B?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Ce.jsxs)("svg",{...b,"aria-hidden":!0,ref:r,width:B?u:u+R,height:u,viewBox:"0 0 "+u+" "+(l>u?l:u),style:{position:"absolute",pointerEvents:"none",[T]:C,[U]:V,[x]:E||B?"100%":"calc(100% - "+R/2+"px)",transform:[A,h].filter(k=>!!k).join(" "),...v},children:[R>0&&(0,Ce.jsx)("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:R+(d?0:1),d:j}),(0,Ce.jsx)("path",{stroke:R&&!d?b.fill:"none",d:j}),(0,Ce.jsx)("clipPath",{id:y,children:(0,Ce.jsx)("rect",{x:-q,y:q*(B?-1:1),width:u+R,height:u})})]})});o1=O.createContext(null),a1=O.createContext(null),Oi=()=>{var e;return((e=O.useContext(o1))==null?void 0:e.id)||null},Ei=()=>O.useContext(a1);Cw=Si("safe-polygon");Xh=()=>{},u1=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Xh,setState:Xh,isInstantPhase:!1}),s1=()=>O.useContext(u1);c1=O.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});kw=0;Ao={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};dc=new WeakSet,pc={},$h=0,tI=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,l1=e=>e&&(e.host||l1(e.parentNode)),rI=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=l1(r);return e.contains(n)?n:null}).filter(r=>r!=null);bc={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},mc=O.forwardRef(function(t,r){let[n,i]=O.useState();me(()=>{Eh()&&i("button")},[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Si("focus-guard")]:"",style:bc};return(0,Ce.jsx)("span",{...t,...o})}),f1=O.createContext(null),jw=Si("portal");p1=()=>O.useContext(f1);oI=20,wi=[];sI=O.forwardRef(function(t,r){return(0,Ce.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:bc})});hc=0,Dw="--floating-ui-scrollbar-width";Bw=()=>{},fI=O.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return me(()=>{if(n)return hc++,hc===1&&(Bw=lI()),()=>{hc--,hc===0&&Bw()}},[n]),(0,Ce.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});mI={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},bI={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Vw=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}};xI="Escape";OI=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);$w=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());RI=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}=Mt(e,t),{rects:f,elements:{floating:p}}=t,d=r.current[a],h=s?.current||p,v=p.clientTop||h.clientTop,b=p.clientTop!==0,y=h.clientTop!==0,_=p===h;if(!d)return{};let w={...t,...await fc(-d.offsetTop-p.clientTop-f.reference.height/2-d.offsetHeight/2-o).fn(t)},x=await yi(Kw(w,h.scrollHeight+v+p.clientTop),c),S=await yi(w,{...c,elementContext:"reference"}),E=He(0,x.top),P=w.y+E,M=(h.scrollHeight>h.clientHeight?I=>I:hi)(He(0,h.scrollHeight+(b&&_||y?v*2:0)-E-He(0,x.bottom)));if(h.style.maxHeight=M+"px",h.scrollTop=E,i){let I=h.offsetHeight<d.offsetHeight*St(u,r.current.length)-1||S.top>=-l||S.bottom>=-l;xi.flushSync(()=>i(I))}return n&&(n.current=await yi(Kw({...w,y:P},h.offsetHeight+v+p.clientTop),c)),{y:P}}})});var y1=g(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.default=FI;var g1=Us(),yc=(b1(),tg(m1)),Jh=lo(),II=fo();function jI(e){return Math.round(e*1e5)/1e5}var LI=(0,II.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Jh.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:`${jI(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function FI({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Jh.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=LI(),{refs:l,floatingStyles:s,context:c}=(0,yc.useFloating)({placement:r,strategy:"fixed",middleware:[(0,yc.offset)(5)]}),f=(0,yc.useClientPoint)(c,e),{getFloatingProps:p}=(0,yc.useInteractions)([f]);return(0,g1.jsx)(Jh.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,g1.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 O1,DI,tv,E1=mt(()=>{"use strict";O1=N(Fe()),DI=e=>{let{color:t="rgb(255,255,255,0.5)"}=e;return O1.default.createElement("rect",{...e,fill:t})},tv=DI});var Ai,A1,BI,P1,T1=mt(()=>{"use strict";Ai=N(Fe()),A1=N(xr()),BI=(0,A1.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return Ai.default.createElement(Ai.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 Ai.default.createElement(Ai.default.Fragment,{key:[u,l,s,c].join("-")},Ai.default.createElement("line",{stroke:"black",x1:c,y1:u,x2:c,y2:l}),Ai.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:s,y2:l}))}):null)}),P1=BI});var _n,R1,zI,M1,C1=mt(()=>{"use strict";_n=N(Fe()),R1=N(xr());E1();T1();zI=(0,R1.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 _n.default.createElement(_n.default.Fragment,null,_n.default.createElement(tv,{y:0,x:0,width:t+5+i,height:n}),_n.default.createElement(P1,{model:e}),_n.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,c)=>_n.default.createElement(tv,{key:`${s.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:s.color})),r?o.map((s,c)=>_n.default.createElement("text",{key:`${s.id}-${c}`,dominantBaseline:"middle",fontSize:u,x:2,y:c*a+a/2},s.label)):null))}),M1=zI});var _c,k1,q1,UI,I1,j1=mt(()=>{"use strict";_c=N(Fe()),k1=N(yt()),q1=N(xr()),UI=(0,q1.observer)(function({children:e,model:t,exportSVG:r}){if(r)return _c.default.createElement(_c.default.Fragment,null,e);{let{totalHeight:n}=t,{width:i}=(0,k1.getContainingView)(t);return _c.default.createElement("svg",{style:{position:"absolute",userSelect:"none",top:0,left:0,pointerEvents:"none",height:n,width:i}},e)}}),I1=UI});var rv,L1,WI,wc,nv=mt(()=>{"use strict";rv=N(Fe()),L1=N(xr());C1();j1();WI=(0,L1.observer)(function(e){let{model:t}=e;return rv.default.createElement(I1,{...e},rv.default.createElement(M1,{model:t}))}),wc=WI});var rx=g((UQ,tx)=>{"use strict";tx.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 Ec=g((WQ,nx)=>{nx.exports=JBrowseExports.mobx});var ux={};ls(ux,{default:()=>u2});var Nt,ix,Yt,ox,ax,o2,a2,u2,sx=mt(()=>{"use strict";Nt=N(Fe()),ix=N(dn()),Yt=N(lo()),ox=N(xr()),ax=N(fo()),o2=(0,ax.makeStyles)()({root:{width:500}}),a2=(0,ox.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=o2(),[i,o]=(0,Nt.useState)(`${t.rowHeight}`),[a,u]=(0,Nt.useState)(`${t.rowProportion}`);return Nt.default.createElement(ix.Dialog,{open:!0,onClose:r,title:"Set row height"},Nt.default.createElement("form",{onSubmit:l=>{l.preventDefault(),t.setRowProportion(+a),t.setRowHeight(+i),r()}},Nt.default.createElement(Yt.DialogContent,{className:n.root},Nt.default.createElement(Yt.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Nt.default.createElement(Yt.TextField,{value:i,helperText:"Enter row height",autoFocus:!0,onChange:l=>{o(l.target.value)}}),Nt.default.createElement(Yt.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{u(l.target.value)}}),Nt.default.createElement(Yt.DialogActions,null,Nt.default.createElement(Yt.Button,{variant:"contained",color:"primary",type:"submit"},"Submit"),Nt.default.createElement(Yt.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel")))))}),u2=a2});var lx={};ls(lx,{renderSvg:()=>s2});async function s2(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,cx.getContainingView)(e),u=`mafclip-${i}`;return Or.default.createElement(Or.default.Fragment,null,Or.default.createElement("defs",null,Or.default.createElement("clipPath",{id:u},Or.default.createElement("rect",{x:0,y:0,width:a,height:n}))),Or.default.createElement("g",{clipPath:`url(#${u})`},Or.default.createElement("g",{id:"snpcov"},await r(t)),Or.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},Or.default.createElement(wc,{model:e,orientation:"left",exportSVG:!0}))))}var Or,cx,fx=mt(()=>{"use strict";Or=N(Fe()),cx=N(yt());nv()});var Cx=g(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.TWO_PWR_32_DBL=Pr.TWO_PWR_16_DBL=void 0;Pr.longFromBytesToUnsigned=h2;Pr.TWO_PWR_16_DBL=65536;Pr.TWO_PWR_32_DBL=Pr.TWO_PWR_16_DBL*Pr.TWO_PWR_16_DBL;function h2(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)*Pr.TWO_PWR_32_DBL+(r>>>0)}});var qx=g(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});var mv=Cx(),Tc=1;function kx(e,t,r){let n=t[Tc],i=r?r[Tc]:1/0;return n<=e&&i>e?0:n<e?-1:1}var bv=class{constructor({filehandle:t}){this.filehandle=t}_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,mv.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,mv.longFromBytesToUnsigned)(o,a*16),l=(0,mv.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=kx(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=kx(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Tc]>=n));c+=1);return o[o.length-1][Tc]<n&&o.push([]),o}};gv.default=bv});var yv=g(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.sum=Ix;Rc.concatUint8Array=v2;function Ix(e){let t=0;for(let r of e)t+=r.length;return t}function v2(e){let t=new Uint8Array(Ix(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var _v=g(Mo=>{"use strict";var m2=Mo&&Mo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.unzip=g2;Mo.unzipChunkSlice=y2;var b2=m2(Fp()),jx=yv(),{Z_SYNC_FLUSH:Lx,Inflate:Fx}=b2.default;async function g2(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new Fx,{strm:t}=n,n.push(o,Lx),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,jx.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function y2(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,u=[],l=[],s=[],c=0;do{let f=e.subarray(o-n.blockPosition),p=new Fx;if({strm:r}=p,p.push(f,Lx),p.err)throw new Error(p.msg);let d=p.result;u.push(d);let h=d.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,jx.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 Nx=g(fu=>{"use strict";var _2=fu&&fu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fu,"__esModule",{value:!0});var w2=_2(qx()),x2=_v(),S2=yv(),wv=class{constructor({filehandle:t,gziFilehandle:r}){this.filehandle=t,this.gzi=new w2.default({filehandle:r})}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,x2.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,S2.concatUint8Array)(i)}};fu.default=wv});var Bx=g(Tr=>{"use strict";var O2=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.unzipChunkSlice=Tr.unzip=Tr.BgzfFilehandle=void 0;var E2=Nx();Object.defineProperty(Tr,"BgzfFilehandle",{enumerable:!0,get:function(){return O2(E2).default}});var Dx=_v();Object.defineProperty(Tr,"unzip",{enumerable:!0,get:function(){return Dx.unzip}});Object.defineProperty(Tr,"unzipChunkSlice",{enumerable:!0,get:function(){return Dx.unzipChunkSlice}})});var zx=g(Sv=>{"use strict";Object.defineProperty(Sv,"__esModule",{value:!0});Sv.default=A2;var xv=Fe();function A2(){let e=(0,xv.useRef)(null),[t,r]=(0,xv.useState)({width:void 0,height:void 0});return(0,xv.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 Wx=g((Aee,Ux)=>{Ux.exports=JBrowseExports["react-dom/client"]});var Tv=g(Pi=>{Object.defineProperty(Pi,"__esModule",{value:!0});var P2={grad:.9,turn:360,rad:360/(2*Math.PI)},Kr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ot=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Xt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Xx=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Vx=function(e){return{r:Xt(e.r,0,255),g:Xt(e.g,0,255),b:Xt(e.b,0,255),a:Xt(e.a)}},Ov=function(e){return{r:ot(e.r),g:ot(e.g),b:ot(e.b),a:ot(e.a,3)}},T2=/^#([0-9a-f]{3,8})$/i,Mc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Jx=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}},Qx=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}},Hx=function(e){return{h:Xx(e.h),s:Xt(e.s,0,100),l:Xt(e.l,0,100),a:Xt(e.a)}},Gx=function(e){return{h:ot(e.h),s:ot(e.s),l:ot(e.l),a:ot(e.a,3)}},$x=function(e){return Qx((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},du=function(e){return{h:(t=Jx(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},R2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,M2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,C2=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,k2=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Pv={string:[[function(e){var t=T2.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?ot(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?ot(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=C2.exec(e)||k2.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Vx({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=R2.exec(e)||M2.exec(e);if(!t)return null;var r,n,i=Hx({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(P2[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return $x(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 Kr(t)&&Kr(r)&&Kr(n)?Vx({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(!Kr(t)||!Kr(r)||!Kr(n))return null;var a=Hx({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return $x(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Kr(t)||!Kr(r)||!Kr(n))return null;var a=function(u){return{h:Xx(u.h),s:Xt(u.s,0,100),v:Xt(u.v,0,100),a:Xt(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return Qx(a)},"hsv"]]},Kx=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]},eS=function(e){return typeof e=="string"?Kx(e.trim(),Pv.string):typeof e=="object"&&e!==null?Kx(e,Pv.object):[null,void 0]},Ev=function(e,t){var r=du(e);return{h:r.h,s:Xt(r.s+100*t,0,100),l:r.l,a:r.a}},Av=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Zx=function(e,t){var r=du(e);return{h:r.h,s:r.s,l:Xt(r.l+100*t,0,100),a:r.a}},pu=function(){function e(t){this.parsed=eS(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 ot(Av(this.rgba),2)},e.prototype.isDark=function(){return Av(this.rgba)<.5},e.prototype.isLight=function(){return Av(this.rgba)>=.5},e.prototype.toHex=function(){return t=Ov(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?Mc(ot(255*o)):"","#"+Mc(r)+Mc(n)+Mc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Ov(this.rgba)},e.prototype.toRgbString=function(){return t=Ov(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 Gx(du(this.rgba))},e.prototype.toHslString=function(){return t=Gx(du(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=Jx(this.rgba),{h:ot(t.h),s:ot(t.s),v:ot(t.v),a:ot(t.a,3)};var t},e.prototype.invert=function(){return Rr({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),Rr(Ev(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Rr(Ev(this.rgba,-t))},e.prototype.grayscale=function(){return Rr(Ev(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Rr(Zx(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Rr(Zx(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"?Rr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):ot(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=du(this.rgba);return typeof t=="number"?Rr({h:t,s:r.s,l:r.l,a:r.a}):ot(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Rr(t).toHex()},e}(),Rr=function(e){return e instanceof pu?e:new pu(e)},Yx=[];Pi.Colord=pu,Pi.colord=Rr,Pi.extend=function(e){e.forEach(function(t){Yx.indexOf(t)<0&&(t(pu,Pv),Yx.push(t))})},Pi.getFormat=function(e){return eS(e)[1]},Pi.random=function(){return new pu({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var nS=g((Tee,rS)=>{var Mr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Rv=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Mv=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},Cv=96.422,kv=100,qv=82.521,q2=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:Mv(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:Mv(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:Mv(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Mr(r.r,0,255),g:Mr(r.g,0,255),b:Mr(r.b,0,255),a:Mr(r.a)}},I2=function(e){var t=Rv(e.r),r=Rv(e.g),n=Rv(e.b);return function(i){return{x:Mr(i.x,0,Cv),y:Mr(i.y,0,kv),z:Mr(i.z,0,qv),a:Mr(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}))},hu=216/24389,Co=24389/27,tS=function(e){var t=I2(e),r=t.x/Cv,n=t.y/kv,i=t.z/qv;return r=r>hu?Math.cbrt(r):(Co*r+16)/116,{l:116*(n=n>hu?Math.cbrt(n):(Co*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>hu?Math.cbrt(i):(Co*i+16)/116)),alpha:t.a}},j2=function(e,t,r){var n,i=tS(e),o=tS(t);return function(a){var u=(a.l+16)/116,l=a.a/500+u,s=u-a.b/200;return q2({x:(Math.pow(l,3)>hu?Math.pow(l,3):(116*l-16)/Co)*Cv,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/Co)*kv,z:(Math.pow(s,3)>hu?Math.pow(s,3):(116*s-16)/Co)*qv,a:a.alpha})}({l:Mr((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:Mr(n.alpha)})};rS.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=j2(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 oS=g((Ree,iS)=>{iS.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(),f=1/0,p="black";if(!o.length)for(var d in r)o[d]=new e(r[d]).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<f&&(f=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 sS=g(xn=>{"use strict";var aS=xn&&xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xn,"__esModule",{value:!0});xn.colord=xn.Colord=void 0;var L2=Tv(),F2=aS(nS()),N2=aS(oS());(0,L2.extend)([F2.default,N2.default]);var uS=Tv();Object.defineProperty(xn,"Colord",{enumerable:!0,get:function(){return uS.Colord}});Object.defineProperty(xn,"colord",{enumerable:!0,get:function(){return uS.colord}})});var Iv=g(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.createStopToken=B2;vu.stopStopToken=z2;vu.checkStopToken=U2;function D2(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function B2(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function z2(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function U2(e){if(typeof jest>"u"&&e!==void 0&&D2()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var lS=g(cS=>{"use strict";Object.defineProperty(cS,"__esModule",{value:!0})});var bS=g((qee,mS)=>{"use strict";var hS=(e,t)=>e>t?1:e<t?-1:0,jv=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),fS="eexxaacctt",W2=/\p{P}/gu,V2="A-Z",H2="a-z",G2=["en",{numeric:!0,sensitivity:"base"}],ko=(e,t,r)=>e.replace(V2,t).replace(H2,r),dS={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=hS)=>{let{idx:i,chars:o,terms:a,interLft2:u,interLft1:l,start:s,intraIns:c,interIns:f,cases:p}=e;return i.map((d,h)=>h).sort((d,h)=>o[h]-o[d]||c[d]-c[h]||a[h]+u[h]+.5*l[h]-(a[d]+u[d]+.5*l[d])||f[d]-f[h]||s[d]-s[h]||p[h]-p[d]||n(t[i[d]],t[i[h]]))}},Lv=(e,t)=>t==0?"":t==1?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`,pS="(?:\\b|_)";function Cc(e){e=Object.assign({},dS,e);let{unicode:t,interLft:r,interRgt:n,intraMode:i,intraSlice:o,intraIns:a,intraSub:u,intraTrn:l,intraDel:s,intraContr:c,intraSplit:f,interSplit:p,intraBound:d,interBound:h,intraChars:v,toUpper:b,toLower:y,compare:_}=e;a??=i,u??=i,l??=i,s??=i,_??=typeof Intl>"u"?hS:new Intl.Collator(...G2).compare;let w=e.letters??e.alpha;if(w!=null){let z=b(w),$=y(w);p=ko(p,z,$),f=ko(f,z,$),h=ko(h,z,$),d=ko(d,z,$),v=ko(v,z,$),c=ko(c,z,$)}let x=t?"u":"",S='".+?"',E=new RegExp(S,"gi"+x),P=new RegExp(`(?:\\s+|^)-(?:${v}+|${S})`,"gi"+x),{intraRules:R}=e;R==null&&(R=z=>{let $=dS.intraSlice,re=0,ae=0,X=0,ie=0;if(/[^\d]/.test(z)){let G=z.length;G<=4?G>=3&&(X=Math.min(l,1),G==4&&(re=Math.min(a,1))):($=o,re=a,ae=u,X=l,ie=s)}return{intraSlice:$,intraIns:re,intraSub:ae,intraTrn:X,intraDel:ie}});let q=!!f,M=new RegExp(f,"g"+x),I=new RegExp(p,"g"+x),B=new RegExp("^"+p+"|"+p+"$","g"+x),U=new RegExp(c,"gi"+x),T=(z,$=!1)=>{let re=[];z=z.replace(E,X=>(re.push(X),fS)),z=z.replace(B,""),$||(z=y(z)),q&&(z=z.replace(M,X=>X[0]+" "+X[1]));let ae=0;return z.split(I).filter(X=>X!="").map(X=>X===fS?re[ae++]:X)},C=/[^\d]+|\d+/g,V=(z,$=0,re=!1)=>{let ae=T(z);if(ae.length==0)return[];let X=Array(ae.length).fill("");ae=ae.map((ne,be)=>ne.replace(U,ve=>(X[be]=ve,"")));let ie;if(i==1)ie=ae.map((ne,be)=>{if(ne[0]==='"')return jv(ne.slice(1,-1));let ve="";for(let xe of ne.matchAll(C)){let J=xe[0],{intraSlice:te,intraIns:se,intraSub:le,intraTrn:H,intraDel:ee}=R(J);if(se+le+H+ee==0)ve+=J+X[be];else{let[Y,pe]=te,he=J.slice(0,Y),Pe=J.slice(pe),je=J.slice(Y,pe);se==1&&he.length==1&&he!=je[0]&&(he+="(?!"+he+")");let Bt=je.length,Ot=[J];if(le)for(let _e=0;_e<Bt;_e++)Ot.push(he+je.slice(0,_e)+v+je.slice(_e+1)+Pe);if(H)for(let _e=0;_e<Bt-1;_e++)je[_e]!=je[_e+1]&&Ot.push(he+je.slice(0,_e)+je[_e+1]+je[_e]+je.slice(_e+2)+Pe);if(ee)for(let _e=0;_e<Bt;_e++)Ot.push(he+je.slice(0,_e+1)+"?"+je.slice(_e+1)+Pe);if(se){let _e=Lv(v,1);for(let ht=0;ht<Bt;ht++)Ot.push(he+je.slice(0,ht)+_e+je.slice(ht)+Pe)}ve+="(?:"+Ot.join("|")+")"+X[be]}}return ve});else{let ne=Lv(v,a);$==2&&a>0&&(ne=")("+ne+")("),ie=ae.map((be,ve)=>be[0]==='"'?jv(be.slice(1,-1)):be.split("").map((xe,J,te)=>(a==1&&J==0&&te.length>1&&xe!=te[J+1]&&(xe+="(?!"+xe+")"),xe)).join(ne)+X[ve])}let G=r==2?pS:"",oe=n==2?pS:"",ue=oe+Lv(e.interChars,e.interIns)+G;return $>0?re?ie=G+"("+ie.join(")"+oe+"|"+G+"(")+")"+oe:(ie="("+ie.join(")("+ue+")(")+")",ie="(.??"+G+")"+ie+"("+oe+".*)"):(ie=ie.join(ue),ie=G+ie+oe),[new RegExp(ie,"i"+x),ae,X]},j=(z,$,re)=>{let[ae]=V($);if(ae==null)return null;let X=[];if(re!=null)for(let ie=0;ie<re.length;ie++){let G=re[ie];ae.test(z[G])&&X.push(G)}else for(let ie=0;ie<z.length;ie++)ae.test(z[ie])&&X.push(ie);return X},A=!!d,k=new RegExp(h,x),W=new RegExp(d,x),ce=(z,$,re)=>{let[ae,X,ie]=V(re,1),G=T(re,!0),[oe]=V(re,2),ue=X.length,ne=Array(ue),be=Array(ue);for(let le=0;le<ue;le++){let H=X[le],ee=G[le],Y=H[0]=='"'?H.slice(1,-1):H+ie[le],pe=ee[0]=='"'?ee.slice(1,-1):ee+ie[le];ne[le]=Y,be[le]=pe}let ve=z.length,xe=Array(ve).fill(0),J={idx:Array(ve),start:xe.slice(),chars:xe.slice(),cases:xe.slice(),terms:xe.slice(),interIns:xe.slice(),intraIns:xe.slice(),interLft2:xe.slice(),interRgt2:xe.slice(),interLft1:xe.slice(),interRgt1:xe.slice(),ranges:Array(ve)},te=r==1||n==1,se=0;for(let le=0;le<z.length;le++){let H=$[z[le]],ee=H.match(ae),Y=ee.index+ee[1].length,pe=Y,he=!1,Pe=0,je=0,Bt=0,Ot=0,_e=0,ht=0,Qn=0,Sa=0,Oa=0,zt=[];for(let Ae=0,Ie=2;Ae<ue;Ae++,Ie+=2){let vr=y(ee[Ie]),at=ne[Ae],Vi=be[Ae],Et=at.length,At=vr.length,vt=vr==at;if(ee[Ie]==Vi&&Qn++,!vt&&ee[Ie+1].length>=Et){let Ge=y(ee[Ie+1]).indexOf(at);Ge>-1&&(zt.push(pe,At,Ge,Et),pe+=F(ee,Ie,Ge,Et),vr=at,At=Et,vt=!0,Ae==0&&(Y=pe))}if(te||vt){let Ge=pe-1,Dr=pe+At,ei=!1,Ea=!1;if(Ge==-1||k.test(H[Ge]))vt&&Pe++,ei=!0;else{if(r==2){he=!0;break}if(A&&W.test(H[Ge]+H[Ge+1]))vt&&je++,ei=!0;else if(r==1){let ss=ee[Ie+1],Hi=pe+At;if(ss.length>=Et){let ti=0,Gi=!1,oM=new RegExp(at,"ig"+x),Jb;for(;Jb=oM.exec(ss);){ti=Jb.index;let Qb=Hi+ti,rp=Qb-1;if(rp==-1||k.test(H[rp])){Pe++,Gi=!0;break}else if(W.test(H[rp]+H[Qb])){je++,Gi=!0;break}}Gi&&(ei=!0,zt.push(pe,At,ti,Et),pe+=F(ee,Ie,ti,Et),vr=at,At=Et,vt=!0,Ae==0&&(Y=pe))}if(!ei){he=!0;break}}}if(Dr==H.length||k.test(H[Dr]))vt&&Bt++,Ea=!0;else{if(n==2){he=!0;break}if(A&&W.test(H[Dr-1]+H[Dr]))vt&&Ot++,Ea=!0;else if(n==1){he=!0;break}}vt&&(_e+=Et,ei&&Ea&&ht++)}if(At>Et&&(Oa+=At-Et),Ae>0&&(Sa+=ee[Ie-1].length),!e.intraFilt(at,vr,pe)){he=!0;break}Ae<ue-1&&(pe+=At+ee[Ie+1].length)}if(!he){J.idx[se]=z[le],J.interLft2[se]=Pe,J.interLft1[se]=je,J.interRgt2[se]=Bt,J.interRgt1[se]=Ot,J.chars[se]=_e,J.terms[se]=ht,J.cases[se]=Qn,J.interIns[se]=Sa,J.intraIns[se]=Oa,J.start[se]=Y;let Ae=H.match(oe),Ie=Ae.index+Ae[1].length,vr=zt.length,at=vr>0?0:1/0,Vi=vr-4;for(let Ge=2;Ge<Ae.length;){let Dr=Ae[Ge].length;if(at<=Vi&&zt[at]==Ie){let ei=zt[at+1],Ea=zt[at+2],ss=zt[at+3],Hi=Ge,ti="";for(let Gi=0;Gi<ei;Hi++)ti+=Ae[Hi],Gi+=Ae[Hi].length;Ae.splice(Ge,Hi-Ge,ti),Ie+=F(Ae,Ge,Ea,ss),at+=4}else Ie+=Dr,Ge++}Ie=Ae.index+Ae[1].length;let Et=J.ranges[se]=[],At=Ie,vt=Ie;for(let Ge=2;Ge<Ae.length;Ge++){let Dr=Ae[Ge].length;Ie+=Dr,Ge%2==0?vt=Ie:Dr>0&&(Et.push(At,vt),At=vt=Ie)}vt>At&&Et.push(At,vt),se++}}if(se<z.length)for(let le in J)J[le]=J[le].slice(0,se);return J},F=(z,$,re,ae)=>{let X=z[$]+z[$+1].slice(0,re);return z[$-1]+=X,z[$]=z[$+1].slice(re,re+ae),z[$+1]=z[$+1].slice(re+ae),X.length},Z=5,fe=(z,$,re,ae=1e3,X)=>{re=re?re===!0?Z:re:0;let ie=null,G=null,oe=[];$=$.replace(P,J=>{let te=J.trim().slice(1);return te=te[0]==='"'?jv(te.slice(1,-1)):te.replace(W2,""),te!=""&&oe.push(te),""});let ue=T($),ne;if(oe.length>0){if(ne=new RegExp(oe.join("|"),"i"+x),ue.length==0){let J=[];for(let te=0;te<z.length;te++)ne.test(z[te])||J.push(te);return[J,null,null]}}else if(ue.length==0)return[null,null,null];if(re>0){let J=T($);if(J.length>1){let te=J.slice().sort((le,H)=>H.length-le.length);for(let le=0;le<te.length;le++){if(X?.length==0)return[[],null,null];X=j(z,te[le],X)}if(J.length>re)return[X,null,null];ie=vS(J).map(le=>le.join(" ")),G=[];let se=new Set;for(let le=0;le<ie.length;le++)if(se.size<X.length){let H=X.filter(Y=>!se.has(Y)),ee=j(z,ie[le],H);for(let Y=0;Y<ee.length;Y++)se.add(ee[Y]);G.push(ee)}else G.push([])}}ie==null&&(ie=[$],G=[X?.length>0?X:j(z,$)]);let be=null,ve=null;if(oe.length>0&&(G=G.map(J=>J.filter(te=>!ne.test(z[te])))),G.reduce((J,te)=>J+te.length,0)<=ae){be={},ve=[];for(let J=0;J<G.length;J++){let te=G[J];if(te==null||te.length==0)continue;let se=ie[J],le=ce(te,z,se),H=e.sort(le,z,se,_);if(J>0)for(let ee=0;ee<H.length;ee++)H[ee]+=ve.length;for(let ee in le)be[ee]=(be[ee]??[]).concat(le[ee]);ve=ve.concat(H)}}return[[].concat(...G),be,ve]};return{search:(...z)=>fe(...z),split:T,filter:j,info:ce,sort:e.sort}}var $2=(()=>{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 vS(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 K2=(e,t)=>t?`<mark>${e}</mark>`:e,Z2=(e,t)=>e+t;function Y2(e,t,r=K2,n="",i=Z2){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}Cc.latinize=$2;Cc.permute=e=>vS([...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]));Cc.highlight=Y2;mS.exports=Cc});var Sn=g((Iee,mu)=>{function X2(e){return e&&e.__esModule?e:{default:e}}mu.exports=X2,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var Nv=g((jee,Zr)=>{function Fv(e){"@babel/helpers - typeof";return Zr.exports=Fv=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},Zr.exports.__esModule=!0,Zr.exports.default=Zr.exports,Fv(e)}Zr.exports=Fv,Zr.exports.__esModule=!0,Zr.exports.default=Zr.exports});var yS=g((Lee,bu)=>{var gS=Nv().default;function J2(e,t){if(gS(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}bu.exports=J2,bu.exports.__esModule=!0,bu.exports.default=bu.exports});var Dv=g((Fee,gu)=>{var Q2=Nv().default,ej=yS();function tj(e){var t=ej(e,"string");return Q2(t)=="symbol"?t:t+""}gu.exports=tj,gu.exports.__esModule=!0,gu.exports.default=gu.exports});var _S=g((Nee,yu)=>{var rj=Dv();function nj(e,t,r){return(t=rj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}yu.exports=nj,yu.exports.__esModule=!0,yu.exports.default=yu.exports});var Ti=g((Dee,_u)=>{function ij(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}_u.exports=ij,_u.exports.__esModule=!0,_u.exports.default=_u.exports});var Ri=g((Bee,wu)=>{var oj=Dv();function wS(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,oj(n.key),n)}}function aj(e,t,r){return t&&wS(e.prototype,t),r&&wS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}wu.exports=aj,wu.exports.__esModule=!0,wu.exports.default=wu.exports});var Bv=g((zee,xu)=>{function uj(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}xu.exports=uj,xu.exports.__esModule=!0,xu.exports.default=xu.exports});var xS=g((Uee,Su)=>{var sj=Bv();function cj(e){if(Array.isArray(e))return sj(e)}Su.exports=cj,Su.exports.__esModule=!0,Su.exports.default=Su.exports});var SS=g((Wee,Ou)=>{function lj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}Ou.exports=lj,Ou.exports.__esModule=!0,Ou.exports.default=Ou.exports});var ES=g((Vee,Eu)=>{var OS=Bv();function fj(e,t){if(e){if(typeof e=="string")return OS(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)?OS(e,t):void 0}}Eu.exports=fj,Eu.exports.__esModule=!0,Eu.exports.default=Eu.exports});var AS=g((Hee,Au)=>{function dj(){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.`)}Au.exports=dj,Au.exports.__esModule=!0,Au.exports.default=Au.exports});var PS=g((Gee,Pu)=>{var pj=xS(),hj=SS(),vj=ES(),mj=AS();function bj(e){return pj(e)||hj(e)||vj(e)||mj()}Pu.exports=bj,Pu.exports.__esModule=!0,Pu.exports.default=Pu.exports});var TS=g(Cr=>{"use strict";var gj=Sn(),yj=gj(PS()),_j={functions:"Jexl Function",transforms:"Transform"};Cr.ArrayLiteral=function(e){return this.evalArray(e.value)};Cr.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])})};Cr.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)})};Cr.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)})};Cr.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]};Cr.Literal=function(e){return e.value};Cr.ObjectLiteral=function(e){return this.evalMap(e.value)};Cr.FunctionCall=function(e){var t=_j[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,yj.default)(i))})};Cr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var CS=g((Kee,MS)=>{"use strict";var RS=Sn(),wj=RS(Ti()),xj=RS(Ri()),Sj=TS(),Oj=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,wj.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,xj.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return Sj[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}();MS.exports=Oj});var jS=g((Zee,IS)=>{"use strict";var qS=Sn(),Ej=qS(Ti()),Aj=qS(Ri()),Pj=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,kS=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,Tj=/\\\\/,Rj=/^\s*$/,Mj=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Cj=["[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]+)"],kj=["binaryOp","unaryOp","openParen","openBracket","question","colon"],qj=function(){function e(t){(0,Ej.default)(this,e),this._grammar=t}return(0,Aj.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(Pj))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(kS))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(kS)&&(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("("+[Mj.join("|"),n.join("|"),Cj.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?kj.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(Rj)}},{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(Tj,"\\")}}]),e}();IS.exports=qj});var zv=g(et=>{"use strict";et.argVal=function(e){e&&this._cursor.args.push(e)};et.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};et.arrayVal=function(e){e&&this._cursor.value.push(e)};et.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)};et.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)};et.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};et.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};et.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))};et.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};et.objKey=function(e){this._curObjKey=e.value};et.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};et.objVal=function(e){this._cursor.value[this._curObjKey]=e};et.subExpression=function(e){this._placeAtCursor(e)};et.ternaryEnd=function(e){this._cursor.alternate=e};et.ternaryMid=function(e){this._cursor.consequent=e};et.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};et.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};et.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var FS=g(LS=>{"use strict";var kt=zv();LS.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:kt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:kt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:kt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:kt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:kt.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:kt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:kt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:kt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:kt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:kt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:kt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:kt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:kt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:kt.ternaryEnd,completable:!0}}});var BS=g((Jee,DS)=>{"use strict";var NS=Sn(),Ij=NS(Ti()),jj=NS(Ri()),Lj=zv(),kc=FS().states,Fj=function(){function e(t,r,n){(0,Ij.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,jj.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=kc[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=Lj[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&&!kc[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(){kc[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=kc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();DS.exports=Fj});var WS=g((Qee,US)=>{"use strict";var zS=Sn(),Nj=zS(Ti()),Dj=zS(Ri()),On=function(){function e(t){(0,Nj.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,Dj.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}();On.all=function(e){return new On(function(t){var r=e.map(function(n){for(;n instanceof On;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};On.resolve=function(e){return new On(function(t){return t(e)})};On.reject=function(e){return new On(function(t,r){return r(e)})};US.exports=On});var GS=g((ete,HS)=>{"use strict";var VS=Sn(),Bj=VS(Ti()),zj=VS(Ri()),Uj=CS(),Wj=jS(),Vj=BS(),Hj=WS(),Gj=function(){function e(t,r){(0,Bj.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,zj.default)(e,[{key:"compile",value:function(){var r=new Wj(this._grammar),n=new Vj(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,Hj);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 Uj(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();HS.exports=Gj});var KS=g($S=>{"use strict";$S.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 YS=g((rte,Wv)=>{"use strict";var Uv=Sn(),$j=Uv(_S()),Kj=Uv(Ti()),Zj=Uv(Ri()),Yj=GS(),Xj=KS(),Jj=Xj.getGrammar,ZS=function(){function e(){(0,Kj.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Jj()}return(0,Zj.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,$j.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 Yj(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}();Wv.exports=new ZS;Wv.exports.Jexl=ZS});var XS=g(Tu=>{"use strict";var Qj=Tu&&Tu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tu,"__esModule",{value:!0});Tu.default=tL;var eL=Qj(YS());function tL(){let e=new eL.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 Hv=g(Ru=>{"use strict";var rL=Ru&&Ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ru,"__esModule",{value:!0});Ru.stringToJexlExpression=iL;var nL=rL(XS()),Vv={};function iL(e,t){let r=`nosig|${e}`;if(!Vv[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,nL.default)().compile(i);Vv[r]=o}return Vv[r]}});var JS=g(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.nanoid=qt.customAlphabet=qt.customRandom=qt.random=qt.urlAlphabet=void 0;qt.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var oL=e=>crypto.getRandomValues(new Uint8Array(e));qt.random=oL;var aL=(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}}};qt.customRandom=aL;var uL=(e,t=21)=>(0,qt.customRandom)(e,t,qt.random);qt.customAlphabet=uL;var sL=(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),"");qt.nanoid=sL});var Gv=g(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.FileLocation=We.UriLocation=We.UriLocationRaw=We.BlobLocation=We.LocalPathLocation=We.Region=We.NoAssemblyRegion=We.ElementId=void 0;var Ee=_t(),cL=JS();We.ElementId=Ee.types.optional(Ee.types.identifier,()=>(0,cL.nanoid)());We.NoAssemblyRegion=Ee.types.model("NoAssemblyRegion",{refName:Ee.types.string,start:Ee.types.number,end:Ee.types.number,reversed:Ee.types.optional(Ee.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));We.Region=Ee.types.compose("Region",We.NoAssemblyRegion,Ee.types.model({assemblyName:Ee.types.string}));We.LocalPathLocation=Ee.types.model("LocalPathLocation",{locationType:Ee.types.literal("LocalPathLocation"),localPath:Ee.types.string});We.BlobLocation=Ee.types.model("BlobLocation",{locationType:Ee.types.literal("BlobLocation"),name:Ee.types.string,blobId:Ee.types.string});We.UriLocationRaw=Ee.types.model("UriLocation",{locationType:Ee.types.literal("UriLocation"),uri:Ee.types.string,baseUri:Ee.types.maybe(Ee.types.string),internetAccountId:Ee.types.maybe(Ee.types.string),internetAccountPreAuthorization:Ee.types.maybe(Ee.types.model("InternetAccountPreAuthorization",{internetAccountType:Ee.types.string,authInfo:Ee.types.frozen()}))});We.UriLocation=Ee.types.snapshotProcessor(We.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});We.FileLocation=Ee.types.snapshotProcessor(Ee.types.union(We.LocalPathLocation,We.UriLocation,We.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 rO=g(Kv=>{"use strict";Object.defineProperty(Kv,"__esModule",{value:!0});Kv.default=bL;var Be=_t(),lL=Mu(),fL=Hv(),dL=Gv();function pL(){return!0}var hL={stringArray:Be.types.array(Be.types.string),stringArrayMap:Be.types.map(Be.types.array(Be.types.string)),numberMap:Be.types.map(Be.types.number),boolean:Be.types.boolean,color:Be.types.refinement("Color",Be.types.string,pL),integer:Be.types.integer,number:Be.types.number,string:Be.types.string,text:Be.types.string,fileLocation:dL.FileLocation,frozen:Be.types.frozen()},QS={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},$v=e=>({views:{get valueJSON(){return e.value}}}),eO=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),tO={fileLocation:eO,number:$v,integer:$v,boolean:$v,frozen:eO,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)}}})},vL=Be.types.refinement("JexlString",Be.types.string,e=>e.startsWith("jexl:"));function mL(e){return e?.toJSON?e.toJSON():`"${e}"`}function bL(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=hL[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=Be.types.model(a,{name:Be.types.literal(e),description:Be.types.literal(t),type:Be.types.literal(n),value:Be.types.optional(Be.types.union(vL,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:f}=(0,lL.getEnv)(c);return!f&&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,fL.stringToJexlExpression)(String(c.value),f?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return mL(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(f){c.value=f},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let f=c.expr.evalSync();if(f!==void 0){c.value=f;return}}catch{}if(c.value=i,!(n in QS))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=QS[n]}}}));tO[n]&&(u=u.extend(tO[n]));let s=Be.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var iO=g(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.getSubType=Zv;An.getUnionSubTypes=nO;An.getPropertyType=gL;An.getDefaultValue=yL;An.getEnumerationValues=_L;An.resolveLateType=wL;var En=_t();function Zv(e){let t;if((0,En.isOptionalType)(e))t=e._subtype||e.type;else if((0,En.isArrayType)(e)||(0,En.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 nO(e){if(!(0,En.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||Zv(e)._types||Zv(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function gL(e,t){return e.properties[t]}function yL(e){if(!(0,En.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function _L(e){return nO(e).map(r=>r.value)}function wL(e){return!(0,En.isUnionType)(e)&&!(0,En.isArrayType)(e)&&(0,En.isLateType)(e)?e.getSubType():e}});var Yv=g(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.readConfObject=qc;Yr.getConf=xL;Yr.getTypeNamesFromExplicitlyTypedUnion=oO;Yr.isBareConfigurationSchemaType=aO;Yr.isConfigurationSchemaType=qo;Yr.isConfigurationModel=uO;Yr.isConfigurationSlotType=SL;var Ke=_t(),Pn=iO();function qc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ke.isStateTreeNode)(e)&&(0,Ke.isMapType)((0,Ke.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ke.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ke.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,Ke.isStateTreeNode)(e)&&(0,Ke.isMapType)((0,Ke.getType)(e))&&(o=e.get(n)),o?qc(o,i,r):void 0}return qc(e,n,r)}}else return structuredClone((0,Ke.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function xL(e,t,r){let{configuration:n}=e;if(uO(n))return qc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function oO(e){if((0,Ke.isType)(e)&&(e=(0,Pn.resolveLateType)(e),(0,Ke.isUnionType)(e))){let t=[];for(let r of(0,Pn.getUnionSubTypes)(e)){r=(0,Pn.resolveLateType)(r);let n=oO(r);if(n.length||(n=[(0,Pn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}return t}return[]}function aO(e){return!!((0,Ke.isType)(e)&&((0,Ke.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ke.isLateType)(e)))}function qo(e){return(0,Ke.isType)(e)?aO(e)?!0:(0,Ke.isUnionType)(e)?(0,Pn.getUnionSubTypes)(e).every(t=>qo(t)||t.name==="undefined"):(0,Ke.isOptionalType)(e)&&qo((0,Pn.getSubType)(e))||(0,Ke.isArrayType)(e)&&qo((0,Pn.getSubType)(e))?!0:!!((0,Ke.isMapType)(e)&&qo((0,Pn.getSubType)(e))):!1}function uO(e){return(0,Ke.isStateTreeNode)(e)&&qo((0,Ke.getType)(e))}function SL(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var lO=g(Io=>{"use strict";var OL=Io&&Io.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Io,"__esModule",{value:!0});Io.ConfigurationSchema=ML;Io.ConfigurationReference=CL;var Jt=_t(),EL=OL(rO()),sO=Yv(),cO=Gv();function AL(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function PL(e){return Array.isArray(e)&&e.length===0}function TL(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 RL(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]=cO.ElementId,i=r.implicitIdentifier):(n.id=cO.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};for(let[c,f]of Object.entries(t))if((0,Jt.isType)(f)&&(0,Jt.isLateType)(f)||(0,sO.isConfigurationSchemaType)(f))n[c]=f;else if(typeof f=="string"||typeof f=="number")o[c]=f;else if(typeof f=="object"){if(!f.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,EL.default)(c,f)}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(f,p){if(!(0,sO.isConfigurationSchemaType)(n[f]))throw new Error(`${f} is not a subschema, cannot replace`);let d=(0,Jt.isStateTreeNode)(p)?p:n[f].create(p);return c[f]=d,d}}));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 f={},p=!0;for(let[d,h]of Object.entries(c))p&&(typeof s[d]=="object"&&typeof h=="object"?JSON.stringify(s[d])!==JSON.stringify(h)&&(p=!1):s[d]!==h&&(p=!1)),h!==void 0&&o[d]===void 0&&!AL(h)&&!PL(h)&&(f[d]=h);return p?{}:f}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Jt.types.optional(a,l)}function ML(e,t,r){let{schemaDefinition:n,options:i}=TL(e,t,r),o=RL(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function CL(e){return Jt.types.union(Jt.types.reference(e),e)}});var Xv=g(cr=>{"use strict";var kL=cr&&cr.__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]}),qL=cr&&cr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&kL(t,e,r)};Object.defineProperty(cr,"__esModule",{value:!0});cr.ConfigurationSchema=cr.ConfigurationReference=void 0;var fO=lO();Object.defineProperty(cr,"ConfigurationReference",{enumerable:!0,get:function(){return fO.ConfigurationReference}});Object.defineProperty(cr,"ConfigurationSchema",{enumerable:!0,get:function(){return fO.ConfigurationSchema}});qL(Yv(),cr)});var pO=g(Cu=>{"use strict";var dO=Cu&&Cu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cu,"__esModule",{value:!0});var IL=dO(bS()),Jv=Xv(),jL=dO(zp()),Qv=class{constructor(t){this.pluginManager=t,this.adapterCache=new jL.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 IL.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 f of c)l.push(t[s.idx[f]])}return r(l)}};Cu.default=Qv});var Ic=g(ye=>{"use strict";var LL=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]}),FL=ye&&ye.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&LL(t,e,r)},NL=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=BL;ye.isSessionModel=Tn;ye.isSessionModelWithConfigEditing=zL;ye.isSessionWithAddTracks=UL;ye.isSessionWithShareURL=WL;ye.isSessionModelWithWidgets=VL;ye.isSessionModelWithConnections=HL;ye.isSessionModelWithConnectionEditing=GL;ye.isSessionWithSessionPlugins=$L;ye.isSelectionContainer=KL;ye.isViewModel=ZL;ye.isTrackModel=YL;ye.isDisplayModel=XL;ye.isTrackViewModel=JL;ye.isAppRootModel=QL;ye.isRootModelWithInternetAccounts=eF;ye.isAbstractMenuManager=tF;ye.isUriLocation=rF;ye.isLocalPathLocation=nF;ye.isBlobLocation=iF;ye.isAuthNeededException=oF;ye.isRetryException=aF;var DL=_t();FL(lS(),ye);function BL(e){return(0,DL.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function Tn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function zL(e){return Tn(e)&&"editConfiguration"in e}function UL(e){return Tn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function WL(e){return Tn(e)&&"shareURL"in e&&!!e.shareURL}function VL(e){return Tn(e)&&"widgets"in e}function HL(e){return Tn(e)&&"makeConnection"in e}function GL(e){return Tn(e)&&"addConnectionConf"in e}function $L(e){return Tn(e)&&"sessionPlugins"in e}function KL(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function ZL(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function YL(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function XL(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function JL(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function QL(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function eF(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function tF(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function rF(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function nF(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function iF(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var em=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=em;var tm=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};ye.RetryError=tm;function oF(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function aF(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var uF=pO();Object.defineProperty(ye,"TextSearchManager",{enumerable:!0,get:function(){return NL(uF).default}})});var hO=g(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.when=void 0;var sF=Ec();Object.defineProperty(jc,"when",{enumerable:!0,get:function(){return sF.when}})});var vO=g(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.intersection2=cF;ku.doesIntersect2=lF;ku.isContainedWithin=fF;function cF(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 lF(e,t,r,n){return t>r&&e<n}function fF(e,t,r,n){return r<=e&&n>=t}});var mO=g(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.dedupe=dF;function dF(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 am=g((bte,_O)=>{"use strict";var Lc={},Dc={},qu={METHOD:"method",PROPERTY:"property"},Fc=class{constructor(t,r){this.inst=t,this.args=r}},nm=class extends Fc{constructor(t,r){super(t,r),this.type=qu.METHOD}execute(t){t[this.inst](...this.args)}},im=class extends Fc{constructor(t,r){super(t,r),this.type=qu.PROPERTY}execute(t){t[this.inst]=this.args[0]}},pF={[qu.METHOD]:nm,[qu.PROPERTY]:im},Nc=class{constructor(t,r,n){return new pF[t](r,n)}};Object.entries(qu).forEach(([e,t])=>{Object.defineProperty(Nc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});Dc=Nc;var gO=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"]}),kr=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),Iu=class{constructor(t=null){this[kr.sequence]=[],t&&this[kr.fromJSON](t)}[kr.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[kr.push](r,n,i)})}[kr.push](t,r,n){this[kr.sequence].push(new Dc(t,r,n))}execute(t){t.save(),this[kr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[kr.sequence]}}};gO.METHODS.forEach(e=>{Object.defineProperty(Iu.prototype,e,{value:function(...r){this[kr.push](Dc.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});gO.PROPERTIES.forEach(e=>{Object.defineProperty(Iu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[kr.push](Dc.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});Lc=Iu;var yO={},bO=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function hF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var om=class extends Lc{build(t={}){let r=new Lc;return this[bO.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?hF(u,t):u);r[bO.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};yO=om;_O.exports={CanvasSequence:Lc,CanvasBlueprint:yO}});var xO=g((gte,wO)=>{wO.exports=!1});var um=g(pt=>{"use strict";var vF=pt&&pt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.ImageBitmapType=pt.createImageBitmap=pt.createCanvas=void 0;pt.drawImageOntoCanvasContext=bF;var OO=am(),mF=vF(xO());function bF(e,t){e.serializedCommands?new OO.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var SO={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:mF.default};SO.realOffscreenCanvas?(pt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),pt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,pt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):SO.node?(pt.createCanvas=(...e)=>nodeCreateCanvas(...e),pt.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})}):(pt.createCanvas=(e,t)=>{let r=new OO.CanvasSequence;return{width:e,height:t,getContext(){return r}}},pt.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},pt.ImageBitmapType=String)});var cm=g(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.blobToDataURL=gF;function gF(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 EO=g((wte,Bc)=>{(function(){"use strict";var e,t,r,n,i;function o(f,p){var d=Object.keys(p),h;for(h=0;h<d.length;h++)f=f.replace(new RegExp("\\{"+d[h]+"\\}","gi"),p[d[h]]);return f}function a(f){var p,d,h;if(!f)throw new Error("cannot create a random attribute name for an undefined object");p="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",d="";do for(d="",h=0;h<12;h++)d+=p[Math.floor(Math.random()*p.length)];while(f[d]);return d}function u(f,p){var d,h,v={},b,y;for(f=f.split(","),p=p||10,d=0;d<f.length;d+=2)h="&"+f[d+1]+";",b=parseInt(f[d],p),v[h]="&#"+b+";";return v["\\xa0"]=" ",v}function l(f){var p={left:"start",right:"end",center:"middle",start:"start",end:"end"};return p[f]||p.start}function s(f){var p={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return p[f]||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(f,p){this.__root=f,this.__ctx=p},r.prototype.addColorStop=function(f,p){var d=this.__ctx.__createElement("stop"),h,v;d.setAttribute("offset",f),p.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,v=h.exec(p),d.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:v[1],g:v[2],b:v[3]})),d.setAttribute("stop-opacity",v[4])):d.setAttribute("stop-color",p),this.__root.appendChild(d)},n=function(f,p){this.__root=f,this.__ctx=p},t=function(f){var p={width:500,height:500,enableMirroring:!1},d;if(arguments.length>1?(d=p,d.width=arguments[0],d.height=arguments[1]):f?d=f:d=p,!(this instanceof t))return new t(d);this.width=d.width||p.width,this.height=d.height||p.height,this.enableMirroring=d.enableMirroring!==void 0?d.enableMirroring:p.enableMirroring,this.canvas=this,this.__document=d.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(f,p,d){typeof p>"u"&&(p={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",f),v=Object.keys(p),b,y;for(d&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),b=0;b<v.length;b++)y=v[b],h.setAttribute(y,p[y]);return h},t.prototype.__setDefaultStyles=function(){var f=Object.keys(e),p,d;for(p=0;p<f.length;p++)d=f[p],this[d]=e[d].canvas},t.prototype.__applyStyleState=function(f){var p=Object.keys(f),d,h;for(d=0;d<p.length;d++)h=p[d],this[h]=f[h]},t.prototype.__getStyleState=function(){var f,p={},d=Object.keys(e),h;for(f=0;f<d.length;f++)h=d[f],p[h]=this[h];return p},t.prototype.__applyStyleToCurrentElement=function(f){var p=Object.keys(e),d,h,v,b,y,_;for(d=0;d<p.length;d++)if(h=e[p[d]],v=this[p[d]],h.apply)if(h.apply.indexOf("fill")!==-1&&v instanceof n){if(v.__ctx)for(;v.__ctx.__defs.childNodes.length;)b=v.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[b]=b,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(f)!==-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,_=y.exec(v),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:_[1],g:_[2],b:_[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",_[4])):this.__currentElement.setAttribute(h.svgAttr,v))},t.prototype.__closestGroupOrSvg=function(f){return f=f||this.__currentElement,f.nodeName==="g"||f.nodeName==="svg"?f:this.__closestGroupOrSvg(f.parentNode)},t.prototype.getSerializedSvg=function(f){var p=new XMLSerializer().serializeToString(this.__root),d,h,v,b,y,_;if(_=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,_.test(p)&&(p=p.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),f)for(d=Object.keys(i),h=0;h<d.length;h++)v=d[h],b=i[v],y=new RegExp(v,"gi"),y.test(p)&&(p=p.replace(y,b));return p},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var f=this.__createElement("g"),p=this.__closestGroupOrSvg();this.__groupStack.push(p),p.appendChild(f),this.__currentElement=f,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var f=this.__stack.pop();this.__applyStyleState(f)},t.prototype.__addTransform=function(f){var p=this.__closestGroupOrSvg();if(p.childNodes.length>0){var d=this.__createElement("g");p.appendChild(d),this.__currentElement=d}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=f,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(f,p){p===void 0&&(p=f),this.__addTransform(o("scale({x},{y})",{x:f,y:p}))},t.prototype.rotate=function(f){var p=f*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:p,cx:0,cy:0}))},t.prototype.translate=function(f,p){this.__addTransform(o("translate({x},{y})",{x:f,y:p}))},t.prototype.transform=function(f,p,d,h,v,b){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:f,b:p,c:d,d:h,e:v,f:b}))},t.prototype.beginPath=function(){var f,p;this.__currentDefaultPath="",this.__currentPosition={},f=this.__createElement("path",{},!0),p=this.__closestGroupOrSvg(),p.appendChild(f),this.__currentElement=f},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var f=this.__currentDefaultPath;this.__currentElement.setAttribute("d",f)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(f){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=f},t.prototype.moveTo=function(f,p){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:f,y:p},this.__addPathCommand(o("M {x} {y}",{x:f,y:p}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(f,p){this.__currentPosition={x:f,y:p},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:f,y:p})):this.__addPathCommand(o("M {x} {y}",{x:f,y:p}))},t.prototype.bezierCurveTo=function(f,p,d,h,v,b){this.__currentPosition={x:v,y:b},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:f,cp1y:p,cp2x:d,cp2y:h,x:v,y:b}))},t.prototype.quadraticCurveTo=function(f,p,d,h){this.__currentPosition={x:d,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:f,cpy:p,x:d,y:h}))};var c=function(f){var p=Math.sqrt(f[0]*f[0]+f[1]*f[1]);return[f[0]/p,f[1]/p]};t.prototype.arcTo=function(f,p,d,h,v){var b=this.__currentPosition&&this.__currentPosition.x,y=this.__currentPosition&&this.__currentPosition.y;if(!(typeof b>"u"||typeof y>"u")){if(v<0)throw new Error("IndexSizeError: The radius provided ("+v+") is negative.");if(b===f&&y===p||f===d&&p===h||v===0){this.lineTo(f,p);return}var _=c([b-f,y-p]),w=c([d-f,h-p]);if(_[0]*w[1]===_[1]*w[0]){this.lineTo(f,p);return}var x=_[0]*w[0]+_[1]*w[1],S=Math.acos(Math.abs(x)),E=c([_[0]+w[0],_[1]+w[1]]),P=v/Math.sin(S/2),R=f+P*E[0],q=p+P*E[1],M=[-_[1],_[0]],I=[w[1],-w[0]],B=function(C){var V=C[0],j=C[1];return j>=0?Math.acos(V):-Math.acos(V)},U=B(M),T=B(I);this.lineTo(R+M[0]*v,q+M[1]*v),this.arc(R,q,v,U,T)}},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(f,p,d,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(f,p),this.lineTo(f+d,p),this.lineTo(f+d,p+h),this.lineTo(f,p+h),this.lineTo(f,p),this.closePath()},t.prototype.fillRect=function(f,p,d,h){var v,b;v=this.__createElement("rect",{x:f,y:p,width:d,height:h},!0),b=this.__closestGroupOrSvg(),b.appendChild(v),this.__currentElement=v,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(f,p,d,h){var v,b;v=this.__createElement("rect",{x:f,y:p,width:d,height:h},!0),b=this.__closestGroupOrSvg(),b.appendChild(v),this.__currentElement=v,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(f,p,d,h){var v,b=this.__closestGroupOrSvg();v=this.__createElement("rect",{x:f,y:p,width:d,height:h,fill:"#FFFFFF"},!0),b.appendChild(v)},t.prototype.createLinearGradient=function(f,p,d,h){var v=this.__createElement("linearGradient",{id:a(this.__ids),x1:f+"px",x2:d+"px",y1:p+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(v),new r(v,this)},t.prototype.createRadialGradient=function(f,p,d,h,v,b){var y=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:v+"px",r:b+"px",fx:f+"px",fy:p+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(y),new r(y,this)},t.prototype.__parseFont=function(){var f=/^\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=f.exec(this.font),d={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"&&(d.decoration="underline"),this.__fontHref&&(d.href=this.__fontHref),d},t.prototype.__wrapTextLink=function(f,p){if(f.href){var d=this.__createElement("a");return d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.href),d.appendChild(p),d}return p},t.prototype.__applyText=function(f,p,d,h){var v=this.__parseFont(),b=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:d,"text-anchor":l(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);y.appendChild(this.__document.createTextNode(f)),this.__currentElement=y,this.__applyStyleToCurrentElement(h),b.appendChild(this.__wrapTextLink(v,y))},t.prototype.fillText=function(f,p,d){this.__applyText(f,p,d,"fill")},t.prototype.strokeText=function(f,p,d){this.__applyText(f,p,d,"stroke")},t.prototype.measureText=function(f){return this.__ctx.font=this.font,this.__ctx.measureText(f)},t.prototype.arc=function(f,p,d,h,v,b){if(h!==v){h=h%(2*Math.PI),v=v%(2*Math.PI),h===v&&(v=(v+2*Math.PI-.001*(b?-1:1))%(2*Math.PI));var y=f+d*Math.cos(v),_=p+d*Math.sin(v),w=f+d*Math.cos(h),x=p+d*Math.sin(h),S=b?0:1,E=0,P=v-h;P<0&&(P+=2*Math.PI),b?E=P>Math.PI?0:1:E=P>Math.PI?1:0,this.lineTo(w,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:d,ry:d,xAxisRotation:0,largeArcFlag:E,sweepFlag:S,endX:y,endY:_})),this.__currentPosition={x:y,y:_}}},t.prototype.clip=function(){var f=this.__closestGroupOrSvg(),p=this.__createElement("clipPath"),d=a(this.__ids),h=this.__createElement("g");f.removeChild(this.__currentElement),p.setAttribute("id",d),p.appendChild(this.__currentElement),this.__defs.appendChild(p),f.setAttribute("clip-path",o("url(#{id})",{id:d})),f.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var f=Array.prototype.slice.call(arguments),p=f[0],d,h,v,b,y=0,_=0,w,x,S,E,P,R,q,M,I,B,U;if(f.length===3)d=f[1],h=f[2],w=p.width,x=p.height,v=w,b=x;else if(f.length===5)d=f[1],h=f[2],v=f[3],b=f[4],w=p.width,x=p.height;else if(f.length===9)y=f[1],_=f[2],w=f[3],x=f[4],d=f[5],h=f[6],v=f[7],b=f[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(S=this.__closestGroupOrSvg(),q=this.__currentElement,p instanceof t){for(E=p.getSvg(),P=E.childNodes[0];P.childNodes.length;)U=P.childNodes[0].getAttribute("id"),this.__ids[U]=U,this.__defs.appendChild(P.childNodes[0]);R=E.childNodes[1],S.appendChild(R),this.__currentElement=R,this.translate(d,h),this.__currentElement=q}else(p.nodeName==="CANVAS"||p.nodeName==="IMG")&&(M=this.__createElement("image"),M.setAttribute("width",v),M.setAttribute("height",b),M.setAttribute("preserveAspectRatio","none"),(y||_||w!==p.width||x!==p.height)&&(I=this.__document.createElement("canvas"),I.width=v,I.height=b,B=I.getContext("2d"),B.drawImage(p,y,_,w,x,0,0,v,b),p=I),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p.nodeName==="CANVAS"?p.toDataURL():p.getAttribute("src")),S.appendChild(M),this.__currentElement=M,this.translate(d,h),this.__currentElement=q)},t.prototype.createPattern=function(f,p){var d=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),v;return d.setAttribute("id",h),d.setAttribute("width",f.width),d.setAttribute("height",f.height),f.nodeName==="CANVAS"||f.nodeName==="IMG"?(v=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),v.setAttribute("width",f.width),v.setAttribute("height",f.height),v.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),d.appendChild(v),this.__defs.appendChild(d)):f instanceof t&&(d.appendChild(f.__root.childNodes[1]),this.__defs.appendChild(d)),new n(d,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 Bc=="object"&&typeof Bc.exports=="object"&&(Bc.exports=t)})()});var TO=g(lr=>{"use strict";var yF=lr&&lr.__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]}),_F=lr&&lr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wF=lr&&lr.__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"&&yF(r,t,n[i]);return _F(r,t),r}}();Object.defineProperty(lr,"__esModule",{value:!0});lr.renderToAbstractCanvas=OF;lr.getSerializedSvg=EF;lr.ReactRendering=AF;var AO=Us(),xF=Fe(),PO=am(),SF=cm(),lm=um();async function OF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,lm.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,AO.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,SF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new PO.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,lm.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,lm.createImageBitmap)(u)}}}async function EF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>wF(EO())),o=new i.default(t,r);return new PO.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function AF({rendering:e}){return(0,xF.isValidElement)(e.reactElement)?e.reactElement:(0,AO.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var MO=g(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.isFeature=PF;function PF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function RO(e){return"uniqueId"in e&&typeof e.data!="object"}var fm=class e{constructor(t){var r;RO(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=RO(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=fm});var Me=g(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.isFunction=void 0;function TF(e){return typeof e=="function"}Uc.isFunction=TF});var Rn=g(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.createErrorClass=void 0;function RF(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}Wc.createErrorClass=RF});var dm=g(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.UnsubscriptionError=void 0;var MF=Rn();Vc.UnsubscriptionError=MF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
1
|
+
"use strict";var JBrowsePluginMafViewer=(()=>{var KM=Object.create;var xu=Object.defineProperty;var ZM=Object.getOwnPropertyDescriptor;var JM=Object.getOwnPropertyNames;var QM=Object.getPrototypeOf,eC=Object.prototype.hasOwnProperty;var gt=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Su=(e,t)=>{for(var r in t)xu(e,r,{get:t[r],enumerable:!0})},Ob=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of JM(t))!eC.call(e,i)&&i!==r&&xu(e,i,{get:()=>t[i],enumerable:!(n=ZM(t,i))||n.enumerable});return e};var L=(e,t,r)=>(r=e!=null?KM(QM(e)):{},Ob(t||!e||!e.__esModule?xu(r,"default",{value:e,enumerable:!0}):r,e)),Eb=e=>Ob(xu({},"__esModule",{value:!0}),e);var Rb=b((zK,Ab)=>{Ab.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Br=b((WK,Pb)=>{Pb.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var zr=b(bt=>{"use strict";var rC=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function nC(e,t){return Object.prototype.hasOwnProperty.call(e,t)}bt.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)nC(r,n)&&(e[n]=r[n])}}return e};bt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var iC={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}},oC={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)}};bt.setTyped=function(e){e?(bt.Buf8=Uint8Array,bt.Buf16=Uint16Array,bt.Buf32=Int32Array,bt.assign(bt,iC)):(bt.Buf8=Array,bt.Buf16=Array,bt.Buf32=Array,bt.assign(bt,oC))};bt.setTyped(rC)});var Jb=b(to=>{"use strict";var aC=zr(),sC=4,Mb=0,Cb=1,uC=2;function eo(e){for(var t=e.length;--t>=0;)e[t]=0}var cC=0,Fb=1,lC=2,fC=3,dC=258,Tp=29,Ba=256,La=Ba+1+Tp,Qi=30,Pp=19,Nb=2*La+1,ai=15,xp=16,pC=7,Mp=256,Db=16,Bb=17,zb=18,Ap=[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],Ou=[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],hC=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ub=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],mC=512,Ur=new Array((La+2)*2);eo(Ur);var ja=new Array(Qi*2);eo(ja);var Fa=new Array(mC);eo(Fa);var Na=new Array(dC-fC+1);eo(Na);var Cp=new Array(Tp);eo(Cp);var Eu=new Array(Qi);eo(Eu);function Sp(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 Wb,Hb,Vb;function Op(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Gb(e){return e<256?Fa[e]:Fa[256+(e>>>7)]}function Da(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Rt(e,t,r){e.bi_valid>xp-r?(e.bi_buf|=t<<e.bi_valid&65535,Da(e,e.bi_buf),e.bi_buf=t>>xp-e.bi_valid,e.bi_valid+=r-xp):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function gr(e,t,r){Rt(e,r[t*2],r[t*2+1])}function $b(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function vC(e){e.bi_valid===16?(Da(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 gC(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,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,u,c,f,p,d,h,m=0;for(p=0;p<=ai;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u<Nb;u++)c=e.heap[u],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]++,d=0,c>=s&&(d=a[c-s]),h=r[c*2],e.opt_len+=h*(p+d),o&&(e.static_len+=h*(i[c*2+1]+d)));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;)f=e.heap[--u],!(f>n)&&(r[f*2+1]!==p&&(e.opt_len+=(p-r[f*2+1])*r[f*2],r[f*2+1]=p),c--)}}function Yb(e,t,r){var n=new Array(ai+1),i=0,o,a;for(o=1;o<=ai;o++)n[o]=i=i+r[o-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=$b(n[s]++,s))}}function bC(){var e,t,r,n,i,o=new Array(ai+1);for(r=0,n=0;n<Tp-1;n++)for(Cp[n]=r,e=0;e<1<<Ap[n];e++)Na[r++]=n;for(Na[r-1]=n,i=0,n=0;n<16;n++)for(Eu[n]=i,e=0;e<1<<Ou[n];e++)Fa[i++]=n;for(i>>=7;n<Qi;n++)for(Eu[n]=i<<7,e=0;e<1<<Ou[n]-7;e++)Fa[256+i++]=n;for(t=0;t<=ai;t++)o[t]=0;for(e=0;e<=143;)Ur[e*2+1]=8,e++,o[8]++;for(;e<=255;)Ur[e*2+1]=9,e++,o[9]++;for(;e<=279;)Ur[e*2+1]=7,e++,o[7]++;for(;e<=287;)Ur[e*2+1]=8,e++,o[8]++;for(Yb(Ur,La+1,o),e=0;e<Qi;e++)ja[e*2+1]=5,ja[e*2]=$b(e,5);Wb=new Sp(Ur,Ap,Ba+1,La,ai),Hb=new Sp(ja,Ou,0,Qi,ai),Vb=new Sp(new Array(0),hC,0,Pp,pC)}function Xb(e){var t;for(t=0;t<La;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Qi;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Pp;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Mp*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Kb(e){e.bi_valid>8?Da(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 yC(e,t,r,n){Kb(e),n&&(Da(e,r),Da(e,~r)),aC.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function kb(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 Ep(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&kb(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!kb(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function Ib(e,t,r){var n,i,o=0,a,s;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?gr(e,i,t):(a=Na[i],gr(e,a+Ba+1,t),s=Ap[a],s!==0&&(i-=Cp[a],Rt(e,i,s)),n--,a=Gb(n),gr(e,a,r),s=Ou[a],s!==0&&(n-=Eu[a],Rt(e,n,s)));while(o<e.last_lit);gr(e,Mp,t)}function Rp(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,s,l=-1,u;for(e.heap_len=0,e.heap_max=Nb,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;)u=e.heap[++e.heap_len]=l<2?++l:0,r[u*2]=1,e.depth[u]=0,e.opt_len--,i&&(e.static_len-=n[u*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)Ep(e,r,a);u=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Ep(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[u*2]=r[a*2]+r[s*2],e.depth[u]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[a*2+1]=r[s*2+1]=u,e.heap[1]=u++,Ep(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],gC(e,t),Yb(r,l,e.bl_count)}function qb(e,t,r){var n,i=-1,o,a=t[1],s=0,l=7,u=4;for(a===0&&(l=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<u?e.bl_tree[o*2]+=s:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[Db*2]++):s<=10?e.bl_tree[Bb*2]++:e.bl_tree[zb*2]++,s=0,i=o,a===0?(l=138,u=3):o===a?(l=6,u=3):(l=7,u=4))}function jb(e,t,r){var n,i=-1,o,a=t[1],s=0,l=7,u=4;for(a===0&&(l=138,u=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<u)do gr(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==i&&(gr(e,o,e.bl_tree),s--),gr(e,Db,e.bl_tree),Rt(e,s-3,2)):s<=10?(gr(e,Bb,e.bl_tree),Rt(e,s-3,3)):(gr(e,zb,e.bl_tree),Rt(e,s-11,7));s=0,i=o,a===0?(l=138,u=3):o===a?(l=6,u=3):(l=7,u=4)}}function _C(e){var t;for(qb(e,e.dyn_ltree,e.l_desc.max_code),qb(e,e.dyn_dtree,e.d_desc.max_code),Rp(e,e.bl_desc),t=Pp-1;t>=3&&e.bl_tree[Ub[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function wC(e,t,r,n){var i;for(Rt(e,t-257,5),Rt(e,r-1,5),Rt(e,n-4,4),i=0;i<n;i++)Rt(e,e.bl_tree[Ub[i]*2+1],3);jb(e,e.dyn_ltree,t-1),jb(e,e.dyn_dtree,r-1)}function xC(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Mb;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Cb;for(r=32;r<Ba;r++)if(e.dyn_ltree[r*2]!==0)return Cb;return Mb}var Lb=!1;function SC(e){Lb||(bC(),Lb=!0),e.l_desc=new Op(e.dyn_ltree,Wb),e.d_desc=new Op(e.dyn_dtree,Hb),e.bl_desc=new Op(e.bl_tree,Vb),e.bi_buf=0,e.bi_valid=0,Xb(e)}function Zb(e,t,r,n){Rt(e,(cC<<1)+(n?1:0),3),yC(e,t,r,!0)}function OC(e){Rt(e,Fb<<1,3),gr(e,Mp,Ur),vC(e)}function EC(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===uC&&(e.strm.data_type=xC(e)),Rp(e,e.l_desc),Rp(e,e.d_desc),a=_C(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?Zb(e,t,r,n):e.strategy===sC||o===i?(Rt(e,(Fb<<1)+(n?1:0),3),Ib(e,Ur,ja)):(Rt(e,(lC<<1)+(n?1:0),3),wC(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),Ib(e,e.dyn_ltree,e.dyn_dtree)),Xb(e),n&&Kb(e)}function AC(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[(Na[r]+Ba+1)*2]++,e.dyn_dtree[Gb(t)*2]++),e.last_lit===e.lit_bufsize-1}to._tr_init=SC;to._tr_stored_block=Zb;to._tr_flush_block=EC;to._tr_tally=AC;to._tr_align=OC});var kp=b((KK,Qb)=>{"use strict";function RC(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}Qb.exports=RC});var Ip=b((ZK,ey)=>{"use strict";function TC(){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 PC=TC();function MC(e,t,r,n){var i=PC,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}ey.exports=MC});var Au=b((JK,ty)=>{"use strict";ty.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 ly=b(_r=>{"use strict";var yt=zr(),Ut=Jb(),oy=kp(),an=Ip(),CC=Au(),li=0,kC=1,IC=3,fn=4,ry=5,yr=0,ny=1,Wt=-2,qC=-3,qp=-5,jC=-1,LC=1,Ru=2,FC=3,NC=4,DC=0,BC=2,Cu=8,zC=9,UC=15,WC=8,HC=29,VC=256,Lp=VC+1+HC,GC=30,$C=19,YC=2*Lp+1,XC=15,we=3,cn=258,tr=cn+we+1,KC=32,ku=42,Fp=69,Tu=73,Pu=91,Mu=103,si=113,Ua=666,Ke=1,Wa=2,ui=3,io=4,ZC=3;function ln(e,t){return e.msg=CC[t],t}function iy(e){return(e<<1)-(e>4?9:0)}function un(e){for(var t=e.length;--t>=0;)e[t]=0}function sn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(yt.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 st(e,t){Ut._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,sn(e.strm)}function Oe(e,t){e.pending_buf[e.pending++]=t}function za(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function JC(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,yt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=oy(e.adler,t,i,r):e.state.wrap===2&&(e.adler=an(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function ay(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-tr?e.strstart-(e.w_size-tr):0,u=e.window,c=e.w_mask,f=e.prev,p=e.strstart+cn,d=u[n+a-1],h=u[n+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(u[i+a]!==h||u[i+a-1]!==d||u[i]!==u[n]||u[++i]!==u[n+1])){n+=2,i++;do;while(u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&u[++n]===u[++i]&&n<p);if(o=cn-(p-n),n=p-cn,o>a){if(e.match_start=t,a=o,o>=s)break;d=u[n+a-1],h=u[n+a]}}while((t=f[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function ci(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-tr)){yt.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=JC(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<tr&&e.strm.avail_in!==0)}function QC(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ci(e),e.lookahead===0&&t===li)return Ke;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,st(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-tr&&(st(e,!1),e.strm.avail_out===0))return Ke}return e.insert=0,t===fn?(st(e,!0),e.strm.avail_out===0?ui:io):(e.strstart>e.block_start&&(st(e,!1),e.strm.avail_out===0),Ke)}function jp(e,t){for(var r,n;;){if(e.lookahead<tr){if(ci(e),e.lookahead<tr&&t===li)return Ke;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-tr&&(e.match_length=ay(e,r)),e.match_length>=we)if(n=Ut._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=Ut._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(st(e,!1),e.strm.avail_out===0))return Ke}return e.insert=e.strstart<we-1?e.strstart:we-1,t===fn?(st(e,!0),e.strm.avail_out===0?ui:io):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Ke:Wa}function ro(e,t){for(var r,n,i;;){if(e.lookahead<tr){if(ci(e),e.lookahead<tr&&t===li)return Ke;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-tr&&(e.match_length=ay(e,r),e.match_length<=5&&(e.strategy===LC||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=Ut._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&&(st(e,!1),e.strm.avail_out===0))return Ke}else if(e.match_available){if(n=Ut._tr_tally(e,0,e.window[e.strstart-1]),n&&st(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Ke}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ut._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<we-1?e.strstart:we-1,t===fn?(st(e,!0),e.strm.avail_out===0?ui:io):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Ke:Wa}function ek(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=cn){if(ci(e),e.lookahead<=cn&&t===li)return Ke;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+cn;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=cn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(r=Ut._tr_tally(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Ut._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(st(e,!1),e.strm.avail_out===0))return Ke}return e.insert=0,t===fn?(st(e,!0),e.strm.avail_out===0?ui:io):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Ke:Wa}function tk(e,t){for(var r;;){if(e.lookahead===0&&(ci(e),e.lookahead===0)){if(t===li)return Ke;break}if(e.match_length=0,r=Ut._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(st(e,!1),e.strm.avail_out===0))return Ke}return e.insert=0,t===fn?(st(e,!0),e.strm.avail_out===0?ui:io):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Ke:Wa}function br(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 no;no=[new br(0,0,0,0,QC),new br(4,4,8,4,jp),new br(4,5,16,8,jp),new br(4,6,32,32,jp),new br(4,4,16,16,ro),new br(8,16,32,32,ro),new br(8,16,128,128,ro),new br(8,32,128,256,ro),new br(32,128,258,1024,ro),new br(32,258,258,4096,ro)];function rk(e){e.window_size=2*e.w_size,un(e.head),e.max_lazy_match=no[e.level].max_lazy,e.good_match=no[e.level].good_length,e.nice_match=no[e.level].nice_length,e.max_chain_length=no[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 nk(){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=Cu,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 yt.Buf16(YC*2),this.dyn_dtree=new yt.Buf16((2*GC+1)*2),this.bl_tree=new yt.Buf16((2*$C+1)*2),un(this.dyn_ltree),un(this.dyn_dtree),un(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new yt.Buf16(XC+1),this.heap=new yt.Buf16(2*Lp+1),un(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new yt.Buf16(2*Lp+1),un(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 sy(e){var t;return!e||!e.state?ln(e,Wt):(e.total_in=e.total_out=0,e.data_type=BC,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ku:si,e.adler=t.wrap===2?0:1,t.last_flush=li,Ut._tr_init(t),yr)}function uy(e){var t=sy(e);return t===yr&&rk(e.state),t}function ik(e,t){return!e||!e.state||e.state.wrap!==2?Wt:(e.state.gzhead=t,yr)}function cy(e,t,r,n,i,o){if(!e)return Wt;var a=1;if(t===jC&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>zC||r!==Cu||n<8||n>15||t<0||t>9||o<0||o>NC)return ln(e,Wt);n===8&&(n=9);var s=new nk;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+we-1)/we),s.window=new yt.Buf8(s.w_size*2),s.head=new yt.Buf16(s.hash_size),s.prev=new yt.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new yt.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,uy(e)}function ok(e,t){return cy(e,t,Cu,UC,WC,DC)}function ak(e,t){var r,n,i,o;if(!e||!e.state||t>ry||t<0)return e?ln(e,Wt):Wt;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Ua&&t!==fn)return ln(e,e.avail_out===0?qp:Wt);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===ku)if(n.wrap===2)e.adler=0,Oe(n,31),Oe(n,139),Oe(n,8),n.gzhead?(Oe(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)),Oe(n,n.gzhead.time&255),Oe(n,n.gzhead.time>>8&255),Oe(n,n.gzhead.time>>16&255),Oe(n,n.gzhead.time>>24&255),Oe(n,n.level===9?2:n.strategy>=Ru||n.level<2?4:0),Oe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Oe(n,n.gzhead.extra.length&255),Oe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=an(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Fp):(Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,n.level===9?2:n.strategy>=Ru||n.level<2?4:0),Oe(n,ZC),n.status=si);else{var a=Cu+(n.w_bits-8<<4)<<8,s=-1;n.strategy>=Ru||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,a|=s<<6,n.strstart!==0&&(a|=KC),a+=31-a%31,n.status=si,za(n,a),n.strstart!==0&&(za(n,e.adler>>>16),za(n,e.adler&65535)),e.adler=1}if(n.status===Fp)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=an(e.adler,n.pending_buf,n.pending-i,i)),sn(e),i=n.pending,n.pending===n.pending_buf_size));)Oe(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=an(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Tu)}else n.status=Tu;if(n.status===Tu)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=an(e.adler,n.pending_buf,n.pending-i,i)),sn(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,Oe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=an(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=Pu)}else n.status=Pu;if(n.status===Pu)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=an(e.adler,n.pending_buf,n.pending-i,i)),sn(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,Oe(n,o)}while(o!==0);n.gzhead.hcrc&&n.pending>i&&(e.adler=an(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=Mu)}else n.status=Mu;if(n.status===Mu&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&sn(e),n.pending+2<=n.pending_buf_size&&(Oe(n,e.adler&255),Oe(n,e.adler>>8&255),e.adler=0,n.status=si)):n.status=si),n.pending!==0){if(sn(e),e.avail_out===0)return n.last_flush=-1,yr}else if(e.avail_in===0&&iy(t)<=iy(r)&&t!==fn)return ln(e,qp);if(n.status===Ua&&e.avail_in!==0)return ln(e,qp);if(e.avail_in!==0||n.lookahead!==0||t!==li&&n.status!==Ua){var l=n.strategy===Ru?tk(n,t):n.strategy===FC?ek(n,t):no[n.level].func(n,t);if((l===ui||l===io)&&(n.status=Ua),l===Ke||l===ui)return e.avail_out===0&&(n.last_flush=-1),yr;if(l===Wa&&(t===kC?Ut._tr_align(n):t!==ry&&(Ut._tr_stored_block(n,0,0,!1),t===IC&&(un(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),sn(e),e.avail_out===0))return n.last_flush=-1,yr}return t!==fn?yr:n.wrap<=0?ny:(n.wrap===2?(Oe(n,e.adler&255),Oe(n,e.adler>>8&255),Oe(n,e.adler>>16&255),Oe(n,e.adler>>24&255),Oe(n,e.total_in&255),Oe(n,e.total_in>>8&255),Oe(n,e.total_in>>16&255),Oe(n,e.total_in>>24&255)):(za(n,e.adler>>>16),za(n,e.adler&65535)),sn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?yr:ny)}function sk(e){var t;return!e||!e.state?Wt:(t=e.state.status,t!==ku&&t!==Fp&&t!==Tu&&t!==Pu&&t!==Mu&&t!==si&&t!==Ua?ln(e,Wt):(e.state=null,t===si?ln(e,qC):yr))}function uk(e,t){var r=t.length,n,i,o,a,s,l,u,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==ku||n.lookahead))return Wt;for(a===1&&(e.adler=oy(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(un(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new yt.Buf8(n.w_size),yt.arraySet(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),s=e.avail_in,l=e.next_in,u=e.input,e.avail_in=r,e.next_in=0,e.input=t,ci(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,ci(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=u,e.avail_in=s,n.wrap=a,yr}_r.deflateInit=ok;_r.deflateInit2=cy;_r.deflateReset=uy;_r.deflateResetKeep=sy;_r.deflateSetHeader=ik;_r.deflate=ak;_r.deflateEnd=sk;_r.deflateSetDictionary=uk;_r.deflateInfo="pako deflate (from Nodeca project)"});var Np=b(oo=>{"use strict";var Iu=zr(),fy=!0,dy=!0;try{String.fromCharCode.apply(null,[0])}catch{fy=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{dy=!1}var Ha=new Iu.Buf8(256);for(Wr=0;Wr<256;Wr++)Ha[Wr]=Wr>=252?6:Wr>=248?5:Wr>=240?4:Wr>=224?3:Wr>=192?2:1;var Wr;Ha[254]=Ha[254]=1;oo.string2buf=function(e){var t,r,n,i,o,a=e.length,s=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++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Iu.Buf8(s),o=0,i=0;o<s;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 py(e,t){if(t<65534&&(e.subarray&&dy||!e.subarray&&fy))return String.fromCharCode.apply(null,Iu.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}oo.buf2binstring=function(e){return py(e,e.length)};oo.binstring2buf=function(e){for(var t=new Iu.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};oo.buf2string=function(e,t){var r,n,i,o,a=t||e.length,s=new Array(a*2);for(n=0,r=0;r<a;){if(i=e[r++],i<128){s[n++]=i;continue}if(o=Ha[i],o>4){s[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){s[n++]=65533;continue}i<65536?s[n++]=i:(i-=65536,s[n++]=55296|i>>10&1023,s[n++]=56320|i&1023)}return py(s,n)};oo.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+Ha[e[r]]>t?r:t}});var Dp=b((tZ,hy)=>{"use strict";function ck(){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}hy.exports=ck});var by=b($a=>{"use strict";var Va=ly(),Ga=zr(),zp=Np(),Up=Au(),lk=Dp(),gy=Object.prototype.toString,fk=0,Bp=4,ao=0,my=1,vy=2,dk=-1,pk=0,hk=8;function fi(e){if(!(this instanceof fi))return new fi(e);this.options=Ga.assign({level:dk,method:hk,chunkSize:16384,windowBits:15,memLevel:8,strategy:pk,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 lk,this.strm.avail_out=0;var r=Va.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==ao)throw new Error(Up[r]);if(t.header&&Va.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=zp.string2buf(t.dictionary):gy.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Va.deflateSetDictionary(this.strm,n),r!==ao)throw new Error(Up[r]);this._dict_set=!0}}fi.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?Bp:fk,typeof e=="string"?r.input=zp.string2buf(e):gy.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 Ga.Buf8(n),r.next_out=0,r.avail_out=n),i=Va.deflate(r,o),i!==my&&i!==ao)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Bp||o===vy))&&(this.options.to==="string"?this.onData(zp.buf2binstring(Ga.shrinkBuf(r.output,r.next_out))):this.onData(Ga.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==my);return o===Bp?(i=Va.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ao):(o===vy&&(this.onEnd(ao),r.avail_out=0),!0)};fi.prototype.onData=function(e){this.chunks.push(e)};fi.prototype.onEnd=function(e){e===ao&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ga.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Wp(e,t){var r=new fi(t);if(r.push(e,!0),r.err)throw r.msg||Up[r.err];return r.result}function mk(e,t){return t=t||{},t.raw=!0,Wp(e,t)}function vk(e,t){return t=t||{},t.gzip=!0,Wp(e,t)}$a.Deflate=fi;$a.deflate=Wp;$a.deflateRaw=mk;$a.gzip=vk});var _y=b((nZ,yy)=>{"use strict";var qu=30,gk=12;yy.exports=function(t,r){var n,i,o,a,s,l,u,c,f,p,d,h,m,v,y,w,_,x,S,E,T,P,k,M,I;n=t.state,i=t.next_in,M=t.input,o=i+(t.avail_in-5),a=t.next_out,I=t.output,s=a-(r-t.avail_out),l=a+(t.avail_out-257),u=n.dmax,c=n.wsize,f=n.whave,p=n.wnext,d=n.window,h=n.hold,m=n.bits,v=n.lencode,y=n.distcode,w=(1<<n.lenbits)-1,_=(1<<n.distbits)-1;e:do{m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=v[h&w];t:for(;;){if(S=x>>>24,h>>>=S,m-=S,S=x>>>16&255,S===0)I[a++]=x&65535;else if(S&16){E=x&65535,S&=15,S&&(m<S&&(h+=M[i++]<<m,m+=8),E+=h&(1<<S)-1,h>>>=S,m-=S),m<15&&(h+=M[i++]<<m,m+=8,h+=M[i++]<<m,m+=8),x=y[h&_];r:for(;;){if(S=x>>>24,h>>>=S,m-=S,S=x>>>16&255,S&16){if(T=x&65535,S&=15,m<S&&(h+=M[i++]<<m,m+=8,m<S&&(h+=M[i++]<<m,m+=8)),T+=h&(1<<S)-1,T>u){t.msg="invalid distance too far back",n.mode=qu;break e}if(h>>>=S,m-=S,S=a-s,T>S){if(S=T-S,S>f&&n.sane){t.msg="invalid distance too far back",n.mode=qu;break e}if(P=0,k=d,p===0){if(P+=c-S,S<E){E-=S;do I[a++]=d[P++];while(--S);P=a-T,k=I}}else if(p<S){if(P+=c+p-S,S-=p,S<E){E-=S;do I[a++]=d[P++];while(--S);if(P=0,p<E){S=p,E-=S;do I[a++]=d[P++];while(--S);P=a-T,k=I}}}else if(P+=p-S,S<E){E-=S;do I[a++]=d[P++];while(--S);P=a-T,k=I}for(;E>2;)I[a++]=k[P++],I[a++]=k[P++],I[a++]=k[P++],E-=3;E&&(I[a++]=k[P++],E>1&&(I[a++]=k[P++]))}else{P=a-T;do I[a++]=I[P++],I[a++]=I[P++],I[a++]=I[P++],E-=3;while(E>2);E&&(I[a++]=I[P++],E>1&&(I[a++]=I[P++]))}}else if((S&64)===0){x=y[(x&65535)+(h&(1<<S)-1)];continue r}else{t.msg="invalid distance code",n.mode=qu;break e}break}}else if((S&64)===0){x=v[(x&65535)+(h&(1<<S)-1)];continue t}else if(S&32){n.mode=gk;break e}else{t.msg="invalid literal/length code",n.mode=qu;break e}break}}while(i<o&&a<l);E=m>>3,i-=E,m-=E<<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 Ry=b((iZ,Ay)=>{"use strict";var wy=zr(),so=15,xy=852,Sy=592,Oy=0,Hp=1,Ey=2,bk=[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],yk=[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],_k=[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],wk=[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];Ay.exports=function(t,r,n,i,o,a,s,l){var u=l.bits,c=0,f=0,p=0,d=0,h=0,m=0,v=0,y=0,w=0,_=0,x,S,E,T,P,k=null,M=0,I,U=new wy.Buf16(so+1),B=new wy.Buf16(so+1),A=null,q=0,W,j,R;for(c=0;c<=so;c++)U[c]=0;for(f=0;f<i;f++)U[r[n+f]]++;for(h=u,d=so;d>=1&&U[d]===0;d--);if(h>d&&(h=d),d===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p<d&&U[p]===0;p++);for(h<p&&(h=p),y=1,c=1;c<=so;c++)if(y<<=1,y-=U[c],y<0)return-1;if(y>0&&(t===Oy||d!==1))return-1;for(B[1]=0,c=1;c<so;c++)B[c+1]=B[c]+U[c];for(f=0;f<i;f++)r[n+f]!==0&&(s[B[r[n+f]]++]=f);if(t===Oy?(k=A=s,I=19):t===Hp?(k=bk,M-=257,A=yk,q-=257,I=256):(k=_k,A=wk,I=-1),_=0,f=0,c=p,P=a,m=h,v=0,E=-1,w=1<<h,T=w-1,t===Hp&&w>xy||t===Ey&&w>Sy)return 1;for(;;){W=c-v,s[f]<I?(j=0,R=s[f]):s[f]>I?(j=A[q+s[f]],R=k[M+s[f]]):(j=96,R=0),x=1<<c-v,S=1<<m,p=S;do S-=x,o[P+(_>>v)+S]=W<<24|j<<16|R|0;while(S!==0);for(x=1<<c-1;_&x;)x>>=1;if(x!==0?(_&=x-1,_+=x):_=0,f++,--U[c]===0){if(c===d)break;c=r[n+s[f]]}if(c>h&&(_&T)!==E){for(v===0&&(v=h),P+=p,m=c-v,y=1<<m;m+v<d&&(y-=U[m+v],!(y<=0));)m++,y<<=1;if(w+=1<<m,t===Hp&&w>xy||t===Ey&&w>Sy)return 1;E=_&T,o[E]=h<<24|m<<16|P-a|0}}return _!==0&&(o[P+_]=c-v<<24|64<<16|0),l.bits=h,0}});var u_=b(rr=>{"use strict";var Ft=zr(),Kp=kp(),wr=Ip(),xk=_y(),Ya=Ry(),Sk=0,Qy=1,e_=2,Ty=4,Ok=5,ju=6,di=0,Ek=1,Ak=2,Ht=-2,t_=-3,Zp=-4,Rk=-5,Py=8,r_=1,My=2,Cy=3,ky=4,Iy=5,qy=6,jy=7,Ly=8,Fy=9,Ny=10,Nu=11,Hr=12,Vp=13,Dy=14,Gp=15,By=16,zy=17,Uy=18,Wy=19,Lu=20,Fu=21,Hy=22,Vy=23,Gy=24,$y=25,Yy=26,$p=27,Xy=28,Ky=29,Le=30,Jp=31,Tk=32,Pk=852,Mk=592,Ck=15,kk=Ck;function Zy(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Ik(){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 n_(e){var t;return!e||!e.state?Ht:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=r_,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(Pk),t.distcode=t.distdyn=new Ft.Buf32(Mk),t.sane=1,t.back=-1,di)}function i_(e){var t;return!e||!e.state?Ht:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,n_(e))}function o_(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))?Ht:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,i_(e))}function a_(e,t){var r,n;return e?(n=new Ik,e.state=n,n.window=null,r=o_(e,t),r!==di&&(e.state=null),r):Ht}function qk(e){return a_(e,kk)}var Jy=!0,Yp,Xp;function jk(e){if(Jy){var t;for(Yp=new Ft.Buf32(512),Xp=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(Ya(Qy,e.lens,0,288,Yp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ya(e_,e.lens,0,32,Xp,0,e.work,{bits:5}),Jy=!1}e.lencode=Yp,e.lenbits=9,e.distcode=Xp,e.distbits=5}function s_(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 Lk(e,t){var r,n,i,o,a,s,l,u,c,f,p,d,h,m,v=0,y,w,_,x,S,E,T,P,k=new Ft.Buf8(4),M,I,U=[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 Ht;r=e.state,r.mode===Hr&&(r.mode=Vp),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,u=r.hold,c=r.bits,f=s,p=l,P=di;e:for(;;)switch(r.mode){case r_:if(r.wrap===0){r.mode=Vp;break}for(;c<16;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(r.wrap&2&&u===35615){r.check=0,k[0]=u&255,k[1]=u>>>8&255,r.check=wr(r.check,k,2,0),u=0,c=0,r.mode=My;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=Le;break}if((u&15)!==Py){e.msg="unknown compression method",r.mode=Le;break}if(u>>>=4,c-=4,T=(u&15)+8,r.wbits===0)r.wbits=T;else if(T>r.wbits){e.msg="invalid window size",r.mode=Le;break}r.dmax=1<<T,e.adler=r.check=1,r.mode=u&512?Ny:Hr,u=0,c=0;break;case My:for(;c<16;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(r.flags=u,(r.flags&255)!==Py){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=u>>8&1),r.flags&512&&(k[0]=u&255,k[1]=u>>>8&255,r.check=wr(r.check,k,2,0)),u=0,c=0,r.mode=Cy;case Cy:for(;c<32;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}r.head&&(r.head.time=u),r.flags&512&&(k[0]=u&255,k[1]=u>>>8&255,k[2]=u>>>16&255,k[3]=u>>>24&255,r.check=wr(r.check,k,4,0)),u=0,c=0,r.mode=ky;case ky:for(;c<16;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=u&255,r.head.os=u>>8),r.flags&512&&(k[0]=u&255,k[1]=u>>>8&255,r.check=wr(r.check,k,2,0)),u=0,c=0,r.mode=Iy;case Iy:if(r.flags&1024){for(;c<16;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}r.length=u,r.head&&(r.head.extra_len=u),r.flags&512&&(k[0]=u&255,k[1]=u>>>8&255,r.check=wr(r.check,k,2,0)),u=0,c=0}else r.head&&(r.head.extra=null);r.mode=qy;case qy:if(r.flags&1024&&(d=r.length,d>s&&(d=s),d&&(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,d,T)),r.flags&512&&(r.check=wr(r.check,n,d,o)),s-=d,o+=d,r.length-=d),r.length))break e;r.length=0,r.mode=jy;case jy:if(r.flags&2048){if(s===0)break e;d=0;do T=n[o+d++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T));while(T&&d<s);if(r.flags&512&&(r.check=wr(r.check,n,d,o)),s-=d,o+=d,T)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=Ly;case Ly:if(r.flags&4096){if(s===0)break e;d=0;do T=n[o+d++],r.head&&T&&r.length<65536&&(r.head.comment+=String.fromCharCode(T));while(T&&d<s);if(r.flags&512&&(r.check=wr(r.check,n,d,o)),s-=d,o+=d,T)break e}else r.head&&(r.head.comment=null);r.mode=Fy;case Fy:if(r.flags&512){for(;c<16;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(u!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Le;break}u=0,c=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Hr;break;case Ny:for(;c<32;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}e.adler=r.check=Zy(u),u=0,c=0,r.mode=Nu;case Nu:if(r.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=u,r.bits=c,Ak;e.adler=r.check=1,r.mode=Hr;case Hr:if(t===Ok||t===ju)break e;case Vp:if(r.last){u>>>=c&7,c-=c&7,r.mode=$p;break}for(;c<3;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}switch(r.last=u&1,u>>>=1,c-=1,u&3){case 0:r.mode=Dy;break;case 1:if(jk(r),r.mode=Lu,t===ju){u>>>=2,c-=2;break e}break;case 2:r.mode=zy;break;case 3:e.msg="invalid block type",r.mode=Le}u>>>=2,c-=2;break;case Dy:for(u>>>=c&7,c-=c&7;c<32;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if((u&65535)!==(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Le;break}if(r.length=u&65535,u=0,c=0,r.mode=Gp,t===ju)break e;case Gp:r.mode=By;case By:if(d=r.length,d){if(d>s&&(d=s),d>l&&(d=l),d===0)break e;Ft.arraySet(i,n,o,d,a),s-=d,o+=d,l-=d,a+=d,r.length-=d;break}r.mode=Hr;break;case zy:for(;c<14;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(r.nlen=(u&31)+257,u>>>=5,c-=5,r.ndist=(u&31)+1,u>>>=5,c-=5,r.ncode=(u&15)+4,u>>>=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=Uy;case Uy:for(;r.have<r.ncode;){for(;c<3;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}r.lens[U[r.have++]]=u&7,u>>>=3,c-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},P=Ya(Sk,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,P){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(;v=r.lencode[u&(1<<r.lenbits)-1],y=v>>>24,w=v>>>16&255,_=v&65535,!(y<=c);){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(_<16)u>>>=y,c-=y,r.lens[r.have++]=_;else{if(_===16){for(I=y+2;c<I;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(u>>>=y,c-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=Le;break}T=r.lens[r.have-1],d=3+(u&3),u>>>=2,c-=2}else if(_===17){for(I=y+3;c<I;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}u>>>=y,c-=y,T=0,d=3+(u&7),u>>>=3,c-=3}else{for(I=y+7;c<I;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}u>>>=y,c-=y,T=0,d=11+(u&127),u>>>=7,c-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Le;break}for(;d--;)r.lens[r.have++]=T}}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,M={bits:r.lenbits},P=Ya(Qy,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,P){e.msg="invalid literal/lengths set",r.mode=Le;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},P=Ya(e_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,P){e.msg="invalid distances set",r.mode=Le;break}if(r.mode=Lu,t===ju)break e;case Lu:r.mode=Fu;case Fu:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=u,r.bits=c,xk(e,p),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,n=e.input,s=e.avail_in,u=r.hold,c=r.bits,r.mode===Hr&&(r.back=-1);break}for(r.back=0;v=r.lencode[u&(1<<r.lenbits)-1],y=v>>>24,w=v>>>16&255,_=v&65535,!(y<=c);){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=y,S=w,E=_;v=r.lencode[E+((u&(1<<x+S)-1)>>x)],y=v>>>24,w=v>>>16&255,_=v&65535,!(x+y<=c);){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}u>>>=x,c-=x,r.back+=x}if(u>>>=y,c-=y,r.back+=y,r.length=_,w===0){r.mode=Yy;break}if(w&32){r.back=-1,r.mode=Hr;break}if(w&64){e.msg="invalid literal/length code",r.mode=Le;break}r.extra=w&15,r.mode=Hy;case Hy:if(r.extra){for(I=r.extra;c<I;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Vy;case Vy:for(;v=r.distcode[u&(1<<r.distbits)-1],y=v>>>24,w=v>>>16&255,_=v&65535,!(y<=c);){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if((w&240)===0){for(x=y,S=w,E=_;v=r.distcode[E+((u&(1<<x+S)-1)>>x)],y=v>>>24,w=v>>>16&255,_=v&65535,!(x+y<=c);){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}u>>>=x,c-=x,r.back+=x}if(u>>>=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=Gy;case Gy:if(r.extra){for(I=r.extra;c<I;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}r.offset+=u&(1<<r.extra)-1,u>>>=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=$y;case $y:if(l===0)break e;if(d=p-l,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Le;break}d>r.wnext?(d-=r.wnext,h=r.wsize-d):h=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,h=a-r.offset,d=r.length;d>l&&(d=l),l-=d,r.length-=d;do i[a++]=m[h++];while(--d);r.length===0&&(r.mode=Fu);break;case Yy:if(l===0)break e;i[a++]=r.length,l--,r.mode=Fu;break;case $p:if(r.wrap){for(;c<32;){if(s===0)break e;s--,u|=n[o++]<<c,c+=8}if(p-=l,e.total_out+=p,r.total+=p,p&&(e.adler=r.check=r.flags?wr(r.check,i,p,a-p):Kp(r.check,i,p,a-p)),p=l,(r.flags?u:Zy(u))!==r.check){e.msg="incorrect data check",r.mode=Le;break}u=0,c=0}r.mode=Xy;case Xy:if(r.wrap&&r.flags){for(;c<32;){if(s===0)break e;s--,u+=n[o++]<<c,c+=8}if(u!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Le;break}u=0,c=0}r.mode=Ky;case Ky:P=Ek;break e;case Le:P=t_;break e;case Jp:return Zp;case Tk:default:return Ht}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=u,r.bits=c,(r.wsize||p!==e.avail_out&&r.mode<Le&&(r.mode<$p||t!==Ty))&&s_(e,e.output,e.next_out,p-e.avail_out)?(r.mode=Jp,Zp):(f-=e.avail_in,p-=e.avail_out,e.total_in+=f,e.total_out+=p,r.total+=p,r.wrap&&p&&(e.adler=r.check=r.flags?wr(r.check,i,p,e.next_out-p):Kp(r.check,i,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Hr?128:0)+(r.mode===Lu||r.mode===Gp?256:0),(f===0&&p===0||t===Ty)&&P===di&&(P=Rk),P)}function Fk(e){if(!e||!e.state)return Ht;var t=e.state;return t.window&&(t.window=null),e.state=null,di}function Nk(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Ht:(r.head=t,t.done=!1,di)}function Dk(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==Nu)?Ht:n.mode===Nu&&(i=1,i=Kp(i,t,r,0),i!==n.check)?t_:(o=s_(e,t,r,r),o?(n.mode=Jp,Zp):(n.havedict=1,di))}rr.inflateReset=i_;rr.inflateReset2=o_;rr.inflateResetKeep=n_;rr.inflateInit=qk;rr.inflateInit2=a_;rr.inflate=Lk;rr.inflateEnd=Fk;rr.inflateGetHeader=Nk;rr.inflateSetDictionary=Dk;rr.inflateInfo="pako inflate (from Nodeca project)"});var Qp=b((aZ,c_)=>{"use strict";c_.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 f_=b((sZ,l_)=>{"use strict";function Bk(){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}l_.exports=Bk});var p_=b(Ka=>{"use strict";var uo=u_(),Xa=zr(),Du=Np(),$e=Qp(),eh=Au(),zk=Dp(),Uk=f_(),d_=Object.prototype.toString;function pi(e){if(!(this instanceof pi))return new pi(e);this.options=Xa.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 zk,this.strm.avail_out=0;var r=uo.inflateInit2(this.strm,t.windowBits);if(r!==$e.Z_OK)throw new Error(eh[r]);if(this.header=new Uk,uo.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Du.string2buf(t.dictionary):d_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=uo.inflateSetDictionary(this.strm,t.dictionary),r!==$e.Z_OK)))throw new Error(eh[r])}pi.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,o,a,s,l,u,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=Du.binstring2buf(e):d_.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 Xa.Buf8(n),r.next_out=0,r.avail_out=n),o=uo.inflate(r,$e.Z_NO_FLUSH),o===$e.Z_NEED_DICT&&i&&(o=uo.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"?(s=Du.utf8border(r.output,r.next_out),l=r.next_out-s,u=Du.buf2string(r.output,s),r.next_out=l,r.avail_out=n-l,l&&Xa.arraySet(r.output,r.output,s,l,0),this.onData(u)):this.onData(Xa.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=uo.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)};pi.prototype.onData=function(e){this.chunks.push(e)};pi.prototype.onEnd=function(e){e===$e.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Xa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function th(e,t){var r=new pi(t);if(r.push(e,!0),r.err)throw r.msg||eh[r.err];return r.result}function Wk(e,t){return t=t||{},t.raw=!0,th(e,t)}Ka.Inflate=pi;Ka.inflate=th;Ka.inflateRaw=Wk;Ka.ungzip=th});var rh=b((cZ,m_)=>{"use strict";var Hk=zr().assign,Vk=by(),Gk=p_(),$k=Qp(),h_={};Hk(h_,Vk,Gk,$k);m_.exports=h_});var zu=b((SZ,g_)=>{g_.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var ut=b((OZ,b_)=>{b_.exports=JBrowseExports["@jbrowse/core/util"]});var ah=b(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var ih=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()])}};oh.default=ih});var Uu=b((AZ,y_)=>{y_.exports=JBrowseExports["@jbrowse/core/util/io"]});var Wu=b((RZ,__)=>{__.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var A_=b(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});function w_(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 Zk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jk(e,t,r){return t=co(t),eI(e,E_()?Reflect.construct(t,r||[],co(e).constructor):t.apply(e,r))}function ch(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x_(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,iI(n.key),n)}}function lh(e,t,r){return t&&x_(e.prototype,t),r&&x_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S_(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=oI(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,s=!1;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return a=l.done,l},e:function(l){s=!0,o=l},f:function(){try{a||r.return==null||r.return()}finally{if(s)throw o}}}}function sh(){return sh=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=tI(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},sh.apply(null,arguments)}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},co(e)}function Qk(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&&uh(e,t)}function E_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E_=function(){return!!e})()}function eI(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 Zk(e)}function uh(e,t){return uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},uh(e,t)}function tI(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=co(e))!==null;);return e}function rI(e,t,r,n){var i=sh(co(1&n?e.prototype:e),t,r);return 2&n&&typeof i=="function"?function(o){return i.apply(r,o)}:i}function nI(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 iI(e){var t=nI(e,"string");return typeof t=="symbol"?t:t+""}function oI(e,t){if(e){if(typeof e=="string")return w_(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)?w_(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function aI(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 sI(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 O_=function(){function e(){ch(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return lh(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[s];try{c.callback.call(n,r)}catch(f){Promise.resolve().then(function(){throw f})}c.options&&c.options.once&&n.removeEventListener(r.type,c.callback)},s=0,l=o.length;s<l;s++)a();return!r.defaultPrevented}}}])}(),fh=function(e){function t(){var r;return ch(this,t),r=Jk(this,t),r.listeners||O_.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 Qk(t,e),lh(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)),rI(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 Hu;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 Hu;function o(){i.abort(this.reason),a()}function a(){var c=S_(n),f;try{for(c.s();!(f=c.n()).done;){var p=f.value;p.removeEventListener("abort",o)}}catch(d){c.e(d)}finally{c.f()}}var s=S_(n),l;try{for(s.s();!(l=s.n()).done;){var u=l.value;if(u.aborted){i.abort(u.reason);break}else u.addEventListener("abort",o)}}catch(c){s.e(c)}finally{s.f()}return i.signal}}])}(O_),Hu=function(){function e(){ch(this,e),Object.defineProperty(this,"signal",{value:new fh,writable:!0,configurable:!0})}return lh(e,[{key:"abort",value:function(r){var n=sI(r),i=aI(n);this.signal.reason=n,this.signal.dispatchEvent(i)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(Hu.prototype[Symbol.toStringTag]="AbortController",fh.prototype[Symbol.toStringTag]="AbortSignal");function uI(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 cI(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,s=a===void 0?!1:a;if(!uI({fetch:r,Request:i,AbortController:o,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:s}))return{fetch:r,Request:l};var l=i;(l&&!l.prototype.hasOwnProperty("signal")||s)&&(l=function(p,d){var h;d&&d.signal&&(h=d.signal,delete d.signal);var m=new i(p,d);return h&&Object.defineProperty(m,"signal",{writable:!1,enumerable:!1,configurable:!0,value:h}),m},l.prototype=i.prototype);var u=r,c=function(p,d){var h=l&&l.prototype.isPrototypeOf(p)?p.signal:d?d.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 v=new Promise(function(y,w){h.addEventListener("abort",function(){return w(m)},{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([v,u(p,d)])}return u(p,d)};return{fetch:c,Request:l}}Za.AbortController=Hu;Za.AbortSignal=fh;Za.abortableFetch=cI});var dh=b(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.AbortSignal=lo.AbortController=void 0;var R_=A_(),Vu=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")},lI=typeof Vu().AbortController>"u"?R_.AbortController:Vu().AbortController;lo.AbortController=lI;var fI=typeof Vu().AbortController>"u"?R_.AbortSignal:Vu().AbortSignal;lo.AbortSignal=fI});var T_=b(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var dI=dh(),ph=class{},hh=class{constructor(){this.signals=new Set,this.abortController=new dI.AbortController}addSignal(t=new ph){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()}};mh.default=hh});var P_=b(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var vh=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)})}};gh.default=vh});var C_=b(Ja=>{"use strict";var M_=Ja&&Ja.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ja,"__esModule",{value:!0});var pI=dh(),hI=M_(T_()),mI=M_(P_()),bh=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 hI.default,a=new mI.default;a.addCallback(i);let s={aborter:o,promise:this.fillCallback(r,o.signal,l=>{a.callback(l)}),settled:!1,statusReporter:a,get aborted(){return this.aborter.signal.aborted}};s.aborter.addSignal(n),s.aborter.signal.addEventListener("abort",()=>{s.settled||this.evict(t,s)}),s.promise.then(()=>{s.settled=!0},()=>{s.settled=!0,this.evict(t,s)}).catch(l=>{throw console.error(l),l}),this.cache.set(t,s)}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 pI.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}};Ja.default=bh});var k_=b(Qa=>{"use strict";var vI=Qa&&Qa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qa,"__esModule",{value:!0});var gI=vI(C_());Qa.default=gI.default});var pn=b((ZZ,Z_)=>{Z_.exports=JBrowseExports["@jbrowse/core/configuration"]});var _t=b((rJ,t0)=>{t0.exports=JBrowseExports["mobx-state-tree"]});var Fe=b((fQ,_0)=>{_0.exports=JBrowseExports.react});var mn=b((dQ,w0)=>{w0.exports=JBrowseExports["@jbrowse/core/ui"]});var go=b((pQ,x0)=>{x0.exports=JBrowseExports["@mui/material"]});var Sr=b((hQ,S0)=>{S0.exports=JBrowseExports["mobx-react"]});var bo=b((mQ,O0)=>{O0.exports=JBrowseExports["tss-react/mui"]});var Ih=b((gQ,R0)=>{R0.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var tc=b((wQ,I0)=>{I0.exports=JBrowseExports["react/jsx-runtime"]});function rc(){return typeof window<"u"}function Or(e){return nc(e)?(e.nodeName||"").toLowerCase():"#document"}function ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function or(e){var t;return(t=(nc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nc(e){return rc()?e instanceof Node||e instanceof ct(e).Node:!1}function Me(e){return rc()?e instanceof Element||e instanceof ct(e).Element:!1}function Ne(e){return rc()?e instanceof HTMLElement||e instanceof ct(e).HTMLElement:!1}function wo(e){return!rc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ct(e).ShadowRoot}function xo(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=xt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!II.has(i)}function q0(e){return qI.has(Or(e))}function ss(e){return jI.some(t=>{try{return e.matches(t)}catch{return!1}})}function ic(e){let t=So(),r=Me(e)?xt(e):e;return LI.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)||FI.some(n=>(r.willChange||"").includes(n))||NI.some(n=>(r.contain||"").includes(n))}function j0(e){let t=ir(e);for(;Ne(t)&&!ar(t);){if(ic(t))return t;if(ss(t))return null;t=ir(t)}return null}function So(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ar(e){return DI.has(Or(e))}function xt(e){return ct(e).getComputedStyle(e)}function us(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ir(e){if(Or(e)==="html")return e;let t=e.assignedSlot||e.parentNode||wo(e)&&e.host||or(e);return wo(t)?t.host:t}function L0(e){let t=ir(e);return ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&xo(t)?t:L0(t)}function Pt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=L0(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=ct(i);if(o){let s=oc(a);return t.concat(a,a.visualViewport||[],xo(i)?i:[],s&&r?Pt(s):[])}return t.concat(i,Pt(i,[],r))}function oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var II,qI,jI,LI,FI,NI,DI,cs=gt(()=>{II=new Set(["inline","contents"]);qI=new Set(["table","td","th"]);jI=[":popover-open",":modal"];LI=["transform","translate","scale","rotate","perspective"],FI=["transform","translate","scale","rotate","perspective","filter"],NI=["paint","layout","strict","content"];DI=new Set(["html","body","#document"])});function ac(e,t,r){return Ve(e,St(t,r))}function Mt(e,t){return typeof e=="function"?e(t):e}function Ct(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function sc(e){return e==="x"?"y":"x"}function uc(e){return e==="y"?"height":"width"}function Xt(e){return UI.has(Ct(e))?"y":"x"}function cc(e){return sc(Xt(e))}function Lh(e,t,r){r===void 0&&(r=!1);let n=Yt(e),i=cc(e),o=uc(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=fs(a)),[a,fs(a)]}function B0(e){let t=fs(e);return[ls(e),t,ls(t)]}function ls(e){return e.replace(/start|end/g,t=>zI[t])}function VI(e,t,r){switch(e){case"top":case"bottom":return r?t?D0:N0:t?N0:D0;case"left":case"right":return t?WI:HI;default:return[]}}function z0(e,t,r,n){let i=Yt(e),o=VI(Ct(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(ls)))),o}function fs(e){return e.replace(/left|right|bottom|top/g,t=>BI[t])}function GI(e){return{top:0,right:0,bottom:0,left:0,...e}}function lc(e){return typeof e!="number"?GI(e):{top:e,right:e,bottom:e,left:e}}function Gr(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 qh,F0,jh,St,Ve,bi,vn,sr,BI,zI,UI,N0,D0,WI,HI,Oo=gt(()=>{qh=["top","right","bottom","left"],F0=["start","end"],jh=qh.reduce((e,t)=>e.concat(t,t+"-"+F0[0],t+"-"+F0[1]),[]),St=Math.min,Ve=Math.max,bi=Math.round,vn=Math.floor,sr=e=>({x:e,y:e}),BI={left:"right",right:"left",bottom:"top",top:"bottom"},zI={start:"end",end:"start"};UI=new Set(["top","bottom"]);N0=["left","right"],D0=["right","left"],WI=["top","bottom"],HI=["bottom","top"]});var $I,fc,W0,Eo,dc,pc,YI,H0,V0,G0,$0,XI,KI,Y0,ZI,JI,QI,eq,tq,rq,nq,U0,iq,oq,Fh,Nh,aq,sq,Ao,X0,Dh,Bh=gt(()=>{$I=["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])"],fc=$I.join(","),W0=typeof Element>"u",Eo=W0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,dc=!W0&&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},pc=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},YI=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},H0=function(t,r,n){if(pc(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(fc));return r&&Eo.call(t,fc)&&i.unshift(t),i=i.filter(n),i},V0=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!pc(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,n);n.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var c=Eo.call(a,fc);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!pc(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,n);n.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},G0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},$0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||YI(t))&&!G0(t)?0:t.tabIndex},XI=function(t,r){var n=$0(t);return n<0&&r&&!G0(t)?0:n},KI=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Y0=function(t){return t.tagName==="INPUT"},ZI=function(t){return Y0(t)&&t.type==="hidden"},JI=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},QI=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},eq=function(t){if(!t.name)return!0;var r=t.form||dc(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},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=QI(i,t.form);return!o||o===t},tq=function(t){return Y0(t)&&t.type==="radio"},rq=function(t){return tq(t)&&!eq(t)},nq=function(t){var r,n=t&&dc(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var u,c,f;n=dc(i),i=(u=n)===null||u===void 0?void 0:u.host,o=!!((c=i)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},U0=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},iq=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Eo.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Eo.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=dc(t);if(l&&!l.shadowRoot&&i(l)===!0)return U0(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(nq(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return U0(t);return!1},oq=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 Eo.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},Fh=function(t,r){return!(r.disabled||pc(r)||ZI(r)||iq(r,t)||JI(r)||oq(r))},Nh=function(t,r){return!(rq(r)||$0(r)<0||!Fh(t,r))},aq=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},sq=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=XI(s,a),u=a?e(i.candidates):s;l===0?a?r.push.apply(r,u):r.push(s):n.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),n.sort(KI).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Ao=function(t,r){r=r||{};var n;return r.getShadowRoot?n=V0([t],r.includeContainer,{filter:Nh.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:aq}):n=H0(t,r.includeContainer,Nh.bind(null,r)),sq(n)},X0=function(t,r){r=r||{};var n;return r.getShadowRoot?n=V0([t],r.includeContainer,{filter:Fh.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=H0(t,r.includeContainer,Fh.bind(null,r)),n},Dh=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Eo.call(t,fc)===!1?!1:Nh(r,t)}});function mc(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function vc(){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 Hh(){return/apple/i.test(navigator.vendor)}function Wh(){let e=/android/i;return e.test(mc())||e.test(vc())}function J0(){return mc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Q0(){return vc().includes("jsdom/")}function ur(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 Je(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&wo(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function cr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function gc(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 ew(e){return e.matches("html,body")}function nt(e){return e?.ownerDocument||document}function bc(e){return Ne(e)&&e.matches(uq)}function yc(e){return e?e.getAttribute("role")==="combobox"&&bc(e):!1}function tw(e){if(!e||Q0())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ds(e){return e?e.hasAttribute(K0)?e:e.querySelector("["+K0+"]")||e:null}function gn(e,t,r){return r===void 0&&(r=!0),e.filter(i=>{var o;return i.parentId===t&&(!r||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...gn(e,i.id,r)])}function rw(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),gn(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function Vh(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 rt(e){e.preventDefault(),e.stopPropagation()}function nw(e){return"nativeEvent"in e}function Gh(e){return e.mozInputSource===0&&e.isTrusted?!0:Wh()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $h(e){return Q0()?!1:!Wh()&&e.width===0&&e.height===0||Wh()&&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 _i(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Qe(e){let t=Ro.useRef(e);return ve(()=>{t.current=e}),t}function Ie(e){let t=Ro.useRef(()=>{});return mq(()=>{t.current=e}),Ro.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 hc(e,t,r){return Math.floor(e/t)!==r}function yi(e,t){return t<0||t>=e.current.length}function ps(e,t){return tt(e,{disabledIndices:t})}function _c(e,t){return tt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tt(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&&bn(e,a,i));return a}function Yh(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:s,minIndex:l,maxIndex:u,prevIndex:c,stopEvent:f=!1}=t,p=c;if(r.key===cq){if(f&&rt(r),c===-1)p=u;else if(p=tt(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),i&&(c-a<l||p<0)){let d=c%a,h=u%a,m=u-(h-d);h===d?p=u:p=h>d?m:m-a}yi(e,p)&&(p=c)}if(r.key===lq&&(f&&rt(r),c===-1?p=l:(p=tt(e,{startingIndex:c,amount:a,disabledIndices:s}),i&&c+a>u&&(p=tt(e,{startingIndex:c%a-a,amount:a,disabledIndices:s}))),yi(e,p)&&(p=c)),n==="both"){let d=vn(c/a);r.key===(o?zh:Uh)&&(f&&rt(r),c%a!==a-1?(p=tt(e,{startingIndex:c,disabledIndices:s}),i&&hc(p,a,d)&&(p=tt(e,{startingIndex:c-c%a-1,disabledIndices:s}))):i&&(p=tt(e,{startingIndex:c-c%a-1,disabledIndices:s})),hc(p,a,d)&&(p=c)),r.key===(o?Uh:zh)&&(f&&rt(r),c%a!==0?(p=tt(e,{startingIndex:c,decrement:!0,disabledIndices:s}),i&&hc(p,a,d)&&(p=tt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:s}))):i&&(p=tt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:s})),hc(p,a,d)&&(p=c));let h=vn(u/a)===d;yi(e,p)&&(i&&h?p=r.key===(o?Uh:zh)?u:tt(e,{startingIndex:c-c%a-1,disabledIndices:s}):p=c)}return p}function Xh(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:s,height:l}=o;s>t;let u=!1;for(r&&(i=0);!u;){let c=[];for(let f=0;f<s;f++)for(let p=0;p<l;p++)c.push(i+f+p*t);i%t+s<=t&&c.every(f=>n[f]==null)?(c.forEach(f=>{n[f]=a}),u=!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 Zh(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function bn(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);let n=e.current[t];return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function iw(e,t){let r=Ao(e,To()),n=r.length;if(n===0)return;let i=ur(nt(e)),o=r.indexOf(i),a=o===-1?t===1?0:n-1:o+t;return r[a]}function Jh(e){return iw(nt(e).body,1)||e}function Qh(e){return iw(nt(e).body,-1)||e}function Po(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Je(r,n)}function ow(e){Ao(e,To()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function em(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 Ro,Z0,K0,uq,zh,Uh,cq,lq,fq,dq,ve,pq,hq,mq,To,aw=gt(()=>{cs();Ro=L(Fe(),1),Z0=L(Fe(),1);Oo();Bh();K0="data-floating-ui-focusable",uq="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",zh="ArrowLeft",Uh="ArrowRight",cq="ArrowUp",lq="ArrowDown";fq=typeof document<"u",dq=function(){},ve=fq?Z0.useLayoutEffect:dq,pq={...Ro};hq=pq.useInsertionEffect,mq=hq||(e=>e());To=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"})});var wc=b((PQ,sw)=>{sw.exports=JBrowseExports["react-dom"]});function uw(e,t,r){let{reference:n,floating:i}=e,o=Xt(t),a=cc(t),s=uc(a),l=Ct(t),u=o==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,p=n[s]/2-i[s]/2,d;switch(l){case"top":d={x:c,y:n.y-i.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-i.width,y:f};break;default:d={x:n.x,y:n.y}}switch(Yt(t)){case"start":d[a]-=p*(r&&u?-1:1);break;case"end":d[a]+=p*(r&&u?-1:1);break}return d}async function yn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Mt(t,e),h=lc(d),v=s[p?f==="floating"?"reference":"floating":f],y=Gr(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(v)))==null||r?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),w=f==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.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},S=Gr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:_,strategy:l}):w);return{top:(y.top-S.top+h.top)/x.y,bottom:(S.bottom-y.bottom+h.bottom)/x.y,left:(y.left-S.left+h.left)/x.x,right:(S.right-y.right+h.right)/x.x}}function vq(e,t,r){return(e?[...r.filter(i=>Yt(i)===e),...r.filter(i=>Yt(i)!==e)]:r.filter(i=>Ct(i)===i)).filter(i=>e?Yt(i)===e||(t?ls(i)!==i:!1):!0)}function cw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lw(e){return qh.some(t=>e[t]>=0)}function vw(e){let t=St(...e.map(o=>o.left)),r=St(...e.map(o=>o.top)),n=Ve(...e.map(o=>o.right)),i=Ve(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function gq(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=>Gr(vw(i)))}async function bq(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Ct(r),s=Yt(r),l=Xt(r)==="y",u=bw.has(a)?-1:1,c=o&&l?-1:1,f=Mt(t,e),{mainAxis:p,crossAxis:d,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(d=s==="end"?h*-1:h),l?{x:d*c,y:p*u}:{x:p*u,y:d*c}}var fw,dw,pw,hw,mw,gw,bw,yw,_w,ww,xw,Sw=gt(()=>{Oo();Oo();fw=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=uw(u,n,l),p=n,d={},h=0;for(let m=0;m<s.length;m++){let{name:v,fn:y}=s[m],{x:w,y:_,data:x,reset:S}=await y({x:c,y:f,initialPlacement:n,placement:p,strategy:i,middlewareData:d,rects:u,platform:a,elements:{reference:e,floating:t}});c=w??c,f=_??f,d={...d,[v]:{...d[v],...x}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=uw(u,p,l)),m=-1)}return{x:c,y:f,placement:p,strategy:i,middlewareData:d}};dw=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=Mt(e,t)||{};if(u==null)return{};let f=lc(c),p={x:r,y:n},d=cc(i),h=uc(d),m=await a.getDimensions(u),v=d==="y",y=v?"top":"left",w=v?"bottom":"right",_=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[d]-p[d]-o.floating[h],S=p[d]-o.reference[d],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u)),T=E?E[_]:0;(!T||!await(a.isElement==null?void 0:a.isElement(E)))&&(T=s.floating[_]||o.floating[h]);let P=x/2-S/2,k=T/2-m[h]/2-1,M=St(f[y],k),I=St(f[w],k),U=M,B=T-m[h]-I,A=T/2-m[h]/2+P,q=ac(U,A,B),W=!l.arrow&&Yt(i)!=null&&A!==q&&o.reference[h]/2-(A<U?M:I)-m[h]/2<0,j=W?A<U?A-U:A-B:0;return{[d]:p[d]+j,data:{[d]:q,centerOffset:A-q-j,...W&&{alignmentOffset:j}},reset:W}}});pw=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;let{rects:o,middlewareData:a,placement:s,platform:l,elements:u}=t,{crossAxis:c=!1,alignment:f,allowedPlacements:p=jh,autoAlignment:d=!0,...h}=Mt(e,t),m=f!==void 0||p===jh?vq(f||null,d,p):p,v=await yn(t,h),y=((r=a.autoPlacement)==null?void 0:r.index)||0,w=m[y];if(w==null)return{};let _=Lh(w,o,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(s!==w)return{reset:{placement:m[0]}};let x=[v[Ct(w)],v[_[0]],v[_[1]]],S=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],E=m[y+1];if(E)return{data:{index:y+1,overflows:S},reset:{placement:E}};let T=S.map(M=>{let I=Yt(M.placement);return[M.placement,I&&c?M.overflows.slice(0,2).reduce((U,B)=>U+B,0):M.overflows[0],M.overflows]}).sort((M,I)=>M[1]-I[1]),k=((i=T.filter(M=>M[2].slice(0,Yt(M[0])?2:3).every(I=>I<=0))[0])==null?void 0:i[0])||T[0][0];return k!==s?{data:{index:y+1,overflows:S},reset:{placement:k}}:{}}}},hw=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:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Mt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let y=Ct(i),w=Xt(s),_=Ct(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=p||(_||!m?[fs(s)]:B0(s)),E=h!=="none";!p&&E&&S.push(...z0(s,m,h,x));let T=[s,...S],P=await yn(t,v),k=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&k.push(P[y]),f){let A=Lh(i,a,x);k.push(P[A[0]],P[A[1]])}if(M=[...M,{placement:i,overflows:k}],!k.every(A=>A<=0)){var I,U;let A=(((I=o.flip)==null?void 0:I.index)||0)+1,q=T[A];if(q&&(!(f==="alignment"?w!==Xt(q):!1)||M.every(R=>R.overflows[0]>0&&Xt(R.placement)===w)))return{data:{index:A,overflows:M},reset:{placement:q}};let W=(U=M.filter(j=>j.overflows[0]<=0).sort((j,R)=>j.overflows[1]-R.overflows[1])[0])==null?void 0:U.placement;if(!W)switch(d){case"bestFit":{var B;let j=(B=M.filter(R=>{if(E){let F=Xt(R.placement);return F===w||F==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(F=>F>0).reduce((F,H)=>F+H,0)]).sort((R,F)=>R[1]-F[1])[0])==null?void 0:B[0];j&&(W=j);break}case"initialPlacement":W=s;break}if(i!==W)return{reset:{placement:W}}}return{}}}};mw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Mt(e,t);switch(n){case"referenceHidden":{let o=await yn(t,{...i,elementContext:"reference"}),a=cw(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:lw(a)}}}case"escaped":{let o=await yn(t,{...i,altBoundary:!0}),a=cw(o,r.floating);return{data:{escapedOffsets:a,escaped:lw(a)}}}default:return{}}}}};gw=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:s=2,x:l,y:u}=Mt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),f=gq(c),p=Gr(vw(c)),d=lc(s);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&u!=null)return f.find(v=>l>v.left-d.left&&l<v.right+d.right&&u>v.top-d.top&&u<v.bottom+d.bottom)||p;if(f.length>=2){if(Xt(r)==="y"){let M=f[0],I=f[f.length-1],U=Ct(r)==="top",B=M.top,A=I.bottom,q=U?M.left:I.left,W=U?M.right:I.right,j=W-q,R=A-B;return{top:B,bottom:A,left:q,right:W,width:j,height:R,x:q,y:B}}let v=Ct(r)==="left",y=Ve(...f.map(M=>M.right)),w=St(...f.map(M=>M.left)),_=f.filter(M=>v?M.left===w:M.right===y),x=_[0].top,S=_[_.length-1].bottom,E=w,T=y,P=T-E,k=S-x;return{top:x,bottom:S,left:E,right:T,width:P,height:k,x:E,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}}:{}}}},bw=new Set(["left","top"]);yw=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:s}=t,l=await bq(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},_w=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:s={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=Mt(e,t),u={x:r,y:n},c=await yn(t,l),f=Xt(Ct(i)),p=sc(f),d=u[p],h=u[f];if(o){let v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=d+c[v],_=d-c[y];d=ac(w,d,_)}if(a){let v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=h+c[v],_=h-c[y];h=ac(w,h,_)}let m=s.fn({...t,[p]:d,[f]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[f]:a}}}}}},ww=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Mt(e,t),c={x:r,y:n},f=Xt(i),p=sc(f),d=c[p],h=c[f],m=Mt(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let _=p==="y"?"height":"width",x=o.reference[p]-o.floating[_]+v.mainAxis,S=o.reference[p]+o.reference[_]-v.mainAxis;d<x?d=x:d>S&&(d=S)}if(u){var y,w;let _=p==="y"?"width":"height",x=bw.has(Ct(i)),S=o.reference[f]-o.floating[_]+(x&&((y=a.offset)==null?void 0:y[f])||0)+(x?0:v.crossAxis),E=o.reference[f]+o.reference[_]+(x?0:((w=a.offset)==null?void 0:w[f])||0)-(x?v.crossAxis:0);h<S?h=S:h>E&&(h=E)}return{[p]:d,[f]:h}}}},xw=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:s}=t,{apply:l=()=>{},...u}=Mt(e,t),c=await yn(t,u),f=Ct(i),p=Yt(i),d=Xt(i)==="y",{width:h,height:m}=o.floating,v,y;f==="top"||f==="bottom"?(v=f,y=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,v=p==="end"?"top":"bottom");let w=m-c.top-c.bottom,_=h-c.left-c.right,x=St(m-c[v],w),S=St(h-c[y],_),E=!t.middlewareData.shift,T=x,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=w),E&&!p){let M=Ve(c.left,0),I=Ve(c.right,0),U=Ve(c.top,0),B=Ve(c.bottom,0);d?P=h-2*(M!==0||I!==0?M+I:Ve(c.left,c.right)):T=m-2*(U!==0||B!==0?U+B:Ve(c.top,c.bottom))}await l({...t,availableWidth:P,availableHeight:T});let k=await a.getDimensions(s.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}}});function Aw(e){let t=xt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Ne(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=bi(r)!==o||bi(n)!==a;return s&&(r=o,n=a),{width:r,height:n,$:s}}function rm(e){return Me(e)?e:e.contextElement}function Mo(e){let t=rm(e);if(!Ne(t))return sr(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Aw(t),a=(o?bi(r.width):r.width)/n,s=(o?bi(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}function Rw(e){let t=ct(e);return!So()||!t.visualViewport?yq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _q(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ct(e)?!1:t}function wi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=rm(e),a=sr(1);t&&(n?Me(n)&&(a=Mo(n)):a=Mo(e));let s=_q(o,r,n)?Rw(o):sr(0),l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){let p=ct(o),d=n&&Me(n)?ct(n):n,h=p,m=oc(h);for(;m&&n&&d!==h;){let v=Mo(m),y=m.getBoundingClientRect(),w=xt(m),_=y.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,x=y.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,f*=v.y,l+=_,u+=x,h=ct(m),m=oc(h)}}return Gr({width:c,height:f,x:l,y:u})}function nm(e,t){let r=us(e).scrollLeft;return t?t.left+r:wi(or(e)).left+r}function Tw(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:nm(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function wq(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=or(n),s=t?ss(t.floating):!1;if(n===a||s&&o)return r;let l={scrollLeft:0,scrollTop:0},u=sr(1),c=sr(0),f=Ne(n);if((f||!f&&!o)&&((Or(n)!=="body"||xo(a))&&(l=us(n)),Ne(n))){let d=wi(n);u=Mo(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}let p=a&&!f&&!o?Tw(a,l,!0):sr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function xq(e){return Array.from(e.getClientRects())}function Sq(e){let t=or(e),r=us(e),n=e.ownerDocument.body,i=Ve(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Ve(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+nm(e),s=-r.scrollTop;return xt(n).direction==="rtl"&&(a+=Ve(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:s}}function Oq(e,t){let r=ct(e),n=or(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;let u=So();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Aq(e,t){let r=wi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Ne(e)?Mo(e):sr(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=n*o.y;return{width:a,height:s,x:l,y:u}}function Ow(e,t,r){let n;if(t==="viewport")n=Oq(e,r);else if(t==="document")n=Sq(or(e));else if(Me(t))n=Aq(t,r);else{let i=Rw(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Gr(n)}function Pw(e,t){let r=ir(e);return r===t||!Me(r)||ar(r)?!1:xt(r).position==="fixed"||Pw(r,t)}function Rq(e,t){let r=t.get(e);if(r)return r;let n=Pt(e,[],!1).filter(s=>Me(s)&&Or(s)!=="body"),i=null,o=xt(e).position==="fixed",a=o?ir(e):e;for(;Me(a)&&!ar(a);){let s=xt(a),l=ic(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&Eq.has(i.position)||xo(a)&&!l&&Pw(e,a))?n=n.filter(c=>c!==a):i=s,a=ir(a)}return t.set(e,n),n}function Tq(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?ss(t)?[]:Rq(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((u,c)=>{let f=Ow(t,c,i);return u.top=Ve(f.top,u.top),u.right=St(f.right,u.right),u.bottom=St(f.bottom,u.bottom),u.left=Ve(f.left,u.left),u},Ow(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Pq(e){let{width:t,height:r}=Aw(e);return{width:t,height:r}}function Mq(e,t,r){let n=Ne(t),i=or(t),o=r==="fixed",a=wi(e,!0,o,t),s={scrollLeft:0,scrollTop:0},l=sr(0);function u(){l.x=nm(i)}if(n||!n&&!o)if((Or(t)!=="body"||xo(i))&&(s=us(t)),n){let d=wi(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&u();o&&!n&&i&&u();let c=i&&!n&&!o?Tw(i,s):sr(0),f=a.left+s.scrollLeft-l.x-c.x,p=a.top+s.scrollTop-l.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function tm(e){return xt(e).position==="static"}function Ew(e,t){if(!Ne(e)||xt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return or(e)===r&&(r=r.ownerDocument.body),r}function Mw(e,t){let r=ct(e);if(ss(e))return r;if(!Ne(e)){let i=ir(e);for(;i&&!ar(i);){if(Me(i)&&!tm(i))return i;i=ir(i)}return r}let n=Ew(e,t);for(;n&&q0(n)&&tm(n);)n=Ew(n,t);return n&&ar(n)&&tm(n)&&!ic(n)?r:n||j0(e)||r}function kq(e){return xt(e).direction==="rtl"}function Cw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Iq(e,t){let r=null,n,i=or(e);function o(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();let u=e.getBoundingClientRect(),{left:c,top:f,width:p,height:d}=u;if(s||t(),!p||!d)return;let h=vn(f),m=vn(i.clientWidth-(c+p)),v=vn(i.clientHeight-(f+d)),y=vn(c),_={rootMargin:-h+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Ve(0,St(1,l))||1},x=!0;function S(E){let T=E[0].intersectionRatio;if(T!==l){if(!x)return a();T?a(!1,T):n=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!Cw(u,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(S,{..._,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,_)}r.observe(e)}return a(!0),o}function im(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=rm(e),c=i||o?[...u?Pt(u):[],...Pt(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),o&&y.addEventListener("resize",r)});let f=u&&s?Iq(u,r):null,p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=d)==null||_.observe(t)})),r()}),u&&!l&&d.observe(u),d.observe(t));let h,m=l?wi(e):null;l&&v();function v(){let y=wi(e);m&&!Cw(m,y)&&r(),m=y,h=requestAnimationFrame(v)}return r(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),f?.(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(h)}}var yq,Eq,Cq,xc,xi,kw,Iw,qw,jw,Lw,Fw,om,Nw,Dw,hs,am=gt(()=>{Sw();Oo();cs();cs();yq=sr(0);Eq=new Set(["absolute","fixed"]);Cq=async function(e){let t=this.getOffsetParent||Mw,r=this.getDimensions,n=await r(e.floating);return{reference:Mq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};xc={convertOffsetParentRelativeRectToViewportRelativeRect:wq,getDocumentElement:or,getClippingRect:Tq,getOffsetParent:Mw,getElementRects:Cq,getClientRects:xq,getDimensions:Pq,getScale:Mo,isElement:Me,isRTL:kq};xi=yn,kw=yw,Iw=pw,qw=_w,jw=hw,Lw=xw,Fw=mw,om=dw,Nw=gw,Dw=ww,hs=(e,t,r)=>{let n=new Map,i={platform:xc,...r},o={...i.platform,_c:n};return fw(e,t,{...i,platform:o})}});function Oc(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(!Oc(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)&&!Oc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Ww(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bw(e,t){let r=Ww(e);return Math.round(t*r)/r}function sm(e){let t=Xe.useRef(e);return Sc(()=>{t.current=e}),t}function Hw(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,f]=Xe.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=Xe.useState(n);Oc(p,n)||d(n);let[h,m]=Xe.useState(null),[v,y]=Xe.useState(null),w=Xe.useCallback(R=>{R!==E.current&&(E.current=R,m(R))},[]),_=Xe.useCallback(R=>{R!==T.current&&(T.current=R,y(R))},[]),x=o||h,S=a||v,E=Xe.useRef(null),T=Xe.useRef(null),P=Xe.useRef(c),k=l!=null,M=sm(l),I=sm(i),U=sm(u),B=Xe.useCallback(()=>{if(!E.current||!T.current)return;let R={placement:t,strategy:r,middleware:p};I.current&&(R.platform=I.current),hs(E.current,T.current,R).then(F=>{let H={...F,isPositioned:U.current!==!1};A.current&&!Oc(P.current,H)&&(P.current=H,Uw.flushSync(()=>{f(H)}))})},[p,t,r,I,U]);Sc(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);let A=Xe.useRef(!1);Sc(()=>(A.current=!0,()=>{A.current=!1}),[]),Sc(()=>{if(x&&(E.current=x),S&&(T.current=S),x&&S){if(M.current)return M.current(x,S,B);B()}},[x,S,B,M,k]);let q=Xe.useMemo(()=>({reference:E,floating:T,setReference:w,setFloating:_}),[w,_]),W=Xe.useMemo(()=>({reference:x,floating:S}),[x,S]),j=Xe.useMemo(()=>{let R={position:r,left:0,top:0};if(!W.floating)return R;let F=Bw(W.floating,c.x),H=Bw(W.floating,c.y);return s?{...R,transform:"translate("+F+"px, "+H+"px)",...Ww(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:H}},[r,s,W.floating,c.x,c.y]);return Xe.useMemo(()=>({...c,update:B,refs:q,elements:W,floatingStyles:j}),[c,B,q,W,j])}var Xe,zw,Uw,qq,jq,Sc,Lq,Ec,Vw,Gw,$w,Yw,Xw,Kw,Zw,Jw,um=gt(()=>{am();am();Xe=L(Fe(),1),zw=L(Fe(),1),Uw=L(wc(),1),qq=typeof document<"u",jq=function(){},Sc=qq?zw.useLayoutEffect:jq;Lq=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?om({element:n.current,padding:i}).fn(r):{}:n?om({element:n,padding:i}).fn(r):{}}}},Ec=(e,t)=>({...kw(e),options:[e,t]}),Vw=(e,t)=>({...qw(e),options:[e,t]}),Gw=(e,t)=>({...Dw(e),options:[e,t]}),$w=(e,t)=>({...jw(e),options:[e,t]}),Yw=(e,t)=>({...Lw(e),options:[e,t]}),Xw=(e,t)=>({...Iw(e),options:[e,t]}),Kw=(e,t)=>({...Fw(e),options:[e,t]}),Zw=(e,t)=>({...Nw(e),options:[e,t]}),Jw=(e,t)=>({...Lq(e),options:[e,t]})});var Wx={};Su(Wx,{Composite:()=>Dq,CompositeItem:()=>Bq,FloatingArrow:()=>Vq,FloatingDelayGroup:()=>Kq,FloatingFocusManager:()=>l2,FloatingList:()=>Ox,FloatingNode:()=>$q,FloatingOverlay:()=>d2,FloatingPortal:()=>o2,FloatingTree:()=>Yq,NextFloatingDelayGroup:()=>Jq,arrow:()=>Jw,autoPlacement:()=>Xw,autoUpdate:()=>im,computePosition:()=>hs,detectOverflow:()=>xi,flip:()=>$w,getOverflowAncestors:()=>Pt,hide:()=>Kw,inline:()=>Zw,inner:()=>M2,limitShift:()=>Gw,offset:()=>Ec,platform:()=>xc,safePolygon:()=>I2,shift:()=>Vw,size:()=>Yw,useClick:()=>h2,useClientPoint:()=>v2,useDelayGroup:()=>Zq,useDelayGroupContext:()=>qx,useDismiss:()=>y2,useFloating:()=>_2,useFloatingNodeId:()=>Gq,useFloatingParentNodeId:()=>Ai,useFloatingPortalNode:()=>Nx,useFloatingRootContext:()=>Bx,useFloatingTree:()=>Ri,useFocus:()=>w2,useHover:()=>Xq,useId:()=>Io,useInnerOffset:()=>C2,useInteractions:()=>x2,useListItem:()=>Ex,useListNavigation:()=>O2,useMergeRefs:()=>xx,useNextDelayGroup:()=>Qq,useRole:()=>A2,useTransitionStatus:()=>zx,useTransitionStyles:()=>T2,useTypeahead:()=>P2});function xx(e){let t=O.useRef(void 0),r=O.useCallback(n=>{let i=e.map(o=>{if(o!=null){if(typeof o=="function"){let a=o,s=a(n);return typeof s=="function"?s:()=>{a(null)}}return o.current=n,()=>{o.current=null}}});return()=>{i.forEach(o=>o?.())}},e);return O.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function Fq(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 Ox(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=O.useState(()=>new Set),a=O.useCallback(u=>{o(c=>new Set(c).add(u))},[]),s=O.useCallback(u=>{o(c=>{let f=new Set(c);return f.delete(u),f})},[]),l=O.useMemo(()=>{let u=new Map;return Array.from(i.keys()).sort(Fq).forEach((f,p)=>{u.set(f,p)}),u},[i]);return(0,Ce.jsx)(Sx.Provider,{value:O.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:r,labelsRef:n}),[a,s,l,r,n]),children:t})}function Ex(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=O.useContext(Sx),[s,l]=O.useState(null),u=O.useRef(null),c=O.useCallback(f=>{if(u.current=f,s!==null&&(o.current[s]=f,a)){var p;let d=t!==void 0;a.current[s]=d?t:(p=f?.textContent)!=null?p:null}},[s,o,a,t]);return ve(()=>{let f=u.current;if(f)return r(f),()=>{n(f)}},[r,n]),ve(()=>{let f=u.current?i.get(u.current):null;f!=null&&l(f)},[i]),O.useMemo(()=>({ref:c,index:s??-1}),[s,c])}function Ax(e,t){return typeof e=="function"?e(t):e?O.cloneElement(e,t):(0,Ce.jsx)("div",{...t})}function Wq(){let[e,t]=O.useState(()=>tx?rx():void 0);return ve(()=>{e==null&&t(rx())},[]),O.useEffect(()=>{tx=!0},[]),e}function Mx(){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 Gq(e){let t=Io(),r=Ri(),n=Ai(),i=e||n;return ve(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function $q(e){let{children:t,id:r}=e,n=Ai();return(0,Ce.jsx)(Cx.Provider,{value:O.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function Yq(e){let{children:t}=e,r=O.useRef([]),n=O.useCallback(a=>{r.current=[...r.current,a]},[]),i=O.useCallback(a=>{r.current=r.current.filter(s=>s!==a)},[]),[o]=O.useState(()=>Mx());return(0,Ce.jsx)(kx.Provider,{value:O.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){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function ms(e,t,r){if(r&&!_i(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 lm(e){return typeof e=="function"?e():e}function Xq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:p=!0}=t,d=Ri(),h=Ai(),m=Qe(u),v=Qe(l),y=Qe(r),w=Qe(f),_=O.useRef(),x=O.useRef(-1),S=O.useRef(),E=O.useRef(-1),T=O.useRef(!0),P=O.useRef(!1),k=O.useRef(()=>{}),M=O.useRef(!1),I=Ie(()=>{var j;let R=(j=i.current.openEvent)==null?void 0:j.type;return R?.includes("mouse")&&R!=="mousedown"});O.useEffect(()=>{if(!s)return;function j(R){let{open:F}=R;F||(it(x),it(E),T.current=!0,M.current=!1)}return o.on("openchange",j),()=>{o.off("openchange",j)}},[s,o]),O.useEffect(()=>{if(!s||!m.current||!r)return;function j(F){I()&&n(!1,F,"hover")}let R=nt(a.floating).documentElement;return R.addEventListener("mouseleave",j),()=>{R.removeEventListener("mouseleave",j)}},[a.floating,r,n,s,m,I]);let U=O.useCallback(function(j,R,F){R===void 0&&(R=!0),F===void 0&&(F="hover");let H=ms(v.current,"close",_.current);H&&!S.current?(it(x),x.current=window.setTimeout(()=>n(!1,j,F),H)):R&&(it(x),n(!1,j,F))},[v,n]),B=Ie(()=>{k.current(),S.current=void 0}),A=Ie(()=>{if(P.current){let j=nt(a.floating).body;j.style.pointerEvents="",j.removeAttribute(nx),P.current=!1}}),q=Ie(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);O.useEffect(()=>{if(!s)return;function j(Q){if(it(x),T.current=!1,c&&!_i(_.current)||lm(w.current)>0&&!ms(v.current,"open"))return;let $=ms(v.current,"open",_.current);$?x.current=window.setTimeout(()=>{y.current||n(!0,Q,"hover")},$):r||n(!0,Q,"hover")}function R(Q){if(q()){A();return}k.current();let $=nt(a.floating);if(it(E),M.current=!1,m.current&&i.current.floatingContext){r||it(x),S.current=m.current({...i.current.floatingContext,tree:d,x:Q.clientX,y:Q.clientY,onClose(){A(),B(),q()||U(Q,!0,"safe-polygon")}});let D=S.current;$.addEventListener("mousemove",D),k.current=()=>{$.removeEventListener("mousemove",D)};return}(_.current==="touch"?!Je(a.floating,Q.relatedTarget):!0)&&U(Q)}function F(Q){q()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:d,x:Q.clientX,y:Q.clientY,onClose(){A(),B(),q()||U(Q)}})(Q))}function H(){it(x)}function _e(Q){q()||U(Q,!1)}if(Me(a.domReference)){let Q=a.domReference,$=a.floating;return r&&Q.addEventListener("mouseleave",F),p&&Q.addEventListener("mousemove",j,{once:!0}),Q.addEventListener("mouseenter",j),Q.addEventListener("mouseleave",R),$&&($.addEventListener("mouseleave",F),$.addEventListener("mouseenter",H),$.addEventListener("mouseleave",_e)),()=>{r&&Q.removeEventListener("mouseleave",F),p&&Q.removeEventListener("mousemove",j),Q.removeEventListener("mouseenter",j),Q.removeEventListener("mouseleave",R),$&&($.removeEventListener("mouseleave",F),$.removeEventListener("mouseenter",H),$.removeEventListener("mouseleave",_e))}}},[a,s,e,c,p,U,B,A,n,r,y,d,v,m,i,q,w]),ve(()=>{var j;if(s&&r&&(j=m.current)!=null&&(j=j.__options)!=null&&j.blockPointerEvents&&I()){P.current=!0;let F=a.floating;if(Me(a.domReference)&&F){var R;let H=nt(a.floating).body;H.setAttribute(nx,"");let _e=a.domReference,Q=d==null||(R=d.nodesRef.current.find($=>$.id===h))==null||(R=R.context)==null?void 0:R.elements.floating;return Q&&(Q.style.pointerEvents=""),H.style.pointerEvents="none",_e.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{H.style.pointerEvents="",_e.style.pointerEvents="",F.style.pointerEvents=""}}}},[s,r,h,a,d,m,I]),ve(()=>{r||(_.current=void 0,M.current=!1,B(),A())},[r,B,A]),O.useEffect(()=>()=>{B(),it(x),it(E),A()},[s,a.domReference,B,A]);let W=O.useMemo(()=>{function j(R){_.current=R.pointerType}return{onPointerDown:j,onPointerEnter:j,onMouseMove(R){let{nativeEvent:F}=R;function H(){!T.current&&!y.current&&n(!0,F,"hover")}c&&!_i(_.current)||r||lm(w.current)===0||M.current&&R.movementX**2+R.movementY**2<2||(it(E),_.current==="touch"?H():(M.current=!0,E.current=window.setTimeout(H,lm(w.current))))}}},[c,n,r,y,w]);return O.useMemo(()=>s?{reference:W}:{},[s,W])}function Kq(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=O.useReducer((l,u)=>({...l,...u}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=O.useRef(null),s=O.useCallback(l=>{o({currentId:l})},[]);return ve(()=>{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,Ce.jsx)(Ix.Provider,{value:O.useMemo(()=>({...i,setState:o,setCurrentId:s}),[i,s]),children:t})}function Zq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,s=o??i,l=qx(),{currentId:u,setCurrentId:c,initialDelay:f,setState:p,timeoutMs:d}=l;return ve(()=>{a&&u&&(p({delay:{open:1,close:ms(f,"close")}}),u!==s&&n(!1))},[a,s,n,p,u,f]),ve(()=>{function h(){n(!1),p({delay:f,currentId:null})}if(a&&u&&!r&&u===s){if(d){let m=window.setTimeout(h,d);return()=>{clearTimeout(m)}}h()}},[a,r,p,u,s,n,f,d]),ve(()=>{a&&(c===vm||!r||c(s))},[a,r,c,s]),l}function Jq(e){let{children:t,delay:r,timeoutMs:n=0}=e,i=O.useRef(r),o=O.useRef(r),a=O.useRef(null),s=O.useRef(null),l=O.useRef(-1);return(0,Ce.jsx)(jx.Provider,{value:O.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:n,currentContextRef:s,timeoutIdRef:l}),[n]),children:t})}function Qq(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{enabled:o=!0}=t,a=O.useContext(jx),{currentIdRef:s,delayRef:l,timeoutMs:u,initialDelayRef:c,currentContextRef:f,hasProvider:p,timeoutIdRef:d}=a,[h,m]=O.useState(!1);return ve(()=>{function v(){var y;m(!1),(y=f.current)==null||y.setIsInstantPhase(!1),s.current=null,f.current=null,l.current=c.current}if(o&&s.current&&!r&&s.current===i){if(m(!1),u)return d.current=window.setTimeout(v,u),()=>{clearTimeout(d.current)};v()}},[o,r,i,s,l,u,c,f,d]),ve(()=>{if(!o||!r)return;let v=f.current,y=s.current;f.current={onOpenChange:n,setIsInstantPhase:m},s.current=i,l.current={open:0,close:ms(c.current,"close")},y!==null&&y!==i?(it(d),m(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1)):(m(!1),v?.setIsInstantPhase(!1))},[o,r,i,n,s,l,u,c,f,d]),ve(()=>()=>{f.current=null},[f]),O.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:h}),[p,l,h])}function Si(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(ix);let o=()=>e?.focus({preventScroll:r});i?o():ix=requestAnimationFrame(o)}function fm(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&wo(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function e2(e){return"composedPath"in e?e.composedPath()[0]:e.target}function t2(e){return e?.ownerDocument||document}function ox(e){return e==="inert"?ko.inert:e==="aria-hidden"?ko["aria-hidden"]:ko.none}function i2(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=n2(t,e),s=new Set,l=new Set(a),u=[];Rc[i]||(Rc[i]=new WeakMap);let c=Rc[i];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||[].forEach.call(d.children,h=>{if(Or(h)!=="script")if(s.has(h))p(h);else{let m=o?h.getAttribute(o):null,v=m!==null&&m!=="false",y=ox(o),w=(y.get(h)||0)+1,_=(c.get(h)||0)+1;y.set(h,w),c.set(h,_),u.push(h),w===1&&v&&Ac.add(h),_===1&&h.setAttribute(i,""),!v&&o&&h.setAttribute(o,o==="inert"?"":"true")}})}return dm++,()=>{u.forEach(d=>{let h=ox(o),v=(h.get(d)||0)-1,y=(c.get(d)||0)-1;h.set(d,v),c.set(d,y),v||(!Ac.has(d)&&o&&d.removeAttribute(o),Ac.delete(d)),y||d.removeAttribute(i)}),dm--,dm||(ko.inert=new WeakMap,ko["aria-hidden"]=new WeakMap,ko.none=new WeakMap,Ac=new WeakSet,Rc={})}}function ax(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=t2(e[0]).body;return i2(e.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,t,r)}function Nx(e){e===void 0&&(e={});let{id:t,root:r}=e,n=Io(),i=Dx(),[o,a]=O.useState(null),s=O.useRef(null);return ve(()=>()=>{o?.remove(),queueMicrotask(()=>{s.current=null})},[o]),ve(()=>{if(!n||s.current)return;let l=t?document.getElementById(t):null;if(!l)return;let u=document.createElement("div");u.id=n,u.setAttribute(sx,""),l.appendChild(u),s.current=u,a(u)},[t,n]),ve(()=>{if(r===null||!n||s.current)return;let l=r||i?.portalNode;l&&!nc(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));let c=document.createElement("div");c.id=n,c.setAttribute(sx,""),l=u||l,l.appendChild(c),s.current=c,a(c)},[t,r,n,i]),o}function o2(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=Nx({id:r,root:n}),[a,s]=O.useState(null),l=O.useRef(null),u=O.useRef(null),c=O.useRef(null),f=O.useRef(null),p=a?.modal,d=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return O.useEffect(()=>{if(!o||!i||p)return;function m(v){o&&Po(v)&&(v.type==="focusin"?em:ow)(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]),O.useEffect(()=>{o&&(d||em(o))},[d,o]),(0,Ce.jsxs)(Fx.Provider,{value:O.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:s}),[i,o]),children:[h&&o&&(0,Ce.jsx)(Mc,{"data-type":"outside",ref:l,onFocus:m=>{if(Po(m,o)){var v;(v=c.current)==null||v.focus()}else{let y=a?a.domReference:null,w=Qh(y);w?.focus()}}}),h&&o&&(0,Ce.jsx)("span",{"aria-owns":o.id,style:Cc}),o&&Oi.createPortal(t,o),h&&o&&(0,Ce.jsx)(Mc,{"data-type":"outside",ref:u,onFocus:m=>{if(Po(m,o)){var v;(v=f.current)==null||v.focus()}else{let y=a?a.domReference:null,w=Jh(y);w?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function ux(e){return O.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}function gm(){_n=_n.filter(e=>e.isConnected)}function s2(e){gm(),e&&Or(e)!=="body"&&(_n.push(e),_n.length>a2&&(_n=_n.slice(-20)))}function cx(){return gm(),_n[_n.length-1]}function u2(e){let t=To();return Dh(e,t)?e:Ao(e,t)[0]||e}function lx(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;let n=To(),o=X0(e,n).filter(s=>{let l=s.getAttribute("data-tabindex")||"";return Dh(s,n)||s.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 l2(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:f=!0,outsideElementsInert:p=!1,getInsideElements:d=()=>[]}=e,{open:h,onOpenChange:m,events:v,dataRef:y,elements:{domReference:w,floating:_}}=t,x=Ie(()=>{var J;return(J=y.current.floatingContext)==null?void 0:J.nodeId}),S=Ie(d),E=typeof a=="number"&&a<0,T=yc(w)&&E,P=r2(),k=P?o:!0,M=!k||P&&p,I=Qe(i),U=Qe(a),B=Qe(s),A=Ri(),q=Dx(),W=O.useRef(null),j=O.useRef(null),R=O.useRef(!1),F=O.useRef(!1),H=O.useRef(-1),_e=O.useRef(-1),Q=q!=null,$=ds(_),Se=Ie(function(J){return J===void 0&&(J=$),J?Ao(J,To()):[]}),D=Ie(J=>{let ue=Se(J);return I.current.map(te=>w&&te==="reference"?w:$&&te==="floating"?$:ue).filter(Boolean).flat()});O.useEffect(()=>{if(n||!u)return;function J(te){if(te.key==="Tab"){Je($,ur(nt($)))&&Se().length===0&&!T&&rt(te);let de=D(),me=cr(te);I.current[0]==="reference"&&me===w&&(rt(te),te.shiftKey?Si(de[de.length-1]):Si(de[1])),I.current[1]==="floating"&&me===$&&te.shiftKey&&(rt(te),Si(de[0]))}}let ue=nt($);return ue.addEventListener("keydown",J),()=>{ue.removeEventListener("keydown",J)}},[n,w,$,u,I,T,Se,D]),O.useEffect(()=>{if(n||!_)return;function J(ue){let te=cr(ue),me=Se().indexOf(te);me!==-1&&(H.current=me)}return _.addEventListener("focusin",J),()=>{_.removeEventListener("focusin",J)}},[n,_,Se]),O.useEffect(()=>{if(n||!f)return;function J(){F.current=!0,setTimeout(()=>{F.current=!1})}function ue(me){let ne=me.relatedTarget,K=me.currentTarget,oe=cr(me);queueMicrotask(()=>{let le=x(),se=!(Je(w,ne)||Je(_,ne)||Je(ne,_)||Je(q?.portalNode,ne)||ne!=null&&ne.hasAttribute(Ei("focus-guard"))||A&&(gn(A.nodesRef.current,le).find(z=>{var Y,V;return Je((Y=z.context)==null?void 0:Y.elements.floating,ne)||Je((V=z.context)==null?void 0:V.elements.domReference,ne)})||Vh(A.nodesRef.current,le).find(z=>{var Y,V,ce;return[(Y=z.context)==null?void 0:Y.elements.floating,ds((V=z.context)==null?void 0:V.elements.floating)].includes(ne)||((ce=z.context)==null?void 0:ce.elements.domReference)===ne})));if(K===w&&$&&lx($,I),l&&K!==w&&!(oe!=null&&oe.isConnected)&&ur(nt($))===nt($).body){Ne($)&&$.focus();let z=H.current,Y=Se(),V=Y[z]||Y[Y.length-1]||$;Ne(V)&&V.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(T||!u)&&ne&&se&&!F.current&&ne!==cx()&&(R.current=!0,m(!1,me,"focus-out"))})}let te=!!(!A&&q);function de(){it(_e),y.current.insideReactTree=!0,_e.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(_&&Ne(w))return w.addEventListener("focusout",ue),w.addEventListener("pointerdown",J),_.addEventListener("focusout",ue),te&&_.addEventListener("focusout",de,!0),()=>{w.removeEventListener("focusout",ue),w.removeEventListener("pointerdown",J),_.removeEventListener("focusout",ue),te&&_.removeEventListener("focusout",de,!0)}},[n,w,_,$,u,A,q,m,f,l,Se,T,x,I,y]);let ee=O.useRef(null),ae=O.useRef(null),ie=ux([ee,q?.beforeInsideRef]),X=ux([ae,q?.afterInsideRef]);O.useEffect(()=>{var J,ue;if(n||!_)return;let te=Array.from((q==null||(J=q.portalNode)==null?void 0:J.querySelectorAll("["+Ei("portal")+"]"))||[]),me=(ue=(A?Vh(A.nodesRef.current,x()):[]).find(oe=>{var le;return yc(((le=oe.context)==null?void 0:le.elements.domReference)||null)}))==null||(ue=ue.context)==null?void 0:ue.elements.domReference,ne=[_,me,...te,...S(),W.current,j.current,ee.current,ae.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,I.current.includes("reference")||T?w:null].filter(oe=>oe!=null),K=u||T?ax(ne,!M,M):ax(ne);return()=>{K()}},[n,w,_,u,I,q,T,k,M,A,x,S]),ve(()=>{if(n||!Ne($))return;let J=nt($),ue=ur(J);queueMicrotask(()=>{let te=D($),de=U.current,me=(typeof de=="number"?te[de]:de.current)||$,ne=Je($,ue);!E&&!ne&&h&&Si(me,{preventScroll:me===$})})},[n,h,$,E,D,U]),ve(()=>{if(n||!$)return;let J=nt($),ue=ur(J);s2(ue);function te(ne){let{reason:K,event:oe,nested:le}=ne;if(["hover","safe-polygon"].includes(K)&&oe.type==="mouseleave"&&(R.current=!0),K==="outside-press")if(le)R.current=!1;else if(Gh(oe)||$h(oe))R.current=!1;else{let se=!1;document.createElement("div").focus({get preventScroll(){return se=!0,!1}}),se?R.current=!1:R.current=!0}}v.on("openchange",te);let de=J.createElement("span");de.setAttribute("tabindex","-1"),de.setAttribute("aria-hidden","true"),Object.assign(de.style,Cc),Q&&w&&w.insertAdjacentElement("afterend",de);function me(){if(typeof B.current=="boolean"){let ne=w||cx();return ne&&ne.isConnected?ne:de}return B.current.current||de}return()=>{v.off("openchange",te);let ne=ur(J),K=Je(_,ne)||A&&gn(A.nodesRef.current,x(),!1).some(le=>{var se;return Je((se=le.context)==null?void 0:se.elements.floating,ne)}),oe=me();queueMicrotask(()=>{let le=u2(oe);B.current&&!R.current&&Ne(le)&&(!(le!==ne&&ne!==J.body)||K)&&le.focus({preventScroll:!0}),de.remove()})}},[n,_,$,B,y,v,A,Q,w,x]),O.useEffect(()=>(queueMicrotask(()=>{R.current=!1}),()=>{queueMicrotask(gm)}),[n]),ve(()=>{if(!n&&q)return q.setFocusManagerState({modal:u,closeOnFocusOut:f,open:h,onOpenChange:m,domReference:w}),()=>{q.setFocusManagerState(null)}},[n,q,u,h,m,f,w]),ve(()=>{n||$&&lx($,I)},[n,$,I]);function re(J){return n||!c||!u?null:(0,Ce.jsx)(c2,{ref:J==="start"?W:j,onClick:ue=>m(!1,ue.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let pe=!n&&k&&(u?!T:!0)&&(Q||u);return(0,Ce.jsxs)(Ce.Fragment,{children:[pe&&(0,Ce.jsx)(Mc,{"data-type":"inside",ref:ie,onFocus:J=>{if(u){let te=D();Si(i[0]==="reference"?te[0]:te[te.length-1])}else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(R.current=!1,Po(J,q.portalNode)){let te=Jh(w);te?.focus()}else{var ue;(ue=q.beforeOutsideRef.current)==null||ue.focus()}}}),!T&&re("start"),r,re("end"),pe&&(0,Ce.jsx)(Mc,{"data-type":"inside",ref:X,onFocus:J=>{if(u)Si(D()[0]);else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(f&&(R.current=!0),Po(J,q.portalNode)){let te=Qh(w);te?.focus()}else{var ue;(ue=q.afterOutsideRef.current)==null||ue.focus()}}})]})}function f2(){let e=mc(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,r=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=r.left?parseFloat(r.left):window.scrollX,s=r.top?parseFloat(r.top):window.scrollY;if(r.overflow="hidden",r.setProperty(fx,o+"px"),o&&(r[i]=o+"px"),t){var l,u;let c=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,f=((u=window.visualViewport)==null?void 0:u.offsetTop)||0;Object.assign(r,{position:"fixed",top:-(s-Math.floor(f))+"px",left:-(a-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(r,{overflow:"",[i]:""}),r.removeProperty(fx),t&&(Object.assign(r,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}function px(e){return Ne(e.target)&&e.target.tagName==="BUTTON"}function p2(e){return Ne(e.target)&&e.target.tagName==="A"}function hx(e){return bc(e)}function h2(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0,stickIfOpen:f=!0}=t,p=O.useRef(),d=O.useRef(!1),h=O.useMemo(()=>({onPointerDown(m){p.current=m.pointerType},onMouseDown(m){let v=p.current;m.button===0&&s!=="click"&&(_i(v,!0)&&u||(r&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?n(!1,m.nativeEvent,"click"):(m.preventDefault(),n(!0,m.nativeEvent,"click"))))},onClick(m){let v=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}_i(v,!0)&&u||(r&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?n(!1,m.nativeEvent,"click"):n(!0,m.nativeEvent,"click"))},onKeyDown(m){p.current=void 0,!(m.defaultPrevented||!c||px(m))&&(m.key===" "&&!hx(o)&&(m.preventDefault(),d.current=!0),!p2(m)&&m.key==="Enter"&&n(!(r&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!c||px(m)||hx(o)||m.key===" "&&d.current&&(d.current=!1,n(!(r&&l),m.nativeEvent,"click"))}}),[i,o,s,u,c,n,r,f,l]);return O.useMemo(()=>a?{reference:h}:{},[a,h])}function m2(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},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",u=["mouseenter","mousemove"].includes(((o=t.dataRef.current.openEvent)==null?void 0:o.type)||"")&&t.pointerType!=="touch",c=a.width,f=a.height,p=a.x,d=a.y;return r==null&&t.x&&s&&(r=a.x-t.x),n==null&&t.y&&l&&(n=a.y-t.y),p-=r||0,d-=n||0,c=0,f=0,!i||u?(c=t.axis==="y"?a.width:0,f=t.axis==="x"?a.height:0,p=s&&t.x!=null?t.x:p,d=l&&t.y!=null?t.y:d):i&&!u&&(f=t.axis==="x"?a.height:f,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:f,x:p,y:d,top:d,right:p+c,bottom:d+f,left:p}}}}function mx(e){return e!=null&&e.clientX!=null}function v2(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:s=!0,axis:l="both",x:u=null,y:c=null}=t,f=O.useRef(!1),p=O.useRef(null),[d,h]=O.useState(),[m,v]=O.useState([]),y=Ie((E,T)=>{f.current||n.current.openEvent&&!mx(n.current.openEvent)||a.setPositionReference(m2(o,{x:E,y:T,axis:l,dataRef:n,pointerType:d}))}),w=Ie(E=>{u!=null||c!=null||(r?p.current||v([]):y(E.clientX,E.clientY))}),_=_i(d)?i:r,x=O.useCallback(()=>{if(!_||!s||u!=null||c!=null)return;let E=ct(i);function T(P){let k=cr(P);Je(i,k)?(E.removeEventListener("mousemove",T),p.current=null):y(P.clientX,P.clientY)}if(!n.current.openEvent||mx(n.current.openEvent)){E.addEventListener("mousemove",T);let P=()=>{E.removeEventListener("mousemove",T),p.current=null};return p.current=P,P}a.setPositionReference(o)},[_,s,u,c,i,n,a,o,y]);O.useEffect(()=>x(),[x,m]),O.useEffect(()=>{s&&!i&&(f.current=!1)},[s,i]),O.useEffect(()=>{!s&&r&&(f.current=!0)},[s,r]),ve(()=>{s&&(u!=null||c!=null)&&(f.current=!1,y(u,c))},[s,u,c,y]);let S=O.useMemo(()=>{function E(T){let{pointerType:P}=T;h(P)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return O.useMemo(()=>s?{reference:S}:{},[s,S])}function y2(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:c=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:d,capture:h}=t,m=Ri(),v=Ie(typeof l=="function"?l:()=>!1),y=typeof l=="function"?v:l,w=O.useRef(!1),{escapeKey:_,outsidePress:x}=vx(d),{escapeKey:S,outsidePress:E}=vx(h),T=O.useRef(!1),P=Ie(A=>{var q;if(!r||!a||!s||A.key!=="Escape"||T.current)return;let W=(q=o.current.floatingContext)==null?void 0:q.nodeId,j=m?gn(m.nodesRef.current,W):[];if(!_&&(A.stopPropagation(),j.length>0)){let R=!0;if(j.forEach(F=>{var H;if((H=F.context)!=null&&H.open&&!F.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}n(!1,nw(A)?A.nativeEvent:A,"escape-key")}),k=Ie(A=>{var q;let W=()=>{var j;P(A),(j=cr(A))==null||j.removeEventListener("keydown",W)};(q=cr(A))==null||q.addEventListener("keydown",W)}),M=Ie(A=>{var q;let W=o.current.insideReactTree;o.current.insideReactTree=!1;let j=w.current;if(w.current=!1,u==="click"&&j||W||typeof y=="function"&&!y(A))return;let R=cr(A),F="["+Ei("inert")+"]",H=nt(i.floating).querySelectorAll(F),_e=Me(R)?R:null;for(;_e&&!ar(_e);){let D=ir(_e);if(ar(D)||!Me(D))break;_e=D}if(H.length&&Me(R)&&!ew(R)&&!Je(R,i.floating)&&Array.from(H).every(D=>!Je(_e,D)))return;if(Ne(R)&&B){let D=ar(R),ee=xt(R),ae=/auto|scroll/,ie=D||ae.test(ee.overflowX),X=D||ae.test(ee.overflowY),re=ie&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,pe=X&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,J=ee.direction==="rtl",ue=pe&&(J?A.offsetX<=R.offsetWidth-R.clientWidth:A.offsetX>R.clientWidth),te=re&&A.offsetY>R.clientHeight;if(ue||te)return}let Q=(q=o.current.floatingContext)==null?void 0:q.nodeId,$=m&&gn(m.nodesRef.current,Q).some(D=>{var ee;return gc(A,(ee=D.context)==null?void 0:ee.elements.floating)});if(gc(A,i.floating)||gc(A,i.domReference)||$)return;let Se=m?gn(m.nodesRef.current,Q):[];if(Se.length>0){let D=!0;if(Se.forEach(ee=>{var ae;if((ae=ee.context)!=null&&ae.open&&!ee.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}n(!1,A,"outside-press")}),I=Ie(A=>{var q;let W=()=>{var j;M(A),(j=cr(A))==null||j.removeEventListener(u,W)};(q=cr(A))==null||q.addEventListener(u,W)});O.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=_,o.current.__outsidePressBubbles=x;let A=-1;function q(H){n(!1,H,"ancestor-scroll")}function W(){window.clearTimeout(A),T.current=!0}function j(){A=window.setTimeout(()=>{T.current=!1},So()?5:0)}let R=nt(i.floating);s&&(R.addEventListener("keydown",S?k:P,S),R.addEventListener("compositionstart",W),R.addEventListener("compositionend",j)),y&&R.addEventListener(u,E?I:M,E);let F=[];return p&&(Me(i.domReference)&&(F=Pt(i.domReference)),Me(i.floating)&&(F=F.concat(Pt(i.floating))),!Me(i.reference)&&i.reference&&i.reference.contextElement&&(F=F.concat(Pt(i.reference.contextElement)))),F=F.filter(H=>{var _e;return H!==((_e=R.defaultView)==null?void 0:_e.visualViewport)}),F.forEach(H=>{H.addEventListener("scroll",q,{passive:!0})}),()=>{s&&(R.removeEventListener("keydown",S?k:P,S),R.removeEventListener("compositionstart",W),R.removeEventListener("compositionend",j)),y&&R.removeEventListener(u,E?I:M,E),F.forEach(H=>{H.removeEventListener("scroll",q)}),window.clearTimeout(A)}},[o,i,s,y,u,r,n,p,a,_,x,P,S,k,M,E,I]),O.useEffect(()=>{o.current.insideReactTree=!1},[o,y,u]);let U=O.useMemo(()=>({onKeyDown:P,...c&&{[g2[f]]:A=>{n(!1,A.nativeEvent,"reference-press")},...f!=="click"&&{onClick(A){n(!1,A.nativeEvent,"reference-press")}}}}),[P,n,c,f]),B=O.useMemo(()=>({onKeyDown:P,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[b2[u]]:()=>{o.current.insideReactTree=!0}}),[P,u,o]);return O.useMemo(()=>a?{reference:U,floating:B}:{},[a,U,B])}function Bx(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=Io(),o=O.useRef({}),[a]=O.useState(()=>Mx()),s=Ai()!=null,[l,u]=O.useState(n.reference),c=Ie((d,h,m)=>{o.current.openEvent=d?h:void 0,a.emit("openchange",{open:d,event:h,reason:m,nested:s}),r?.(d,h,m)}),f=O.useMemo(()=>({setPositionReference:u}),[]),p=O.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return O.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:p,events:a,floatingId:i,refs:f}),[t,c,p,a,i,f])}function _2(e){e===void 0&&(e={});let{nodeId:t}=e,r=Bx({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=O.useState(null),[s,l]=O.useState(null),c=i?.domReference||o,f=O.useRef(null),p=Ri();ve(()=>{c&&(f.current=c)},[c]);let d=Hw({...e,elements:{...i,...s&&{reference:s}}}),h=O.useCallback(_=>{let x=Me(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;l(x),d.refs.setReference(x)},[d.refs]),m=O.useCallback(_=>{(Me(_)||_===null)&&(f.current=_,a(_)),(Me(d.refs.reference.current)||d.refs.reference.current===null||_!==null&&!Me(_))&&d.refs.setReference(_)},[d.refs]),v=O.useMemo(()=>({...d.refs,setReference:m,setPositionReference:h,domReference:f}),[d.refs,m,h]),y=O.useMemo(()=>({...d.elements,domReference:c}),[d.elements,c]),w=O.useMemo(()=>({...d,...n,refs:v,elements:y,nodeId:t}),[d,v,y,t,n]);return ve(()=>{n.dataRef.current.floatingContext=w;let _=p?.nodesRef.current.find(x=>x.id===t);_&&(_.context=w)}),O.useMemo(()=>({...d,context:w,refs:v,elements:y}),[d,v,y,w])}function pm(){return J0()&&Hh()}function w2(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,u=O.useRef(!1),c=O.useRef(-1),f=O.useRef(!0);O.useEffect(()=>{if(!s)return;let d=ct(a.domReference);function h(){!r&&Ne(a.domReference)&&a.domReference===ur(nt(a.domReference))&&(u.current=!0)}function m(){f.current=!0}function v(){f.current=!1}return d.addEventListener("blur",h),pm()&&(d.addEventListener("keydown",m,!0),d.addEventListener("pointerdown",v,!0)),()=>{d.removeEventListener("blur",h),pm()&&(d.removeEventListener("keydown",m,!0),d.removeEventListener("pointerdown",v,!0))}},[a.domReference,r,s]),O.useEffect(()=>{if(!s)return;function d(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(u.current=!0)}return i.on("openchange",d),()=>{i.off("openchange",d)}},[i,s]),O.useEffect(()=>()=>{it(c)},[]);let p=O.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(d){if(u.current)return;let h=cr(d.nativeEvent);if(l&&Me(h)){if(pm()&&!d.relatedTarget){if(!f.current&&!bc(h))return}else if(!tw(h))return}n(!0,d.nativeEvent,"focus")},onBlur(d){u.current=!1;let h=d.relatedTarget,m=d.nativeEvent,v=Me(h)&&h.hasAttribute(Ei("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var y;let w=ur(a.domReference?a.domReference.ownerDocument:document);!h&&w===a.domReference||Je((y=o.current.floatingContext)==null?void 0:y.refs.floating.current,w)||Je(a.domReference,w)||v||n(!1,m,"focus")})}}),[o,a.domReference,n,l]);return O.useMemo(()=>s?{reference:p}:{},[s,p])}function hm(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[Qw]:a,[ex]:s,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[Nq]:""},...o,...t.map(a=>{let s=a?a[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[u,c]=l;if(!(i&&[Qw,ex].includes(u)))if(u.indexOf("on")===0){if(n.has(u)||n.set(u,[]),typeof c=="function"){var f;(f=n.get(u))==null||f.push(c),a[u]=function(){for(var p,d=arguments.length,h=new Array(d),m=0;m<d;m++)h[m]=arguments[m];return(p=n.get(u))==null?void 0:p.map(v=>v(...h)).find(v=>v!==void 0)}}}else a[u]=c}),a),{})}}function x2(e){e===void 0&&(e=[]);let t=e.map(s=>s?.reference),r=e.map(s=>s?.floating),n=e.map(s=>s?.item),i=O.useCallback(s=>hm(s,e,"reference"),t),o=O.useCallback(s=>hm(s,e,"floating"),r),a=O.useCallback(s=>hm(s,e,"item"),n);return O.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function kc(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Pc(e,t){return kc(t,e===vs||e===wn,e===xn||e===Sn)}function mm(e,t,r){return kc(t,e===wn,r?e===xn:e===Sn)||e==="Enter"||e===" "||e===""}function gx(e,t,r){return kc(t,r?e===xn:e===Sn,e===wn)}function bx(e,t,r,n){let i=r?e===Sn:e===xn,o=e===vs;return t==="both"||t==="horizontal"&&n&&n>1?e===S2:kc(t,i,o)}function O2(e,t){let{open:r,onOpenChange:n,elements:i,floatingId:o}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:c=null,allowEscape:f=!1,loop:p=!1,nested:d=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:w=!0,disabledIndices:_=void 0,orientation:x="vertical",parentOrientation:S,cols:E=1,scrollItemIntoView:T=!0,virtualItemRef:P,itemSizes:k,dense:M=!1}=t,I=ds(i.floating),U=Qe(I),B=Ai(),A=Ri();ve(()=>{e.dataRef.current.orientation=x},[e,x]);let q=Ie(()=>{l(R.current===-1?null:R.current)}),W=yc(i.domReference),j=O.useRef(v),R=O.useRef(c??-1),F=O.useRef(null),H=O.useRef(!0),_e=O.useRef(q),Q=O.useRef(!!i.floating),$=O.useRef(r),Se=O.useRef(!1),D=O.useRef(!1),ee=Qe(_),ae=Qe(r),ie=Qe(T),X=Qe(c),[re,pe]=O.useState(),[J,ue]=O.useState(),te=Ie(()=>{function z(he){if(m){var Re;(Re=he.id)!=null&&Re.endsWith("-fui-option")&&(he.id=o+"-"+Math.random().toString(16).slice(2,10)),pe(he.id),A?.events.emit("virtualfocus",he),P&&(P.current=he)}else Si(he,{sync:Se.current,preventScroll:!0})}let Y=a.current[R.current],V=D.current;Y&&z(Y),(Se.current?he=>he():requestAnimationFrame)(()=>{let he=a.current[R.current]||Y;if(!he)return;Y||z(he);let Re=ie.current;Re&&me&&(V||!H.current)&&(he.scrollIntoView==null||he.scrollIntoView(typeof Re=="boolean"?{block:"nearest",inline:"nearest"}:Re))})});ve(()=>{u&&(r&&i.floating?j.current&&c!=null&&(D.current=!0,R.current=c,q()):Q.current&&(R.current=-1,_e.current()))},[u,r,i.floating,c,q]),ve(()=>{if(u&&r&&i.floating)if(s==null){if(Se.current=!1,X.current!=null)return;if(Q.current&&(R.current=-1,te()),(!$.current||!Q.current)&&j.current&&(F.current!=null||j.current===!0&&F.current==null)){let z=0,Y=()=>{a.current[0]==null?(z<2&&(z?requestAnimationFrame:queueMicrotask)(Y),z++):(R.current=F.current==null||mm(F.current,x,h)||d?ps(a,ee.current):_c(a,ee.current),F.current=null,q())};Y()}}else yi(a,s)||(R.current=s,te(),D.current=!1)},[u,r,i.floating,s,X,d,a,x,h,q,te,ee]),ve(()=>{var z;if(!u||i.floating||!A||m||!Q.current)return;let Y=A.nodesRef.current,V=(z=Y.find(Re=>Re.id===B))==null||(z=z.context)==null?void 0:z.elements.floating,ce=ur(nt(i.floating)),he=Y.some(Re=>Re.context&&Je(Re.context.elements.floating,ce));V&&!he&&H.current&&V.focus({preventScroll:!0})},[u,i.floating,A,B,m]),ve(()=>{if(!u||!A||!m||B)return;function z(Y){ue(Y.id),P&&(P.current=Y)}return A.events.on("virtualfocus",z),()=>{A.events.off("virtualfocus",z)}},[u,A,m,B,P]),ve(()=>{_e.current=q,$.current=r,Q.current=!!i.floating}),ve(()=>{r||(F.current=null,j.current=v)},[r,v]);let de=s!=null,me=O.useMemo(()=>{function z(V){if(!ae.current)return;let ce=a.current.indexOf(V);ce!==-1&&R.current!==ce&&(R.current=ce,q())}return{onFocus(V){let{currentTarget:ce}=V;Se.current=!0,z(ce)},onClick:V=>{let{currentTarget:ce}=V;return ce.focus({preventScroll:!0})},onMouseMove(V){let{currentTarget:ce}=V;Se.current=!0,D.current=!1,y&&z(ce)},onPointerLeave(V){let{pointerType:ce}=V;if(!(!H.current||ce==="touch")&&(Se.current=!0,!!y&&(R.current=-1,q(),!m))){var he;(he=U.current)==null||he.focus({preventScroll:!0})}}}},[ae,U,y,a,q,m]),ne=O.useCallback(()=>{var z;return S??(A==null||(z=A.nodesRef.current.find(Y=>Y.id===B))==null||(z=z.context)==null||(z=z.dataRef)==null?void 0:z.current.orientation)},[B,A,S]),K=Ie(z=>{if(H.current=!1,Se.current=!0,z.which===229||!ae.current&&z.currentTarget===U.current)return;if(d&&bx(z.key,x,h,E)){Pc(z.key,ne())||rt(z),n(!1,z.nativeEvent,"list-navigation"),Ne(i.domReference)&&(m?A?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let Y=R.current,V=ps(a,_),ce=_c(a,_);if(W||(z.key==="Home"&&(rt(z),R.current=V,q()),z.key==="End"&&(rt(z),R.current=ce,q())),E>1){let he=k||Array.from({length:a.current.length},()=>({width:1,height:1})),Re=Xh(he,E,M),je=Re.findIndex(ye=>ye!=null&&!bn(a,ye,_)),Bt=Re.reduce((ye,mt,ni)=>mt!=null&&!bn(a,mt,_)?ni:ye,-1),Ot=Re[Yh({current:Re.map(ye=>ye!=null?a.current[ye]:null)},{event:z,orientation:x,loop:p,rtl:h,cols:E,disabledIndices:Zh([...(typeof _!="function"?_:null)||a.current.map((ye,mt)=>bn(a,mt,_)?mt:void 0),void 0],Re),minIndex:je,maxIndex:Bt,prevIndex:Kh(R.current>ce?V:R.current,he,Re,E,z.key===wn?"bl":z.key===(h?xn:Sn)?"tr":"tl"),stopEvent:!0})];if(Ot!=null&&(R.current=Ot,q()),x==="both")return}if(Pc(z.key,x)){if(rt(z),r&&!m&&ur(z.currentTarget.ownerDocument)===z.currentTarget){R.current=mm(z.key,x,h)?V:ce,q();return}mm(z.key,x,h)?p?R.current=Y>=ce?f&&Y!==a.current.length?-1:V:tt(a,{startingIndex:Y,disabledIndices:_}):R.current=Math.min(ce,tt(a,{startingIndex:Y,disabledIndices:_})):p?R.current=Y<=V?f&&Y!==-1?a.current.length:ce:tt(a,{startingIndex:Y,decrement:!0,disabledIndices:_}):R.current=Math.max(V,tt(a,{startingIndex:Y,decrement:!0,disabledIndices:_})),yi(a,R.current)&&(R.current=-1),q()}}),oe=O.useMemo(()=>m&&r&&de&&{"aria-activedescendant":J||re},[m,r,de,J,re]),le=O.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...W?{}:oe,onKeyDown:K,onPointerMove(){H.current=!0}}),[oe,K,x,W]),se=O.useMemo(()=>{function z(V){v==="auto"&&Gh(V.nativeEvent)&&(j.current=!0)}function Y(V){j.current=v,v==="auto"&&$h(V.nativeEvent)&&(j.current=!0)}return{...oe,onKeyDown(V){H.current=!1;let ce=V.key.startsWith("Arrow"),he=["Home","End"].includes(V.key),Re=ce||he,je=gx(V.key,x,h),Bt=bx(V.key,x,h,E),Ot=gx(V.key,ne(),h),ye=Pc(V.key,x),mt=(d?Ot:ye)||V.key==="Enter"||V.key.trim()==="";if(m&&r){let zt=A?.nodesRef.current.find(qe=>qe.parentId==null),Ae=A&&zt?rw(A.nodesRef.current,zt.id):null;if(Re&&Ae&&P){let qe=new KeyboardEvent("keydown",{key:V.key,bubbles:!0});if(je||Bt){var ni,ka;let vr=((ni=Ae.context)==null?void 0:ni.elements.domReference)===V.currentTarget,at=Bt&&!vr?(ka=Ae.context)==null?void 0:ka.elements.domReference:je?a.current.find(Ki=>Ki?.id===re):null;at&&(rt(V),at.dispatchEvent(qe),ue(void 0))}if((ye||he)&&Ae.context&&Ae.context.open&&Ae.parentId&&V.currentTarget!==Ae.context.elements.domReference){var Ia;rt(V),(Ia=Ae.context.elements.domReference)==null||Ia.dispatchEvent(qe);return}}return K(V)}if(!(!r&&!w&&ce)){if(mt){let zt=Pc(V.key,ne());F.current=d&&zt?null:V.key}if(d){Ot&&(rt(V),r?(R.current=ps(a,ee.current),q()):n(!0,V.nativeEvent,"list-navigation"));return}ye&&(c!=null&&(R.current=c),rt(V),!r&&w?n(!0,V.nativeEvent,"list-navigation"):K(V),r&&q())}},onFocus(){r&&!m&&(R.current=-1,q())},onPointerDown:Y,onPointerEnter:Y,onMouseDown:z,onClick:z}},[re,oe,E,K,ee,v,a,d,q,n,r,w,x,ne,h,c,A,m,P]);return O.useMemo(()=>u?{reference:se,floating:le,item:me}:{},[u,se,le,me])}function A2(e,t){var r,n;t===void 0&&(t={});let{open:i,elements:o,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,u=Io(),c=((r=o.domReference)==null?void 0:r.id)||u,f=O.useMemo(()=>{var w;return((w=ds(o.floating))==null?void 0:w.id)||a},[o.floating,a]),p=(n=E2.get(l))!=null?n:l,h=Ai()!=null,m=O.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":i?f: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,f,h,i,c,l]),v=O.useMemo(()=>{let w={id:f,...p&&{role:p}};return p==="tooltip"||l==="label"?w:{...w,...p==="menu"&&{"aria-labelledby":c}}},[p,f,c,l]),y=O.useCallback(w=>{let{active:_,selected:x}=w,S={role:"option",..._&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...S,"aria-selected":x}}return{}},[f,l]);return O.useMemo(()=>s?{reference:m,floating:v,item:y}:{},[s,m,v,y])}function Co(e,t){return typeof e=="function"?e(t):e}function R2(e,t){let[r,n]=O.useState(e);return e&&!r&&n(!0),O.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function zx(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,[s,l]=O.useState("unmounted"),u=R2(r,a);return!u&&s==="close"&&l("unmounted"),ve(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{Oi.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:u,status:s}}function T2(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,s=e.placement,l=s.split("-")[0],u=O.useMemo(()=>({side:l,placement:s}),[l,s]),c=typeof a=="number",f=(c?a:a.open)||0,p=(c?a:a.close)||0,[d,h]=O.useState(()=>({...Co(o,u),...Co(r,u)})),{isMounted:m,status:v}=zx(e,{duration:a}),y=Qe(r),w=Qe(n),_=Qe(i),x=Qe(o);return ve(()=>{let S=Co(y.current,u),E=Co(_.current,u),T=Co(x.current,u),P=Co(w.current,u)||Object.keys(S).reduce((k,M)=>(k[M]="",k),{});if(v==="initial"&&h(k=>({transitionProperty:k.transitionProperty,...T,...S})),v==="open"&&h({transitionProperty:Object.keys(P).map(yx).join(","),transitionDuration:f+"ms",...T,...P}),v==="close"){let k=E||S;h({transitionProperty:Object.keys(k).map(yx).join(","),transitionDuration:p+"ms",...T,...k})}},[p,_,y,w,x,f,v,u]),{isMounted:m,styles:d}}function P2(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:c=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,h=O.useRef(-1),m=O.useRef(""),v=O.useRef((r=d??a)!=null?r:-1),y=O.useRef(null),w=Ie(s),_=Ie(l),x=Qe(c),S=Qe(p);ve(()=>{n&&(it(h),y.current=null,m.current="")},[n]),ve(()=>{if(n&&m.current===""){var M;v.current=(M=d??a)!=null?M:-1}},[n,d,a]);let E=Ie(M=>{M?i.current.typing||(i.current.typing=M,_(M)):i.current.typing&&(i.current.typing=M,_(M))}),T=Ie(M=>{function I(W,j,R){let F=x.current?x.current(j,R):j.find(H=>H?.toLocaleLowerCase().indexOf(R.toLocaleLowerCase())===0);return F?W.indexOf(F):-1}let U=o.current;if(m.current.length>0&&m.current[0]!==" "&&(I(U,U,m.current)===-1?E(!1):M.key===" "&&rt(M)),U==null||S.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(rt(M),E(!0)),U.every(W=>{var j,R;return W?((j=W[0])==null?void 0:j.toLocaleLowerCase())!==((R=W[1])==null?void 0:R.toLocaleLowerCase()):!0})&&m.current===M.key&&(m.current="",v.current=y.current),m.current+=M.key,it(h),h.current=window.setTimeout(()=>{m.current="",v.current=y.current,E(!1)},f);let A=v.current,q=I(U,[...U.slice((A||0)+1),...U.slice(0,(A||0)+1)],m.current);q!==-1?(w(q),y.current=q):M.key!==" "&&(m.current="",E(!1))}),P=O.useMemo(()=>({onKeyDown:T}),[T]),k=O.useMemo(()=>({onKeyDown:T,onKeyUp(M){M.key===" "&&E(!1)}}),[T,E]);return O.useMemo(()=>u?{reference:P,floating:k}:{},[u,P,k])}function _x(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function C2(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:s}=t,l=Ie(s),u=O.useRef(!1),c=O.useRef(null),f=O.useRef(null);O.useEffect(()=>{if(!i)return;function d(m){if(m.ctrlKey||!h||o.current==null)return;let v=m.deltaY,y=o.current.top>=-.5,w=o.current.bottom>=-.5,_=h.scrollHeight-h.clientHeight,x=v<0?-1:1,S=v<0?"max":"min";h.scrollHeight<=h.clientHeight||(!y&&v>0||!w&&v<0?(m.preventDefault(),Oi.flushSync(()=>{l(E=>E+Math[S](v,_*x))})):/firefox/i.test(vc())&&(h.scrollTop+=v))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",d),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{c.current=null,f.current=null,h.removeEventListener("wheel",d)}},[i,r,n.floating,o,a,l]);let p=O.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){let d=a?.current||n.floating;if(!(!o.current||!d||!u.current)){if(c.current!==null){let h=d.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&Oi.flushSync(()=>l(m=>m+h))}requestAnimationFrame(()=>{c.current=d.scrollTop})}}}),[n.floating,l,o,a]);return O.useMemo(()=>i?{floating:p}:{},[i,p])}function Ux(e,t,r){return r===void 0&&(r=!0),e.filter(i=>{var o;return i.parentId===t&&(!r||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...Ux(e,i.id,r)])}function wx(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,s=o-1;a<o;s=a++){let[l,u]=t[a]||[0,0],[c,f]=t[s]||[0,0];u>=n!=f>=n&&r<=(c-l)*(n-u)/(f-u)+l&&(i=!i)}return i}function k2(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function I2(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:n=!0}=e,i={current:-1},o=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function u(f,p){let d=performance.now(),h=d-l;if(a===null||s===null||h===0)return a=f,s=p,l=d,null;let m=f-a,v=p-s,w=Math.sqrt(m*m+v*v)/h;return a=f,s=p,l=d,w}let c=f=>{let{x:p,y:d,placement:h,elements:m,onClose:v,nodeId:y,tree:w}=f;return function(x){function S(){it(i),v()}if(it(i),!m.domReference||!m.floating||h==null||p==null||d==null)return;let{clientX:E,clientY:T}=x,P=[E,T],k=e2(x),M=x.type==="mouseleave",I=fm(m.floating,k),U=fm(m.domReference,k),B=m.domReference.getBoundingClientRect(),A=m.floating.getBoundingClientRect(),q=h.split("-")[0],W=p>A.right-A.width/2,j=d>A.bottom-A.height/2,R=k2(P,B),F=A.width>B.width,H=A.height>B.height,_e=(F?B:A).left,Q=(F?B:A).right,$=(H?B:A).top,Se=(H?B:A).bottom;if(I&&(o=!0,!M))return;if(U&&(o=!1),U&&!M){o=!0;return}if(M&&Me(x.relatedTarget)&&fm(m.floating,x.relatedTarget)||w&&Ux(w.nodesRef.current,y).length)return;if(q==="top"&&d>=B.bottom-1||q==="bottom"&&d<=B.top+1||q==="left"&&p>=B.right-1||q==="right"&&p<=B.left+1)return S();let D=[];switch(q){case"top":D=[[_e,B.top+1],[_e,A.bottom-1],[Q,A.bottom-1],[Q,B.top+1]];break;case"bottom":D=[[_e,A.top+1],[_e,B.bottom-1],[Q,B.bottom-1],[Q,A.top+1]];break;case"left":D=[[A.right-1,Se],[A.right-1,$],[B.left+1,$],[B.left+1,Se]];break;case"right":D=[[B.right-1,Se],[B.right-1,$],[A.left+1,$],[A.left+1,Se]];break}function ee(ae){let[ie,X]=ae;switch(q){case"top":{let re=[F?ie+t/2:W?ie+t*4:ie-t*4,X+t+1],pe=[F?ie-t/2:W?ie+t*4:ie-t*4,X+t+1],J=[[A.left,W||F?A.bottom-t:A.top],[A.right,W?F?A.bottom-t:A.top:A.bottom-t]];return[re,pe,...J]}case"bottom":{let re=[F?ie+t/2:W?ie+t*4:ie-t*4,X-t],pe=[F?ie-t/2:W?ie+t*4:ie-t*4,X-t],J=[[A.left,W||F?A.top+t:A.bottom],[A.right,W?F?A.top+t:A.bottom:A.top+t]];return[re,pe,...J]}case"left":{let re=[ie+t+1,H?X+t/2:j?X+t*4:X-t*4],pe=[ie+t+1,H?X-t/2:j?X+t*4:X-t*4];return[...[[j||H?A.right-t:A.left,A.top],[j?H?A.right-t:A.left:A.right-t,A.bottom]],re,pe]}case"right":{let re=[ie-t,H?X+t/2:j?X+t*4:X-t*4],pe=[ie-t,H?X-t/2:j?X+t*4:X-t*4],J=[[j||H?A.left+t:A.right,A.top],[j?H?A.left+t:A.right:A.left+t,A.bottom]];return[re,pe,...J]}}}if(!wx([E,T],D)){if(o&&!R)return S();if(!M&&n){let ae=u(x.clientX,x.clientY);if(ae!==null&&ae<.1)return S()}wx([E,T],ee([p,d]))?!o&&n&&(i.current=window.setTimeout(S,40)):S()}}};return c.__options={blockPointerEvents:r},c}var O,Ce,Oi,Sx,Nq,Qw,ex,xn,Sn,vs,wn,Rx,Tx,Px,cm,Dq,Bq,zq,tx,Uq,rx,Hq,Io,Vq,Cx,kx,Ai,Ri,nx,vm,Ix,qx,jx,ix,ko,Ac,Rc,dm,r2,Lx,n2,Cc,Mc,Fx,sx,Dx,a2,_n,c2,Tc,fx,dx,d2,g2,b2,vx,S2,E2,yx,M2,Hx=gt(()=>{O=L(Fe());aw();Ce=L(tc());cs();Bh();Oi=L(wc());um();um();Oo();Sx=O.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});Nq="data-floating-ui-focusable",Qw="active",ex="selected",xn="ArrowLeft",Sn="ArrowRight",vs="ArrowUp",wn="ArrowDown";Rx=O.createContext({activeIndex:0,onNavigate:()=>{}}),Tx=[xn,Sn],Px=[vs,wn],cm=[...Tx,...Px],Dq=O.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:s=1,disabledIndices:l,activeIndex:u,onNavigate:c,itemSizes:f,dense:p=!1,...d}=t,[h,m]=O.useState(0),v=u??h,y=Ie(c??m),w=O.useRef([]),_=n&&typeof n!="function"?n.props:{},x=O.useMemo(()=>({activeIndex:v,onNavigate:y}),[v,y]),S=s>1;function E(P){if(!cm.includes(P.key))return;let k=v,M=ps(w,l),I=_c(w,l),U=a?xn:Sn,B=a?Sn:xn;if(S){let R=f||Array.from({length:w.current.length},()=>({width:1,height:1})),F=Xh(R,s,p),H=F.findIndex($=>$!=null&&!bn(w,$,l)),_e=F.reduce(($,Se,D)=>Se!=null&&!bn(w,Se,l)?D:$,-1),Q=F[Yh({current:F.map($=>$?w.current[$]:null)},{event:P,orientation:i,loop:o,rtl:a,cols:s,disabledIndices:Zh([...(typeof l!="function"?l:null)||w.current.map(($,Se)=>bn(w,Se,l)?Se:void 0),void 0],F),minIndex:H,maxIndex:_e,prevIndex:Kh(v>I?M:v,R,F,s,P.key===wn?"bl":P.key===U?"tr":"tl")})];Q!=null&&(k=Q)}let A={horizontal:[U],vertical:[wn],both:[U,wn]}[i],q={horizontal:[B],vertical:[vs],both:[B,vs]}[i],W=S?cm:{horizontal:Tx,vertical:Px,both:cm}[i];if(k===v&&[...A,...q].includes(P.key)&&(o&&k===I&&A.includes(P.key)?k=M:o&&k===M&&q.includes(P.key)?k=I:k=tt(w,{startingIndex:k,decrement:q.includes(P.key),disabledIndices:l})),k!==v&&!yi(w,k)){var j;P.stopPropagation(),W.includes(P.key)&&P.preventDefault(),y(k),(j=w.current[k])==null||j.focus()}}let T={...d,..._,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(P){d.onKeyDown==null||d.onKeyDown(P),_.onKeyDown==null||_.onKeyDown(P),E(P)}};return(0,Ce.jsx)(Rx.Provider,{value:x,children:(0,Ce.jsx)(Ox,{elementsRef:w,children:Ax(n,T)})})}),Bq=O.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:s}=O.useContext(Rx),{ref:l,index:u}=Ex(),c=xx([l,r,o.ref]),f=a===u,p={...i,...o,ref:c,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(d){i.onFocus==null||i.onFocus(d),o.onFocus==null||o.onFocus(d),s(u)}};return Ax(n,p)}),zq={...O},tx=!1,Uq=0,rx=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Uq++;Hq=zq.useId,Io=Hq||Wq,Vq=O.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:s=14,height:l=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:f,stroke:p,d,style:{transform:h,...m}={},...v}=t,y=Io(),[w,_]=O.useState(!1);if(ve(()=>{if(!i)return;xt(i).direction==="rtl"&&_(!0)},[i]),!i)return null;let[x,S]=n.split("-"),E=x==="top"||x==="bottom",T=f;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(T=null);let P=c*2,k=P/2,M=s/2*(u/-8+1),I=l/2*u/4,U=!!d,B=T&&S==="end"?"bottom":"top",A=T&&S==="end"?"right":"left";T&&w&&(A=S==="end"?"left":"right");let q=o?.x!=null?T||o.x:"",W=o?.y!=null?T||o.y:"",j=d||"M0,0"+(" H"+s)+(" L"+(s-M)+","+(l-I))+(" Q"+s/2+","+l+" "+M+","+(l-I))+" Z",R={top:U?"rotate(180deg)":"",left:U?"rotate(90deg)":"rotate(-90deg)",bottom:U?"":"rotate(180deg)",right:U?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Ce.jsxs)("svg",{...v,"aria-hidden":!0,ref:r,width:U?s:s+P,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[A]:q,[B]:W,[x]:E||U?"100%":"calc(100% - "+P/2+"px)",transform:[R,h].filter(F=>!!F).join(" "),...m},children:[P>0&&(0,Ce.jsx)("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:P+(d?0:1),d:j}),(0,Ce.jsx)("path",{stroke:P&&!d?v.fill:"none",d:j}),(0,Ce.jsx)("clipPath",{id:y,children:(0,Ce.jsx)("rect",{x:-k,y:k*(U?-1:1),width:s+P,height:s})})]})});Cx=O.createContext(null),kx=O.createContext(null),Ai=()=>{var e;return((e=O.useContext(Cx))==null?void 0:e.id)||null},Ri=()=>O.useContext(kx);nx=Ei("safe-polygon");vm=()=>{},Ix=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:vm,setState:vm,isInstantPhase:!1}),qx=()=>O.useContext(Ix);jx=O.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});ix=0;ko={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};Ac=new WeakSet,Rc={},dm=0,r2=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Lx=e=>e&&(e.host||Lx(e.parentNode)),n2=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=Lx(r);return e.contains(n)?n:null}).filter(r=>r!=null);Cc={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},Mc=O.forwardRef(function(t,r){let[n,i]=O.useState();ve(()=>{Hh()&&i("button")},[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[Ei("focus-guard")]:"",style:Cc};return(0,Ce.jsx)("span",{...t,...o})}),Fx=O.createContext(null),sx=Ei("portal");Dx=()=>O.useContext(Fx);a2=20,_n=[];c2=O.forwardRef(function(t,r){return(0,Ce.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:Cc})});Tc=0,fx="--floating-ui-scrollbar-width";dx=()=>{},d2=O.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return ve(()=>{if(n)return Tc++,Tc===1&&(dx=f2()),()=>{Tc--,Tc===0&&dx()}},[n]),(0,Ce.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});g2={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},b2={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},vx=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}};S2="Escape";E2=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);yx=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());M2=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Mt(e,t),{rects:f,elements:{floating:p}}=t,d=r.current[a],h=u?.current||p,m=p.clientTop||h.clientTop,v=p.clientTop!==0,y=h.clientTop!==0,w=p===h;if(!d)return{};let _={...t,...await Ec(-d.offsetTop-p.clientTop-f.reference.height/2-d.offsetHeight/2-o).fn(t)},x=await xi(_x(_,h.scrollHeight+m+p.clientTop),c),S=await xi(_,{...c,elementContext:"reference"}),E=Ve(0,x.top),T=_.y+E,M=(h.scrollHeight>h.clientHeight?I=>I:bi)(Ve(0,h.scrollHeight+(v&&w||y?m*2:0)-E-Ve(0,x.bottom)));if(h.style.maxHeight=M+"px",h.scrollTop=E,i){let I=h.offsetHeight<d.offsetHeight*St(s,r.current.length)-1||S.top>=-l||S.bottom>=-l;Oi.flushSync(()=>i(I))}return n&&(n.current=await xi(_x({..._,y:T},h.offsetHeight+m+p.clientTop),c)),{y:T}}})});var Gx=b(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.default=F2;var Vx=tc(),Ic=(Hx(),Eb(Wx)),bm=go(),q2=bo();function j2(e){return Math.round(e*1e5)/1e5}var L2=(0,q2.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,bm.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:`${j2(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function F2({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,bm.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:s}=L2(),{refs:l,floatingStyles:u,context:c}=(0,Ic.useFloating)({placement:r,strategy:"fixed",middleware:[(0,Ic.offset)(5)]}),f=(0,Ic.useClientPoint)(c,e),{getFloatingProps:p}=(0,Ic.useInteractions)([f]);return(0,Vx.jsx)(bm.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,Vx.jsx)("div",{className:s.tooltip,ref:l.setFloating,style:{...u,zIndex:1e5,visibility:u.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...p(),children:t})})}});var Qx,D2,Sm,e1=gt(()=>{"use strict";Qx=L(Fe()),D2=e=>{let{color:t="rgb(255,255,255,0.5)"}=e;return Qx.default.createElement("rect",{...e,fill:t})},Sm=D2});var Ti,t1,B2,r1,n1=gt(()=>{"use strict";Ti=L(Fe()),t1=L(Sr()),B2=(0,t1.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return Ti.default.createElement(Ti.default.Fragment,null,r?[...r.links()].map(i=>{let{source:o,target:a}=i,s=o.x,l=a.x,u=n?a.len:a.y,c=n?o.len:o.y;return Ti.default.createElement(Ti.default.Fragment,{key:[s,l,u,c].join("-")},Ti.default.createElement("line",{stroke:"black",x1:c,y1:s,x2:c,y2:l}),Ti.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:u,y2:l}))}):null)}),r1=B2});var On,i1,z2,o1,a1=gt(()=>{"use strict";On=L(Fe()),i1=L(Sr());e1();n1();z2=(0,i1.observer)(function({model:e}){let{labelWidth:t,canDisplayLabel:r,totalHeight:n,treeWidth:i,samples:o=[],rowHeight:a,svgFontSize:s}=e,l=Math.min(20,a);return On.default.createElement(On.default.Fragment,null,On.default.createElement(Sm,{y:0,x:0,width:t+5+i,height:n}),On.default.createElement(r1,{model:e}),On.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((u,c)=>On.default.createElement(Sm,{key:`${u.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:u.color})),r?o.map((u,c)=>On.default.createElement("text",{key:`${u.id}-${c}`,dominantBaseline:"middle",fontSize:s,x:2,y:c*a+a/2},u.label)):null))}),o1=z2});var Lc,s1,u1,U2,c1,l1=gt(()=>{"use strict";Lc=L(Fe()),s1=L(ut()),u1=L(Sr()),U2=(0,u1.observer)(function({children:e,model:t,exportSVG:r}){if(r)return Lc.default.createElement(Lc.default.Fragment,null,e);{let{totalHeight:n}=t,{width:i}=(0,s1.getContainingView)(t);return Lc.default.createElement("svg",{style:{position:"absolute",userSelect:"none",top:0,left:0,pointerEvents:"none",height:n,width:i}},e)}}),c1=U2});var Om,f1,W2,Fc,Em=gt(()=>{"use strict";Om=L(Fe()),f1=L(Sr());a1();l1();W2=(0,f1.observer)(function(e){let{model:t}=e;return Om.default.createElement(c1,{...e},Om.default.createElement(o1,{model:t}))}),Fc=W2});var C1=b((Xee,M1)=>{"use strict";M1.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 Dc=b((Kee,k1)=>{k1.exports=JBrowseExports.mobx});var L1={};Su(L1,{default:()=>sj});var Nt,I1,Kt,q1,j1,oj,aj,sj,F1=gt(()=>{"use strict";Nt=L(Fe()),I1=L(mn()),Kt=L(go()),q1=L(Sr()),j1=L(bo()),oj=(0,j1.makeStyles)()({root:{width:500}}),aj=(0,q1.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=oj(),[i,o]=(0,Nt.useState)(`${t.rowHeight}`),[a,s]=(0,Nt.useState)(`${t.rowProportion}`);return Nt.default.createElement(I1.Dialog,{open:!0,onClose:r,title:"Set row height"},Nt.default.createElement("form",{onSubmit:l=>{l.preventDefault(),t.setRowProportion(+a),t.setRowHeight(+i),r()}},Nt.default.createElement(Kt.DialogContent,{className:n.root},Nt.default.createElement(Kt.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Nt.default.createElement(Kt.TextField,{value:i,helperText:"Enter row height",autoFocus:!0,onChange:l=>{o(l.target.value)}}),Nt.default.createElement(Kt.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{s(l.target.value)}}),Nt.default.createElement(Kt.DialogActions,null,Nt.default.createElement(Kt.Button,{variant:"contained",color:"primary",type:"submit"},"Submit"),Nt.default.createElement(Kt.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel")))))}),sj=aj});var D1={};Su(D1,{renderSvg:()=>uj});async function uj(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,N1.getContainingView)(e),s=`mafclip-${i}`;return Er.default.createElement(Er.default.Fragment,null,Er.default.createElement("defs",null,Er.default.createElement("clipPath",{id:s},Er.default.createElement("rect",{x:0,y:0,width:a,height:n}))),Er.default.createElement("g",{clipPath:`url(#${s})`},Er.default.createElement("g",{id:"snpcov"},await r(t)),Er.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},Er.default.createElement(Fc,{model:e,orientation:"left",exportSVG:!0}))))}var Er,N1,B1=gt(()=>{"use strict";Er=L(Fe()),N1=L(ut());Em()});var wS=b(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL=void 0;Rr.longFromBytesToUnsigned=_j;Rr.TWO_PWR_16_DBL=65536;Rr.TWO_PWR_32_DBL=Rr.TWO_PWR_16_DBL*Rr.TWO_PWR_16_DBL;function _j(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 SS=b(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var Bm=wS(),$c=1;function xS(e,t,r){let n=t[$c],i=r?r[$c]:1/0;return n<=e&&i>e?0:n<e?-1:1}var zm=class{constructor({filehandle:t}){this.filehandle=t}_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,Bm.longFromBytesToUnsigned)(t);if(!r)return[[0,0]];let n=new Array(r+1);n[0]=[0,0];let i=16*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 s=(0,Bm.longFromBytesToUnsigned)(o,a*16),l=(0,Bm.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[s,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,s=i.length-1,l=Math.floor(i.length/2),u=xS(r,i[l],i[l+1]);for(;u!==0;)u>0?s=l-1:u<0&&(a=l+1),l=Math.ceil((s-a)/2)+a,u=xS(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][$c]>=n));c+=1);return o[o.length-1][$c]<n&&o.push([]),o}};Um.default=zm});var Wm=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.sum=OS;Yc.concatUint8Array=wj;function OS(e){let t=0;for(let r of e)t+=r.length;return t}function wj(e){let t=new Uint8Array(OS(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var Hm=b(Do=>{"use strict";var xj=Do&&Do.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Do,"__esModule",{value:!0});Do.unzip=Oj;Do.unzipChunkSlice=Ej;var Sj=xj(rh()),ES=Wm(),{Z_SYNC_FLUSH:AS,Inflate:RS}=Sj.default;async function Oj(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new RS,{strm:t}=n,n.push(o,AS),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,ES.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function Ej(e,t){try{let r,{minv:n,maxv:i}=t,o=n.blockPosition,a=n.dataPosition,s=[],l=[],u=[],c=0;do{let f=e.subarray(o-n.blockPosition),p=new RS;if({strm:r}=p,p.push(f,AS),p.err)throw new Error(p.msg);let d=p.result;s.push(d);let h=d.length;l.push(o),u.push(a),s.length===1&&n.dataPosition&&(s[0]=s[0].subarray(n.dataPosition),h=s[0].length);let m=o;if(o+=r.next_in,a+=h,m>=i.blockPosition){s[c]=s[c].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),l.push(o),u.push(a);break}c++}while(r.avail_in);return{buffer:(0,ES.concatUint8Array)(s),cpositions:l,dpositions:u}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var TS=b(Os=>{"use strict";var Aj=Os&&Os.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Os,"__esModule",{value:!0});var Rj=Aj(SS()),Tj=Hm(),Pj=Wm(),Vm=class{constructor({filehandle:t,gziFilehandle:r}){this.filehandle=t,this.gzi=new Rj.default({filehandle:r})}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,Tj.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]),[,s]=n[o],l=s>=r?0:r-s,u=Math.min(r+t,s+a.length)-s;l>=0&&l<a.length&&i.push(a.subarray(l,u))}return(0,Pj.concatUint8Array)(i)}};Os.default=Vm});var MS=b(Tr=>{"use strict";var Mj=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.unzipChunkSlice=Tr.unzip=Tr.BgzfFilehandle=void 0;var Cj=TS();Object.defineProperty(Tr,"BgzfFilehandle",{enumerable:!0,get:function(){return Mj(Cj).default}});var PS=Hm();Object.defineProperty(Tr,"unzip",{enumerable:!0,get:function(){return PS.unzip}});Object.defineProperty(Tr,"unzipChunkSlice",{enumerable:!0,get:function(){return PS.unzipChunkSlice}})});var CS=b($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.default=kj;var Gm=Fe();function kj(){let e=(0,Gm.useRef)(null),[t,r]=(0,Gm.useState)({width:void 0,height:void 0});return(0,Gm.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 IS=b((xre,kS)=>{kS.exports=JBrowseExports["react-dom/client"]});var Jm=b(Ii=>{Object.defineProperty(Ii,"__esModule",{value:!0});var Ij={grad:.9,turn:360,rad:360/(2*Math.PI)},Zr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ot=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Jt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},zS=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},qS=function(e){return{r:Jt(e.r,0,255),g:Jt(e.g,0,255),b:Jt(e.b,0,255),a:Jt(e.a)}},Ym=function(e){return{r:ot(e.r),g:ot(e.g),b:ot(e.b),a:ot(e.a,3)}},qj=/^#([0-9a-f]{3,8})$/i,Xc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},US=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),s=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(s<0?s+6:s),s:o?a/o*100:0,v:o/255*100,a:i}},WS=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),s=n*(1-(t-o)*r),l=n*(1-(1-t+o)*r),u=o%6;return{r:255*[n,s,a,a,l,n][u],g:255*[l,n,n,s,a,a][u],b:255*[a,a,l,n,n,s][u],a:i}},jS=function(e){return{h:zS(e.h),s:Jt(e.s,0,100),l:Jt(e.l,0,100),a:Jt(e.a)}},LS=function(e){return{h:ot(e.h),s:ot(e.s),l:ot(e.l),a:ot(e.a,3)}},FS=function(e){return WS((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},Es=function(e){return{h:(t=US(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},jj=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Lj=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fj=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nj=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zm={string:[[function(e){var t=qj.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?ot(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?ot(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Fj.exec(e)||Nj.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:qS({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=jj.exec(e)||Lj.exec(e);if(!t)return null;var r,n,i=jS({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Ij[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return FS(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 Zr(t)&&Zr(r)&&Zr(n)?qS({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(!Zr(t)||!Zr(r)||!Zr(n))return null;var a=jS({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return FS(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Zr(t)||!Zr(r)||!Zr(n))return null;var a=function(s){return{h:zS(s.h),s:Jt(s.s,0,100),v:Jt(s.v,0,100),a:Jt(s.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return WS(a)},"hsv"]]},NS=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]},HS=function(e){return typeof e=="string"?NS(e.trim(),Zm.string):typeof e=="object"&&e!==null?NS(e,Zm.object):[null,void 0]},Xm=function(e,t){var r=Es(e);return{h:r.h,s:Jt(r.s+100*t,0,100),l:r.l,a:r.a}},Km=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},DS=function(e,t){var r=Es(e);return{h:r.h,s:r.s,l:Jt(r.l+100*t,0,100),a:r.a}},As=function(){function e(t){this.parsed=HS(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 ot(Km(this.rgba),2)},e.prototype.isDark=function(){return Km(this.rgba)<.5},e.prototype.isLight=function(){return Km(this.rgba)>=.5},e.prototype.toHex=function(){return t=Ym(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?Xc(ot(255*o)):"","#"+Xc(r)+Xc(n)+Xc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Ym(this.rgba)},e.prototype.toRgbString=function(){return t=Ym(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 LS(Es(this.rgba))},e.prototype.toHslString=function(){return t=LS(Es(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=US(this.rgba),{h:ot(t.h),s:ot(t.s),v:ot(t.v),a:ot(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(Xm(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Pr(Xm(this.rgba,-t))},e.prototype.grayscale=function(){return Pr(Xm(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Pr(DS(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Pr(DS(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}):ot(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Es(this.rgba);return typeof t=="number"?Pr({h:t,s:r.s,l:r.l,a:r.a}):ot(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Pr(t).toHex()},e}(),Pr=function(e){return e instanceof As?e:new As(e)},BS=[];Ii.Colord=As,Ii.colord=Pr,Ii.extend=function(e){e.forEach(function(t){BS.indexOf(t)<0&&(t(As,Zm),BS.push(t))})},Ii.getFormat=function(e){return HS(e)[1]},Ii.random=function(){return new As({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var $S=b((Ore,GS)=>{var Mr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Qm=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},ev=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},tv=96.422,rv=100,nv=82.521,Dj=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:ev(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:ev(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:ev(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Mr(r.r,0,255),g:Mr(r.g,0,255),b:Mr(r.b,0,255),a:Mr(r.a)}},Bj=function(e){var t=Qm(e.r),r=Qm(e.g),n=Qm(e.b);return function(i){return{x:Mr(i.x,0,tv),y:Mr(i.y,0,rv),z:Mr(i.z,0,nv),a:Mr(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}))},Rs=216/24389,Bo=24389/27,VS=function(e){var t=Bj(e),r=t.x/tv,n=t.y/rv,i=t.z/nv;return r=r>Rs?Math.cbrt(r):(Bo*r+16)/116,{l:116*(n=n>Rs?Math.cbrt(n):(Bo*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>Rs?Math.cbrt(i):(Bo*i+16)/116)),alpha:t.a}},zj=function(e,t,r){var n,i=VS(e),o=VS(t);return function(a){var s=(a.l+16)/116,l=a.a/500+s,u=s-a.b/200;return Dj({x:(Math.pow(l,3)>Rs?Math.pow(l,3):(116*l-16)/Bo)*tv,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/Bo)*rv,z:(Math.pow(u,3)>Rs?Math.pow(u,3):(116*u-16)/Bo)*nv,a:a.alpha})}({l:Mr((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:Mr(n.alpha)})};GS.exports=function(e){function t(r,n,i){i===void 0&&(i=5);for(var o=[],a=1/(i-1),s=0;s<=i-1;s++)o.push(r.mix(n,a*s));return o}e.prototype.mix=function(r,n){n===void 0&&(n=.5);var i=r instanceof e?r:new e(r),o=zj(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 XS=b((Ere,YS)=>{YS.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 s,l,u=n[this.toHex()];if(u)return u;if(a?.closest){var c=this.toRgb(),f=1/0,p="black";if(!o.length)for(var d in r)o[d]=new e(r[d]).toRgb();for(var h in r){var m=(s=c,l=o[h],Math.pow(s.r-l.r,2)+Math.pow(s.g-l.g,2)+Math.pow(s.b-l.b,2));m<f&&(f=m,p=h)}return p}},t.string.push([function(a){var s=a.toLowerCase(),l=s==="transparent"?"#0000":r[s];return l?new e(l).toRgb():null},"name"])}});var JS=b(An=>{"use strict";var KS=An&&An.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(An,"__esModule",{value:!0});An.colord=An.Colord=void 0;var Uj=Jm(),Wj=KS($S()),Hj=KS(XS());(0,Uj.extend)([Wj.default,Hj.default]);var ZS=Jm();Object.defineProperty(An,"Colord",{enumerable:!0,get:function(){return ZS.Colord}});Object.defineProperty(An,"colord",{enumerable:!0,get:function(){return ZS.colord}})});var iv=b(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.createStopToken=Gj;Ts.stopStopToken=$j;Ts.checkStopToken=Yj;function Vj(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Gj(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function $j(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function Yj(e){if(typeof jest>"u"&&e!==void 0&&Vj()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var eO=b(QS=>{"use strict";Object.defineProperty(QS,"__esModule",{value:!0})});var sO=b((Pre,aO)=>{"use strict";var iO=(e,t)=>e>t?1:e<t?-1:0,ov=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),tO="eexxaacctt",Xj=/\p{P}/gu,Kj=["en",{numeric:!0,sensitivity:"base"}],zo=(e,t,r)=>e.replace("A-Z",t).replace("a-z",r),rO={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=iO)=>{let{idx:i,chars:o,terms:a,interLft2:s,interLft1:l,start:u,intraIns:c,interIns:f,cases:p}=e;return i.map((d,h)=>h).sort((d,h)=>o[h]-o[d]||c[d]-c[h]||a[h]+s[h]+.5*l[h]-(a[d]+s[d]+.5*l[d])||f[d]-f[h]||u[d]-u[h]||p[h]-p[d]||n(t[i[d]],t[i[h]]))}},av=(e,t)=>t==0?"":t==1?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`,nO="(?:\\b|_)";function Kc(e){e=Object.assign({},rO,e);let{unicode:t,interLft:r,interRgt:n,intraMode:i,intraSlice:o,intraIns:a,intraSub:s,intraTrn:l,intraDel:u,intraContr:c,intraSplit:f,interSplit:p,intraBound:d,interBound:h,intraChars:m,toUpper:v,toLower:y,compare:w}=e;a??=i,s??=i,l??=i,u??=i,w??=typeof Intl>"u"?iO:new Intl.Collator(...Kj).compare;let _=e.letters??e.alpha;if(_!=null){let D=v(_),ee=y(_);p=zo(p,D,ee),f=zo(f,D,ee),h=zo(h,D,ee),d=zo(d,D,ee),m=zo(m,D,ee),c=zo(c,D,ee)}let x=t?"u":"",S='".+?"',E=new RegExp(S,"gi"+x),T=new RegExp(`(?:\\s+|^)-(?:${m}+|${S})`,"gi"+x),{intraRules:P}=e;P==null&&(P=D=>{let ee=rO.intraSlice,ae=0,ie=0,X=0,re=0;if(/[^\d]/.test(D)){let pe=D.length;pe<=4?pe>=3&&(X=Math.min(l,1),pe==4&&(ae=Math.min(a,1))):(ee=o,ae=a,ie=s,X=l,re=u)}return{intraSlice:ee,intraIns:ae,intraSub:ie,intraTrn:X,intraDel:re}});let k=!!f,M=new RegExp(f,"g"+x),I=new RegExp(p,"g"+x),U=new RegExp("^"+p+"|"+p+"$","g"+x),B=new RegExp(c,"gi"+x),A=(D,ee=!1)=>{let ae=[];D=D.replace(E,X=>(ae.push(X),tO)),D=D.replace(U,""),ee||(D=y(D)),k&&(D=D.replace(M,X=>X[0]+" "+X[1]));let ie=0;return D.split(I).filter(X=>X!="").map(X=>X===tO?ae[ie++]:X)},q=/[^\d]+|\d+/g,W=(D,ee=0,ae=!1)=>{let ie=A(D);if(ie.length==0)return[];let X=Array(ie.length).fill("");ie=ie.map((te,de)=>te.replace(B,me=>(X[de]=me,"")));let re;if(i==1)re=ie.map((te,de)=>{if(te[0]==='"')return ov(te.slice(1,-1));let me="";for(let ne of te.matchAll(q)){let K=ne[0],{intraSlice:oe,intraIns:le,intraSub:se,intraTrn:z,intraDel:Y}=P(K);if(le+se+z+Y==0)me+=K+X[de];else{let[V,ce]=oe,he=K.slice(0,V),Re=K.slice(ce),je=K.slice(V,ce);le==1&&he.length==1&&he!=je[0]&&(he+="(?!"+he+")");let Bt=je.length,Ot=[K];if(se)for(let ye=0;ye<Bt;ye++)Ot.push(he+je.slice(0,ye)+m+je.slice(ye+1)+Re);if(z)for(let ye=0;ye<Bt-1;ye++)je[ye]!=je[ye+1]&&Ot.push(he+je.slice(0,ye)+je[ye+1]+je[ye]+je.slice(ye+2)+Re);if(Y)for(let ye=0;ye<Bt;ye++)Ot.push(he+je.slice(0,ye+1)+"?"+je.slice(ye+1)+Re);if(le){let ye=av(m,1);for(let mt=0;mt<Bt;mt++)Ot.push(he+je.slice(0,mt)+ye+je.slice(mt)+Re)}me+="(?:"+Ot.join("|")+")"+X[de]}}return me});else{let te=av(m,a);ee==2&&a>0&&(te=")("+te+")("),re=ie.map((de,me)=>de[0]==='"'?ov(de.slice(1,-1)):de.split("").map((ne,K,oe)=>(a==1&&K==0&&oe.length>1&&ne!=oe[K+1]&&(ne+="(?!"+ne+")"),ne)).join(te)+X[me])}let pe=r==2?nO:"",J=n==2?nO:"",ue=J+av(e.interChars,e.interIns)+pe;return ee>0?ae?re=pe+"("+re.join(")"+J+"|"+pe+"(")+")"+J:(re="("+re.join(")("+ue+")(")+")",re="(.??"+pe+")"+re+"("+J+".*)"):(re=re.join(ue),re=pe+re+J),[new RegExp(re,"i"+x),ie,X]},j=(D,ee,ae)=>{let[ie]=W(ee);if(ie==null)return null;let X=[];if(ae!=null)for(let re=0;re<ae.length;re++){let pe=ae[re];ie.test(D[pe])&&X.push(pe)}else for(let re=0;re<D.length;re++)ie.test(D[re])&&X.push(re);return X},R=!!d,F=new RegExp(h,x),H=new RegExp(d,x),_e=(D,ee,ae)=>{let[ie,X,re]=W(ae,1),pe=A(ae,!0),[J]=W(ae,2),ue=X.length,te=Array(ue),de=Array(ue);for(let se=0;se<ue;se++){let z=X[se],Y=pe[se],V=z[0]=='"'?z.slice(1,-1):z+re[se],ce=Y[0]=='"'?Y.slice(1,-1):Y+re[se];te[se]=V,de[se]=ce}let me=D.length,ne=Array(me).fill(0),K={idx:Array(me),start:ne.slice(),chars:ne.slice(),cases:ne.slice(),terms:ne.slice(),interIns:ne.slice(),intraIns:ne.slice(),interLft2:ne.slice(),interRgt2:ne.slice(),interLft1:ne.slice(),interRgt1:ne.slice(),ranges:Array(me)},oe=r==1||n==1,le=0;for(let se=0;se<D.length;se++){let z=ee[D[se]],Y=z.match(ie),V=Y.index+Y[1].length,ce=V,he=!1,Re=0,je=0,Bt=0,Ot=0,ye=0,mt=0,ni=0,ka=0,Ia=0,zt=[];for(let Ae=0,qe=2;Ae<ue;Ae++,qe+=2){let vr=y(Y[qe]),at=te[Ae],Ki=de[Ae],Et=at.length,At=vr.length,vt=vr==at;if(Y[qe]==Ki&&ni++,!vt&&Y[qe+1].length>=Et){let Ge=y(Y[qe+1]).indexOf(at);Ge>-1&&(zt.push(ce,At,Ge,Et),ce+=Q(Y,qe,Ge,Et),vr=at,At=Et,vt=!0,Ae==0&&(V=ce))}if(oe||vt){let Ge=ce-1,Dr=ce+At,ii=!1,qa=!1;if(Ge==-1||F.test(z[Ge]))vt&&Re++,ii=!0;else{if(r==2){he=!0;break}if(R&&H.test(z[Ge]+z[Ge+1]))vt&&je++,ii=!0;else if(r==1){let wu=Y[qe+1],Zi=ce+At;if(wu.length>=Et){let oi=0,Ji=!1,XM=new RegExp(at,"ig"+x),xb;for(;xb=XM.exec(wu);){oi=xb.index;let Sb=Zi+oi,wp=Sb-1;if(wp==-1||F.test(z[wp])){Re++,Ji=!0;break}else if(H.test(z[wp]+z[Sb])){je++,Ji=!0;break}}Ji&&(ii=!0,zt.push(ce,At,oi,Et),ce+=Q(Y,qe,oi,Et),vr=at,At=Et,vt=!0,Ae==0&&(V=ce))}if(!ii){he=!0;break}}}if(Dr==z.length||F.test(z[Dr]))vt&&Bt++,qa=!0;else{if(n==2){he=!0;break}if(R&&H.test(z[Dr-1]+z[Dr]))vt&&Ot++,qa=!0;else if(n==1){he=!0;break}}vt&&(ye+=Et,ii&&qa&&mt++)}if(At>Et&&(Ia+=At-Et),Ae>0&&(ka+=Y[qe-1].length),!e.intraFilt(at,vr,ce)){he=!0;break}Ae<ue-1&&(ce+=At+Y[qe+1].length)}if(!he){K.idx[le]=D[se],K.interLft2[le]=Re,K.interLft1[le]=je,K.interRgt2[le]=Bt,K.interRgt1[le]=Ot,K.chars[le]=ye,K.terms[le]=mt,K.cases[le]=ni,K.interIns[le]=ka,K.intraIns[le]=Ia,K.start[le]=V;let Ae=z.match(J),qe=Ae.index+Ae[1].length,vr=zt.length,at=vr>0?0:1/0,Ki=vr-4;for(let Ge=2;Ge<Ae.length;){let Dr=Ae[Ge].length;if(at<=Ki&&zt[at]==qe){let ii=zt[at+1],qa=zt[at+2],wu=zt[at+3],Zi=Ge,oi="";for(let Ji=0;Ji<ii;Zi++)oi+=Ae[Zi],Ji+=Ae[Zi].length;Ae.splice(Ge,Zi-Ge,oi),qe+=Q(Ae,Ge,qa,wu),at+=4}else qe+=Dr,Ge++}qe=Ae.index+Ae[1].length;let Et=K.ranges[le]=[],At=qe,vt=qe;for(let Ge=2;Ge<Ae.length;Ge++){let Dr=Ae[Ge].length;qe+=Dr,Ge%2==0?vt=qe:Dr>0&&(Et.push(At,vt),At=vt=qe)}vt>At&&Et.push(At,vt),le++}}if(le<D.length)for(let se in K)K[se]=K[se].slice(0,le);return K},Q=(D,ee,ae,ie)=>{let X=D[ee]+D[ee+1].slice(0,ae);return D[ee-1]+=X,D[ee]=D[ee+1].slice(ae,ae+ie),D[ee+1]=D[ee+1].slice(ae+ie),X.length},$=5,Se=(D,ee,ae,ie=1e3,X)=>{ae=ae?ae===!0?$:ae:0;let re=null,pe=null,J=[];ee=ee.replace(T,K=>{let oe=K.trim().slice(1);return oe=oe[0]==='"'?ov(oe.slice(1,-1)):oe.replace(Xj,""),oe!=""&&J.push(oe),""});let ue=A(ee),te;if(J.length>0){if(te=new RegExp(J.join("|"),"i"+x),ue.length==0){let K=[];for(let oe=0;oe<D.length;oe++)te.test(D[oe])||K.push(oe);return[K,null,null]}}else if(ue.length==0)return[null,null,null];if(ae>0){let K=A(ee);if(K.length>1){let oe=K.slice().sort((se,z)=>z.length-se.length);for(let se=0;se<oe.length;se++){if(X?.length==0)return[[],null,null];X=j(D,oe[se],X)}if(K.length>ae)return[X,null,null];re=oO(K).map(se=>se.join(" ")),pe=[];let le=new Set;for(let se=0;se<re.length;se++)if(le.size<X.length){let z=X.filter(V=>!le.has(V)),Y=j(D,re[se],z);for(let V=0;V<Y.length;V++)le.add(Y[V]);pe.push(Y)}else pe.push([])}}re==null&&(re=[ee],pe=[X?.length>0?X:j(D,ee)]);let de=null,me=null;if(J.length>0&&(pe=pe.map(K=>K.filter(oe=>!te.test(D[oe])))),pe.reduce((K,oe)=>K+oe.length,0)<=ie){de={},me=[];for(let K=0;K<pe.length;K++){let oe=pe[K];if(oe==null||oe.length==0)continue;let le=re[K],se=_e(oe,D,le),z=e.sort(se,D,le,w);if(K>0)for(let Y=0;Y<z.length;Y++)z[Y]+=me.length;for(let Y in se)de[Y]=(de[Y]??[]).concat(se[Y]);me=me.concat(z)}}return[[].concat(...pe),de,me]};return{search:(...D)=>Se(...D),split:A,filter:j,info:_e,sort:e.sort}}var Zj=(()=>{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 s=0;s<o.length;s++)a[s]=o[s].replace(n,i);return a}})();function oO(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 Jj=(e,t)=>t?`<mark>${e}</mark>`:e,Qj=(e,t)=>e+t;function eL(e,t,r=Jj,n="",i=Qj){n=i(n,r(e.substring(0,t[0]),!1))??n;for(let o=0;o<t.length;o+=2){let a=t[o],s=t[o+1];n=i(n,r(e.substring(a,s),!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}Kc.latinize=Zj;Kc.permute=e=>oO([...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]));Kc.highlight=eL;aO.exports=Kc});var Rn=b((Mre,Ps)=>{function tL(e){return e&&e.__esModule?e:{default:e}}Ps.exports=tL,Ps.exports.__esModule=!0,Ps.exports.default=Ps.exports});var uv=b((Cre,Jr)=>{function sv(e){"@babel/helpers - typeof";return Jr.exports=sv=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},Jr.exports.__esModule=!0,Jr.exports.default=Jr.exports,sv(e)}Jr.exports=sv,Jr.exports.__esModule=!0,Jr.exports.default=Jr.exports});var cO=b((kre,Ms)=>{var uO=uv().default;function rL(e,t){if(uO(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(uO(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}Ms.exports=rL,Ms.exports.__esModule=!0,Ms.exports.default=Ms.exports});var cv=b((Ire,Cs)=>{var nL=uv().default,iL=cO();function oL(e){var t=iL(e,"string");return nL(t)=="symbol"?t:t+""}Cs.exports=oL,Cs.exports.__esModule=!0,Cs.exports.default=Cs.exports});var lO=b((qre,ks)=>{var aL=cv();function sL(e,t,r){return(t=aL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}ks.exports=sL,ks.exports.__esModule=!0,ks.exports.default=ks.exports});var qi=b((jre,Is)=>{function uL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Is.exports=uL,Is.exports.__esModule=!0,Is.exports.default=Is.exports});var ji=b((Lre,qs)=>{var cL=cv();function fO(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,cL(n.key),n)}}function lL(e,t,r){return t&&fO(e.prototype,t),r&&fO(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}qs.exports=lL,qs.exports.__esModule=!0,qs.exports.default=qs.exports});var lv=b((Fre,js)=>{function fL(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}js.exports=fL,js.exports.__esModule=!0,js.exports.default=js.exports});var dO=b((Nre,Ls)=>{var dL=lv();function pL(e){if(Array.isArray(e))return dL(e)}Ls.exports=pL,Ls.exports.__esModule=!0,Ls.exports.default=Ls.exports});var pO=b((Dre,Fs)=>{function hL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}Fs.exports=hL,Fs.exports.__esModule=!0,Fs.exports.default=Fs.exports});var mO=b((Bre,Ns)=>{var hO=lv();function mL(e,t){if(e){if(typeof e=="string")return hO(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)?hO(e,t):void 0}}Ns.exports=mL,Ns.exports.__esModule=!0,Ns.exports.default=Ns.exports});var vO=b((zre,Ds)=>{function vL(){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.`)}Ds.exports=vL,Ds.exports.__esModule=!0,Ds.exports.default=Ds.exports});var gO=b((Ure,Bs)=>{var gL=dO(),bL=pO(),yL=mO(),_L=vO();function wL(e){return gL(e)||bL(e)||yL(e)||_L()}Bs.exports=wL,Bs.exports.__esModule=!0,Bs.exports.default=Bs.exports});var bO=b(Cr=>{"use strict";var xL=Rn(),SL=xL(gO()),OL={functions:"Jexl Function",transforms:"Transform"};Cr.ArrayLiteral=function(e){return this.evalArray(e.value)};Cr.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])})};Cr.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)})};Cr.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)})};Cr.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]};Cr.Literal=function(e){return e.value};Cr.ObjectLiteral=function(e){return this.evalMap(e.value)};Cr.FunctionCall=function(e){var t=OL[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,SL.default)(i))})};Cr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var wO=b((Hre,_O)=>{"use strict";var yO=Rn(),EL=yO(qi()),AL=yO(ji()),RL=bO(),TL=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,EL.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,AL.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return RL[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(s){return n.eval(r[s])});return this.Promise.all(a).then(function(s){return s.forEach(function(l,u){o[i[u]]=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 s=new e(i._grammar,i._context,a,i.Promise);o.push(s.eval(n))}),this.Promise.all(o).then(function(a){var s=[];return a.forEach(function(l,u){l&&s.push(r[u])}),s})}},{key:"_filterStatic",value:function(r,n){return this.eval(n).then(function(i){return typeof i=="boolean"?i?r:void 0:r[i]})}}]),e}();_O.exports=TL});var EO=b((Vre,OO)=>{"use strict";var SO=Rn(),PL=SO(qi()),ML=SO(ji()),CL=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,xO=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,kL=/\\\\/,IL=/^\s*$/,qL=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],jL=["[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]+)"],LL=["binaryOp","unaryOp","openParen","openBracket","question","colon"],FL=function(){function e(t){(0,PL.default)(this,e),this._grammar=t}return(0,ML.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(CL))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(xO))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(xO)&&(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("("+[qL.join("|"),n.join("|"),jL.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?LL.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(IL)}},{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(kL,"\\")}}]),e}();OO.exports=FL});var fv=b(et=>{"use strict";et.argVal=function(e){e&&this._cursor.args.push(e)};et.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};et.arrayVal=function(e){e&&this._cursor.value.push(e)};et.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)};et.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)};et.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};et.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};et.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))};et.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};et.objKey=function(e){this._curObjKey=e.value};et.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};et.objVal=function(e){this._cursor.value[this._curObjKey]=e};et.subExpression=function(e){this._placeAtCursor(e)};et.ternaryEnd=function(e){this._cursor.alternate=e};et.ternaryMid=function(e){this._cursor.consequent=e};et.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};et.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};et.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var RO=b(AO=>{"use strict";var kt=fv();AO.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:kt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:kt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:kt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:kt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:kt.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:kt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:kt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:kt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:kt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:kt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:kt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:kt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:kt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:kt.ternaryEnd,completable:!0}}});var MO=b((Yre,PO)=>{"use strict";var TO=Rn(),NL=TO(qi()),DL=TO(ji()),BL=fv(),Zc=RO().states,zL=function(){function e(t,r,n){(0,NL.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,DL.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=Zc[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],s=BL[r.type];a.handler&&(s=a.handler),s&&s.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&&!Zc[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(){Zc[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=Zc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();PO.exports=zL});var IO=b((Xre,kO)=>{"use strict";var CO=Rn(),UL=CO(qi()),WL=CO(ji()),Tn=function(){function e(t){(0,UL.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,WL.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}();Tn.all=function(e){return new Tn(function(t){var r=e.map(function(n){for(;n instanceof Tn;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};Tn.resolve=function(e){return new Tn(function(t){return t(e)})};Tn.reject=function(e){return new Tn(function(t,r){return r(e)})};kO.exports=Tn});var LO=b((Kre,jO)=>{"use strict";var qO=Rn(),HL=qO(qi()),VL=qO(ji()),GL=wO(),$L=EO(),YL=MO(),XL=IO(),KL=function(){function e(t,r){(0,HL.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,VL.default)(e,[{key:"compile",value:function(){var r=new $L(this._grammar),n=new YL(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,XL);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 GL(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();jO.exports=KL});var NO=b(FO=>{"use strict";FO.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 BO=b((Jre,pv)=>{"use strict";var dv=Rn(),ZL=dv(lO()),JL=dv(qi()),QL=dv(ji()),eF=LO(),tF=NO(),rF=tF.getGrammar,DO=function(){function e(){(0,JL.default)(this,e),this.expr=this.expr.bind(this),this._grammar=rF()}return(0,QL.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,ZL.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 eF(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(s,l,u){var c=u<i.length?i[u]:"";return s+=l+c,s},"");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}();pv.exports=new DO;pv.exports.Jexl=DO});var zO=b(zs=>{"use strict";var nF=zs&&zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zs,"__esModule",{value:!0});zs.default=oF;var iF=nF(BO());function oF(){let e=new iF.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 mv=b(Us=>{"use strict";var aF=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.stringToJexlExpression=uF;var sF=aF(zO()),hv={};function uF(e,t){let r=`nosig|${e}`;if(!hv[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,sF.default)().compile(i);hv[r]=o}return hv[r]}});var UO=b(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.nanoid=It.customAlphabet=It.customRandom=It.random=It.urlAlphabet=void 0;It.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var cF=e=>crypto.getRandomValues(new Uint8Array(e));It.random=cF;var lF=(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 s=r(i),l=i;for(;l--;)if(a+=e[s[l]&n]||"",a.length===o)return a}}};It.customRandom=lF;var fF=(e,t=21)=>(0,It.customRandom)(e,t,It.random);It.customAlphabet=fF;var dF=(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),"");It.nanoid=dF});var vv=b(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.FileLocation=We.UriLocation=We.UriLocationRaw=We.BlobLocation=We.LocalPathLocation=We.Region=We.NoAssemblyRegion=We.ElementId=void 0;var Ee=_t(),pF=UO();We.ElementId=Ee.types.optional(Ee.types.identifier,()=>(0,pF.nanoid)());We.NoAssemblyRegion=Ee.types.model("NoAssemblyRegion",{refName:Ee.types.string,start:Ee.types.number,end:Ee.types.number,reversed:Ee.types.optional(Ee.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));We.Region=Ee.types.compose("Region",We.NoAssemblyRegion,Ee.types.model({assemblyName:Ee.types.string}));We.LocalPathLocation=Ee.types.model("LocalPathLocation",{locationType:Ee.types.literal("LocalPathLocation"),localPath:Ee.types.string});We.BlobLocation=Ee.types.model("BlobLocation",{locationType:Ee.types.literal("BlobLocation"),name:Ee.types.string,blobId:Ee.types.string});We.UriLocationRaw=Ee.types.model("UriLocation",{locationType:Ee.types.literal("UriLocation"),uri:Ee.types.string,baseUri:Ee.types.maybe(Ee.types.string),internetAccountId:Ee.types.maybe(Ee.types.string),internetAccountPreAuthorization:Ee.types.maybe(Ee.types.model("InternetAccountPreAuthorization",{internetAccountType:Ee.types.string,authInfo:Ee.types.frozen()}))});We.UriLocation=Ee.types.snapshotProcessor(We.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});We.FileLocation=Ee.types.snapshotProcessor(Ee.types.union(We.LocalPathLocation,We.UriLocation,We.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 GO=b(bv=>{"use strict";Object.defineProperty(bv,"__esModule",{value:!0});bv.default=wF;var Be=_t(),hF=Ws(),mF=mv(),vF=vv();function gF(){return!0}var bF={stringArray:Be.types.array(Be.types.string),stringArrayMap:Be.types.map(Be.types.array(Be.types.string)),numberMap:Be.types.map(Be.types.number),boolean:Be.types.boolean,color:Be.types.refinement("Color",Be.types.string,gF),integer:Be.types.integer,number:Be.types.number,string:Be.types.string,text:Be.types.string,fileLocation:vF.FileLocation,frozen:Be.types.frozen()},WO={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},gv=e=>({views:{get valueJSON(){return e.value}}}),HO=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),VO={fileLocation:HO,number:gv,integer:gv,boolean:gv,frozen:HO,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)}}})},yF=Be.types.refinement("JexlString",Be.types.string,e=>e.startsWith("jexl:"));function _F(e){return e?.toJSON?e.toJSON():`"${e}"`}function wF(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=bF[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`,s=Be.types.model(a,{name:Be.types.literal(e),description:Be.types.literal(t),type:Be.types.literal(n),value:Be.types.optional(Be.types.union(yF,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:f}=(0,hF.getEnv)(c);return!f&&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,mF.stringToJexlExpression)(String(c.value),f?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return _F(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(f){c.value=f},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let f=c.expr.evalSync();if(f!==void 0){c.value=f;return}}catch{}if(c.value=i,!(n in WO))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=WO[n]}}}));VO[n]&&(s=s.extend(VO[n]));let u=Be.types.optional(s,{name:e,type:n,description:t,value:i});return Object.defineProperty(u,"isJBrowseConfigurationSlot",{value:!0}),u}});var YO=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.getSubType=yv;Mn.getUnionSubTypes=$O;Mn.getPropertyType=xF;Mn.getDefaultValue=SF;Mn.getEnumerationValues=OF;Mn.resolveLateType=EF;var Pn=_t();function yv(e){let t;if((0,Pn.isOptionalType)(e))t=e._subtype||e.type;else if((0,Pn.isArrayType)(e)||(0,Pn.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 $O(e){if(!(0,Pn.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||yv(e)._types||yv(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function xF(e,t){return e.properties[t]}function SF(e){if(!(0,Pn.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function OF(e){return $O(e).map(r=>r.value)}function EF(e){return!(0,Pn.isUnionType)(e)&&!(0,Pn.isArrayType)(e)&&(0,Pn.isLateType)(e)?e.getSubType():e}});var _v=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.readConfObject=Jc;Qr.getConf=AF;Qr.getTypeNamesFromExplicitlyTypedUnion=XO;Qr.isBareConfigurationSchemaType=KO;Qr.isConfigurationSchemaType=Uo;Qr.isConfigurationModel=ZO;Qr.isConfigurationSlotType=RF;var Ye=_t(),Cn=YO();function Jc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ye.isStateTreeNode)(e)&&(0,Ye.isMapType)((0,Ye.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ye.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ye.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,Ye.isStateTreeNode)(e)&&(0,Ye.isMapType)((0,Ye.getType)(e))&&(o=e.get(n)),o?Jc(o,i,r):void 0}return Jc(e,n,r)}}else return structuredClone((0,Ye.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function AF(e,t,r){let{configuration:n}=e;if(ZO(n))return Jc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function XO(e){if((0,Ye.isType)(e)&&(e=(0,Cn.resolveLateType)(e),(0,Ye.isUnionType)(e))){let t=[];for(let r of(0,Cn.getUnionSubTypes)(e)){r=(0,Cn.resolveLateType)(r);let n=XO(r);if(n.length||(n=[(0,Cn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}return t}return[]}function KO(e){return!!((0,Ye.isType)(e)&&((0,Ye.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ye.isLateType)(e)))}function Uo(e){return(0,Ye.isType)(e)?KO(e)?!0:(0,Ye.isUnionType)(e)?(0,Cn.getUnionSubTypes)(e).every(t=>Uo(t)||t.name==="undefined"):(0,Ye.isOptionalType)(e)&&Uo((0,Cn.getSubType)(e))||(0,Ye.isArrayType)(e)&&Uo((0,Cn.getSubType)(e))?!0:!!((0,Ye.isMapType)(e)&&Uo((0,Cn.getSubType)(e))):!1}function ZO(e){return(0,Ye.isStateTreeNode)(e)&&Uo((0,Ye.getType)(e))}function RF(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var eE=b(Wo=>{"use strict";var TF=Wo&&Wo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.ConfigurationSchema=qF;Wo.ConfigurationReference=jF;var Qt=_t(),PF=TF(GO()),JO=_v(),QO=vv();function MF(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function CF(e){return Array.isArray(e)&&e.length===0}function kF(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 IF(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Qt.types.optional(Qt.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]=Qt.types.identifier,i=r.explicitIdentifier):(n.id=Qt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=QO.ElementId,i=r.implicitIdentifier):(n.id=QO.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};for(let[c,f]of Object.entries(t))if((0,Qt.isType)(f)&&(0,Qt.isLateType)(f)||(0,JO.isConfigurationSchemaType)(f))n[c]=f;else if(typeof f=="string"||typeof f=="number")o[c]=f;else if(typeof f=="object"){if(!f.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,PF.default)(c,f)}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=Qt.types.model(`${e}ConfigurationSchema`,n).actions(c=>({setSubschema(f,p){if(!(0,JO.isConfigurationSchemaType)(n[f]))throw new Error(`${f} is not a subschema, cannot replace`);let d=(0,Qt.isStateTreeNode)(p)?p:n[f].create(p);return c[f]=d,d}}));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 s=i?{[i]:"placeholderId"}:{},l=r.explicitlyTyped?{type:e,...s}:s,u=(0,Qt.getSnapshot)(a.create(l));return a=a.postProcessSnapshot(c=>{let f={},p=!0;for(let[d,h]of Object.entries(c))p&&(typeof u[d]=="object"&&typeof h=="object"?JSON.stringify(u[d])!==JSON.stringify(h)&&(p=!1):u[d]!==h&&(p=!1)),h!==void 0&&o[d]===void 0&&!MF(h)&&!CF(h)&&(f[d]=h);return p?{}:f}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Qt.types.optional(a,l)}function qF(e,t,r){let{schemaDefinition:n,options:i}=kF(e,t,r),o=IF(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function jF(e){return Qt.types.union(Qt.types.reference(e),e)}});var wv=b(lr=>{"use strict";var LF=lr&&lr.__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=lr&&lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&LF(t,e,r)};Object.defineProperty(lr,"__esModule",{value:!0});lr.ConfigurationSchema=lr.ConfigurationReference=void 0;var tE=eE();Object.defineProperty(lr,"ConfigurationReference",{enumerable:!0,get:function(){return tE.ConfigurationReference}});Object.defineProperty(lr,"ConfigurationSchema",{enumerable:!0,get:function(){return tE.ConfigurationSchema}});FF(_v(),lr)});var nE=b(Hs=>{"use strict";var rE=Hs&&Hs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hs,"__esModule",{value:!0});var NF=rE(sO()),xv=wv(),DF=rE(ah()),Sv=class{constructor(t){this.pluginManager=t,this.adapterCache=new DF.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,xv.readConfObject)(r,"textSearchAdapterId"),i=this.adapterCache.get(n);if(i)return i;{let a=await this.pluginManager.getTextSearchAdapterType(r.type).getAdapterClass(),s=new a(r,void 0,this.pluginManager);return this.adapterCache.set(n,s),s}}))}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,xv.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,xv.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 NF.default({}),o=t.map(u=>u.getDisplayString()),a=n.queryString,s=i.filter(o,a),l=[];if(s!=null&&s.length>0){let u=i.info(s,o,a),c=i.sort(u,o,a);for(let f of c)l.push(t[u.idx[f]])}return r(l)}};Hs.default=Sv});var Qc=b(be=>{"use strict";var BF=be&&be.__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]}),zF=be&&be.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&BF(t,e,r)},UF=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0});be.TextSearchManager=be.RetryError=be.AuthNeededError=void 0;be.isViewContainer=HF;be.isSessionModel=kn;be.isSessionModelWithConfigEditing=VF;be.isSessionWithAddTracks=GF;be.isSessionWithShareURL=$F;be.isSessionModelWithWidgets=YF;be.isSessionModelWithConnections=XF;be.isSessionModelWithConnectionEditing=KF;be.isSessionWithSessionPlugins=ZF;be.isSelectionContainer=JF;be.isViewModel=QF;be.isTrackModel=eN;be.isDisplayModel=tN;be.isTrackViewModel=rN;be.isAppRootModel=nN;be.isRootModelWithInternetAccounts=iN;be.isAbstractMenuManager=oN;be.isUriLocation=aN;be.isLocalPathLocation=sN;be.isBlobLocation=uN;be.isAuthNeededException=cN;be.isRetryException=lN;var WF=_t();zF(eO(),be);function HF(e){return(0,WF.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function kn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function VF(e){return kn(e)&&"editConfiguration"in e}function GF(e){return kn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function $F(e){return kn(e)&&"shareURL"in e&&!!e.shareURL}function YF(e){return kn(e)&&"widgets"in e}function XF(e){return kn(e)&&"makeConnection"in e}function KF(e){return kn(e)&&"addConnectionConf"in e}function ZF(e){return kn(e)&&"sessionPlugins"in e}function JF(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function QF(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function eN(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function tN(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function rN(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function nN(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function iN(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function oN(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function aN(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function sN(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function uN(e){return typeof e=="object"&&e!==null&&"blobId"in e&&!!e.blobId}var Ov=class e extends Error{constructor(t,r){super(t),this.message=t,this.url=r,this.name="AuthNeededError",Object.setPrototypeOf(this,e.prototype)}};be.AuthNeededError=Ov;var Ev=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};be.RetryError=Ev;function cN(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function lN(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var fN=nE();Object.defineProperty(be,"TextSearchManager",{enumerable:!0,get:function(){return UF(fN).default}})});var iE=b(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.when=void 0;var dN=Dc();Object.defineProperty(el,"when",{enumerable:!0,get:function(){return dN.when}})});var oE=b(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.intersection2=pN;Vs.doesIntersect2=hN;Vs.isContainedWithin=mN;function pN(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 hN(e,t,r,n){return t>r&&e<n}function mN(e,t,r,n){return r<=e&&n>=t}});var aE=b(Av=>{"use strict";Object.defineProperty(Av,"__esModule",{value:!0});Av.dedupe=vN;function vN(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 Mv=b((pne,lE)=>{"use strict";var tl={},il={},Gs={METHOD:"method",PROPERTY:"property"},rl=class{constructor(t,r){this.inst=t,this.args=r}},Rv=class extends rl{constructor(t,r){super(t,r),this.type=Gs.METHOD}execute(t){t[this.inst](...this.args)}},Tv=class extends rl{constructor(t,r){super(t,r),this.type=Gs.PROPERTY}execute(t){t[this.inst]=this.args[0]}},gN={[Gs.METHOD]:Rv,[Gs.PROPERTY]:Tv},nl=class{constructor(t,r,n){return new gN[t](r,n)}};Object.entries(Gs).forEach(([e,t])=>{Object.defineProperty(nl,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});il=nl;var uE=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"]}),kr=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),$s=class{constructor(t=null){this[kr.sequence]=[],t&&this[kr.fromJSON](t)}[kr.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[kr.push](r,n,i)})}[kr.push](t,r,n){this[kr.sequence].push(new il(t,r,n))}execute(t){t.save(),this[kr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[kr.sequence]}}};uE.METHODS.forEach(e=>{Object.defineProperty($s.prototype,e,{value:function(...r){this[kr.push](il.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});uE.PROPERTIES.forEach(e=>{Object.defineProperty($s.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[kr.push](il.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});tl=$s;var cE={},sE=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function bN(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Pv=class extends tl{build(t={}){let r=new tl;return this[sE.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(s=>typeof s=="string"?bN(s,t):s);r[sE.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};cE=Pv;lE.exports={CanvasSequence:tl,CanvasBlueprint:cE}});var dE=b((hne,fE)=>{fE.exports=!1});var Cv=b(ht=>{"use strict";var yN=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.ImageBitmapType=ht.createImageBitmap=ht.createCanvas=void 0;ht.drawImageOntoCanvasContext=wN;var hE=Mv(),_N=yN(dE());function wN(e,t){e.serializedCommands?new hE.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var pE={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:_N.default};pE.realOffscreenCanvas?(ht.createCanvas=(e,t)=>new OffscreenCanvas(e,t),ht.createImageBitmap=window.createImageBitmap||self.createImageBitmap,ht.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):pE.node?(ht.createCanvas=(...e)=>nodeCreateCanvas(...e),ht.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})}):(ht.createCanvas=(e,t)=>{let r=new hE.CanvasSequence;return{width:e,height:t,getContext(){return r}}},ht.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},ht.ImageBitmapType=String)});var Iv=b(kv=>{"use strict";Object.defineProperty(kv,"__esModule",{value:!0});kv.blobToDataURL=xN;function xN(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 mE=b((gne,ol)=>{(function(){"use strict";var e,t,r,n,i;function o(f,p){var d=Object.keys(p),h;for(h=0;h<d.length;h++)f=f.replace(new RegExp("\\{"+d[h]+"\\}","gi"),p[d[h]]);return f}function a(f){var p,d,h;if(!f)throw new Error("cannot create a random attribute name for an undefined object");p="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",d="";do for(d="",h=0;h<12;h++)d+=p[Math.floor(Math.random()*p.length)];while(f[d]);return d}function s(f,p){var d,h,m={},v,y;for(f=f.split(","),p=p||10,d=0;d<f.length;d+=2)h="&"+f[d+1]+";",v=parseInt(f[d],p),m[h]="&#"+v+";";return m["\\xa0"]=" ",m}function l(f){var p={left:"start",right:"end",center:"middle",start:"start",end:"end"};return p[f]||p.start}function u(f){var p={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return p[f]||p.alphabetic}i=s("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(f,p){this.__root=f,this.__ctx=p},r.prototype.addColorStop=function(f,p){var d=this.__ctx.__createElement("stop"),h,m;d.setAttribute("offset",f),p.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,m=h.exec(p),d.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:m[1],g:m[2],b:m[3]})),d.setAttribute("stop-opacity",m[4])):d.setAttribute("stop-color",p),this.__root.appendChild(d)},n=function(f,p){this.__root=f,this.__ctx=p},t=function(f){var p={width:500,height:500,enableMirroring:!1},d;if(arguments.length>1?(d=p,d.width=arguments[0],d.height=arguments[1]):f?d=f:d=p,!(this instanceof t))return new t(d);this.width=d.width||p.width,this.height=d.height||p.height,this.enableMirroring=d.enableMirroring!==void 0?d.enableMirroring:p.enableMirroring,this.canvas=this,this.__document=d.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(f,p,d){typeof p>"u"&&(p={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",f),m=Object.keys(p),v,y;for(d&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),v=0;v<m.length;v++)y=m[v],h.setAttribute(y,p[y]);return h},t.prototype.__setDefaultStyles=function(){var f=Object.keys(e),p,d;for(p=0;p<f.length;p++)d=f[p],this[d]=e[d].canvas},t.prototype.__applyStyleState=function(f){var p=Object.keys(f),d,h;for(d=0;d<p.length;d++)h=p[d],this[h]=f[h]},t.prototype.__getStyleState=function(){var f,p={},d=Object.keys(e),h;for(f=0;f<d.length;f++)h=d[f],p[h]=this[h];return p},t.prototype.__applyStyleToCurrentElement=function(f){var p=Object.keys(e),d,h,m,v,y,w;for(d=0;d<p.length;d++)if(h=e[p[d]],m=this[p[d]],h.apply)if(h.apply.indexOf("fill")!==-1&&m instanceof n){if(m.__ctx)for(;m.__ctx.__defs.childNodes.length;)v=m.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[v]=v,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(f)!==-1&&h.svg!==m&&((h.svgAttr==="stroke"||h.svgAttr==="fill")&&m.indexOf("rgba")!==-1?(y=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=y.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(f){return f=f||this.__currentElement,f.nodeName==="g"||f.nodeName==="svg"?f:this.__closestGroupOrSvg(f.parentNode)},t.prototype.getSerializedSvg=function(f){var p=new XMLSerializer().serializeToString(this.__root),d,h,m,v,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')),f)for(d=Object.keys(i),h=0;h<d.length;h++)m=d[h],v=i[m],y=new RegExp(m,"gi"),y.test(p)&&(p=p.replace(y,v));return p},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var f=this.__createElement("g"),p=this.__closestGroupOrSvg();this.__groupStack.push(p),p.appendChild(f),this.__currentElement=f,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var f=this.__stack.pop();this.__applyStyleState(f)},t.prototype.__addTransform=function(f){var p=this.__closestGroupOrSvg();if(p.childNodes.length>0){var d=this.__createElement("g");p.appendChild(d),this.__currentElement=d}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=f,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(f,p){p===void 0&&(p=f),this.__addTransform(o("scale({x},{y})",{x:f,y:p}))},t.prototype.rotate=function(f){var p=f*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:p,cx:0,cy:0}))},t.prototype.translate=function(f,p){this.__addTransform(o("translate({x},{y})",{x:f,y:p}))},t.prototype.transform=function(f,p,d,h,m,v){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:f,b:p,c:d,d:h,e:m,f:v}))},t.prototype.beginPath=function(){var f,p;this.__currentDefaultPath="",this.__currentPosition={},f=this.__createElement("path",{},!0),p=this.__closestGroupOrSvg(),p.appendChild(f),this.__currentElement=f},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var f=this.__currentDefaultPath;this.__currentElement.setAttribute("d",f)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(f){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=f},t.prototype.moveTo=function(f,p){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:f,y:p},this.__addPathCommand(o("M {x} {y}",{x:f,y:p}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(f,p){this.__currentPosition={x:f,y:p},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:f,y:p})):this.__addPathCommand(o("M {x} {y}",{x:f,y:p}))},t.prototype.bezierCurveTo=function(f,p,d,h,m,v){this.__currentPosition={x:m,y:v},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:f,cp1y:p,cp2x:d,cp2y:h,x:m,y:v}))},t.prototype.quadraticCurveTo=function(f,p,d,h){this.__currentPosition={x:d,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:f,cpy:p,x:d,y:h}))};var c=function(f){var p=Math.sqrt(f[0]*f[0]+f[1]*f[1]);return[f[0]/p,f[1]/p]};t.prototype.arcTo=function(f,p,d,h,m){var v=this.__currentPosition&&this.__currentPosition.x,y=this.__currentPosition&&this.__currentPosition.y;if(!(typeof v>"u"||typeof y>"u")){if(m<0)throw new Error("IndexSizeError: The radius provided ("+m+") is negative.");if(v===f&&y===p||f===d&&p===h||m===0){this.lineTo(f,p);return}var w=c([v-f,y-p]),_=c([d-f,h-p]);if(w[0]*_[1]===w[1]*_[0]){this.lineTo(f,p);return}var x=w[0]*_[0]+w[1]*_[1],S=Math.acos(Math.abs(x)),E=c([w[0]+_[0],w[1]+_[1]]),T=m/Math.sin(S/2),P=f+T*E[0],k=p+T*E[1],M=[-w[1],w[0]],I=[_[1],-_[0]],U=function(q){var W=q[0],j=q[1];return j>=0?Math.acos(W):-Math.acos(W)},B=U(M),A=U(I);this.lineTo(P+M[0]*m,k+M[1]*m),this.arc(P,k,m,B,A)}},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(f,p,d,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(f,p),this.lineTo(f+d,p),this.lineTo(f+d,p+h),this.lineTo(f,p+h),this.lineTo(f,p),this.closePath()},t.prototype.fillRect=function(f,p,d,h){var m,v;m=this.__createElement("rect",{x:f,y:p,width:d,height:h},!0),v=this.__closestGroupOrSvg(),v.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(f,p,d,h){var m,v;m=this.__createElement("rect",{x:f,y:p,width:d,height:h},!0),v=this.__closestGroupOrSvg(),v.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(f,p,d,h){var m,v=this.__closestGroupOrSvg();m=this.__createElement("rect",{x:f,y:p,width:d,height:h,fill:"#FFFFFF"},!0),v.appendChild(m)},t.prototype.createLinearGradient=function(f,p,d,h){var m=this.__createElement("linearGradient",{id:a(this.__ids),x1:f+"px",x2:d+"px",y1:p+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(m),new r(m,this)},t.prototype.createRadialGradient=function(f,p,d,h,m,v){var y=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:m+"px",r:v+"px",fx:f+"px",fy:p+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(y),new r(y,this)},t.prototype.__parseFont=function(){var f=/^\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=f.exec(this.font),d={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"&&(d.decoration="underline"),this.__fontHref&&(d.href=this.__fontHref),d},t.prototype.__wrapTextLink=function(f,p){if(f.href){var d=this.__createElement("a");return d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.href),d.appendChild(p),d}return p},t.prototype.__applyText=function(f,p,d,h){var m=this.__parseFont(),v=this.__closestGroupOrSvg(),y=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:d,"text-anchor":l(this.textAlign),"dominant-baseline":u(this.textBaseline)},!0);y.appendChild(this.__document.createTextNode(f)),this.__currentElement=y,this.__applyStyleToCurrentElement(h),v.appendChild(this.__wrapTextLink(m,y))},t.prototype.fillText=function(f,p,d){this.__applyText(f,p,d,"fill")},t.prototype.strokeText=function(f,p,d){this.__applyText(f,p,d,"stroke")},t.prototype.measureText=function(f){return this.__ctx.font=this.font,this.__ctx.measureText(f)},t.prototype.arc=function(f,p,d,h,m,v){if(h!==m){h=h%(2*Math.PI),m=m%(2*Math.PI),h===m&&(m=(m+2*Math.PI-.001*(v?-1:1))%(2*Math.PI));var y=f+d*Math.cos(m),w=p+d*Math.sin(m),_=f+d*Math.cos(h),x=p+d*Math.sin(h),S=v?0:1,E=0,T=m-h;T<0&&(T+=2*Math.PI),v?E=T>Math.PI?0:1:E=T>Math.PI?1:0,this.lineTo(_,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:d,ry:d,xAxisRotation:0,largeArcFlag:E,sweepFlag:S,endX:y,endY:w})),this.__currentPosition={x:y,y:w}}},t.prototype.clip=function(){var f=this.__closestGroupOrSvg(),p=this.__createElement("clipPath"),d=a(this.__ids),h=this.__createElement("g");f.removeChild(this.__currentElement),p.setAttribute("id",d),p.appendChild(this.__currentElement),this.__defs.appendChild(p),f.setAttribute("clip-path",o("url(#{id})",{id:d})),f.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var f=Array.prototype.slice.call(arguments),p=f[0],d,h,m,v,y=0,w=0,_,x,S,E,T,P,k,M,I,U,B;if(f.length===3)d=f[1],h=f[2],_=p.width,x=p.height,m=_,v=x;else if(f.length===5)d=f[1],h=f[2],m=f[3],v=f[4],_=p.width,x=p.height;else if(f.length===9)y=f[1],w=f[2],_=f[3],x=f[4],d=f[5],h=f[6],m=f[7],v=f[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(S=this.__closestGroupOrSvg(),k=this.__currentElement,p instanceof t){for(E=p.getSvg(),T=E.childNodes[0];T.childNodes.length;)B=T.childNodes[0].getAttribute("id"),this.__ids[B]=B,this.__defs.appendChild(T.childNodes[0]);P=E.childNodes[1],S.appendChild(P),this.__currentElement=P,this.translate(d,h),this.__currentElement=k}else(p.nodeName==="CANVAS"||p.nodeName==="IMG")&&(M=this.__createElement("image"),M.setAttribute("width",m),M.setAttribute("height",v),M.setAttribute("preserveAspectRatio","none"),(y||w||_!==p.width||x!==p.height)&&(I=this.__document.createElement("canvas"),I.width=m,I.height=v,U=I.getContext("2d"),U.drawImage(p,y,w,_,x,0,0,m,v),p=I),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p.nodeName==="CANVAS"?p.toDataURL():p.getAttribute("src")),S.appendChild(M),this.__currentElement=M,this.translate(d,h),this.__currentElement=k)},t.prototype.createPattern=function(f,p){var d=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),m;return d.setAttribute("id",h),d.setAttribute("width",f.width),d.setAttribute("height",f.height),f.nodeName==="CANVAS"||f.nodeName==="IMG"?(m=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),m.setAttribute("width",f.width),m.setAttribute("height",f.height),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),d.appendChild(m),this.__defs.appendChild(d)):f instanceof t&&(d.appendChild(f.__root.childNodes[1]),this.__defs.appendChild(d)),new n(d,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 ol=="object"&&typeof ol.exports=="object"&&(ol.exports=t)})()});var bE=b(fr=>{"use strict";var SN=fr&&fr.__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]}),ON=fr&&fr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),EN=fr&&fr.__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"&&SN(r,t,n[i]);return ON(r,t),r}}();Object.defineProperty(fr,"__esModule",{value:!0});fr.renderToAbstractCanvas=TN;fr.getSerializedSvg=PN;fr.ReactRendering=MN;var vE=tc(),AN=Fe(),gE=Mv(),RN=Iv(),qv=Cv();async function TN(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,s=(0,qv.createCanvas)(Math.ceil(e*a),t*a),l=s.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,vE.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in s?await(0,RN.blobToDataURL)(await s.convertToBlob({type:"image/png"})):s.toDataURL("image/png")})}}else{let a=new gE.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,s=(0,qv.createCanvas)(Math.ceil(e*a),t*a),l=s.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,qv.createImageBitmap)(s)}}}async function PN(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>EN(mE())),o=new i.default(t,r);return new gE.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function MN({rendering:e}){return(0,AN.isValidElement)(e.reactElement)?e.reactElement:(0,vE.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var _E=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.isFeature=CN;function CN(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function yE(e){return"uniqueId"in e&&typeof e.data!="object"}var jv=class e{constructor(t){var r;yE(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=yE(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})}};al.default=jv});var Pe=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.isFunction=void 0;function kN(e){return typeof e=="function"}sl.isFunction=kN});var In=b(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.createErrorClass=void 0;function IN(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}ul.createErrorClass=IN});var Lv=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.UnsubscriptionError=void 0;var qN=In();cl.UnsubscriptionError=qN.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
4
4
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
5
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}})});var Xr=g(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.arrRemove=void 0;function CF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}Hc.arrRemove=CF});var Dt=g(It=>{"use strict";var CO=It&&It.__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.")},kO=It&&It.__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},qO=It&&It.__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(It,"__esModule",{value:!0});It.isSubscription=It.EMPTY_SUBSCRIPTION=It.Subscription=void 0;var ju=Me(),pm=dm(),IO=Xr(),hm=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=CO(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(ju.isFunction(c))try{c()}catch(v){o=v instanceof pm.UnsubscriptionError?v.errors:[v]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var p=CO(f),d=p.next();!d.done;d=p.next()){var h=d.value;try{jO(h)}catch(v){o=o??[],v instanceof pm.UnsubscriptionError?o=qO(qO([],kO(o)),kO(v.errors)):o.push(v)}}}catch(v){n={error:v}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new pm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)jO(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)&&IO.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&IO.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();It.Subscription=hm;It.EMPTY_SUBSCRIPTION=hm.EMPTY;function kF(e){return e instanceof hm||e&&"closed"in e&&ju.isFunction(e.remove)&&ju.isFunction(e.add)&&ju.isFunction(e.unsubscribe)}It.isSubscription=kF;function jO(e){ju.isFunction(e)?e():e.unsubscribe()}});var jo=g(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.config=void 0;Gc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var vm=g(qr=>{"use strict";var LO=qr&&qr.__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=qr&&qr.__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(qr,"__esModule",{value:!0});qr.timeoutProvider=void 0;qr.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=qr.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,FO([e,t],LO(r))):setTimeout.apply(void 0,FO([e,t],LO(r)))},clearTimeout:function(e){var t=qr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var mm=g($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.reportUnhandledError=void 0;var qF=jo(),IF=vm();function jF(e){IF.timeoutProvider.setTimeout(function(){var t=qF.config.onUnhandledError;if(t)t(e);else throw e})}$c.reportUnhandledError=jF});var ct=g(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.noop=void 0;function LF(){}Kc.noop=LF});var NO=g(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.createNotification=Ir.nextNotification=Ir.errorNotification=Ir.COMPLETE_NOTIFICATION=void 0;Ir.COMPLETE_NOTIFICATION=function(){return Zc("C",void 0,void 0)}();function FF(e){return Zc("E",void 0,e)}Ir.errorNotification=FF;function NF(e){return Zc("N",e,void 0)}Ir.nextNotification=NF;function Zc(e,t,r){return{kind:e,value:t,error:r}}Ir.createNotification=Zc});var Yc=g(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.captureError=Lo.errorContext=void 0;var DO=jo(),Mi=null;function DF(e){if(DO.config.useDeprecatedSynchronousErrorHandling){var t=!Mi;if(t&&(Mi={errorThrown:!1,error:null}),e(),t){var r=Mi,n=r.errorThrown,i=r.error;if(Mi=null,n)throw i}}else e()}Lo.errorContext=DF;function BF(e){DO.config.useDeprecatedSynchronousErrorHandling&&Mi&&(Mi.errorThrown=!0,Mi.error=e)}Lo.captureError=BF});var Fo=g(fr=>{"use strict";var UO=fr&&fr.__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(fr,"__esModule",{value:!0});fr.EMPTY_OBSERVER=fr.SafeSubscriber=fr.Subscriber=void 0;var zF=Me(),BO=Dt(),_m=jo(),UF=mm(),zO=ct(),bm=NO(),WF=vm(),VF=Yc(),WO=function(e){UO(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,BO.isSubscription(r)&&r.add(n)):n.destination=fr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new VO(r,n,i)},t.prototype.next=function(r){this.isStopped?ym(bm.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?ym(bm.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?ym(bm.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}(BO.Subscription);fr.Subscriber=WO;var HF=Function.prototype.bind;function gm(e,t){return HF.call(e,t)}var GF=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){Xc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Xc(n)}else Xc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Xc(r)}},e}(),VO=function(e){UO(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(zF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&_m.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&gm(r.next,u),error:r.error&&gm(r.error,u),complete:r.complete&&gm(r.complete,u)}):a=r}return o.destination=new GF(a),o}return t}(WO);fr.SafeSubscriber=VO;function Xc(e){_m.config.useDeprecatedSynchronousErrorHandling?VF.captureError(e):UF.reportUnhandledError(e)}function $F(e){throw e}function ym(e,t){var r=_m.config.onStoppedNotification;r&&WF.timeoutProvider.setTimeout(function(){return r(e,t)})}fr.EMPTY_OBSERVER={closed:!0,next:zO.noop,error:$F,complete:zO.noop}});var Lu=g(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.observable=void 0;Jc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var lt=g(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.identity=void 0;function KF(e){return e}Qc.identity=KF});var Fu=g(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.pipeFromArray=No.pipe=void 0;var ZF=lt();function YF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return HO(e)}No.pipe=YF;function HO(e){return e.length===0?ZF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}No.pipeFromArray=HO});var ke=g(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.Observable=void 0;var xm=Fo(),XF=Dt(),JF=Lu(),QF=Fu(),eN=jo(),wm=Me(),tN=Yc(),rN=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=iN(t)?t:new xm.SafeSubscriber(t,r,n);return tN.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=GO(r),new r(function(i,o){var a=new xm.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[JF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return QF.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=GO(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}();el.Observable=rN;function GO(e){var t;return(t=e??eN.config.Promise)!==null&&t!==void 0?t:Promise}function nN(e){return e&&wm.isFunction(e.next)&&wm.isFunction(e.error)&&wm.isFunction(e.complete)}function iN(e){return e&&e instanceof xm.Subscriber||nN(e)&&XF.isSubscription(e)}});var K=g(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.operate=Do.hasLift=void 0;var oN=Me();function $O(e){return oN.isFunction(e?.lift)}Do.hasLift=$O;function aN(e){return function(t){if($O(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")}}Do.operate=aN});var Q=g(Mn=>{"use strict";var uN=Mn&&Mn.__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(Mn,"__esModule",{value:!0});Mn.OperatorSubscriber=Mn.createOperatorSubscriber=void 0;var sN=Fo();function cN(e,t,r,n,i){return new KO(e,t,r,n,i)}Mn.createOperatorSubscriber=cN;var KO=function(e){uN(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}(sN.Subscriber);Mn.OperatorSubscriber=KO});var Sm=g(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.refCount=void 0;var lN=K(),fN=Q();function dN(){return lN.operate(function(e,t){var r=null;e._refCount++;var n=fN.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())})}tl.refCount=dN});var Nu=g(Bo=>{"use strict";var pN=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.ConnectableObservable=void 0;var hN=ke(),ZO=Dt(),vN=Sm(),mN=Q(),bN=K(),gN=function(e){pN(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,bN.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 ZO.Subscription;var i=this.getSubject();n.add(this.source.subscribe(mN.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=ZO.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return vN.refCount()(this)},t}(hN.Observable);Bo.ConnectableObservable=gN});var YO=g(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.performanceTimestampProvider=void 0;Du.performanceTimestampProvider={now:function(){return(Du.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Om=g(dr=>{"use strict";var XO=dr&&dr.__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},JO=dr&&dr.__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(dr,"__esModule",{value:!0});dr.animationFrameProvider=void 0;var yN=Dt();dr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=dr.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=dr.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,JO([],XO(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dr.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,JO([],XO(e)))},delegate:void 0}});var tE=g(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.animationFrames=void 0;var _N=ke(),wN=YO(),QO=Om();function xN(e){return e?eE(e):SN}rl.animationFrames=xN;function eE(e){return new _N.Observable(function(t){var r=e||wN.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=QO.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&QO.animationFrameProvider.cancelAnimationFrame(i)}})}var SN=eE()});var Em=g(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.ObjectUnsubscribedError=void 0;var ON=Rn();nl.ObjectUnsubscribedError=ON.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var ft=g(jr=>{"use strict";var nE=jr&&jr.__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)}}(),EN=jr&&jr.__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(jr,"__esModule",{value:!0});jr.AnonymousSubject=jr.Subject=void 0;var rE=ke(),Pm=Dt(),AN=Em(),PN=Xr(),Am=Yc(),iE=function(e){nE(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 Tm(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new AN.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Am.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=EN(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;Am.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;Am.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?Pm.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Pm.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 rE.Observable;return r.source=this,r},t.create=function(r,n){return new Tm(r,n)},t}(rE.Observable);jr.Subject=iE;var Tm=function(e){nE(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:Pm.EMPTY_SUBSCRIPTION},t}(iE);jr.AnonymousSubject=Tm});var Rm=g(zo=>{"use strict";var TN=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.BehaviorSubject=void 0;var RN=ft(),MN=function(e){TN(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}(RN.Subject);zo.BehaviorSubject=MN});var il=g(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.dateTimestampProvider=void 0;Bu.dateTimestampProvider={now:function(){return(Bu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var ol=g(Uo=>{"use strict";var CN=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.ReplaySubject=void 0;var kN=ft(),qN=il(),IN=function(e){CN(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=qN.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}(kN.Subject);Uo.ReplaySubject=IN});var al=g(Wo=>{"use strict";var jN=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.AsyncSubject=void 0;var LN=ft(),FN=function(e){jN(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);Wo.AsyncSubject=FN});var oE=g(Vo=>{"use strict";var NN=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.Action=void 0;var DN=Dt(),BN=function(e){NN(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}(DN.Subscription);Vo.Action=BN});var sE=g(Lr=>{"use strict";var aE=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},uE=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.intervalProvider=void 0;Lr.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lr.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,uE([e,t],aE(r))):setInterval.apply(void 0,uE([e,t],aE(r)))},clearInterval:function(e){var t=Lr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Go=g(Ho=>{"use strict";var zN=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.AsyncAction=void 0;var UN=oE(),cE=sE(),WN=Xr(),VN=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.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),cE.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&&cE.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,WN.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(UN.Action);Ho.AsyncAction=VN});var fE=g($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.TestTools=$o.Immediate=void 0;var HN=1,Mm,ul={};function lE(e){return e in ul?(delete ul[e],!0):!1}$o.Immediate={setImmediate:function(e){var t=HN++;return ul[t]=!0,Mm||(Mm=Promise.resolve()),Mm.then(function(){return lE(t)&&e()}),t},clearImmediate:function(e){lE(e)}};$o.TestTools={pending:function(){return Object.keys(ul).length}}});var pE=g(Fr=>{"use strict";var GN=Fr&&Fr.__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},$N=Fr&&Fr.__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(Fr,"__esModule",{value:!0});Fr.immediateProvider=void 0;var dE=fE(),KN=dE.Immediate.setImmediate,ZN=dE.Immediate.clearImmediate;Fr.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Fr.immediateProvider.delegate;return(r?.setImmediate||KN).apply(void 0,$N([],GN(e)))},clearImmediate:function(e){var t=Fr.immediateProvider.delegate;return(t?.clearImmediate||ZN)(e)},delegate:void 0}});var vE=g(Ko=>{"use strict";var YN=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.AsapAction=void 0;var XN=Go(),hE=pE(),JN=function(e){YN(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=hE.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&&(hE.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(XN.AsyncAction);Ko.AsapAction=JN});var Cm=g(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.Scheduler=void 0;var QN=il(),eD=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=QN.dateTimestampProvider.now,e}();sl.Scheduler=eD});var Yo=g(Zo=>{"use strict";var tD=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 mE=Cm(),rD=function(e){tD(t,e);function t(r,n){n===void 0&&(n=mE.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}(mE.Scheduler);Zo.AsyncScheduler=rD});var bE=g(Xo=>{"use strict";var nD=Xo&&Xo.__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(Xo,"__esModule",{value:!0});Xo.AsapScheduler=void 0;var iD=Yo(),oD=function(e){nD(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}(iD.AsyncScheduler);Xo.AsapScheduler=oD});var gE=g(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.asap=Ci.asapScheduler=void 0;var aD=vE(),uD=bE();Ci.asapScheduler=new uD.AsapScheduler(aD.AsapAction);Ci.asap=Ci.asapScheduler});var jt=g(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.async=ki.asyncScheduler=void 0;var sD=Go(),cD=Yo();ki.asyncScheduler=new cD.AsyncScheduler(sD.AsyncAction);ki.async=ki.asyncScheduler});var yE=g(Jo=>{"use strict";var lD=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.QueueAction=void 0;var fD=Go(),dD=function(e){lD(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}(fD.AsyncAction);Jo.QueueAction=dD});var _E=g(Qo=>{"use strict";var pD=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.QueueScheduler=void 0;var hD=Yo(),vD=function(e){pD(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(hD.AsyncScheduler);Qo.QueueScheduler=vD});var wE=g(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.queue=qi.queueScheduler=void 0;var mD=yE(),bD=_E();qi.queueScheduler=new bD.QueueScheduler(mD.QueueAction);qi.queue=qi.queueScheduler});var SE=g(ea=>{"use strict";var gD=ea&&ea.__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(ea,"__esModule",{value:!0});ea.AnimationFrameAction=void 0;var yD=Go(),xE=Om(),_D=function(e){gD(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=xE.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&&(xE.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(yD.AsyncAction);ea.AnimationFrameAction=_D});var OE=g(ta=>{"use strict";var wD=ta&&ta.__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(ta,"__esModule",{value:!0});ta.AnimationFrameScheduler=void 0;var xD=Yo(),SD=function(e){wD(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}(xD.AsyncScheduler);ta.AnimationFrameScheduler=SD});var EE=g(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.animationFrame=Ii.animationFrameScheduler=void 0;var OD=SE(),ED=OE();Ii.animationFrameScheduler=new ED.AnimationFrameScheduler(OD.AnimationFrameAction);Ii.animationFrame=Ii.animationFrameScheduler});var TE=g(Cn=>{"use strict";var AE=Cn&&Cn.__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(Cn,"__esModule",{value:!0});Cn.VirtualAction=Cn.VirtualTimeScheduler=void 0;var AD=Go(),PD=Dt(),TD=Yo(),RD=function(e){AE(t,e);function t(r,n){r===void 0&&(r=PE),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}(TD.AsyncScheduler);Cn.VirtualTimeScheduler=RD;var PE=function(e){AE(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}(AD.AsyncAction);Cn.VirtualAction=PE});var pr=g(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.empty=ji.EMPTY=void 0;var RE=ke();ji.EMPTY=new RE.Observable(function(e){return e.complete()});function MD(e){return e?CD(e):ji.EMPTY}ji.empty=MD;function CD(e){return new RE.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var zu=g(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.isScheduler=void 0;var kD=Me();function qD(e){return e&&kD.isFunction(e.schedule)}cl.isScheduler=qD});var Lt=g(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.popNumber=kn.popScheduler=kn.popResultSelector=void 0;var ID=Me(),jD=zu();function km(e){return e[e.length-1]}function LD(e){return ID.isFunction(km(e))?e.pop():void 0}kn.popResultSelector=LD;function FD(e){return jD.isScheduler(km(e))?e.pop():void 0}kn.popScheduler=FD;function ND(e,t){return typeof km(e)=="number"?e.pop():t}kn.popNumber=ND});var fl=g(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.isArrayLike=void 0;ll.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var qm=g(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.isPromise=void 0;var DD=Me();function BD(e){return DD.isFunction(e?.then)}dl.isPromise=BD});var Im=g(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.isInteropObservable=void 0;var zD=Lu(),UD=Me();function WD(e){return UD.isFunction(e[zD.observable])}pl.isInteropObservable=WD});var jm=g(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.isAsyncIterable=void 0;var VD=Me();function HD(e){return Symbol.asyncIterator&&VD.isFunction(e?.[Symbol.asyncIterator])}hl.isAsyncIterable=HD});var Lm=g(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.createInvalidObservableTypeError=void 0;function GD(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.")}vl.createInvalidObservableTypeError=GD});var Fm=g(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.iterator=ra.getSymbolIterator=void 0;function ME(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}ra.getSymbolIterator=ME;ra.iterator=ME()});var Nm=g(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.isIterable=void 0;var $D=Fm(),KD=Me();function ZD(e){return KD.isFunction(e?.[$D.iterator])}ml.isIterable=ZD});var bl=g(Qt=>{"use strict";var YD=Qt&&Qt.__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}}},na=Qt&&Qt.__await||function(e){return this instanceof na?(this.v=e,this):new na(e)},XD=Qt&&Qt.__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(d){return new Promise(function(h,v){o.push([p,d,h,v])>1||u(p,d)})})}function u(p,d){try{l(n[p](d))}catch(h){f(o[0][3],h)}}function l(p){p.value instanceof na?Promise.resolve(p.value.v).then(s,c):f(o[0][2],p)}function s(p){u("next",p)}function c(p){u("throw",p)}function f(p,d){p(d),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.isReadableStreamLike=Qt.readableStreamLikeToAsyncGenerator=void 0;var JD=Me();function QD(e){return XD(this,arguments,function(){var r,n,i,o;return YD(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,na(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,na(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,na(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]}})})}Qt.readableStreamLikeToAsyncGenerator=QD;function e5(e){return JD.isFunction(e?.getReader)}Qt.isReadableStreamLike=e5});var de=g(ze=>{"use strict";var t5=ze&&ze.__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(f){a(f)}}function l(c){try{s(n.throw(c))}catch(f){a(f)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((n=n.apply(e,t||[])).next())})},r5=ze&&ze.__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}}},n5=ze&&ze.__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 Dm=="function"?Dm(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)}},Dm=ze&&ze.__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(ze,"__esModule",{value:!0});ze.fromReadableStreamLike=ze.fromAsyncIterable=ze.fromIterable=ze.fromPromise=ze.fromArrayLike=ze.fromInteropObservable=ze.innerFrom=void 0;var i5=fl(),o5=qm(),ia=ke(),a5=Im(),u5=jm(),s5=Lm(),c5=Nm(),CE=bl(),l5=Me(),f5=mm(),d5=Lu();function p5(e){if(e instanceof ia.Observable)return e;if(e!=null){if(a5.isInteropObservable(e))return kE(e);if(i5.isArrayLike(e))return qE(e);if(o5.isPromise(e))return IE(e);if(u5.isAsyncIterable(e))return Bm(e);if(c5.isIterable(e))return jE(e);if(CE.isReadableStreamLike(e))return LE(e)}throw s5.createInvalidObservableTypeError(e)}ze.innerFrom=p5;function kE(e){return new ia.Observable(function(t){var r=e[d5.observable]();if(l5.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}ze.fromInteropObservable=kE;function qE(e){return new ia.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}ze.fromArrayLike=qE;function IE(e){return new ia.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,f5.reportUnhandledError)})}ze.fromPromise=IE;function jE(e){return new ia.Observable(function(t){var r,n;try{for(var i=Dm(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()})}ze.fromIterable=jE;function Bm(e){return new ia.Observable(function(t){h5(e,t).catch(function(r){return t.error(r)})})}ze.fromAsyncIterable=Bm;function LE(e){return Bm(CE.readableStreamLikeToAsyncGenerator(e))}ze.fromReadableStreamLike=LE;function h5(e,t){var r,n,i,o;return t5(this,void 0,void 0,function(){var a,u;return r5(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=n5(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 Jr=g(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.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}gl.executeSchedule=v5});var Uu=g(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.observeOn=void 0;var zm=Jr(),m5=K(),b5=Q();function g5(e,t){return t===void 0&&(t=0),m5.operate(function(r,n){r.subscribe(b5.createOperatorSubscriber(n,function(i){return zm.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return zm.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return zm.executeSchedule(n,e,function(){return n.error(i)},t)}))})}yl.observeOn=g5});var Wu=g(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.subscribeOn=void 0;var y5=K();function _5(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=_5});var FE=g(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.scheduleObservable=void 0;var w5=de(),x5=Uu(),S5=Wu();function O5(e,t){return w5.innerFrom(e).pipe(S5.subscribeOn(t),x5.observeOn(t))}wl.scheduleObservable=O5});var NE=g(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.schedulePromise=void 0;var E5=de(),A5=Uu(),P5=Wu();function T5(e,t){return E5.innerFrom(e).pipe(P5.subscribeOn(t),A5.observeOn(t))}xl.schedulePromise=T5});var DE=g(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.scheduleArray=void 0;var R5=ke();function M5(e,t){return new R5.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}Sl.scheduleArray=M5});var Um=g(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.scheduleIterable=void 0;var C5=ke(),k5=Fm(),q5=Me(),BE=Jr();function I5(e,t){return new C5.Observable(function(r){var n;return BE.executeSchedule(r,t,function(){n=e[k5.iterator](),BE.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 q5.isFunction(n?.return)&&n.return()}})}Ol.scheduleIterable=I5});var Wm=g(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.scheduleAsyncIterable=void 0;var j5=ke(),zE=Jr();function L5(e,t){if(!e)throw new Error("Iterable cannot be null");return new j5.Observable(function(r){zE.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();zE.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}El.scheduleAsyncIterable=L5});var UE=g(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.scheduleReadableStreamLike=void 0;var F5=Wm(),N5=bl();function D5(e,t){return F5.scheduleAsyncIterable(N5.readableStreamLikeToAsyncGenerator(e),t)}Al.scheduleReadableStreamLike=D5});var Vm=g(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.scheduled=void 0;var B5=FE(),z5=NE(),U5=DE(),W5=Um(),V5=Wm(),H5=Im(),G5=qm(),$5=fl(),K5=Nm(),Z5=jm(),Y5=Lm(),X5=bl(),J5=UE();function Q5(e,t){if(e!=null){if(H5.isInteropObservable(e))return B5.scheduleObservable(e,t);if($5.isArrayLike(e))return U5.scheduleArray(e,t);if(G5.isPromise(e))return z5.schedulePromise(e,t);if(Z5.isAsyncIterable(e))return V5.scheduleAsyncIterable(e,t);if(K5.isIterable(e))return W5.scheduleIterable(e,t);if(X5.isReadableStreamLike(e))return J5.scheduleReadableStreamLike(e,t)}throw Y5.createInvalidObservableTypeError(e)}Pl.scheduled=Q5});var Qr=g(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.from=void 0;var e3=Vm(),t3=de();function r3(e,t){return t?e3.scheduled(e,t):t3.innerFrom(e)}Tl.from=r3});var Ml=g(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.of=void 0;var n3=Lt(),i3=Qr();function o3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n3.popScheduler(e);return i3.from(e,r)}Rl.of=o3});var Hm=g(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.throwError=void 0;var a3=ke(),u3=Me();function s3(e,t){var r=u3.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new a3.Observable(t?function(i){return t.schedule(n,0,i)}:n)}Cl.throwError=s3});var kl=g(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.observeNotification=en.Notification=en.NotificationKind=void 0;var c3=pr(),l3=Ml(),f3=Hm(),d3=Me(),p3;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(p3=en.NotificationKind||(en.NotificationKind={}));var h3=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 WE(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 d3.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"?l3.of(n):r==="E"?f3.throwError(function(){return i}):r==="C"?c3.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}();en.Notification=h3;function WE(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)}en.observeNotification=WE});var HE=g(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.isObservable=void 0;var v3=ke(),VE=Me();function m3(e){return!!e&&(e instanceof v3.Observable||VE.isFunction(e.lift)&&VE.isFunction(e.subscribe))}ql.isObservable=m3});var qn=g(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.EmptyError=void 0;var b3=Rn();Il.EmptyError=b3.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var GE=g(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.lastValueFrom=void 0;var g3=qn();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 g3.EmptyError)}})})}jl.lastValueFrom=y3});var $E=g(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.firstValueFrom=void 0;var _3=qn(),w3=Fo();function x3(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new w3.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new _3.EmptyError)}});e.subscribe(o)})}Ll.firstValueFrom=x3});var Gm=g(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.ArgumentOutOfRangeError=void 0;var S3=Rn();Fl.ArgumentOutOfRangeError=S3.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var $m=g(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.NotFoundError=void 0;var O3=Rn();Nl.NotFoundError=O3.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var Km=g(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.SequenceError=void 0;var E3=Rn();Dl.SequenceError=E3.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var zl=g(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.isValidDate=void 0;function A3(e){return e instanceof Date&&!isNaN(e)}Bl.isValidDate=A3});var Ul=g(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.timeout=Li.TimeoutError=void 0;var P3=jt(),T3=zl(),R3=K(),M3=de(),C3=Rn(),k3=Q(),q3=Jr();Li.TimeoutError=C3.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 I3(e,t){var r=T3.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?j3: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 R3.operate(function(f,p){var d,h,v=null,b=0,y=function(_){h=q3.executeSchedule(p,l,function(){try{d.unsubscribe(),M3.innerFrom(a({meta:c,lastValue:v,seen:b})).subscribe(p)}catch(w){p.error(w)}},_)};d=f.subscribe(k3.createOperatorSubscriber(p,function(_){h?.unsubscribe(),b++,p.next(v=_),i>0&&y(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),v=null})),!b&&y(n!=null?typeof n=="number"?n:+n-l.now():i)})}Li.timeout=I3;function j3(e){throw new Li.TimeoutError(e)}});var In=g(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.map=void 0;var L3=K(),F3=Q();function N3(e,t){return L3.operate(function(r,n){var i=0;r.subscribe(F3.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}Wl.map=N3});var Ln=g(jn=>{"use strict";var D3=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},B3=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.mapOneOrManyArgs=void 0;var z3=In(),U3=Array.isArray;function W3(e,t){return U3(t)?e.apply(void 0,B3([],D3(t))):e(t)}function V3(e){return z3.map(function(t){return W3(e,t)})}jn.mapOneOrManyArgs=V3});var Ym=g(Fn=>{"use strict";var H3=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},KE=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.bindCallbackInternals=void 0;var G3=zu(),$3=ke(),K3=Wu(),Z3=Ln(),Y3=Uu(),X3=al();function Zm(e,t,r,n){if(r)if(G3.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Zm(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 Zm(e,t).apply(this,i).pipe(K3.subscribeOn(n),Y3.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 $3.Observable(function(s){var c=u.subscribe(s);if(l){l=!1;var f=!1,p=!1;t.apply(i,KE(KE([],H3(o)),[function(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];if(e){var v=d.shift();if(v!=null){u.error(v);return}}u.next(1<d.length?d:d[0]),p=!0,f&&u.complete()}])),p&&u.complete(),f=!0}return c})}}Fn.bindCallbackInternals=Zm});var ZE=g(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.bindCallback=void 0;var J3=Ym();function Q3(e,t,r){return J3.bindCallbackInternals(!1,e,t,r)}Vl.bindCallback=Q3});var YE=g(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.bindNodeCallback=void 0;var e6=Ym();function t6(e,t,r){return e6.bindCallbackInternals(!0,e,t,r)}Hl.bindNodeCallback=t6});var Xm=g(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.argsArgArrayOrObject=void 0;var r6=Array.isArray,n6=Object.getPrototypeOf,i6=Object.prototype,o6=Object.keys;function a6(e){if(e.length===1){var t=e[0];if(r6(t))return{args:t,keys:null};if(u6(t)){var r=o6(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Gl.argsArgArrayOrObject=a6;function u6(e){return e&&typeof e=="object"&&n6(e)===i6}});var Jm=g($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.createObject=void 0;function s6(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}$l.createObject=s6});var Kl=g(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.combineLatestInit=oa.combineLatest=void 0;var c6=ke(),l6=Xm(),QE=Qr(),eA=lt(),f6=Ln(),XE=Lt(),d6=Jm(),p6=Q(),h6=Jr();function v6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=XE.popScheduler(e),n=XE.popResultSelector(e),i=l6.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return QE.from([],r);var u=new c6.Observable(tA(o,r,a?function(l){return d6.createObject(a,l)}:eA.identity));return n?u.pipe(f6.mapOneOrManyArgs(n)):u}oa.combineLatest=v6;function tA(e,t,r){return r===void 0&&(r=eA.identity),function(n){JE(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,l=function(c){JE(t,function(){var f=QE.from(e[c],t),p=!1;f.subscribe(p6.createOperatorSubscriber(n,function(d){o[c]=d,p||(p=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)l(s)},n)}}oa.combineLatestInit=tA;function JE(e,t,r){e?h6.executeSchedule(r,e,t):t()}});var Yl=g(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.mergeInternals=void 0;var m6=de(),b6=Jr(),rA=Q();function g6(e,t,r,n,i,o,a,u){var l=[],s=0,c=0,f=!1,p=function(){f&&!l.length&&!s&&t.complete()},d=function(v){return s<n?h(v):l.push(v)},h=function(v){o&&t.next(v),s++;var b=!1;m6.innerFrom(r(v,c++)).subscribe(rA.createOperatorSubscriber(t,function(y){i?.(y),o?d(y):t.next(y)},function(){b=!0},void 0,function(){if(b)try{s--;for(var y=function(){var _=l.shift();a?b6.executeSchedule(t,a,function(){return h(_)}):h(_)};l.length&&s<n;)y();p()}catch(_){t.error(_)}}))};return e.subscribe(rA.createOperatorSubscriber(t,d,function(){f=!0,p()})),function(){u?.()}}Zl.mergeInternals=g6});var tn=g(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.mergeMap=void 0;var y6=In(),_6=de(),w6=K(),x6=Yl(),S6=Me();function nA(e,t,r){return r===void 0&&(r=1/0),S6.isFunction(t)?nA(function(n,i){return y6.map(function(o,a){return t(n,o,i,a)})(_6.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),w6.operate(function(n,i){return x6.mergeInternals(n,i,e,r)}))}Xl.mergeMap=nA});var Vu=g(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.mergeAll=void 0;var O6=tn(),E6=lt();function A6(e){return e===void 0&&(e=1/0),O6.mergeMap(E6.identity,e)}Jl.mergeAll=A6});var ef=g(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.concatAll=void 0;var P6=Vu();function T6(){return P6.mergeAll(1)}Ql.concatAll=T6});var Hu=g(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.concat=void 0;var R6=ef(),M6=Lt(),C6=Qr();function k6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return R6.concatAll()(C6.from(e,M6.popScheduler(e)))}tf.concat=k6});var Gu=g(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.defer=void 0;var q6=ke(),I6=de();function j6(e){return new q6.Observable(function(t){I6.innerFrom(e()).subscribe(t)})}rf.defer=j6});var iA=g(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.connectable=void 0;var L6=ft(),F6=ke(),N6=Gu(),D6={connector:function(){return new L6.Subject},resetOnDisconnect:!0};function B6(e,t){t===void 0&&(t=D6);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new F6.Observable(function(l){return a.subscribe(l)});return u.connect=function(){return(!r||r.closed)&&(r=N6.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}nf.connectable=B6});var oA=g(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.forkJoin=void 0;var z6=ke(),U6=Xm(),W6=de(),V6=Lt(),H6=Q(),G6=Ln(),$6=Jm();function K6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=V6.popResultSelector(e),n=U6.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new z6.Observable(function(u){var l=i.length;if(!l){u.complete();return}for(var s=new Array(l),c=l,f=l,p=function(h){var v=!1;W6.innerFrom(i[h]).subscribe(H6.createOperatorSubscriber(u,function(b){v||(v=!0,f--),s[h]=b},function(){return c--},void 0,function(){(!c||!v)&&(f||u.next(o?$6.createObject(o,s):s),u.complete())}))},d=0;d<l;d++)p(d)});return r?a.pipe(G6.mapOneOrManyArgs(r)):a}of.forkJoin=K6});var uA=g(aa=>{"use strict";var Z6=aa&&aa.__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(aa,"__esModule",{value:!0});aa.fromEvent=void 0;var Y6=de(),X6=ke(),J6=tn(),Q6=fl(),Fi=Me(),e8=Ln(),t8=["addListener","removeListener"],r8=["addEventListener","removeEventListener"],n8=["on","off"];function Qm(e,t,r,n){if(Fi.isFunction(r)&&(n=r,r=void 0),n)return Qm(e,t,r).pipe(e8.mapOneOrManyArgs(n));var i=Z6(a8(e)?r8.map(function(u){return function(l){return e[u](t,l,r)}}):i8(e)?t8.map(aA(e,t)):o8(e)?n8.map(aA(e,t)):[],2),o=i[0],a=i[1];if(!o&&Q6.isArrayLike(e))return J6.mergeMap(function(u){return Qm(u,t,r)})(Y6.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)}})}aa.fromEvent=Qm;function aA(e,t){return function(r){return function(n){return e[r](t,n)}}}function i8(e){return Fi.isFunction(e.addListener)&&Fi.isFunction(e.removeListener)}function o8(e){return Fi.isFunction(e.on)&&Fi.isFunction(e.off)}function a8(e){return Fi.isFunction(e.addEventListener)&&Fi.isFunction(e.removeEventListener)}});var cA=g(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.fromEventPattern=void 0;var u8=ke(),s8=Me(),c8=Ln();function sA(e,t,r){return r?sA(e,t).pipe(c8.mapOneOrManyArgs(r)):new u8.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 s8.isFunction(t)?function(){return t(i,o)}:void 0})}af.fromEventPattern=sA});var fA=g(ua=>{"use strict";var l8=ua&&ua.__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(ua,"__esModule",{value:!0});ua.generate=void 0;var lA=lt(),f8=zu(),d8=Gu(),p8=Um();function h8(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?lA.identity:a,i=o.scheduler):(l=e,!n||f8.isScheduler(n)?(u=lA.identity,i=n):u=n);function s(){var c;return l8(this,function(f){switch(f.label){case 0:c=l,f.label=1;case 1:return!t||t(c)?[4,u(c)]:[3,4];case 2:f.sent(),f.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return d8.defer(i?function(){return p8.scheduleIterable(s(),i)}:s)}ua.generate=h8});var dA=g(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.iif=void 0;var v8=Gu();function m8(e,t,r){return v8.defer(function(){return e()?t:r})}uf.iif=m8});var Nn=g(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.timer=void 0;var b8=ke(),g8=jt(),y8=zu(),_8=zl();function w8(e,t,r){e===void 0&&(e=0),r===void 0&&(r=g8.async);var n=-1;return t!=null&&(y8.isScheduler(t)?r=t:n=t),new b8.Observable(function(i){var o=_8.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)})}sf.timer=w8});var eb=g(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.interval=void 0;var x8=jt(),S8=Nn();function O8(e,t){return e===void 0&&(e=0),t===void 0&&(t=x8.asyncScheduler),e<0&&(e=0),S8.timer(e,e,t)}cf.interval=O8});var hA=g(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.merge=void 0;var E8=Vu(),A8=de(),P8=pr(),pA=Lt(),T8=Qr();function R8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pA.popScheduler(e),n=pA.popNumber(e,1/0),i=e;return i.length?i.length===1?A8.innerFrom(i[0]):E8.mergeAll(n)(T8.from(i,r)):P8.EMPTY}lf.merge=R8});var tb=g(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.never=Ni.NEVER=void 0;var M8=ke(),C8=ct();Ni.NEVER=new M8.Observable(C8.noop);function k8(){return Ni.NEVER}Ni.never=k8});var sa=g(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.argsOrArgArray=void 0;var q8=Array.isArray;function I8(e){return e.length===1&&q8(e[0])?e[0]:e}ff.argsOrArgArray=I8});var rb=g(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.onErrorResumeNext=void 0;var j8=ke(),L8=sa(),F8=Q(),vA=ct(),N8=de();function D8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=L8.argsOrArgArray(e);return new j8.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=N8.innerFrom(r[i++])}catch{o();return}var u=new F8.OperatorSubscriber(n,void 0,vA.noop,vA.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}df.onErrorResumeNext=D8});var mA=g(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.pairs=void 0;var B8=Qr();function z8(e,t){return B8.from(Object.entries(e),t)}pf.pairs=z8});var bA=g(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.not=void 0;function U8(e,t){return function(r,n){return!e.call(t,r,n)}}hf.not=U8});var Di=g(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.filter=void 0;var W8=K(),V8=Q();function H8(e,t){return W8.operate(function(r,n){var i=0;r.subscribe(V8.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}vf.filter=H8});var _A=g(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.partition=void 0;var G8=bA(),gA=Di(),yA=de();function $8(e,t,r){return[gA.filter(t,r)(yA.innerFrom(e)),gA.filter(G8.not(t,r))(yA.innerFrom(e))]}mf.partition=$8});var nb=g(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.raceInit=ca.race=void 0;var K8=ke(),wA=de(),Z8=sa(),Y8=Q();function X8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=Z8.argsOrArgArray(e),e.length===1?wA.innerFrom(e[0]):new K8.Observable(xA(e))}ca.race=X8;function xA(e){return function(t){for(var r=[],n=function(o){r.push(wA.innerFrom(e[o]).subscribe(Y8.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)}}ca.raceInit=xA});var SA=g(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.range=void 0;var J8=ke(),Q8=pr();function eB(e,t,r){if(t==null&&(t=e,e=0),t<=0)return Q8.EMPTY;var n=t+e;return new J8.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()})}bf.range=eB});var OA=g(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.using=void 0;var tB=ke(),rB=de(),nB=pr();function iB(e,t){return new tB.Observable(function(r){var n=e(),i=t(n),o=i?rB.innerFrom(i):nB.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}gf.using=iB});var yf=g(Dn=>{"use strict";var oB=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},aB=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.zip=void 0;var uB=ke(),sB=de(),cB=sa(),lB=pr(),fB=Q(),dB=Lt();function pB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dB.popResultSelector(e),n=cB.argsOrArgArray(e);return n.length?new uB.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){sB.innerFrom(n[s]).subscribe(fB.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(p){return p.length})){var f=o.map(function(p){return p.shift()});i.next(r?r.apply(void 0,aB([],oB(f))):f),o.some(function(p,d){return!p.length&&a[d]})&&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}}):lB.EMPTY}Dn.zip=pB});var AA=g(EA=>{"use strict";Object.defineProperty(EA,"__esModule",{value:!0})});var ib=g(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.audit=void 0;var hB=K(),vB=de(),PA=Q();function mB(e){return hB.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(PA.createOperatorSubscriber(r,function(s){n=!0,i=s,o||vB.innerFrom(e(s)).subscribe(o=PA.createOperatorSubscriber(r,u,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}_f.audit=mB});var TA=g(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.auditTime=void 0;var bB=jt(),gB=ib(),yB=Nn();function _B(e,t){return t===void 0&&(t=bB.asyncScheduler),gB.audit(function(){return yB.timer(e,t)})}wf.auditTime=_B});var MA=g(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.buffer=void 0;var wB=K(),xB=ct(),RA=Q(),SB=de();function OB(e){return wB.operate(function(t,r){var n=[];return t.subscribe(RA.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),SB.innerFrom(e).subscribe(RA.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},xB.noop)),function(){n=null}})}xf.buffer=OB});var CA=g(la=>{"use strict";var ob=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.bufferCount=void 0;var EB=K(),AB=Q(),PB=Xr();function TB(e,t){return t===void 0&&(t=null),t=t??e,EB.operate(function(r,n){var i=[],o=0;r.subscribe(AB.createOperatorSubscriber(n,function(a){var u,l,s,c,f=null;o++%t===0&&i.push([]);try{for(var p=ob(i),d=p.next();!d.done;d=p.next()){var h=d.value;h.push(a),e<=h.length&&(f=f??[],f.push(h))}}catch(y){u={error:y}}finally{try{d&&!d.done&&(l=p.return)&&l.call(p)}finally{if(u)throw u.error}}if(f)try{for(var v=ob(f),b=v.next();!b.done;b=v.next()){var h=b.value;PB.arrRemove(i,h),n.next(h)}}catch(y){s={error:y}}finally{try{b&&!b.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var l=ob(i),s=l.next();!s.done;s=l.next()){var c=s.value;n.next(c)}}catch(f){a={error:f}}finally{try{s&&!s.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}la.bufferCount=TB});var qA=g(fa=>{"use strict";var RB=fa&&fa.__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(fa,"__esModule",{value:!0});fa.bufferTime=void 0;var MB=Dt(),CB=K(),kB=Q(),qB=Xr(),IB=jt(),jB=Lt(),kA=Jr();function LB(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=jB.popScheduler(n))!==null&&t!==void 0?t:IB.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return CB.operate(function(l,s){var c=[],f=!1,p=function(v){var b=v.buffer,y=v.subs;y.unsubscribe(),qB.arrRemove(c,v),s.next(b),f&&d()},d=function(){if(c){var v=new MB.Subscription;s.add(v);var b=[],y={buffer:b,subs:v};c.push(y),kA.executeSchedule(v,o,function(){return p(y)},e)}};a!==null&&a>=0?kA.executeSchedule(s,o,d,a,!0):f=!0,d();var h=kB.createOperatorSubscriber(s,function(v){var b,y,_=c.slice();try{for(var w=RB(_),x=w.next();!x.done;x=w.next()){var S=x.value,E=S.buffer;E.push(v),u<=E.length&&p(S)}}catch(P){b={error:P}}finally{try{x&&!x.done&&(y=w.return)&&y.call(w)}finally{if(b)throw b.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)})}fa.bufferTime=LB});var LA=g(da=>{"use strict";var FB=da&&da.__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(da,"__esModule",{value:!0});da.bufferToggle=void 0;var NB=Dt(),DB=K(),IA=de(),ab=Q(),jA=ct(),BB=Xr();function zB(e,t){return DB.operate(function(r,n){var i=[];IA.innerFrom(e).subscribe(ab.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new NB.Subscription,l=function(){BB.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(IA.innerFrom(t(o)).subscribe(ab.createOperatorSubscriber(n,l,jA.noop)))},jA.noop)),r.subscribe(ab.createOperatorSubscriber(n,function(o){var a,u;try{for(var l=FB(i),s=l.next();!s.done;s=l.next()){var c=s.value;c.push(o)}}catch(f){a={error:f}}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()}))})}da.bufferToggle=zB});var NA=g(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.bufferWhen=void 0;var UB=K(),WB=ct(),FA=Q(),VB=de();function HB(e){return UB.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),VB.innerFrom(e()).subscribe(i=FA.createOperatorSubscriber(r,o,WB.noop))};o(),t.subscribe(FA.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}Sf.bufferWhen=HB});var BA=g(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.catchError=void 0;var GB=de(),$B=Q(),KB=K();function DA(e){return KB.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe($B.createOperatorSubscriber(r,void 0,void 0,function(a){o=GB.innerFrom(e(a,DA(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}Of.catchError=DA});var ub=g(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.scanInternals=void 0;var ZB=Q();function YB(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe(ZB.createOperatorSubscriber(a,function(c){var f=s++;l=u?e(l,c,f):(u=!0,c),n&&a.next(l)},i&&function(){u&&a.next(l),a.complete()}))}}Ef.scanInternals=YB});var pa=g(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.reduce=void 0;var XB=ub(),JB=K();function QB(e,t){return JB.operate(XB.scanInternals(e,t,arguments.length>=2,!1,!0))}Af.reduce=QB});var sb=g(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.toArray=void 0;var ez=pa(),tz=K(),rz=function(e,t){return e.push(t),e};function nz(){return tz.operate(function(e,t){ez.reduce(rz,[])(e).subscribe(t)})}Pf.toArray=nz});var cb=g(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.joinAllInternals=void 0;var iz=lt(),oz=Ln(),az=Fu(),uz=tn(),sz=sb();function cz(e,t){return az.pipe(sz.toArray(),uz.mergeMap(function(r){return e(r)}),t?oz.mapOneOrManyArgs(t):iz.identity)}Tf.joinAllInternals=cz});var lb=g(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.combineLatestAll=void 0;var lz=Kl(),fz=cb();function dz(e){return fz.joinAllInternals(lz.combineLatest,e)}Rf.combineLatestAll=dz});var zA=g(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.combineAll=void 0;var pz=lb();Mf.combineAll=pz.combineLatestAll});var HA=g(Bn=>{"use strict";var UA=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},WA=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.combineLatest=void 0;var hz=Kl(),vz=K(),mz=sa(),bz=Ln(),gz=Fu(),yz=Lt();function VA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=yz.popResultSelector(e);return r?gz.pipe(VA.apply(void 0,WA([],UA(e))),bz.mapOneOrManyArgs(r)):vz.operate(function(n,i){hz.combineLatestInit(WA([n],UA(mz.argsOrArgArray(e))))(i)})}Bn.combineLatest=VA});var GA=g(zn=>{"use strict";var _z=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},wz=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.combineLatestWith=void 0;var xz=HA();function Sz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return xz.combineLatest.apply(void 0,wz([],_z(e)))}zn.combineLatestWith=Sz});var fb=g(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.concatMap=void 0;var $A=tn(),Oz=Me();function Ez(e,t){return Oz.isFunction(t)?$A.mergeMap(e,t,1):$A.mergeMap(e,1)}Cf.concatMap=Ez});var ZA=g(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.concatMapTo=void 0;var KA=fb(),Az=Me();function Pz(e,t){return Az.isFunction(t)?KA.concatMap(function(){return e},t):KA.concatMap(function(){return e})}kf.concatMapTo=Pz});var YA=g(Un=>{"use strict";var Tz=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},Rz=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.concat=void 0;var Mz=K(),Cz=ef(),kz=Lt(),qz=Qr();function Iz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=kz.popScheduler(e);return Mz.operate(function(n,i){Cz.concatAll()(qz.from(Rz([n],Tz(e)),r)).subscribe(i)})}Un.concat=Iz});var XA=g(Wn=>{"use strict";var jz=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},Lz=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.concatWith=void 0;var Fz=YA();function Nz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Fz.concat.apply(void 0,Lz([],jz(e)))}Wn.concatWith=Nz});var JA=g(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.fromSubscribable=void 0;var Dz=ke();function Bz(e){return new Dz.Observable(function(t){return e.subscribe(t)})}qf.fromSubscribable=Bz});var jf=g(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.connect=void 0;var zz=ft(),Uz=de(),Wz=K(),Vz=JA(),Hz={connector:function(){return new zz.Subject}};function Gz(e,t){t===void 0&&(t=Hz);var r=t.connector;return Wz.operate(function(n,i){var o=r();Uz.innerFrom(e(Vz.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}If.connect=Gz});var QA=g(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.count=void 0;var $z=pa();function Kz(e){return $z.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}Lf.count=Kz});var tP=g(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.debounce=void 0;var Zz=K(),Yz=ct(),eP=Q(),Xz=de();function Jz(e){return Zz.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(eP.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=eP.createOperatorSubscriber(r,a,Yz.noop),Xz.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}Ff.debounce=Jz});var rP=g(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.debounceTime=void 0;var Qz=jt(),eU=K(),tU=Q();function rU(e,t){return t===void 0&&(t=Qz.asyncScheduler),eU.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(tU.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}))})}Nf.debounceTime=rU});var $u=g(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.defaultIfEmpty=void 0;var nU=K(),iU=Q();function oU(e){return nU.operate(function(t,r){var n=!1;t.subscribe(iU.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}Df.defaultIfEmpty=oU});var Ku=g(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.take=void 0;var aU=pr(),uU=K(),sU=Q();function cU(e){return e<=0?function(){return aU.EMPTY}:uU.operate(function(t,r){var n=0;t.subscribe(sU.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Bf.take=cU});var db=g(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.ignoreElements=void 0;var lU=K(),fU=Q(),dU=ct();function pU(){return lU.operate(function(e,t){e.subscribe(fU.createOperatorSubscriber(t,dU.noop))})}zf.ignoreElements=pU});var pb=g(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.mapTo=void 0;var hU=In();function vU(e){return hU.map(function(){return e})}Uf.mapTo=vU});var hb=g(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.delayWhen=void 0;var mU=Hu(),nP=Ku(),bU=db(),gU=pb(),yU=tn(),_U=de();function iP(e,t){return t?function(r){return mU.concat(t.pipe(nP.take(1),bU.ignoreElements()),r.pipe(iP(e)))}:yU.mergeMap(function(r,n){return _U.innerFrom(e(r,n)).pipe(nP.take(1),gU.mapTo(r))})}Wf.delayWhen=iP});var oP=g(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.delay=void 0;var wU=jt(),xU=hb(),SU=Nn();function OU(e,t){t===void 0&&(t=wU.asyncScheduler);var r=SU.timer(e,t);return xU.delayWhen(function(){return r})}Vf.delay=OU});var aP=g(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.dematerialize=void 0;var EU=kl(),AU=K(),PU=Q();function TU(){return AU.operate(function(e,t){e.subscribe(PU.createOperatorSubscriber(t,function(r){return EU.observeNotification(r,t)}))})}Hf.dematerialize=TU});var sP=g(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.distinct=void 0;var RU=K(),uP=Q(),MU=ct(),CU=de();function kU(e,t){return RU.operate(function(r,n){var i=new Set;r.subscribe(uP.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&CU.innerFrom(t).subscribe(uP.createOperatorSubscriber(n,function(){return i.clear()},MU.noop))})}Gf.distinct=kU});var vb=g($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.distinctUntilChanged=void 0;var qU=lt(),IU=K(),jU=Q();function LU(e,t){return t===void 0&&(t=qU.identity),e=e??FU,IU.operate(function(r,n){var i,o=!0;r.subscribe(jU.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}$f.distinctUntilChanged=LU;function FU(e,t){return e===t}});var cP=g(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.distinctUntilKeyChanged=void 0;var NU=vb();function DU(e,t){return NU.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Kf.distinctUntilKeyChanged=DU});var Zu=g(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.throwIfEmpty=void 0;var BU=qn(),zU=K(),UU=Q();function WU(e){return e===void 0&&(e=VU),zU.operate(function(t,r){var n=!1;t.subscribe(UU.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Zf.throwIfEmpty=WU;function VU(){return new BU.EmptyError}});var fP=g(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.elementAt=void 0;var lP=Gm(),HU=Di(),GU=Zu(),$U=$u(),KU=Ku();function ZU(e,t){if(e<0)throw new lP.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(HU.filter(function(i,o){return o===e}),KU.take(1),r?$U.defaultIfEmpty(t):GU.throwIfEmpty(function(){return new lP.ArgumentOutOfRangeError}))}}Yf.elementAt=ZU});var dP=g(Vn=>{"use strict";var YU=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},XU=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.endWith=void 0;var JU=Hu(),QU=Ml();function e4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return JU.concat(r,QU.of.apply(void 0,XU([],YU(e))))}}Vn.endWith=e4});var pP=g(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.every=void 0;var t4=K(),r4=Q();function n4(e,t){return t4.operate(function(r,n){var i=0;r.subscribe(r4.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}Xf.every=n4});var mb=g(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.exhaustMap=void 0;var i4=In(),hP=de(),o4=K(),vP=Q();function mP(e,t){return t?function(r){return r.pipe(mP(function(n,i){return hP.innerFrom(e(n,i)).pipe(i4.map(function(o,a){return t(n,o,i,a)}))}))}:o4.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(vP.createOperatorSubscriber(n,function(u){o||(o=vP.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),hP.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}Jf.exhaustMap=mP});var bb=g(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.exhaustAll=void 0;var a4=mb(),u4=lt();function s4(){return a4.exhaustMap(u4.identity)}Qf.exhaustAll=s4});var bP=g(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.exhaust=void 0;var c4=bb();ed.exhaust=c4.exhaustAll});var gP=g(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.expand=void 0;var l4=K(),f4=Yl();function d4(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,l4.operate(function(n,i){return f4.mergeInternals(n,i,e,t,void 0,!0,r)})}td.expand=d4});var yP=g(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.finalize=void 0;var p4=K();function h4(e){return p4.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}rd.finalize=h4});var gb=g(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.createFind=ha.find=void 0;var v4=K(),m4=Q();function b4(e,t){return v4.operate(_P(e,t,"value"))}ha.find=b4;function _P(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(m4.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()}))}}ha.createFind=_P});var wP=g(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.findIndex=void 0;var g4=K(),y4=gb();function _4(e,t){return g4.operate(y4.createFind(e,t,"index"))}nd.findIndex=_4});var xP=g(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.first=void 0;var w4=qn(),x4=Di(),S4=Ku(),O4=$u(),E4=Zu(),A4=lt();function P4(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?x4.filter(function(i,o){return e(i,o,n)}):A4.identity,S4.take(1),r?O4.defaultIfEmpty(t):E4.throwIfEmpty(function(){return new w4.EmptyError}))}}id.first=P4});var OP=g(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.groupBy=void 0;var T4=ke(),R4=de(),M4=ft(),C4=K(),SP=Q();function k4(e,t,r,n){return C4.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,f=!1,p=new SP.OperatorSubscriber(o,function(h){try{var v=e(h),b=u.get(v);if(!b){u.set(v,b=n?n():new M4.Subject);var y=d(v,b);if(o.next(y),r){var _=SP.createOperatorSubscriber(b,function(){b.complete(),_?.unsubscribe()},void 0,void 0,function(){return u.delete(v)});p.add(R4.innerFrom(r(y)).subscribe(_))}}b.next(a?a(h):h)}catch(w){s(w)}},function(){return l(function(h){return h.complete()})},s,function(){return u.clear()},function(){return f=!0,c===0});i.subscribe(p);function d(h,v){var b=new T4.Observable(function(y){c++;var _=v.subscribe(y);return function(){_.unsubscribe(),--c===0&&f&&p.unsubscribe()}});return b.key=h,b}})}od.groupBy=k4});var EP=g(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.isEmpty=void 0;var q4=K(),I4=Q();function j4(){return q4.operate(function(e,t){e.subscribe(I4.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}ad.isEmpty=j4});var yb=g(va=>{"use strict";var L4=va&&va.__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(va,"__esModule",{value:!0});va.takeLast=void 0;var F4=pr(),N4=K(),D4=Q();function B4(e){return e<=0?function(){return F4.EMPTY}:N4.operate(function(t,r){var n=[];t.subscribe(D4.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=L4(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}))})}va.takeLast=B4});var AP=g(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.last=void 0;var z4=qn(),U4=Di(),W4=yb(),V4=Zu(),H4=$u(),G4=lt();function $4(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?U4.filter(function(i,o){return e(i,o,n)}):G4.identity,W4.takeLast(1),r?H4.defaultIfEmpty(t):V4.throwIfEmpty(function(){return new z4.EmptyError}))}}ud.last=$4});var PP=g(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.materialize=void 0;var _b=kl(),K4=K(),Z4=Q();function Y4(){return K4.operate(function(e,t){e.subscribe(Z4.createOperatorSubscriber(t,function(r){t.next(_b.Notification.createNext(r))},function(){t.next(_b.Notification.createComplete()),t.complete()},function(r){t.next(_b.Notification.createError(r)),t.complete()}))})}sd.materialize=Y4});var TP=g(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.max=void 0;var X4=pa(),J4=Me();function Q4(e){return X4.reduce(J4.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}cd.max=Q4});var RP=g(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.flatMap=void 0;var eW=tn();ld.flatMap=eW.mergeMap});var CP=g(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.mergeMapTo=void 0;var MP=tn(),tW=Me();function rW(e,t,r){return r===void 0&&(r=1/0),tW.isFunction(t)?MP.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),MP.mergeMap(function(){return e},r))}fd.mergeMapTo=rW});var kP=g(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.mergeScan=void 0;var nW=K(),iW=Yl();function oW(e,t,r){return r===void 0&&(r=1/0),nW.operate(function(n,i){var o=t;return iW.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}dd.mergeScan=oW});var IP=g(Hn=>{"use strict";var aW=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},uW=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.merge=void 0;var sW=K(),cW=Vu(),qP=Lt(),lW=Qr();function fW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=qP.popScheduler(e),n=qP.popNumber(e,1/0);return sW.operate(function(i,o){cW.mergeAll(n)(lW.from(uW([i],aW(e)),r)).subscribe(o)})}Hn.merge=fW});var jP=g(Gn=>{"use strict";var dW=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},pW=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.mergeWith=void 0;var hW=IP();function vW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hW.merge.apply(void 0,pW([],dW(e)))}Gn.mergeWith=vW});var LP=g(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.min=void 0;var mW=pa(),bW=Me();function gW(e){return mW.reduce(bW.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}pd.min=gW});var vd=g(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.multicast=void 0;var yW=Nu(),FP=Me(),_W=jf();function wW(e,t){var r=FP.isFunction(e)?e:function(){return e};return FP.isFunction(t)?_W.connect(t,{connector:r}):function(n){return new yW.ConnectableObservable(n,r)}}hd.multicast=wW});var DP=g(Nr=>{"use strict";var xW=Nr&&Nr.__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},SW=Nr&&Nr.__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(Nr,"__esModule",{value:!0});Nr.onErrorResumeNext=Nr.onErrorResumeNextWith=void 0;var OW=sa(),EW=rb();function NP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=OW.argsOrArgArray(e);return function(n){return EW.onErrorResumeNext.apply(void 0,SW([n],xW(r)))}}Nr.onErrorResumeNextWith=NP;Nr.onErrorResumeNext=NP});var BP=g(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.pairwise=void 0;var AW=K(),PW=Q();function TW(){return AW.operate(function(e,t){var r,n=!1;e.subscribe(PW.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}md.pairwise=TW});var zP=g(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.pluck=void 0;var RW=In();function MW(){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 RW.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})}bd.pluck=MW});var UP=g(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.publish=void 0;var CW=ft(),kW=vd(),qW=jf();function IW(e){return e?function(t){return qW.connect(e)(t)}:function(t){return kW.multicast(new CW.Subject)(t)}}gd.publish=IW});var WP=g(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.publishBehavior=void 0;var jW=Rm(),LW=Nu();function FW(e){return function(t){var r=new jW.BehaviorSubject(e);return new LW.ConnectableObservable(t,function(){return r})}}yd.publishBehavior=FW});var VP=g(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.publishLast=void 0;var NW=al(),DW=Nu();function BW(){return function(e){var t=new NW.AsyncSubject;return new DW.ConnectableObservable(e,function(){return t})}}_d.publishLast=BW});var GP=g(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.publishReplay=void 0;var zW=ol(),UW=vd(),HP=Me();function WW(e,t,r,n){r&&!HP.isFunction(r)&&(n=r);var i=HP.isFunction(r)?r:void 0;return function(o){return UW.multicast(new zW.ReplaySubject(e,t,n),i)(o)}}wd.publishReplay=WW});var $P=g($n=>{"use strict";var VW=$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},HW=$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.raceWith=void 0;var GW=nb(),$W=K(),KW=lt();function ZW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?$W.operate(function(r,n){GW.raceInit(HW([r],VW(e)))(n)}):KW.identity}$n.raceWith=ZW});var ZP=g(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.repeat=void 0;var YW=pr(),XW=K(),KP=Q(),JW=de(),QW=Nn();function e7(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 YW.EMPTY}:XW.operate(function(i,o){var a=0,u,l=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?QW.timer(n):JW.innerFrom(n(a)),f=KP.createOperatorSubscriber(o,function(){f.unsubscribe(),s()});c.subscribe(f)}else s()},s=function(){var c=!1;u=i.subscribe(KP.createOperatorSubscriber(o,void 0,function(){++a<r?u?l():c=!0:o.complete()})),c&&l()};s()})}xd.repeat=e7});var XP=g(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.repeatWhen=void 0;var t7=de(),r7=ft(),n7=K(),YP=Q();function i7(e){return n7.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 r7.Subject,t7.innerFrom(e(o)).subscribe(YP.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){u=!1,n=t.subscribe(YP.createOperatorSubscriber(r,void 0,function(){u=!0,!l()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}Sd.repeatWhen=i7});var QP=g(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.retry=void 0;var o7=K(),JP=Q(),a7=lt(),u7=Nn(),s7=de();function c7(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?a7.identity:o7.operate(function(u,l){var s=0,c,f=function(){var p=!1;c=u.subscribe(JP.createOperatorSubscriber(l,function(d){a&&(s=0),l.next(d)},void 0,function(d){if(s++<n){var h=function(){c?(c.unsubscribe(),c=null,f()):p=!0};if(i!=null){var v=typeof i=="number"?u7.timer(i):s7.innerFrom(i(d,s)),b=JP.createOperatorSubscriber(l,function(){b.unsubscribe(),h()},function(){l.complete()});v.subscribe(b)}else h()}else l.error(d)})),p&&(c.unsubscribe(),c=null,f())};f()})}Od.retry=c7});var tT=g(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.retryWhen=void 0;var l7=de(),f7=ft(),d7=K(),eT=Q();function p7(e){return d7.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(eT.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new f7.Subject,l7.innerFrom(e(o)).subscribe(eT.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}Ed.retryWhen=p7});var wb=g(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.sample=void 0;var h7=de(),v7=K(),m7=ct(),rT=Q();function b7(e){return v7.operate(function(t,r){var n=!1,i=null;t.subscribe(rT.createOperatorSubscriber(r,function(o){n=!0,i=o})),h7.innerFrom(e).subscribe(rT.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},m7.noop))})}Ad.sample=b7});var nT=g(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.sampleTime=void 0;var g7=jt(),y7=wb(),_7=eb();function w7(e,t){return t===void 0&&(t=g7.asyncScheduler),y7.sample(_7.interval(e,t))}Pd.sampleTime=w7});var iT=g(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.scan=void 0;var x7=K(),S7=ub();function O7(e,t){return x7.operate(S7.scanInternals(e,t,arguments.length>=2,!0))}Td.scan=O7});var aT=g(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.sequenceEqual=void 0;var E7=K(),A7=Q(),P7=de();function T7(e,t){return t===void 0&&(t=function(r,n){return r===n}),E7.operate(function(r,n){var i=oT(),o=oT(),a=function(l){n.next(l),n.complete()},u=function(l,s){var c=A7.createOperatorSubscriber(n,function(f){var p=s.buffer,d=s.complete;p.length===0?d?a(!1):l.buffer.push(f):!t(f,p.shift())&&a(!1)},function(){l.complete=!0;var f=s.complete,p=s.buffer;f&&a(p.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),P7.innerFrom(e).subscribe(u(o,i))})}Rd.sequenceEqual=T7;function oT(){return{buffer:[],complete:!1}}});var Sb=g(Kn=>{"use strict";var R7=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},M7=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.share=void 0;var uT=de(),C7=ft(),sT=Fo(),k7=K();function q7(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new C7.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,f,p,d=0,h=!1,v=!1,b=function(){f?.unsubscribe(),f=void 0},y=function(){b(),c=p=void 0,h=v=!1},_=function(){var w=c;y(),w?.unsubscribe()};return k7.operate(function(w,x){d++,!v&&!h&&b();var S=p=p??r();x.add(function(){d--,d===0&&!v&&!h&&(f=xb(_,l))}),S.subscribe(x),!c&&d>0&&(c=new sT.SafeSubscriber({next:function(E){return S.next(E)},error:function(E){v=!0,b(),f=xb(y,i,E),S.error(E)},complete:function(){h=!0,b(),f=xb(y,a),S.complete()}}),uT.innerFrom(w).subscribe(c))})(s)}}Kn.share=q7;function xb(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 sT.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return uT.innerFrom(t.apply(void 0,M7([],R7(r)))).subscribe(i)}}});var cT=g(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.shareReplay=void 0;var I7=ol(),j7=Sb();function L7(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,j7.share({connector:function(){return new I7.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}Md.shareReplay=L7});var lT=g(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.single=void 0;var F7=qn(),N7=Km(),D7=$m(),B7=K(),z7=Q();function U7(e){return B7.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(z7.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new N7.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new D7.NotFoundError("No matching values"):new F7.EmptyError)}))})}Cd.single=U7});var fT=g(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.skip=void 0;var W7=Di();function V7(e){return W7.filter(function(t,r){return e<=r})}kd.skip=V7});var dT=g(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.skipLast=void 0;var H7=lt(),G7=K(),$7=Q();function K7(e){return e<=0?H7.identity:G7.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe($7.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}})}qd.skipLast=K7});var hT=g(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.skipUntil=void 0;var Z7=K(),pT=Q(),Y7=de(),X7=ct();function J7(e){return Z7.operate(function(t,r){var n=!1,i=pT.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},X7.noop);Y7.innerFrom(e).subscribe(i),t.subscribe(pT.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}Id.skipUntil=J7});var vT=g(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.skipWhile=void 0;var Q7=K(),eV=Q();function tV(e){return Q7.operate(function(t,r){var n=!1,i=0;t.subscribe(eV.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}jd.skipWhile=tV});var bT=g(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.startWith=void 0;var mT=Hu(),rV=Lt(),nV=K();function iV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=rV.popScheduler(e);return nV.operate(function(n,i){(r?mT.concat(e,n,r):mT.concat(e,n)).subscribe(i)})}Ld.startWith=iV});var Yu=g(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.switchMap=void 0;var oV=de(),aV=K(),gT=Q();function uV(e,t){return aV.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(gT.createOperatorSubscriber(n,function(l){i?.unsubscribe();var s=0,c=o++;oV.innerFrom(e(l,c)).subscribe(i=gT.createOperatorSubscriber(n,function(f){return n.next(t?t(l,f,c,s++):f)},function(){i=null,u()}))},function(){a=!0,u()}))})}Fd.switchMap=uV});var yT=g(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.switchAll=void 0;var sV=Yu(),cV=lt();function lV(){return sV.switchMap(cV.identity)}Nd.switchAll=lV});var wT=g(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.switchMapTo=void 0;var _T=Yu(),fV=Me();function dV(e,t){return fV.isFunction(t)?_T.switchMap(function(){return e},t):_T.switchMap(function(){return e})}Dd.switchMapTo=dV});var xT=g(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.switchScan=void 0;var pV=Yu(),hV=K();function vV(e,t){return hV.operate(function(r,n){var i=t;return pV.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Bd.switchScan=vV});var ST=g(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.takeUntil=void 0;var mV=K(),bV=Q(),gV=de(),yV=ct();function _V(e){return mV.operate(function(t,r){gV.innerFrom(e).subscribe(bV.createOperatorSubscriber(r,function(){return r.complete()},yV.noop)),!r.closed&&t.subscribe(r)})}zd.takeUntil=_V});var OT=g(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.takeWhile=void 0;var wV=K(),xV=Q();function SV(e,t){return t===void 0&&(t=!1),wV.operate(function(r,n){var i=0;r.subscribe(xV.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Ud.takeWhile=SV});var ET=g(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.tap=void 0;var OV=Me(),EV=K(),AV=Q(),PV=lt();function TV(e,t,r){var n=OV.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?EV.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(AV.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)}))}):PV.identity}Wd.tap=TV});var Ob=g(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.throttle=void 0;var RV=K(),AT=Q(),MV=de();function CV(e,t){return RV.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,f=null,p=!1,d=function(){f?.unsubscribe(),f=null,l&&(b(),p&&n.complete())},h=function(){f=null,p&&n.complete()},v=function(y){return f=MV.innerFrom(e(y)).subscribe(AT.createOperatorSubscriber(n,d,h))},b=function(){if(s){s=!1;var y=c;c=null,n.next(y),!p&&v(y)}};r.subscribe(AT.createOperatorSubscriber(n,function(y){s=!0,c=y,!(f&&!f.closed)&&(a?b():v(y))},function(){p=!0,!(l&&s&&f&&!f.closed)&&n.complete()}))})}Vd.throttle=CV});var PT=g(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.throttleTime=void 0;var kV=jt(),qV=Ob(),IV=Nn();function jV(e,t,r){t===void 0&&(t=kV.asyncScheduler);var n=IV.timer(e,t);return qV.throttle(function(){return n},r)}Hd.throttleTime=jV});var RT=g(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.TimeInterval=ma.timeInterval=void 0;var LV=jt(),FV=K(),NV=Q();function DV(e){return e===void 0&&(e=LV.asyncScheduler),FV.operate(function(t,r){var n=e.now();t.subscribe(NV.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new TT(i,a))}))})}ma.timeInterval=DV;var TT=function(){function e(t,r){this.value=t,this.interval=r}return e}();ma.TimeInterval=TT});var MT=g(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.timeoutWith=void 0;var BV=jt(),zV=zl(),UV=Ul();function WV(e,t,r){var n,i,o;if(r=r??BV.async,zV.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 UV.timeout({first:n,each:i,scheduler:r,with:o})}Gd.timeoutWith=WV});var CT=g($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.timestamp=void 0;var VV=il(),HV=In();function GV(e){return e===void 0&&(e=VV.dateTimestampProvider),HV.map(function(t){return{value:t,timestamp:e.now()}})}$d.timestamp=GV});var IT=g(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.window=void 0;var kT=ft(),$V=K(),qT=Q(),KV=ct(),ZV=de();function YV(e){return $V.operate(function(t,r){var n=new kT.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(qT.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),ZV.innerFrom(e).subscribe(qT.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new kT.Subject)},KV.noop,i)),function(){n?.unsubscribe(),n=null}})}Kd.window=YV});var LT=g(ba=>{"use strict";var XV=ba&&ba.__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(ba,"__esModule",{value:!0});ba.windowCount=void 0;var jT=ft(),JV=K(),QV=Q();function eH(e,t){t===void 0&&(t=0);var r=t>0?t:e;return JV.operate(function(n,i){var o=[new jT.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(QV.createOperatorSubscriber(i,function(l){var s,c;try{for(var f=XV(o),p=f.next();!p.done;p=f.next()){var d=p.value;d.next(l)}}catch(b){s={error:b}}finally{try{p&&!p.done&&(c=f.return)&&c.call(f)}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 jT.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}))})}ba.windowCount=eH});var NT=g(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.windowTime=void 0;var tH=ft(),rH=jt(),nH=Dt(),iH=K(),oH=Q(),aH=Xr(),uH=Lt(),FT=Jr();function sH(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=uH.popScheduler(n))!==null&&t!==void 0?t:rH.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return iH.operate(function(l,s){var c=[],f=!1,p=function(b){var y=b.window,_=b.subs;y.complete(),_.unsubscribe(),aH.arrRemove(c,b),f&&d()},d=function(){if(c){var b=new nH.Subscription;s.add(b);var y=new tH.Subject,_={window:y,subs:b,seen:0};c.push(_),s.next(y.asObservable()),FT.executeSchedule(b,o,function(){return p(_)},e)}};a!==null&&a>=0?FT.executeSchedule(s,o,d,a,!0):f=!0,d();var h=function(b){return c.slice().forEach(b)},v=function(b){h(function(y){var _=y.window;return b(_)}),b(s),s.unsubscribe()};return l.subscribe(oH.createOperatorSubscriber(s,function(b){h(function(y){y.window.next(b),u<=++y.seen&&p(y)})},function(){return v(function(b){return b.complete()})},function(b){return v(function(y){return y.error(b)})})),function(){c=null}})}Zd.windowTime=sH});var zT=g(ga=>{"use strict";var cH=ga&&ga.__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(ga,"__esModule",{value:!0});ga.windowToggle=void 0;var lH=ft(),fH=Dt(),dH=K(),DT=de(),Eb=Q(),BT=ct(),pH=Xr();function hH(e,t){return dH.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};DT.innerFrom(e).subscribe(Eb.createOperatorSubscriber(n,function(a){var u=new lH.Subject;i.push(u);var l=new fH.Subscription,s=function(){pH.arrRemove(i,u),u.complete(),l.unsubscribe()},c;try{c=DT.innerFrom(t(a))}catch(f){o(f);return}n.next(u.asObservable()),l.add(c.subscribe(Eb.createOperatorSubscriber(n,s,BT.noop,o)))},BT.noop)),r.subscribe(Eb.createOperatorSubscriber(n,function(a){var u,l,s=i.slice();try{for(var c=cH(s),f=c.next();!f.done;f=c.next()){var p=f.value;p.next(a)}}catch(d){u={error:d}}finally{try{f&&!f.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()}))})}ga.windowToggle=hH});var WT=g(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.windowWhen=void 0;var vH=ft(),mH=K(),UT=Q(),bH=de();function gH(e){return mH.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new vH.Subject,r.next(n.asObservable());var u;try{u=bH.innerFrom(e())}catch(l){o(l);return}u.subscribe(i=UT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(UT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}Yd.windowWhen=gH});var $T=g(Zn=>{"use strict";var VT=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},HT=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.withLatestFrom=void 0;var yH=K(),GT=Q(),_H=de(),wH=lt(),xH=ct(),SH=Lt();function OH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=SH.popResultSelector(e);return yH.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),l=!1,s=function(f){_H.innerFrom(e[f]).subscribe(GT.createOperatorSubscriber(i,function(p){a[f]=p,!l&&!u[f]&&(u[f]=!0,(l=u.every(wH.identity))&&(u=null))},xH.noop))},c=0;c<o;c++)s(c);n.subscribe(GT.createOperatorSubscriber(i,function(f){if(l){var p=HT([f],VT(a));i.next(r?r.apply(void 0,HT([],VT(p))):p)}}))})}Zn.withLatestFrom=OH});var KT=g(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.zipAll=void 0;var EH=yf(),AH=cb();function PH(e){return AH.joinAllInternals(EH.zip,e)}Xd.zipAll=PH});var ZT=g(Yn=>{"use strict";var TH=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},RH=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.zip=void 0;var MH=yf(),CH=K();function kH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return CH.operate(function(r,n){MH.zip.apply(void 0,RH([r],TH(e))).subscribe(n)})}Yn.zip=kH});var YT=g(Xn=>{"use strict";var qH=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},IH=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.zipWith=void 0;var jH=ZT();function LH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jH.zip.apply(void 0,IH([],qH(e)))}Xn.zipWith=LH});var nR=g(m=>{"use strict";var FH=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]}),NH=m&&m.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&FH(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 DH=ke();Object.defineProperty(m,"Observable",{enumerable:!0,get:function(){return DH.Observable}});var BH=Nu();Object.defineProperty(m,"ConnectableObservable",{enumerable:!0,get:function(){return BH.ConnectableObservable}});var zH=Lu();Object.defineProperty(m,"observable",{enumerable:!0,get:function(){return zH.observable}});var UH=tE();Object.defineProperty(m,"animationFrames",{enumerable:!0,get:function(){return UH.animationFrames}});var WH=ft();Object.defineProperty(m,"Subject",{enumerable:!0,get:function(){return WH.Subject}});var VH=Rm();Object.defineProperty(m,"BehaviorSubject",{enumerable:!0,get:function(){return VH.BehaviorSubject}});var HH=ol();Object.defineProperty(m,"ReplaySubject",{enumerable:!0,get:function(){return HH.ReplaySubject}});var GH=al();Object.defineProperty(m,"AsyncSubject",{enumerable:!0,get:function(){return GH.AsyncSubject}});var XT=gE();Object.defineProperty(m,"asap",{enumerable:!0,get:function(){return XT.asap}});Object.defineProperty(m,"asapScheduler",{enumerable:!0,get:function(){return XT.asapScheduler}});var JT=jt();Object.defineProperty(m,"async",{enumerable:!0,get:function(){return JT.async}});Object.defineProperty(m,"asyncScheduler",{enumerable:!0,get:function(){return JT.asyncScheduler}});var QT=wE();Object.defineProperty(m,"queue",{enumerable:!0,get:function(){return QT.queue}});Object.defineProperty(m,"queueScheduler",{enumerable:!0,get:function(){return QT.queueScheduler}});var eR=EE();Object.defineProperty(m,"animationFrame",{enumerable:!0,get:function(){return eR.animationFrame}});Object.defineProperty(m,"animationFrameScheduler",{enumerable:!0,get:function(){return eR.animationFrameScheduler}});var tR=TE();Object.defineProperty(m,"VirtualTimeScheduler",{enumerable:!0,get:function(){return tR.VirtualTimeScheduler}});Object.defineProperty(m,"VirtualAction",{enumerable:!0,get:function(){return tR.VirtualAction}});var $H=Cm();Object.defineProperty(m,"Scheduler",{enumerable:!0,get:function(){return $H.Scheduler}});var KH=Dt();Object.defineProperty(m,"Subscription",{enumerable:!0,get:function(){return KH.Subscription}});var ZH=Fo();Object.defineProperty(m,"Subscriber",{enumerable:!0,get:function(){return ZH.Subscriber}});var rR=kl();Object.defineProperty(m,"Notification",{enumerable:!0,get:function(){return rR.Notification}});Object.defineProperty(m,"NotificationKind",{enumerable:!0,get:function(){return rR.NotificationKind}});var YH=Fu();Object.defineProperty(m,"pipe",{enumerable:!0,get:function(){return YH.pipe}});var XH=ct();Object.defineProperty(m,"noop",{enumerable:!0,get:function(){return XH.noop}});var JH=lt();Object.defineProperty(m,"identity",{enumerable:!0,get:function(){return JH.identity}});var QH=HE();Object.defineProperty(m,"isObservable",{enumerable:!0,get:function(){return QH.isObservable}});var eG=GE();Object.defineProperty(m,"lastValueFrom",{enumerable:!0,get:function(){return eG.lastValueFrom}});var tG=$E();Object.defineProperty(m,"firstValueFrom",{enumerable:!0,get:function(){return tG.firstValueFrom}});var rG=Gm();Object.defineProperty(m,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rG.ArgumentOutOfRangeError}});var nG=qn();Object.defineProperty(m,"EmptyError",{enumerable:!0,get:function(){return nG.EmptyError}});var iG=$m();Object.defineProperty(m,"NotFoundError",{enumerable:!0,get:function(){return iG.NotFoundError}});var oG=Em();Object.defineProperty(m,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return oG.ObjectUnsubscribedError}});var aG=Km();Object.defineProperty(m,"SequenceError",{enumerable:!0,get:function(){return aG.SequenceError}});var uG=Ul();Object.defineProperty(m,"TimeoutError",{enumerable:!0,get:function(){return uG.TimeoutError}});var sG=dm();Object.defineProperty(m,"UnsubscriptionError",{enumerable:!0,get:function(){return sG.UnsubscriptionError}});var cG=ZE();Object.defineProperty(m,"bindCallback",{enumerable:!0,get:function(){return cG.bindCallback}});var lG=YE();Object.defineProperty(m,"bindNodeCallback",{enumerable:!0,get:function(){return lG.bindNodeCallback}});var fG=Kl();Object.defineProperty(m,"combineLatest",{enumerable:!0,get:function(){return fG.combineLatest}});var dG=Hu();Object.defineProperty(m,"concat",{enumerable:!0,get:function(){return dG.concat}});var pG=iA();Object.defineProperty(m,"connectable",{enumerable:!0,get:function(){return pG.connectable}});var hG=Gu();Object.defineProperty(m,"defer",{enumerable:!0,get:function(){return hG.defer}});var vG=pr();Object.defineProperty(m,"empty",{enumerable:!0,get:function(){return vG.empty}});var mG=oA();Object.defineProperty(m,"forkJoin",{enumerable:!0,get:function(){return mG.forkJoin}});var bG=Qr();Object.defineProperty(m,"from",{enumerable:!0,get:function(){return bG.from}});var gG=uA();Object.defineProperty(m,"fromEvent",{enumerable:!0,get:function(){return gG.fromEvent}});var yG=cA();Object.defineProperty(m,"fromEventPattern",{enumerable:!0,get:function(){return yG.fromEventPattern}});var _G=fA();Object.defineProperty(m,"generate",{enumerable:!0,get:function(){return _G.generate}});var wG=dA();Object.defineProperty(m,"iif",{enumerable:!0,get:function(){return wG.iif}});var xG=eb();Object.defineProperty(m,"interval",{enumerable:!0,get:function(){return xG.interval}});var SG=hA();Object.defineProperty(m,"merge",{enumerable:!0,get:function(){return SG.merge}});var OG=tb();Object.defineProperty(m,"never",{enumerable:!0,get:function(){return OG.never}});var EG=Ml();Object.defineProperty(m,"of",{enumerable:!0,get:function(){return EG.of}});var AG=rb();Object.defineProperty(m,"onErrorResumeNext",{enumerable:!0,get:function(){return AG.onErrorResumeNext}});var PG=mA();Object.defineProperty(m,"pairs",{enumerable:!0,get:function(){return PG.pairs}});var TG=_A();Object.defineProperty(m,"partition",{enumerable:!0,get:function(){return TG.partition}});var RG=nb();Object.defineProperty(m,"race",{enumerable:!0,get:function(){return RG.race}});var MG=SA();Object.defineProperty(m,"range",{enumerable:!0,get:function(){return MG.range}});var CG=Hm();Object.defineProperty(m,"throwError",{enumerable:!0,get:function(){return CG.throwError}});var kG=Nn();Object.defineProperty(m,"timer",{enumerable:!0,get:function(){return kG.timer}});var qG=OA();Object.defineProperty(m,"using",{enumerable:!0,get:function(){return qG.using}});var IG=yf();Object.defineProperty(m,"zip",{enumerable:!0,get:function(){return IG.zip}});var jG=Vm();Object.defineProperty(m,"scheduled",{enumerable:!0,get:function(){return jG.scheduled}});var LG=pr();Object.defineProperty(m,"EMPTY",{enumerable:!0,get:function(){return LG.EMPTY}});var FG=tb();Object.defineProperty(m,"NEVER",{enumerable:!0,get:function(){return FG.NEVER}});NH(AA(),m);var NG=jo();Object.defineProperty(m,"config",{enumerable:!0,get:function(){return NG.config}});var DG=ib();Object.defineProperty(m,"audit",{enumerable:!0,get:function(){return DG.audit}});var BG=TA();Object.defineProperty(m,"auditTime",{enumerable:!0,get:function(){return BG.auditTime}});var zG=MA();Object.defineProperty(m,"buffer",{enumerable:!0,get:function(){return zG.buffer}});var UG=CA();Object.defineProperty(m,"bufferCount",{enumerable:!0,get:function(){return UG.bufferCount}});var WG=qA();Object.defineProperty(m,"bufferTime",{enumerable:!0,get:function(){return WG.bufferTime}});var VG=LA();Object.defineProperty(m,"bufferToggle",{enumerable:!0,get:function(){return VG.bufferToggle}});var HG=NA();Object.defineProperty(m,"bufferWhen",{enumerable:!0,get:function(){return HG.bufferWhen}});var GG=BA();Object.defineProperty(m,"catchError",{enumerable:!0,get:function(){return GG.catchError}});var $G=zA();Object.defineProperty(m,"combineAll",{enumerable:!0,get:function(){return $G.combineAll}});var KG=lb();Object.defineProperty(m,"combineLatestAll",{enumerable:!0,get:function(){return KG.combineLatestAll}});var ZG=GA();Object.defineProperty(m,"combineLatestWith",{enumerable:!0,get:function(){return ZG.combineLatestWith}});var YG=ef();Object.defineProperty(m,"concatAll",{enumerable:!0,get:function(){return YG.concatAll}});var XG=fb();Object.defineProperty(m,"concatMap",{enumerable:!0,get:function(){return XG.concatMap}});var JG=ZA();Object.defineProperty(m,"concatMapTo",{enumerable:!0,get:function(){return JG.concatMapTo}});var QG=XA();Object.defineProperty(m,"concatWith",{enumerable:!0,get:function(){return QG.concatWith}});var e9=jf();Object.defineProperty(m,"connect",{enumerable:!0,get:function(){return e9.connect}});var t9=QA();Object.defineProperty(m,"count",{enumerable:!0,get:function(){return t9.count}});var r9=tP();Object.defineProperty(m,"debounce",{enumerable:!0,get:function(){return r9.debounce}});var n9=rP();Object.defineProperty(m,"debounceTime",{enumerable:!0,get:function(){return n9.debounceTime}});var i9=$u();Object.defineProperty(m,"defaultIfEmpty",{enumerable:!0,get:function(){return i9.defaultIfEmpty}});var o9=oP();Object.defineProperty(m,"delay",{enumerable:!0,get:function(){return o9.delay}});var a9=hb();Object.defineProperty(m,"delayWhen",{enumerable:!0,get:function(){return a9.delayWhen}});var u9=aP();Object.defineProperty(m,"dematerialize",{enumerable:!0,get:function(){return u9.dematerialize}});var s9=sP();Object.defineProperty(m,"distinct",{enumerable:!0,get:function(){return s9.distinct}});var c9=vb();Object.defineProperty(m,"distinctUntilChanged",{enumerable:!0,get:function(){return c9.distinctUntilChanged}});var l9=cP();Object.defineProperty(m,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return l9.distinctUntilKeyChanged}});var f9=fP();Object.defineProperty(m,"elementAt",{enumerable:!0,get:function(){return f9.elementAt}});var d9=dP();Object.defineProperty(m,"endWith",{enumerable:!0,get:function(){return d9.endWith}});var p9=pP();Object.defineProperty(m,"every",{enumerable:!0,get:function(){return p9.every}});var h9=bP();Object.defineProperty(m,"exhaust",{enumerable:!0,get:function(){return h9.exhaust}});var v9=bb();Object.defineProperty(m,"exhaustAll",{enumerable:!0,get:function(){return v9.exhaustAll}});var m9=mb();Object.defineProperty(m,"exhaustMap",{enumerable:!0,get:function(){return m9.exhaustMap}});var b9=gP();Object.defineProperty(m,"expand",{enumerable:!0,get:function(){return b9.expand}});var g9=Di();Object.defineProperty(m,"filter",{enumerable:!0,get:function(){return g9.filter}});var y9=yP();Object.defineProperty(m,"finalize",{enumerable:!0,get:function(){return y9.finalize}});var _9=gb();Object.defineProperty(m,"find",{enumerable:!0,get:function(){return _9.find}});var w9=wP();Object.defineProperty(m,"findIndex",{enumerable:!0,get:function(){return w9.findIndex}});var x9=xP();Object.defineProperty(m,"first",{enumerable:!0,get:function(){return x9.first}});var S9=OP();Object.defineProperty(m,"groupBy",{enumerable:!0,get:function(){return S9.groupBy}});var O9=db();Object.defineProperty(m,"ignoreElements",{enumerable:!0,get:function(){return O9.ignoreElements}});var E9=EP();Object.defineProperty(m,"isEmpty",{enumerable:!0,get:function(){return E9.isEmpty}});var A9=AP();Object.defineProperty(m,"last",{enumerable:!0,get:function(){return A9.last}});var P9=In();Object.defineProperty(m,"map",{enumerable:!0,get:function(){return P9.map}});var T9=pb();Object.defineProperty(m,"mapTo",{enumerable:!0,get:function(){return T9.mapTo}});var R9=PP();Object.defineProperty(m,"materialize",{enumerable:!0,get:function(){return R9.materialize}});var M9=TP();Object.defineProperty(m,"max",{enumerable:!0,get:function(){return M9.max}});var C9=Vu();Object.defineProperty(m,"mergeAll",{enumerable:!0,get:function(){return C9.mergeAll}});var k9=RP();Object.defineProperty(m,"flatMap",{enumerable:!0,get:function(){return k9.flatMap}});var q9=tn();Object.defineProperty(m,"mergeMap",{enumerable:!0,get:function(){return q9.mergeMap}});var I9=CP();Object.defineProperty(m,"mergeMapTo",{enumerable:!0,get:function(){return I9.mergeMapTo}});var j9=kP();Object.defineProperty(m,"mergeScan",{enumerable:!0,get:function(){return j9.mergeScan}});var L9=jP();Object.defineProperty(m,"mergeWith",{enumerable:!0,get:function(){return L9.mergeWith}});var F9=LP();Object.defineProperty(m,"min",{enumerable:!0,get:function(){return F9.min}});var N9=vd();Object.defineProperty(m,"multicast",{enumerable:!0,get:function(){return N9.multicast}});var D9=Uu();Object.defineProperty(m,"observeOn",{enumerable:!0,get:function(){return D9.observeOn}});var B9=DP();Object.defineProperty(m,"onErrorResumeNextWith",{enumerable:!0,get:function(){return B9.onErrorResumeNextWith}});var z9=BP();Object.defineProperty(m,"pairwise",{enumerable:!0,get:function(){return z9.pairwise}});var U9=zP();Object.defineProperty(m,"pluck",{enumerable:!0,get:function(){return U9.pluck}});var W9=UP();Object.defineProperty(m,"publish",{enumerable:!0,get:function(){return W9.publish}});var V9=WP();Object.defineProperty(m,"publishBehavior",{enumerable:!0,get:function(){return V9.publishBehavior}});var H9=VP();Object.defineProperty(m,"publishLast",{enumerable:!0,get:function(){return H9.publishLast}});var G9=GP();Object.defineProperty(m,"publishReplay",{enumerable:!0,get:function(){return G9.publishReplay}});var $9=$P();Object.defineProperty(m,"raceWith",{enumerable:!0,get:function(){return $9.raceWith}});var K9=pa();Object.defineProperty(m,"reduce",{enumerable:!0,get:function(){return K9.reduce}});var Z9=ZP();Object.defineProperty(m,"repeat",{enumerable:!0,get:function(){return Z9.repeat}});var Y9=XP();Object.defineProperty(m,"repeatWhen",{enumerable:!0,get:function(){return Y9.repeatWhen}});var X9=QP();Object.defineProperty(m,"retry",{enumerable:!0,get:function(){return X9.retry}});var J9=tT();Object.defineProperty(m,"retryWhen",{enumerable:!0,get:function(){return J9.retryWhen}});var Q9=Sm();Object.defineProperty(m,"refCount",{enumerable:!0,get:function(){return Q9.refCount}});var e$=wb();Object.defineProperty(m,"sample",{enumerable:!0,get:function(){return e$.sample}});var t$=nT();Object.defineProperty(m,"sampleTime",{enumerable:!0,get:function(){return t$.sampleTime}});var r$=iT();Object.defineProperty(m,"scan",{enumerable:!0,get:function(){return r$.scan}});var n$=aT();Object.defineProperty(m,"sequenceEqual",{enumerable:!0,get:function(){return n$.sequenceEqual}});var i$=Sb();Object.defineProperty(m,"share",{enumerable:!0,get:function(){return i$.share}});var o$=cT();Object.defineProperty(m,"shareReplay",{enumerable:!0,get:function(){return o$.shareReplay}});var a$=lT();Object.defineProperty(m,"single",{enumerable:!0,get:function(){return a$.single}});var u$=fT();Object.defineProperty(m,"skip",{enumerable:!0,get:function(){return u$.skip}});var s$=dT();Object.defineProperty(m,"skipLast",{enumerable:!0,get:function(){return s$.skipLast}});var c$=hT();Object.defineProperty(m,"skipUntil",{enumerable:!0,get:function(){return c$.skipUntil}});var l$=vT();Object.defineProperty(m,"skipWhile",{enumerable:!0,get:function(){return l$.skipWhile}});var f$=bT();Object.defineProperty(m,"startWith",{enumerable:!0,get:function(){return f$.startWith}});var d$=Wu();Object.defineProperty(m,"subscribeOn",{enumerable:!0,get:function(){return d$.subscribeOn}});var p$=yT();Object.defineProperty(m,"switchAll",{enumerable:!0,get:function(){return p$.switchAll}});var h$=Yu();Object.defineProperty(m,"switchMap",{enumerable:!0,get:function(){return h$.switchMap}});var v$=wT();Object.defineProperty(m,"switchMapTo",{enumerable:!0,get:function(){return v$.switchMapTo}});var m$=xT();Object.defineProperty(m,"switchScan",{enumerable:!0,get:function(){return m$.switchScan}});var b$=Ku();Object.defineProperty(m,"take",{enumerable:!0,get:function(){return b$.take}});var g$=yb();Object.defineProperty(m,"takeLast",{enumerable:!0,get:function(){return g$.takeLast}});var y$=ST();Object.defineProperty(m,"takeUntil",{enumerable:!0,get:function(){return y$.takeUntil}});var _$=OT();Object.defineProperty(m,"takeWhile",{enumerable:!0,get:function(){return _$.takeWhile}});var w$=ET();Object.defineProperty(m,"tap",{enumerable:!0,get:function(){return w$.tap}});var x$=Ob();Object.defineProperty(m,"throttle",{enumerable:!0,get:function(){return x$.throttle}});var S$=PT();Object.defineProperty(m,"throttleTime",{enumerable:!0,get:function(){return S$.throttleTime}});var O$=Zu();Object.defineProperty(m,"throwIfEmpty",{enumerable:!0,get:function(){return O$.throwIfEmpty}});var E$=RT();Object.defineProperty(m,"timeInterval",{enumerable:!0,get:function(){return E$.timeInterval}});var A$=Ul();Object.defineProperty(m,"timeout",{enumerable:!0,get:function(){return A$.timeout}});var P$=MT();Object.defineProperty(m,"timeoutWith",{enumerable:!0,get:function(){return P$.timeoutWith}});var T$=CT();Object.defineProperty(m,"timestamp",{enumerable:!0,get:function(){return T$.timestamp}});var R$=sb();Object.defineProperty(m,"toArray",{enumerable:!0,get:function(){return R$.toArray}});var M$=IT();Object.defineProperty(m,"window",{enumerable:!0,get:function(){return M$.window}});var C$=LT();Object.defineProperty(m,"windowCount",{enumerable:!0,get:function(){return C$.windowCount}});var k$=NT();Object.defineProperty(m,"windowTime",{enumerable:!0,get:function(){return k$.windowTime}});var q$=zT();Object.defineProperty(m,"windowToggle",{enumerable:!0,get:function(){return q$.windowToggle}});var I$=WT();Object.defineProperty(m,"windowWhen",{enumerable:!0,get:function(){return I$.windowWhen}});var j$=$T();Object.defineProperty(m,"withLatestFrom",{enumerable:!0,get:function(){return j$.withLatestFrom}});var L$=KT();Object.defineProperty(m,"zipAll",{enumerable:!0,get:function(){return L$.zipAll}});var F$=YT();Object.defineProperty(m,"zipWith",{enumerable:!0,get:function(){return F$.zipWith}})});var Pb=g(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.checkAbortSignal=oR;Bi.abortBreakPoint=D$;Bi.makeAbortError=aR;Bi.observeAbortSignal=B$;Bi.isAbortException=z$;var iR=nR(),Ab=class extends Error{};function oR(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw aR()}}function N$(e){return new Promise(t=>setTimeout(t,e))}async function D$(e){await N$(1),oR(e)}function aR(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Ab("aborted");return e.code="ERR_ABORTED",e}function B$(e){return e?(0,iR.fromEvent)(e,"abort"):new iR.Observable}function z$(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var uR=g(Rb=>{"use strict";Object.defineProperty(Rb,"__esModule",{value:!0});Rb.makeAbortableReaction=V$;var U$=Ec(),Xu=_t(),W$=Pb(),Tb=Iv();function V$(e,t,r,n,i,o,a){let u;function l(s){(0,W$.isAbortException)(s)||(console.error(s),(0,Xu.isAlive)(e)&&a(s))}(0,Xu.addDisposer)(e,(0,U$.reaction)(()=>{try{return t(e)}catch(s){l(s);return}},async(s,c)=>{if(u&&(0,Tb.stopStopToken)(u),!!(0,Xu.isAlive)(e)){u=(0,Tb.createStopToken)(),i(u);try{let f=await r(s,u,e,c);(0,Xu.isAlive)(e)&&o(f)}catch(f){l(f)}}},n)),(0,Xu.addDisposer)(e,()=>{u&&(0,Tb.stopStopToken)(u)})}});var Mu=g(L=>{"use strict";var H$=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]}),Ui=L&&L.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&H$(t,e,r)},sR=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=Y$;L.useWidthSetter=X$;L.useDebouncedCallback=J$;L.findParentThat=lR;L.springAnimate=Q$;L.findParentThatIs=Qu;L.getSession=eK;L.getContainingView=fR;L.getContainingTrack=tK;L.getContainingDisplay=rK;L.assembleLocString=nK;L.assembleLocStringFast=dR;L.parseLocStringOneBased=pR;L.parseLocString=Mb;L.compareLocs=hR;L.compareLocStrings=iK;L.clamp=oK;L.bpToPx=Cb;L.radToDeg=cK;L.degToRad=lK;L.polarToCartesian=fK;L.cartesianToPolar=dK;L.featureSpanPx=pK;L.bpSpanPx=vR;L.iterMap=hK;L.findLastIndex=vK;L.findLast=mK;L.renameRegionIfNeeded=mR;L.renameRegionsIfNeeded=bK;L.minmax=gK;L.shorten=bR;L.shorten2=yK;L.stringify=_K;L.revcom=wK;L.reverse=xK;L.complement=SK;L.measureText=gR;L.getFrame=EK;L.generateCodonTable=AK;L.updateStatus=kb;L.updateStatus2=PK;L.hashCode=yR;L.objectHash=TK;L.bytesForRegions=RK;L.isSupportedIndexingAdapter=MK;L.getBpDisplayStr=CK;L.getProgressDisplayStr=kK;L.toLocale=ya;L.getTickDisplayStr=qK;L.getViewParams=IK;L.getLayoutId=jK;L.useLocalStorage=LK;L.getUriLink=_R;L.getStr=wR;L.coarseStripHTML=xR;L.linkify=FK;L.measureGridWidth=NK;L.getEnv=DK;L.localStorageGetItem=Ib;L.localStorageSetItem=SR;L.max=OR;L.min=BK;L.sum=ER;L.avg=zK;L.groupBy=UK;L.notEmpty=WK;L.mergeIntervals=AR;L.gatherOverlaps=VK;L.stripAlpha=HK;L.getStrokeProps=GK;L.getFillProps=$K;L.renderToStaticMarkup=KK;L.isGzip=PR;L.fetchAndMaybeUnzip=TR;L.fetchAndMaybeUnzipText=ZK;L.isObject=RR;L.localStorageGetNumber=YK;L.localStorageGetBoolean=XK;L.localStorageSetBoolean=JK;L.forEachWithStopTokenCheck=QK;L.testAdapter=eZ;var zi=Fe(),G$=Bx(),$$=sR(zx()),hr=_t(),K$=uc(),Z$=Wx(),qb=sS(),cR=Iv(),Ju=Ic();Ui(Ic(),L);Ui(hO(),L);Ui(vO(),L);Ui(mO(),L);Ui(um(),L);Ui(TO(),L);function Y$(e,t){let[r,n]=(0,zi.useState)(e);return(0,zi.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function X$(e,t){let[r,{width:n}]=(0,$$.default)();return(0,zi.useEffect)(()=>{n&&(0,hr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function J$(e,t=400){let r=(0,zi.useRef)(null),n=(0,zi.useRef)(null);return(0,zi.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 lR(e,t){if(!(0,hr.hasParent)(e))throw new Error("node does not have parent");let r=(0,hr.getParent)(e);for(;r&&(0,hr.isAlive)(r);){if(t(r))return r;if((0,hr.hasParent)(r))r=(0,hr.getParent)(r);else break}throw new Error("no matching node found")}function Q$(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function c(f){let p=Date.now(),d=f.lastPosition,h=f.lastTime||p,v=f.lastVelocity||0;p>h+64&&(h=p);let b=Math.floor(p-h);for(let S=0;S<b;++S){let E=-o*(d-t),P=-a*v,R=(E+P)/1;v+=R*1/1e3,d+=v*1/1e3}let y=Math.abs(v)<=i,_=o!==0?Math.abs(t-d)<=i:!0;(u&&o!==0?e<t?d>t:d<t:!1)||y&&_?(r(t),n()):(r(d),s=requestAnimationFrame(()=>{c({lastPosition:d,lastTime:p,lastVelocity:v})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Qu(e,t){return lR(e,t)}function eK(e){try{return Qu(e,Ju.isSessionModel)}catch{throw new Error("no session model found!")}}function fR(e){try{return Qu(e,Ju.isViewModel)}catch{throw new Error("no containing view found")}}function tK(e){try{return Qu(e,Ju.isTrackModel)}catch{throw new Error("no containing track found")}}function rK(e){try{return Qu(e,Ju.isDisplayModel)}catch{throw new Error("no containing display found")}}function nK(e){return dR(e,ya)}function dR(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 pR(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 f=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),p=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(f){let[,d,,,,h]=f;if(d!==void 0&&h!==void 0)return{assemblyName:a,refName:s,start:+d.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(p){let[,d,,,h]=p;if(d!==void 0)return h?{assemblyName:a,refName:s,start:+d.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+d.replaceAll(",",""),end:+d.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 Mb(e,t){let r=pR(e,t);return typeof r.start=="number"&&(r.start-=1),r}function hR(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 iK(e,t,r){let n=Mb(e,r),i=Mb(t,r);return hR(n,i)}function oK(e,t,r){return e<t?t:e>r?r:e}function aK(e){return Math.round(e*10)/10}function Cb(e,{reversed:t,end:r=0,start:n=0},i){return aK((t?r-e:e-n)/i)}var uK=180/Math.PI,sK=Math.PI/180;function cK(e){return e*uK%360}function lK(e){return e*sK%(2*Math.PI)}function fK(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function dK(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function pK(e,t,r){return vR(e.get("start"),e.get("end"),t,r)}function vR(e,t,r,n){let i=Cb(e,r,n),o=Cb(t,r,n);return r.reversed?[o,i]:[i,o]}function hK(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 vK(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function mK(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function mR(e,t){if((0,hr.isStateTreeNode)(t)&&!(0,hr.isAlive)(t))return t;if(e?.[t.refName]){t=(0,hr.isStateTreeNode)(t)?{...(0,hr.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function bK(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)=>mR(o[i[u]],a))}}function gK(e,t){return[Math.min(e,t),Math.max(e,t)]}function bR(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function yK(e,t=70){return e.length>t?`${e.slice(0,t)}...`:e}function _K({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${bR(e)}:${ya(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 wK(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 xK(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function SK(e){var t;let r="";for(let n of e)r+=(t=L.complementTable[n])!==null&&t!==void 0?t:n;return r}L.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var OK=[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 gR(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=OK[u])!==null&&r!==void 0?r:n}return o*t}function EK(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 AK(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],f=a+l+c;t[f]=n}}}}return t}async function kb(e,t,r){t(e);let n=await r();return t(""),n}async function PK(e,t,r,n){t(e);let i=await n();return(0,cR.checkStopToken)(r),t(""),i}function yR(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 TK(e){return`${yR(JSON.stringify(e))}`}async function RK(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 MK(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function CK(e){return Math.floor(e/1e6)>0?`${Jn(e/1e6)}Mbp`:Math.floor(e/1e3)>0?`${Jn(e/1e3)}Kbp`:`${Math.floor(e)}bp`}function Jn(e){return ya(Number.parseFloat(e.toPrecision(3)))}function kK(e,t){return Math.floor(t/1e6)>0?`${Jn(e/1e6)}/${Jn(t/1e6)}Mb`:Math.floor(t/1e3)>0?`${Jn(e/1e3)}/${Jn(t/1e3)}Kb`:`${Jn(e)}/${Jn(t)}}bytes`}function ya(e){return e.toLocaleString("en-US")}function qK(e,t){return Math.floor(t/1e3)>0?`${ya(Number.parseFloat((e/1e6).toFixed(2)))}M`:ya(Math.floor(e))}function IK(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=fR(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 jK({sessionId:e,layoutId:t}){return`${e}-${t}`}function LK(e,t){let[r,n]=(0,zi.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 _R(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function wR(e){return RR(e)?(0,Ju.isUriLocation)(e)?_R(e):JSON.stringify(e):String(e)}function xR(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function FK(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 NK(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return OR(e.map(u=>wR(u)).map(u=>a?xR(u):u).map(u=>gR(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function DK(e){return(0,hr.getEnv)(e)}function Ib(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function SR(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function OR(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function BK(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function ER(e){let t=0;for(let r of e)t+=r;return t}function zK(e){return ER(e)/e.length}function UK(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function WK(e){return e!=null}function AR(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 VK(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=>AR(n.sort((i,o)=>i.start-o.start),t))}function HK(e){return(0,qb.colord)(e).alpha(1).toHex()}function GK(e){let t=(0,qb.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}function $K(e){let t=(0,qb.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}function KK(e){let t=document.createElement("div");return(0,K$.flushSync)(()=>{(0,Z$.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function PR(e){return e[0]===31&&e[1]===139&&e[2]===8}async function TR(e,t={}){let{statusCallback:r=()=>{}}=t,n=await kb("Downloading file",r,()=>e.readFile(t));return PR(n)?await kb("Unzipping",r,()=>(0,G$.unzip)(n)):n}async function ZK(e,t){let r=await TR(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function RR(e){return typeof e=="object"&&e!==null}function YK(e,t){var r;return+((r=Ib(e))!==null&&r!==void 0?r:t)}function XK(e,t){return!!JSON.parse(Ib(e)||JSON.stringify(t))}function JK(e,t){SR(e,JSON.stringify(t))}function QK(e,t,r,n=400){let i=performance.now(),o=0;for(let a of e)performance.now()-i>n&&((0,cR.checkStopToken)(t),i=performance.now()),r(a,o++)}function eZ(e,t,r,n){return t.test(e)&&!r||r===n}var MR=MO();Object.defineProperty(L,"SimpleFeature",{enumerable:!0,get:function(){return sR(MR).default}});Object.defineProperty(L,"isFeature",{enumerable:!0,get:function(){return MR.isFeature}});var tZ=cm();Object.defineProperty(L,"blobToDataURL",{enumerable:!0,get:function(){return tZ.blobToDataURL}});var rZ=uR();Object.defineProperty(L,"makeAbortableReaction",{enumerable:!0,get:function(){return rZ.makeAbortableReaction}});Ui(Pb(),L)});var kR=g(jb=>{"use strict";Object.defineProperty(jb,"__esModule",{value:!0});jb.default=nZ;var CR=Mu();function nZ(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,CR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return`adp-${(0,CR.hashCode)(t)}`}});var qR=g(es=>{"use strict";var iZ=es&&es.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(es,"__esModule",{value:!0});es.adapterConfigCacheKey=aZ;var oZ=iZ(kR());function aZ(e={}){return`${(0,oZ.default)(e)}`}});var Lb=g(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.getAdapter=IR;ts.freeAdapterResources=cZ;ts.clearAdapterCache=lZ;var uZ=qR(),Wi={};async function sZ(e,t,r){let n=r?.type;if(!n)throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(r)}`);let i=e.getAdapterType(n);if(!i)throw new Error(`unknown data adapter type ${n}`);let o=i.configSchema.create(r,{pluginManager:e}),a=IR.bind(null,e,t),u=await i.getAdapterClass();return{dataAdapter:new u(o,a,e),sessionIds:new Set([t])}}async function IR(e,t,r){var n;let i=(0,uZ.adapterConfigCacheKey)(r);(n=Wi[i])!==null&&n!==void 0||(Wi[i]=sZ(e,t,r));let o=await Wi[i];return o.sessionIds.add(t),o}async function cZ(e){let t=Object.keys(e);if(t.length===1&&t[0]==="sessionId"){let{sessionId:r}=e;for(let[n,i]of Object.entries(Wi)){let o=await i;o.sessionIds.delete(r),o.sessionIds.size===0&&delete Wi[n]}}else for(let r of Object.values(Wi)){let n=await r,i=e.regions||(e.region?[e.region]:[]);for(let o of i)o.refName!==void 0&&n.dataAdapter.freeResources(o)}}function lZ(){Wi={}}});var jR=g(Nb=>{"use strict";Object.defineProperty(Nb,"__esModule",{value:!0});var Fb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};Nb.default=Fb});var FR=g(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:!0});Bb.default=Db;var LR=e=>typeof e=="object"&&e!==null,fZ=e=>LR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function Db(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{for(let o of i)t(o),LR(o)&&Db(o,t,r)};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),fZ(i)&&(Array.isArray(i)?n(i):Db(i,t,r))}});var DR=g(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.UNSUPPORTED=Ve.UNKNOWN=void 0;Ve.getTrackAssemblyNames=dZ;Ve.getConfAssemblyNames=NR;Ve.getRpcSessionId=pZ;Ve.getParentRenderProps=hZ;Ve.getBlob=vZ;Ve.getBlobMap=mZ;Ve.setBlobMap=bZ;Ve.storeBlobLocation=yZ;Ve.makeIndex=_Z;Ve.makeIndexType=wZ;Ve.getFileName=xZ;Ve.guessAdapter=SZ;Ve.guessTrackType=OZ;Ve.generateUnsupportedTrackConf=EZ;Ve.generateUnknownTrackConf=AZ;Ve.getTrackName=PZ;var wa=_t(),rs=Mu(),_a=Xv();function dZ(e){return NR(e.configuration)}function NR(e){let t=(0,_a.readConfObject)(e,"assemblyNames");if(!t){let r=(0,wa.getParent)(e);if("sequence"in r)return[(0,_a.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function pZ(e){let t;for(let r=e;!(0,wa.isRoot)(r);r=(0,wa.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 hZ(e){for(let t=(0,wa.getParent)(e);!(0,wa.isRoot)(t);t=(0,wa.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}Ve.UNKNOWN="UNKNOWN";Ve.UNSUPPORTED="UNSUPPORTED";var Jd={};function vZ(e){return Jd[e]}function mZ(){return Jd}function bZ(e){Jd=e}var gZ=0;function yZ(e){if("blob"in e){let t=`b${+Date.now()}-${gZ++}`;return Jd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function _Z(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function wZ(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function xZ(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 SZ(e,t,r,n){if(n){let{pluginManager:i}=(0,rs.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,l,s)=>{})(e,t,r);if(a)return a}return{type:Ve.UNKNOWN}}function OZ(e,t){if(t){let r=(0,rs.getSession)(t),i=(0,rs.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function EZ(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,rs.objectHash)(n),n}function AZ(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,rs.objectHash)(n),n}function PZ(e,t){let r=(0,_a.readConfObject)(e,"name");if(!r&&(0,_a.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,_a.readConfObject)(n,"displayName")||(0,_a.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var UR=g(ns=>{"use strict";var zR=ns&&ns.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ns,"__esModule",{value:!0});var TZ=zR(jR()),RZ=zR(FR()),BR=DR(),Qd=Ic(),zb=class extends TZ.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,BR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Qd.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,BR.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,Qd.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 Qd.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,RZ.default)(t,i=>{(0,Qd.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};ns.default=zb});var WR=g(Wb=>{"use strict";Object.defineProperty(Wb,"__esModule",{value:!0});var MZ=Hv(),Ub=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,MZ.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)}};Wb.default=Ub});var Hb=g(is=>{"use strict";var VR=is&&is.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(is,"__esModule",{value:!0});var CZ=VR(UR()),kZ=Mu(),qZ=VR(WR()),Vb=class extends CZ.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new qZ.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,kZ.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};is.default=Vb});var jZ={};ls(jZ,{default:()=>tp});var iM=N(ng());var ig="1.3.1";var M_=N(Br());var Gy=N(Fp(),1);function ik(e){let t=0;for(let r of e)t+=r.length;return t}function Np(e){let t=new Uint8Array(ik(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}var{Z_SYNC_FLUSH:ok,Inflate:ak}=Gy.default;async function Ps(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new ak,{strm:t}=n,n.push(o,ok),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return Np(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}var S_=N(Ts()),Ga=N(yt()),O_=N(zp()),Is=N(Rs()),E_=N(Ms()),A_=N(s_());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 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 dt(e){return(e&&e.__isLong__)===!0}function c_(e){var t=Math.clz32(e&-e);return e?31-t:t}Te.isLong=dt;var l_={},f_={};function li(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=f_[e],n)?n:(r=Se(e,0,!0),i&&(f_[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=l_[e],n)?n:(r=Se(e,e<0?-1:0,!1),i&&(l_[e]=r),r))}Te.fromInt=li;function Gt(e,t){if(isNaN(e))return t?Hr:rr;if(t){if(e<0)return Hr;if(e>=v_)return g_}else{if(e<=-p_)return Tt;if(e+1>=p_)return b_}return e<0?Gt(-e,t).neg():Se(e%ao|0,e/ao|0,t)}Te.fromNumber=Gt;function Se(e,t,r){return new Te(e,t,r)}Te.fromBits=Se;var qs=Math.pow;function th(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?Hr:rr;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 th(e.substring(1),t,r).neg();for(var i=Gt(qs(r,8)),o=rr,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=Gt(qs(r,u));o=o.mul(s).add(Gt(l))}else o=o.mul(i),o=o.add(Gt(l))}return o.unsigned=t,o}Te.fromString=th;function $t(e,t){return typeof e=="number"?Gt(e,t):typeof e=="string"?th(e,t):Se(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Te.fromValue=$t;var d_=65536,Tk=1<<24,ao=d_*d_,v_=ao*ao,p_=v_/2,h_=li(Tk),rr=li(0);Te.ZERO=rr;var Hr=li(0,!0);Te.UZERO=Hr;var oo=li(1);Te.ONE=oo;var m_=li(1,!0);Te.UONE=m_;var eh=li(-1);Te.NEG_ONE=eh;var b_=Se(-1,2147483647,!1);Te.MAX_VALUE=b_;var g_=Se(-1,-1,!0);Te.MAX_UNSIGNED_VALUE=g_;var Tt=Se(0,-2147483648,!1);Te.MIN_VALUE=Tt;var D=Te.prototype;D.toInt=function(){return this.unsigned?this.low>>>0:this.low};D.toNumber=function(){return this.unsigned?(this.high>>>0)*ao+(this.low>>>0):this.high*ao+(this.low>>>0)};D.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(Tt)){var r=Gt(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=Gt(qs(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}};D.getHighBits=function(){return this.high};D.getHighBitsUnsigned=function(){return this.high>>>0};D.getLowBits=function(){return this.low};D.getLowBitsUnsigned=function(){return this.low>>>0};D.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Tt)?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};D.isSafeInteger=function(){var t=this.high>>21;return t?this.unsigned?!1:t===-1&&!(this.low===0&&this.high===-2097152):!0};D.isZero=function(){return this.high===0&&this.low===0};D.eqz=D.isZero;D.isNegative=function(){return!this.unsigned&&this.high<0};D.isPositive=function(){return this.unsigned||this.high>=0};D.isOdd=function(){return(this.low&1)===1};D.isEven=function(){return(this.low&1)===0};D.equals=function(t){return dt(t)||(t=$t(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};D.eq=D.equals;D.notEquals=function(t){return!this.eq(t)};D.neq=D.notEquals;D.ne=D.notEquals;D.lessThan=function(t){return this.comp(t)<0};D.lt=D.lessThan;D.lessThanOrEqual=function(t){return this.comp(t)<=0};D.lte=D.lessThanOrEqual;D.le=D.lessThanOrEqual;D.greaterThan=function(t){return this.comp(t)>0};D.gt=D.greaterThan;D.greaterThanOrEqual=function(t){return this.comp(t)>=0};D.gte=D.greaterThanOrEqual;D.ge=D.greaterThanOrEqual;D.compare=function(t){if(dt(t)||(t=$t(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};D.comp=D.compare;D.negate=function(){return!this.unsigned&&this.eq(Tt)?Tt:this.not().add(oo)};D.neg=D.negate;D.add=function(t){dt(t)||(t=$t(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,f=0,p=0,d=0;return d+=o+s,p+=d>>>16,d&=65535,p+=i+l,f+=p>>>16,p&=65535,f+=n+u,c+=f>>>16,f&=65535,c+=r+a,c&=65535,Se(p<<16|d,c<<16|f,this.unsigned)};D.subtract=function(t){return dt(t)||(t=$t(t)),this.add(t.neg())};D.sub=D.subtract;D.multiply=function(t){if(this.isZero())return this;if(dt(t)||(t=$t(t)),Ht){var r=Ht.mul(this.low,this.high,t.low,t.high);return Se(r,Ht.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?Hr:rr;if(this.eq(Tt))return t.isOdd()?Tt:rr;if(t.eq(Tt))return this.isOdd()?Tt:rr;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(h_)&&t.lt(h_))return Gt(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,f=0,p=0,d=0,h=0;return h+=a*c,d+=h>>>16,h&=65535,d+=o*c,p+=d>>>16,d&=65535,d+=a*s,p+=d>>>16,d&=65535,p+=i*c,f+=p>>>16,p&=65535,p+=o*s,f+=p>>>16,p&=65535,p+=a*l,f+=p>>>16,p&=65535,f+=n*c+i*s+o*l+a*u,f&=65535,Se(d<<16|h,f<<16|p,this.unsigned)};D.mul=D.multiply;D.divide=function(t){if(dt(t)||(t=$t(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 Se(r,Ht.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Hr:rr;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Hr;if(t.gt(this.shru(1)))return m_;o=Hr}else{if(this.eq(Tt)){if(t.eq(oo)||t.eq(eh))return Tt;if(t.eq(Tt))return oo;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(rr)?t.isNegative()?oo:eh:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(Tt))return this.unsigned?Hr:rr;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=rr}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:qs(2,u-48),s=Gt(n),c=s.mul(t);c.isNegative()||c.gt(i);)n-=l,s=Gt(n,this.unsigned),c=s.mul(t);s.isZero()&&(s=oo),o=o.add(s),i=i.sub(c)}return o};D.div=D.divide;D.modulo=function(t){if(dt(t)||(t=$t(t)),Ht){var r=(this.unsigned?Ht.rem_u:Ht.rem_s)(this.low,this.high,t.low,t.high);return Se(r,Ht.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};D.mod=D.modulo;D.rem=D.modulo;D.not=function(){return Se(~this.low,~this.high,this.unsigned)};D.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};D.clz=D.countLeadingZeros;D.countTrailingZeros=function(){return this.low?c_(this.low):c_(this.high)+32};D.ctz=D.countTrailingZeros;D.and=function(t){return dt(t)||(t=$t(t)),Se(this.low&t.low,this.high&t.high,this.unsigned)};D.or=function(t){return dt(t)||(t=$t(t)),Se(this.low|t.low,this.high|t.high,this.unsigned)};D.xor=function(t){return dt(t)||(t=$t(t)),Se(this.low^t.low,this.high^t.high,this.unsigned)};D.shiftLeft=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Se(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Se(0,this.low<<t-32,this.unsigned)};D.shl=D.shiftLeft;D.shiftRight=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Se(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Se(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};D.shr=D.shiftRight;D.shiftRightUnsigned=function(t){return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?Se(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?Se(this.high,0,this.unsigned):Se(this.high>>>t-32,0,this.unsigned)};D.shru=D.shiftRightUnsigned;D.shr_u=D.shiftRightUnsigned;D.rotateLeft=function(t){var r;return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Se(this.high,this.low,this.unsigned):t<32?(r=32-t,Se(this.low<<t|this.high>>>r,this.high<<t|this.low>>>r,this.unsigned)):(t-=32,r=32-t,Se(this.high<<t|this.low>>>r,this.low<<t|this.high>>>r,this.unsigned))};D.rotl=D.rotateLeft;D.rotateRight=function(t){var r;return dt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?Se(this.high,this.low,this.unsigned):t<32?(r=32-t,Se(this.high<<r|this.low>>>t,this.low<<r|this.high>>>t,this.unsigned)):(t-=32,r=32-t,Se(this.low<<r|this.high>>>t,this.high<<r|this.low>>>t,this.unsigned))};D.rotr=D.rotateRight;D.toSigned=function(){return this.unsigned?Se(this.low,this.high,!1):this};D.toUnsigned=function(){return this.unsigned?this:Se(this.low,this.high,!0)};D.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};D.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]};D.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 Se(n,i,r)},Te.fromValue=function(t,r){return typeof t=="bigint"?Te.fromBigInt(t,r):$t(t,r)},D.toBigInt=function(){var t=BigInt(this.low>>>0),r=BigInt(this.unsigned?this.high>>>0:this.high);return r<<BigInt(32)|t});var y_=Te;var Ha=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 fi(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 Rk(e){return typeof e[0]=="string"}function cn(e){return Rk(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function __(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 w_(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 x_=(e=0)=>+(+e).toFixed(1),$a=class extends S_.BaseFeatureDataAdapter{setupP;cache=new A_.default({cache:new O_.default({maxSize:50}),fill:async({nextEntry:t,firstEntry:r},n,i)=>{let a=await(0,Is.openLocation)(this.getConf("tafGzLocation")).read(t.virtualOffset.blockPosition-r.virtualOffset.blockPosition,r.virtualOffset.blockPosition),l=(await Ps(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(w_(t,s=>{if(u++%100===0&&n(`Processing ${x_(l/1e6)}/${x_(t.length/1e6)}Mb`),l+=s.length,s){let[c,f]=s.split(" ; ");if(f){for(let d of __(f))if(d.type==="i"){o.splice(d.row,0,d),i[d.asm]||(i[d.asm]={start:d.start,strand:d.strand,srcSize:d.length,chr:d.ref,data:""});let h=i[d.asm];h.data+=" ".repeat(Math.max(0,u-h.data.length-1))}else if(d.type==="s"){i[d.asm]||(i[d.asm]={start:d.start,strand:d.strand,srcSize:d.length,chr:d.ref,data:""});let h=i[d.asm];h.data+=" ".repeat(Math.max(0,u-h.data.length-1)),o[d.row]=d}else d.type==="d"&&o.splice(d.row,1);a||(a=o[0])}let p=c.length;for(let d=0;d<p;d++){let h=c[d],v=o[d];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,Ga.updateStatus)("Downloading index",r,()=>this.setupPre())}async readTaiFile(){let r=(await(0,Is.openLocation)(this.getConf("taiLocation")).readFile("utf8")).split(`
|
|
6
|
-
`).map(
|
|
5
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}})});var en=b(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.arrRemove=void 0;function jN(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}ll.arrRemove=jN});var Dt=b(qt=>{"use strict";var wE=qt&&qt.__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.")},xE=qt&&qt.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},SE=qt&&qt.__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(qt,"__esModule",{value:!0});qt.isSubscription=qt.EMPTY_SUBSCRIPTION=qt.Subscription=void 0;var Ys=Pe(),Fv=Lv(),OE=en(),Nv=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 s=wE(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Ys.isFunction(c))try{c()}catch(m){o=m instanceof Fv.UnsubscriptionError?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var p=wE(f),d=p.next();!d.done;d=p.next()){var h=d.value;try{EE(h)}catch(m){o=o??[],m instanceof Fv.UnsubscriptionError?o=SE(SE([],xE(o)),xE(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new Fv.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)EE(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)&&OE.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&OE.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();qt.Subscription=Nv;qt.EMPTY_SUBSCRIPTION=Nv.EMPTY;function LN(e){return e instanceof Nv||e&&"closed"in e&&Ys.isFunction(e.remove)&&Ys.isFunction(e.add)&&Ys.isFunction(e.unsubscribe)}qt.isSubscription=LN;function EE(e){Ys.isFunction(e)?e():e.unsubscribe()}});var Ho=b(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.config=void 0;fl.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Dv=b(Ir=>{"use strict";var AE=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},RE=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.timeoutProvider=void 0;Ir.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Ir.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,RE([e,t],AE(r))):setTimeout.apply(void 0,RE([e,t],AE(r)))},clearTimeout:function(e){var t=Ir.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var Bv=b(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.reportUnhandledError=void 0;var FN=Ho(),NN=Dv();function DN(e){NN.timeoutProvider.setTimeout(function(){var t=FN.config.onUnhandledError;if(t)t(e);else throw e})}dl.reportUnhandledError=DN});var lt=b(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.noop=void 0;function BN(){}pl.noop=BN});var TE=b(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.createNotification=qr.nextNotification=qr.errorNotification=qr.COMPLETE_NOTIFICATION=void 0;qr.COMPLETE_NOTIFICATION=function(){return hl("C",void 0,void 0)}();function zN(e){return hl("E",void 0,e)}qr.errorNotification=zN;function UN(e){return hl("N",e,void 0)}qr.nextNotification=UN;function hl(e,t,r){return{kind:e,value:t,error:r}}qr.createNotification=hl});var ml=b(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.captureError=Vo.errorContext=void 0;var PE=Ho(),Li=null;function WN(e){if(PE.config.useDeprecatedSynchronousErrorHandling){var t=!Li;if(t&&(Li={errorThrown:!1,error:null}),e(),t){var r=Li,n=r.errorThrown,i=r.error;if(Li=null,n)throw i}}else e()}Vo.errorContext=WN;function HN(e){PE.config.useDeprecatedSynchronousErrorHandling&&Li&&(Li.errorThrown=!0,Li.error=e)}Vo.captureError=HN});var Go=b(dr=>{"use strict";var kE=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)}}();Object.defineProperty(dr,"__esModule",{value:!0});dr.EMPTY_OBSERVER=dr.SafeSubscriber=dr.Subscriber=void 0;var VN=Pe(),ME=Dt(),Hv=Ho(),GN=Bv(),CE=lt(),zv=TE(),$N=Dv(),YN=ml(),IE=function(e){kE(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,ME.isSubscription(r)&&r.add(n)):n.destination=dr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new qE(r,n,i)},t.prototype.next=function(r){this.isStopped?Wv(zv.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Wv(zv.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Wv(zv.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}(ME.Subscription);dr.Subscriber=IE;var XN=Function.prototype.bind;function Uv(e,t){return XN.call(e,t)}var KN=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){vl(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){vl(n)}else vl(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){vl(r)}},e}(),qE=function(e){kE(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(VN.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var s;o&&Hv.config.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Uv(r.next,s),error:r.error&&Uv(r.error,s),complete:r.complete&&Uv(r.complete,s)}):a=r}return o.destination=new KN(a),o}return t}(IE);dr.SafeSubscriber=qE;function vl(e){Hv.config.useDeprecatedSynchronousErrorHandling?YN.captureError(e):GN.reportUnhandledError(e)}function ZN(e){throw e}function Wv(e,t){var r=Hv.config.onStoppedNotification;r&&$N.timeoutProvider.setTimeout(function(){return r(e,t)})}dr.EMPTY_OBSERVER={closed:!0,next:CE.noop,error:ZN,complete:CE.noop}});var Xs=b(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.observable=void 0;gl.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var ft=b(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.identity=void 0;function JN(e){return e}bl.identity=JN});var Ks=b($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.pipeFromArray=$o.pipe=void 0;var QN=ft();function eD(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jE(e)}$o.pipe=eD;function jE(e){return e.length===0?QN.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}$o.pipeFromArray=jE});var ke=b(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.Observable=void 0;var Gv=Go(),tD=Dt(),rD=Xs(),nD=Ks(),iD=Ho(),Vv=Pe(),oD=ml(),aD=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=uD(t)?t:new Gv.SafeSubscriber(t,r,n);return oD.errorContext(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.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=LE(r),new r(function(i,o){var a=new Gv.SafeSubscriber({next:function(s){try{t(s)}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[rD.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return nD.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=LE(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}();yl.Observable=aD;function LE(e){var t;return(t=e??iD.config.Promise)!==null&&t!==void 0?t:Promise}function sD(e){return e&&Vv.isFunction(e.next)&&Vv.isFunction(e.error)&&Vv.isFunction(e.complete)}function uD(e){return e&&e instanceof Gv.Subscriber||sD(e)&&tD.isSubscription(e)}});var G=b(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.operate=Yo.hasLift=void 0;var cD=Pe();function FE(e){return cD.isFunction(e?.lift)}Yo.hasLift=FE;function lD(e){return function(t){if(FE(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")}}Yo.operate=lD});var Z=b(qn=>{"use strict";var fD=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.OperatorSubscriber=qn.createOperatorSubscriber=void 0;var dD=Go();function pD(e,t,r,n,i){return new NE(e,t,r,n,i)}qn.createOperatorSubscriber=pD;var NE=function(e){fD(t,e);function t(r,n,i,o,a,s){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=n?function(u){try{n(u)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(u){try{o(u)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(u){r.error(u)}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}(dD.Subscriber);qn.OperatorSubscriber=NE});var $v=b(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.refCount=void 0;var hD=G(),mD=Z();function vD(){return hD.operate(function(e,t){var r=null;e._refCount++;var n=mD.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())})}_l.refCount=vD});var Zs=b(Xo=>{"use strict";var gD=Xo&&Xo.__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(Xo,"__esModule",{value:!0});Xo.ConnectableObservable=void 0;var bD=ke(),DE=Dt(),yD=$v(),_D=Z(),wD=G(),xD=function(e){gD(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,wD.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 DE.Subscription;var i=this.getSubject();n.add(this.source.subscribe(_D.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=DE.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return yD.refCount()(this)},t}(bD.Observable);Xo.ConnectableObservable=xD});var BE=b(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.performanceTimestampProvider=void 0;Js.performanceTimestampProvider={now:function(){return(Js.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Yv=b(pr=>{"use strict";var zE=pr&&pr.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},UE=pr&&pr.__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(pr,"__esModule",{value:!0});pr.animationFrameProvider=void 0;var SD=Dt();pr.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=pr.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new SD.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pr.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,UE([],zE(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pr.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,UE([],zE(e)))},delegate:void 0}});var VE=b(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.animationFrames=void 0;var OD=ke(),ED=BE(),WE=Yv();function AD(e){return e?HE(e):RD}wl.animationFrames=AD;function HE(e){return new OD.Observable(function(t){var r=e||ED.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=WE.animationFrameProvider.requestAnimationFrame(function(a){i=0;var s=r.now();t.next({timestamp:e?s:a,elapsed:s-n}),o()}))};return o(),function(){i&&WE.animationFrameProvider.cancelAnimationFrame(i)}})}var RD=HE()});var Xv=b(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.ObjectUnsubscribedError=void 0;var TD=In();xl.ObjectUnsubscribedError=TD.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var dt=b(jr=>{"use strict";var $E=jr&&jr.__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)}}(),PD=jr&&jr.__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(jr,"__esModule",{value:!0});jr.AnonymousSubject=jr.Subject=void 0;var GE=ke(),Zv=Dt(),MD=Xv(),CD=en(),Kv=ml(),YE=function(e){$E(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 Jv(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new MD.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Kv.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=PD(n.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(r)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Kv.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;Kv.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,s=i.observers;return o||a?Zv.EMPTY_SUBSCRIPTION:(this.currentObservers=null,s.push(r),new Zv.Subscription(function(){n.currentObservers=null,CD.arrRemove(s,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 GE.Observable;return r.source=this,r},t.create=function(r,n){return new Jv(r,n)},t}(GE.Observable);jr.Subject=YE;var Jv=function(e){$E(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:Zv.EMPTY_SUBSCRIPTION},t}(YE);jr.AnonymousSubject=Jv});var Qv=b(Ko=>{"use strict";var kD=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.BehaviorSubject=void 0;var ID=dt(),qD=function(e){kD(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}(ID.Subject);Ko.BehaviorSubject=qD});var Sl=b(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.dateTimestampProvider=void 0;Qs.dateTimestampProvider={now:function(){return(Qs.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Ol=b(Zo=>{"use strict";var jD=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.ReplaySubject=void 0;var LD=dt(),FD=Sl(),ND=function(e){jD(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=FD.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,s=n._timestampProvider,l=n._windowTime;i||(o.push(r),!a&&o.push(s.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,s=a.slice(),l=0;l<s.length&&!r.closed;l+=o?1:2)r.next(s[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,s=(a?1:2)*n;if(n<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},t}(LD.Subject);Zo.ReplaySubject=ND});var El=b(Jo=>{"use strict";var DD=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 BD=dt(),zD=function(e){DD(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,s=n.thrownError,l=n.isStopped,u=n._isComplete;i?r.error(s):(l||u)&&(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}(BD.Subject);Jo.AsyncSubject=zD});var XE=b(Qo=>{"use strict";var UD=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.Action=void 0;var WD=Dt(),HD=function(e){UD(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}(WD.Subscription);Qo.Action=HD});var JE=b(Lr=>{"use strict";var KE=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},ZE=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.intervalProvider=void 0;Lr.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Lr.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,ZE([e,t],KE(r))):setInterval.apply(void 0,ZE([e,t],KE(r)))},clearInterval:function(e){var t=Lr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var ta=b(ea=>{"use strict";var VD=ea&&ea.__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(ea,"__esModule",{value:!0});ea.AsyncAction=void 0;var GD=XE(),QE=JE(),$D=en(),YD=function(e){VD(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),QE.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&&QE.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,$D.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(GD.Action);ea.AsyncAction=YD});var tA=b(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.TestTools=ra.Immediate=void 0;var XD=1,eg,Al={};function eA(e){return e in Al?(delete Al[e],!0):!1}ra.Immediate={setImmediate:function(e){var t=XD++;return Al[t]=!0,eg||(eg=Promise.resolve()),eg.then(function(){return eA(t)&&e()}),t},clearImmediate:function(e){eA(e)}};ra.TestTools={pending:function(){return Object.keys(Al).length}}});var nA=b(Fr=>{"use strict";var KD=Fr&&Fr.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},ZD=Fr&&Fr.__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(Fr,"__esModule",{value:!0});Fr.immediateProvider=void 0;var rA=tA(),JD=rA.Immediate.setImmediate,QD=rA.Immediate.clearImmediate;Fr.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Fr.immediateProvider.delegate;return(r?.setImmediate||JD).apply(void 0,ZD([],KD(e)))},clearImmediate:function(e){var t=Fr.immediateProvider.delegate;return(t?.clearImmediate||QD)(e)},delegate:void 0}});var oA=b(na=>{"use strict";var e5=na&&na.__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(na,"__esModule",{value:!0});na.AsapAction=void 0;var t5=ta(),iA=nA(),r5=function(e){e5(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=iA.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&&(iA.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(t5.AsyncAction);na.AsapAction=r5});var tg=b(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.Scheduler=void 0;var n5=Sl(),i5=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=n5.dateTimestampProvider.now,e}();Rl.Scheduler=i5});var oa=b(ia=>{"use strict";var o5=ia&&ia.__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(ia,"__esModule",{value:!0});ia.AsyncScheduler=void 0;var aA=tg(),a5=function(e){o5(t,e);function t(r,n){n===void 0&&(n=aA.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}(aA.Scheduler);ia.AsyncScheduler=a5});var sA=b(aa=>{"use strict";var s5=aa&&aa.__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(aa,"__esModule",{value:!0});aa.AsapScheduler=void 0;var u5=oa(),c5=function(e){s5(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}(u5.AsyncScheduler);aa.AsapScheduler=c5});var uA=b(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.asap=Fi.asapScheduler=void 0;var l5=oA(),f5=sA();Fi.asapScheduler=new f5.AsapScheduler(l5.AsapAction);Fi.asap=Fi.asapScheduler});var jt=b(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.async=Ni.asyncScheduler=void 0;var d5=ta(),p5=oa();Ni.asyncScheduler=new p5.AsyncScheduler(d5.AsyncAction);Ni.async=Ni.asyncScheduler});var cA=b(sa=>{"use strict";var h5=sa&&sa.__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(sa,"__esModule",{value:!0});sa.QueueAction=void 0;var m5=ta(),v5=function(e){h5(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}(m5.AsyncAction);sa.QueueAction=v5});var lA=b(ua=>{"use strict";var g5=ua&&ua.__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(ua,"__esModule",{value:!0});ua.QueueScheduler=void 0;var b5=oa(),y5=function(e){g5(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(b5.AsyncScheduler);ua.QueueScheduler=y5});var fA=b(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.queue=Di.queueScheduler=void 0;var _5=cA(),w5=lA();Di.queueScheduler=new w5.QueueScheduler(_5.QueueAction);Di.queue=Di.queueScheduler});var pA=b(ca=>{"use strict";var x5=ca&&ca.__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(ca,"__esModule",{value:!0});ca.AnimationFrameAction=void 0;var S5=ta(),dA=Yv(),O5=function(e){x5(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=dA.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&&(dA.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(S5.AsyncAction);ca.AnimationFrameAction=O5});var hA=b(la=>{"use strict";var E5=la&&la.__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(la,"__esModule",{value:!0});la.AnimationFrameScheduler=void 0;var A5=oa(),R5=function(e){E5(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}(A5.AsyncScheduler);la.AnimationFrameScheduler=R5});var mA=b(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.animationFrame=Bi.animationFrameScheduler=void 0;var T5=pA(),P5=hA();Bi.animationFrameScheduler=new P5.AnimationFrameScheduler(T5.AnimationFrameAction);Bi.animationFrame=Bi.animationFrameScheduler});var bA=b(jn=>{"use strict";var vA=jn&&jn.__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(jn,"__esModule",{value:!0});jn.VirtualAction=jn.VirtualTimeScheduler=void 0;var M5=ta(),C5=Dt(),k5=oa(),I5=function(e){vA(t,e);function t(r,n){r===void 0&&(r=gA),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}(k5.AsyncScheduler);jn.VirtualTimeScheduler=I5;var gA=function(e){vA(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 C5.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}(M5.AsyncAction);jn.VirtualAction=gA});var hr=b(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.empty=zi.EMPTY=void 0;var yA=ke();zi.EMPTY=new yA.Observable(function(e){return e.complete()});function q5(e){return e?j5(e):zi.EMPTY}zi.empty=q5;function j5(e){return new yA.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var eu=b(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.isScheduler=void 0;var L5=Pe();function F5(e){return e&&L5.isFunction(e.schedule)}Tl.isScheduler=F5});var Lt=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.popNumber=Ln.popScheduler=Ln.popResultSelector=void 0;var N5=Pe(),D5=eu();function rg(e){return e[e.length-1]}function B5(e){return N5.isFunction(rg(e))?e.pop():void 0}Ln.popResultSelector=B5;function z5(e){return D5.isScheduler(rg(e))?e.pop():void 0}Ln.popScheduler=z5;function U5(e,t){return typeof rg(e)=="number"?e.pop():t}Ln.popNumber=U5});var Ml=b(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.isArrayLike=void 0;Pl.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var ng=b(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.isPromise=void 0;var W5=Pe();function H5(e){return W5.isFunction(e?.then)}Cl.isPromise=H5});var ig=b(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.isInteropObservable=void 0;var V5=Xs(),G5=Pe();function $5(e){return G5.isFunction(e[V5.observable])}kl.isInteropObservable=$5});var og=b(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.isAsyncIterable=void 0;var Y5=Pe();function X5(e){return Symbol.asyncIterator&&Y5.isFunction(e?.[Symbol.asyncIterator])}Il.isAsyncIterable=X5});var ag=b(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.createInvalidObservableTypeError=void 0;function K5(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.")}ql.createInvalidObservableTypeError=K5});var sg=b(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.iterator=fa.getSymbolIterator=void 0;function _A(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}fa.getSymbolIterator=_A;fa.iterator=_A()});var ug=b(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.isIterable=void 0;var Z5=sg(),J5=Pe();function Q5(e){return J5.isFunction(e?.[Z5.iterator])}jl.isIterable=Q5});var Ll=b(er=>{"use strict";var e3=er&&er.__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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},da=er&&er.__await||function(e){return this instanceof da?(this.v=e,this):new da(e)},t3=er&&er.__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(d){return new Promise(function(h,m){o.push([p,d,h,m])>1||s(p,d)})})}function s(p,d){try{l(n[p](d))}catch(h){f(o[0][3],h)}}function l(p){p.value instanceof da?Promise.resolve(p.value.v).then(u,c):f(o[0][2],p)}function u(p){s("next",p)}function c(p){s("throw",p)}function f(p,d){p(d),o.shift(),o.length&&s(o[0][0],o[0][1])}};Object.defineProperty(er,"__esModule",{value:!0});er.isReadableStreamLike=er.readableStreamLikeToAsyncGenerator=void 0;var r3=Pe();function n3(e){return t3(this,arguments,function(){var r,n,i,o;return e3(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,da(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,da(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,da(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]}})})}er.readableStreamLikeToAsyncGenerator=n3;function i3(e){return r3.isFunction(e?.getReader)}er.isReadableStreamLike=i3});var fe=b(ze=>{"use strict";var o3=ze&&ze.__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 s(c){try{u(n.next(c))}catch(f){a(f)}}function l(c){try{u(n.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})},a3=ze&&ze.__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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},s3=ze&&ze.__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 cg=="function"?cg(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(s,l){a=e[o](a),i(s,l,a.done,a.value)})}}function i(o,a,s,l){Promise.resolve(l).then(function(u){o({value:u,done:s})},a)}},cg=ze&&ze.__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(ze,"__esModule",{value:!0});ze.fromReadableStreamLike=ze.fromAsyncIterable=ze.fromIterable=ze.fromPromise=ze.fromArrayLike=ze.fromInteropObservable=ze.innerFrom=void 0;var u3=Ml(),c3=ng(),pa=ke(),l3=ig(),f3=og(),d3=ag(),p3=ug(),wA=Ll(),h3=Pe(),m3=Bv(),v3=Xs();function g3(e){if(e instanceof pa.Observable)return e;if(e!=null){if(l3.isInteropObservable(e))return xA(e);if(u3.isArrayLike(e))return SA(e);if(c3.isPromise(e))return OA(e);if(f3.isAsyncIterable(e))return lg(e);if(p3.isIterable(e))return EA(e);if(wA.isReadableStreamLike(e))return AA(e)}throw d3.createInvalidObservableTypeError(e)}ze.innerFrom=g3;function xA(e){return new pa.Observable(function(t){var r=e[v3.observable]();if(h3.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}ze.fromInteropObservable=xA;function SA(e){return new pa.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}ze.fromArrayLike=SA;function OA(e){return new pa.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,m3.reportUnhandledError)})}ze.fromPromise=OA;function EA(e){return new pa.Observable(function(t){var r,n;try{for(var i=cg(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()})}ze.fromIterable=EA;function lg(e){return new pa.Observable(function(t){b3(e,t).catch(function(r){return t.error(r)})})}ze.fromAsyncIterable=lg;function AA(e){return lg(wA.readableStreamLikeToAsyncGenerator(e))}ze.fromReadableStreamLike=AA;function b3(e,t){var r,n,i,o;return o3(this,void 0,void 0,function(){var a,s;return a3(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=s3(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 s=l.sent(),i={error:s},[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 tn=b(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.executeSchedule=void 0;function y3(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}Fl.executeSchedule=y3});var tu=b(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.observeOn=void 0;var fg=tn(),_3=G(),w3=Z();function x3(e,t){return t===void 0&&(t=0),_3.operate(function(r,n){r.subscribe(w3.createOperatorSubscriber(n,function(i){return fg.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return fg.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return fg.executeSchedule(n,e,function(){return n.error(i)},t)}))})}Nl.observeOn=x3});var ru=b(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.subscribeOn=void 0;var S3=G();function O3(e,t){return t===void 0&&(t=0),S3.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}Dl.subscribeOn=O3});var RA=b(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.scheduleObservable=void 0;var E3=fe(),A3=tu(),R3=ru();function T3(e,t){return E3.innerFrom(e).pipe(R3.subscribeOn(t),A3.observeOn(t))}Bl.scheduleObservable=T3});var TA=b(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.schedulePromise=void 0;var P3=fe(),M3=tu(),C3=ru();function k3(e,t){return P3.innerFrom(e).pipe(C3.subscribeOn(t),M3.observeOn(t))}zl.schedulePromise=k3});var PA=b(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.scheduleArray=void 0;var I3=ke();function q3(e,t){return new I3.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}Ul.scheduleArray=q3});var dg=b(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.scheduleIterable=void 0;var j3=ke(),L3=sg(),F3=Pe(),MA=tn();function N3(e,t){return new j3.Observable(function(r){var n;return MA.executeSchedule(r,t,function(){n=e[L3.iterator](),MA.executeSchedule(r,t,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(s){r.error(s);return}a?r.complete():r.next(o)},0,!0)}),function(){return F3.isFunction(n?.return)&&n.return()}})}Wl.scheduleIterable=N3});var pg=b(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.scheduleAsyncIterable=void 0;var D3=ke(),CA=tn();function B3(e,t){if(!e)throw new Error("Iterable cannot be null");return new D3.Observable(function(r){CA.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();CA.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}Hl.scheduleAsyncIterable=B3});var kA=b(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.scheduleReadableStreamLike=void 0;var z3=pg(),U3=Ll();function W3(e,t){return z3.scheduleAsyncIterable(U3.readableStreamLikeToAsyncGenerator(e),t)}Vl.scheduleReadableStreamLike=W3});var hg=b(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.scheduled=void 0;var H3=RA(),V3=TA(),G3=PA(),$3=dg(),Y3=pg(),X3=ig(),K3=ng(),Z3=Ml(),J3=ug(),Q3=og(),e6=ag(),t6=Ll(),r6=kA();function n6(e,t){if(e!=null){if(X3.isInteropObservable(e))return H3.scheduleObservable(e,t);if(Z3.isArrayLike(e))return G3.scheduleArray(e,t);if(K3.isPromise(e))return V3.schedulePromise(e,t);if(Q3.isAsyncIterable(e))return Y3.scheduleAsyncIterable(e,t);if(J3.isIterable(e))return $3.scheduleIterable(e,t);if(t6.isReadableStreamLike(e))return r6.scheduleReadableStreamLike(e,t)}throw e6.createInvalidObservableTypeError(e)}Gl.scheduled=n6});var rn=b($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.from=void 0;var i6=hg(),o6=fe();function a6(e,t){return t?i6.scheduled(e,t):o6.innerFrom(e)}$l.from=a6});var Xl=b(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.of=void 0;var s6=Lt(),u6=rn();function c6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s6.popScheduler(e);return u6.from(e,r)}Yl.of=c6});var mg=b(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.throwError=void 0;var l6=ke(),f6=Pe();function d6(e,t){var r=f6.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new l6.Observable(t?function(i){return t.schedule(n,0,i)}:n)}Kl.throwError=d6});var Zl=b(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.observeNotification=nn.Notification=nn.NotificationKind=void 0;var p6=hr(),h6=Xl(),m6=mg(),v6=Pe(),g6;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(g6=nn.NotificationKind||(nn.NotificationKind={}));var b6=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 IA(this,t)},e.prototype.do=function(t,r,n){var i=this,o=i.kind,a=i.value,s=i.error;return o==="N"?t?.(a):o==="E"?r?.(s):n?.()},e.prototype.accept=function(t,r,n){var i;return v6.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"?h6.of(n):r==="E"?m6.throwError(function(){return i}):r==="C"?p6.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}();nn.Notification=b6;function IA(e,t){var r,n,i,o=e,a=o.kind,s=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,s):a==="E"?(n=t.error)===null||n===void 0||n.call(t,l):(i=t.complete)===null||i===void 0||i.call(t)}nn.observeNotification=IA});var jA=b(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.isObservable=void 0;var y6=ke(),qA=Pe();function _6(e){return!!e&&(e instanceof y6.Observable||qA.isFunction(e.lift)&&qA.isFunction(e.subscribe))}Jl.isObservable=_6});var Fn=b(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.EmptyError=void 0;var w6=In();Ql.EmptyError=w6.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var LA=b(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.lastValueFrom=void 0;var x6=Fn();function S6(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=!1,a;e.subscribe({next:function(s){a=s,o=!0},error:i,complete:function(){o?n(a):r?n(t.defaultValue):i(new x6.EmptyError)}})})}ef.lastValueFrom=S6});var FA=b(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.firstValueFrom=void 0;var O6=Fn(),E6=Go();function A6(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new E6.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new O6.EmptyError)}});e.subscribe(o)})}tf.firstValueFrom=A6});var vg=b(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.ArgumentOutOfRangeError=void 0;var R6=In();rf.ArgumentOutOfRangeError=R6.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var gg=b(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.NotFoundError=void 0;var T6=In();nf.NotFoundError=T6.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var bg=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.SequenceError=void 0;var P6=In();of.SequenceError=P6.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var sf=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.isValidDate=void 0;function M6(e){return e instanceof Date&&!isNaN(e)}af.isValidDate=M6});var uf=b(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.timeout=Ui.TimeoutError=void 0;var C6=jt(),k6=sf(),I6=G(),q6=fe(),j6=In(),L6=Z(),F6=tn();Ui.TimeoutError=j6.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 N6(e,t){var r=k6.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?D6:o,s=r.scheduler,l=s===void 0?t??C6.asyncScheduler:s,u=r.meta,c=u===void 0?null:u;if(n==null&&i==null)throw new TypeError("No timeout provided.");return I6.operate(function(f,p){var d,h,m=null,v=0,y=function(w){h=F6.executeSchedule(p,l,function(){try{d.unsubscribe(),q6.innerFrom(a({meta:c,lastValue:m,seen:v})).subscribe(p)}catch(_){p.error(_)}},w)};d=f.subscribe(L6.createOperatorSubscriber(p,function(w){h?.unsubscribe(),v++,p.next(m=w),i>0&&y(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),m=null})),!v&&y(n!=null?typeof n=="number"?n:+n-l.now():i)})}Ui.timeout=N6;function D6(e){throw new Ui.TimeoutError(e)}});var Nn=b(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.map=void 0;var B6=G(),z6=Z();function U6(e,t){return B6.operate(function(r,n){var i=0;r.subscribe(z6.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}cf.map=U6});var Bn=b(Dn=>{"use strict";var W6=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},H6=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.mapOneOrManyArgs=void 0;var V6=Nn(),G6=Array.isArray;function $6(e,t){return G6(t)?e.apply(void 0,H6([],W6(t))):e(t)}function Y6(e){return V6.map(function(t){return $6(e,t)})}Dn.mapOneOrManyArgs=Y6});var _g=b(zn=>{"use strict";var X6=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},NA=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.bindCallbackInternals=void 0;var K6=eu(),Z6=ke(),J6=ru(),Q6=Bn(),eB=tu(),tB=El();function yg(e,t,r,n){if(r)if(K6.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return yg(e,t,n).apply(this,i).pipe(Q6.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return yg(e,t).apply(this,i).pipe(J6.subscribeOn(n),eB.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=new tB.AsyncSubject,l=!0;return new Z6.Observable(function(u){var c=s.subscribe(u);if(l){l=!1;var f=!1,p=!1;t.apply(i,NA(NA([],X6(o)),[function(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];if(e){var m=d.shift();if(m!=null){s.error(m);return}}s.next(1<d.length?d:d[0]),p=!0,f&&s.complete()}])),p&&s.complete(),f=!0}return c})}}zn.bindCallbackInternals=yg});var DA=b(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.bindCallback=void 0;var rB=_g();function nB(e,t,r){return rB.bindCallbackInternals(!1,e,t,r)}lf.bindCallback=nB});var BA=b(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.bindNodeCallback=void 0;var iB=_g();function oB(e,t,r){return iB.bindCallbackInternals(!0,e,t,r)}ff.bindNodeCallback=oB});var wg=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.argsArgArrayOrObject=void 0;var aB=Array.isArray,sB=Object.getPrototypeOf,uB=Object.prototype,cB=Object.keys;function lB(e){if(e.length===1){var t=e[0];if(aB(t))return{args:t,keys:null};if(fB(t)){var r=cB(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}df.argsArgArrayOrObject=lB;function fB(e){return e&&typeof e=="object"&&sB(e)===uB}});var xg=b(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.createObject=void 0;function dB(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}pf.createObject=dB});var hf=b(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.combineLatestInit=ha.combineLatest=void 0;var pB=ke(),hB=wg(),WA=rn(),HA=ft(),mB=Bn(),zA=Lt(),vB=xg(),gB=Z(),bB=tn();function yB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zA.popScheduler(e),n=zA.popResultSelector(e),i=hB.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return WA.from([],r);var s=new pB.Observable(VA(o,r,a?function(l){return vB.createObject(a,l)}:HA.identity));return n?s.pipe(mB.mapOneOrManyArgs(n)):s}ha.combineLatest=yB;function VA(e,t,r){return r===void 0&&(r=HA.identity),function(n){UA(t,function(){for(var i=e.length,o=new Array(i),a=i,s=i,l=function(c){UA(t,function(){var f=WA.from(e[c],t),p=!1;f.subscribe(gB.createOperatorSubscriber(n,function(d){o[c]=d,p||(p=!0,s--),s||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},u=0;u<i;u++)l(u)},n)}}ha.combineLatestInit=VA;function UA(e,t,r){e?bB.executeSchedule(r,e,t):t()}});var vf=b(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.mergeInternals=void 0;var _B=fe(),wB=tn(),GA=Z();function xB(e,t,r,n,i,o,a,s){var l=[],u=0,c=0,f=!1,p=function(){f&&!l.length&&!u&&t.complete()},d=function(m){return u<n?h(m):l.push(m)},h=function(m){o&&t.next(m),u++;var v=!1;_B.innerFrom(r(m,c++)).subscribe(GA.createOperatorSubscriber(t,function(y){i?.(y),o?d(y):t.next(y)},function(){v=!0},void 0,function(){if(v)try{u--;for(var y=function(){var w=l.shift();a?wB.executeSchedule(t,a,function(){return h(w)}):h(w)};l.length&&u<n;)y();p()}catch(w){t.error(w)}}))};return e.subscribe(GA.createOperatorSubscriber(t,d,function(){f=!0,p()})),function(){s?.()}}mf.mergeInternals=xB});var on=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.mergeMap=void 0;var SB=Nn(),OB=fe(),EB=G(),AB=vf(),RB=Pe();function $A(e,t,r){return r===void 0&&(r=1/0),RB.isFunction(t)?$A(function(n,i){return SB.map(function(o,a){return t(n,o,i,a)})(OB.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),EB.operate(function(n,i){return AB.mergeInternals(n,i,e,r)}))}gf.mergeMap=$A});var nu=b(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.mergeAll=void 0;var TB=on(),PB=ft();function MB(e){return e===void 0&&(e=1/0),TB.mergeMap(PB.identity,e)}bf.mergeAll=MB});var _f=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.concatAll=void 0;var CB=nu();function kB(){return CB.mergeAll(1)}yf.concatAll=kB});var iu=b(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.concat=void 0;var IB=_f(),qB=Lt(),jB=rn();function LB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return IB.concatAll()(jB.from(e,qB.popScheduler(e)))}wf.concat=LB});var ou=b(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.defer=void 0;var FB=ke(),NB=fe();function DB(e){return new FB.Observable(function(t){NB.innerFrom(e()).subscribe(t)})}xf.defer=DB});var YA=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.connectable=void 0;var BB=dt(),zB=ke(),UB=ou(),WB={connector:function(){return new BB.Subject},resetOnDisconnect:!0};function HB(e,t){t===void 0&&(t=WB);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),s=new zB.Observable(function(l){return a.subscribe(l)});return s.connect=function(){return(!r||r.closed)&&(r=UB.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},s}Sf.connectable=HB});var XA=b(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.forkJoin=void 0;var VB=ke(),GB=wg(),$B=fe(),YB=Lt(),XB=Z(),KB=Bn(),ZB=xg();function JB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=YB.popResultSelector(e),n=GB.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new VB.Observable(function(s){var l=i.length;if(!l){s.complete();return}for(var u=new Array(l),c=l,f=l,p=function(h){var m=!1;$B.innerFrom(i[h]).subscribe(XB.createOperatorSubscriber(s,function(v){m||(m=!0,f--),u[h]=v},function(){return c--},void 0,function(){(!c||!m)&&(f||s.next(o?ZB.createObject(o,u):u),s.complete())}))},d=0;d<l;d++)p(d)});return r?a.pipe(KB.mapOneOrManyArgs(r)):a}Of.forkJoin=JB});var ZA=b(ma=>{"use strict";var QB=ma&&ma.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};Object.defineProperty(ma,"__esModule",{value:!0});ma.fromEvent=void 0;var e8=fe(),t8=ke(),r8=on(),n8=Ml(),Wi=Pe(),i8=Bn(),o8=["addListener","removeListener"],a8=["addEventListener","removeEventListener"],s8=["on","off"];function Sg(e,t,r,n){if(Wi.isFunction(r)&&(n=r,r=void 0),n)return Sg(e,t,r).pipe(i8.mapOneOrManyArgs(n));var i=QB(l8(e)?a8.map(function(s){return function(l){return e[s](t,l,r)}}):u8(e)?o8.map(KA(e,t)):c8(e)?s8.map(KA(e,t)):[],2),o=i[0],a=i[1];if(!o&&n8.isArrayLike(e))return r8.mergeMap(function(s){return Sg(s,t,r)})(e8.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new t8.Observable(function(s){var l=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return s.next(1<u.length?u:u[0])};return o(l),function(){return a(l)}})}ma.fromEvent=Sg;function KA(e,t){return function(r){return function(n){return e[r](t,n)}}}function u8(e){return Wi.isFunction(e.addListener)&&Wi.isFunction(e.removeListener)}function c8(e){return Wi.isFunction(e.on)&&Wi.isFunction(e.off)}function l8(e){return Wi.isFunction(e.addEventListener)&&Wi.isFunction(e.removeEventListener)}});var QA=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.fromEventPattern=void 0;var f8=ke(),d8=Pe(),p8=Bn();function JA(e,t,r){return r?JA(e,t).pipe(p8.mapOneOrManyArgs(r)):new f8.Observable(function(n){var i=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return n.next(a.length===1?a[0]:a)},o=e(i);return d8.isFunction(t)?function(){return t(i,o)}:void 0})}Ef.fromEventPattern=JA});var tR=b(va=>{"use strict";var h8=va&&va.__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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(va,"__esModule",{value:!0});va.generate=void 0;var eR=ft(),m8=eu(),v8=ou(),g8=dg();function b8(e,t,r,n,i){var o,a,s,l;arguments.length===1?(o=e,l=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,s=a===void 0?eR.identity:a,i=o.scheduler):(l=e,!n||m8.isScheduler(n)?(s=eR.identity,i=n):s=n);function u(){var c;return h8(this,function(f){switch(f.label){case 0:c=l,f.label=1;case 1:return!t||t(c)?[4,s(c)]:[3,4];case 2:f.sent(),f.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return v8.defer(i?function(){return g8.scheduleIterable(u(),i)}:u)}va.generate=b8});var rR=b(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.iif=void 0;var y8=ou();function _8(e,t,r){return y8.defer(function(){return e()?t:r})}Af.iif=_8});var Un=b(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.timer=void 0;var w8=ke(),x8=jt(),S8=eu(),O8=sf();function E8(e,t,r){e===void 0&&(e=0),r===void 0&&(r=x8.async);var n=-1;return t!=null&&(S8.isScheduler(t)?r=t:n=t),new w8.Observable(function(i){var o=O8.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=E8});var Og=b(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.interval=void 0;var A8=jt(),R8=Un();function T8(e,t){return e===void 0&&(e=0),t===void 0&&(t=A8.asyncScheduler),e<0&&(e=0),R8.timer(e,e,t)}Tf.interval=T8});var iR=b(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.merge=void 0;var P8=nu(),M8=fe(),C8=hr(),nR=Lt(),k8=rn();function I8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=nR.popScheduler(e),n=nR.popNumber(e,1/0),i=e;return i.length?i.length===1?M8.innerFrom(i[0]):P8.mergeAll(n)(k8.from(i,r)):C8.EMPTY}Pf.merge=I8});var Eg=b(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.never=Hi.NEVER=void 0;var q8=ke(),j8=lt();Hi.NEVER=new q8.Observable(j8.noop);function L8(){return Hi.NEVER}Hi.never=L8});var ga=b(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.argsOrArgArray=void 0;var F8=Array.isArray;function N8(e){return e.length===1&&F8(e[0])?e[0]:e}Mf.argsOrArgArray=N8});var Ag=b(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.onErrorResumeNext=void 0;var D8=ke(),B8=ga(),z8=Z(),oR=lt(),U8=fe();function W8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=B8.argsOrArgArray(e);return new D8.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=U8.innerFrom(r[i++])}catch{o();return}var s=new z8.OperatorSubscriber(n,void 0,oR.noop,oR.noop);a.subscribe(s),s.add(o)}else n.complete()};o()})}Cf.onErrorResumeNext=W8});var aR=b(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.pairs=void 0;var H8=rn();function V8(e,t){return H8.from(Object.entries(e),t)}kf.pairs=V8});var sR=b(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.not=void 0;function G8(e,t){return function(r,n){return!e.call(t,r,n)}}If.not=G8});var Vi=b(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.filter=void 0;var $8=G(),Y8=Z();function X8(e,t){return $8.operate(function(r,n){var i=0;r.subscribe(Y8.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}qf.filter=X8});var lR=b(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.partition=void 0;var K8=sR(),uR=Vi(),cR=fe();function Z8(e,t,r){return[uR.filter(t,r)(cR.innerFrom(e)),uR.filter(K8.not(t,r))(cR.innerFrom(e))]}jf.partition=Z8});var Rg=b(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.raceInit=ba.race=void 0;var J8=ke(),fR=fe(),Q8=ga(),ez=Z();function tz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=Q8.argsOrArgArray(e),e.length===1?fR.innerFrom(e[0]):new J8.Observable(dR(e))}ba.race=tz;function dR(e){return function(t){for(var r=[],n=function(o){r.push(fR.innerFrom(e[o]).subscribe(ez.createOperatorSubscriber(t,function(a){if(r){for(var s=0;s<r.length;s++)s!==o&&r[s].unsubscribe();r=null}t.next(a)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}ba.raceInit=dR});var pR=b(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.range=void 0;var rz=ke(),nz=hr();function iz(e,t,r){if(t==null&&(t=e,e=0),t<=0)return nz.EMPTY;var n=t+e;return new rz.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()})}Lf.range=iz});var hR=b(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.using=void 0;var oz=ke(),az=fe(),sz=hr();function uz(e,t){return new oz.Observable(function(r){var n=e(),i=t(n),o=i?az.innerFrom(i):sz.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}Ff.using=uz});var Nf=b(Wn=>{"use strict";var cz=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},lz=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.zip=void 0;var fz=ke(),dz=fe(),pz=ga(),hz=hr(),mz=Z(),vz=Lt();function gz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=vz.popResultSelector(e),n=pz.argsOrArgArray(e);return n.length?new fz.Observable(function(i){var o=n.map(function(){return[]}),a=n.map(function(){return!1});i.add(function(){o=a=null});for(var s=function(u){dz.innerFrom(n[u]).subscribe(mz.createOperatorSubscriber(i,function(c){if(o[u].push(c),o.every(function(p){return p.length})){var f=o.map(function(p){return p.shift()});i.next(r?r.apply(void 0,lz([],cz(f))):f),o.some(function(p,d){return!p.length&&a[d]})&&i.complete()}},function(){a[u]=!0,!o[u].length&&i.complete()}))},l=0;!i.closed&&l<n.length;l++)s(l);return function(){o=a=null}}):hz.EMPTY}Wn.zip=gz});var vR=b(mR=>{"use strict";Object.defineProperty(mR,"__esModule",{value:!0})});var Tg=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.audit=void 0;var bz=G(),yz=fe(),gR=Z();function _z(e){return bz.operate(function(t,r){var n=!1,i=null,o=null,a=!1,s=function(){if(o?.unsubscribe(),o=null,n){n=!1;var u=i;i=null,r.next(u)}a&&r.complete()},l=function(){o=null,a&&r.complete()};t.subscribe(gR.createOperatorSubscriber(r,function(u){n=!0,i=u,o||yz.innerFrom(e(u)).subscribe(o=gR.createOperatorSubscriber(r,s,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}Df.audit=_z});var bR=b(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.auditTime=void 0;var wz=jt(),xz=Tg(),Sz=Un();function Oz(e,t){return t===void 0&&(t=wz.asyncScheduler),xz.audit(function(){return Sz.timer(e,t)})}Bf.auditTime=Oz});var _R=b(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.buffer=void 0;var Ez=G(),Az=lt(),yR=Z(),Rz=fe();function Tz(e){return Ez.operate(function(t,r){var n=[];return t.subscribe(yR.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),Rz.innerFrom(e).subscribe(yR.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},Az.noop)),function(){n=null}})}zf.buffer=Tz});var wR=b(ya=>{"use strict";var Pg=ya&&ya.__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(ya,"__esModule",{value:!0});ya.bufferCount=void 0;var Pz=G(),Mz=Z(),Cz=en();function kz(e,t){return t===void 0&&(t=null),t=t??e,Pz.operate(function(r,n){var i=[],o=0;r.subscribe(Mz.createOperatorSubscriber(n,function(a){var s,l,u,c,f=null;o++%t===0&&i.push([]);try{for(var p=Pg(i),d=p.next();!d.done;d=p.next()){var h=d.value;h.push(a),e<=h.length&&(f=f??[],f.push(h))}}catch(y){s={error:y}}finally{try{d&&!d.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}if(f)try{for(var m=Pg(f),v=m.next();!v.done;v=m.next()){var h=v.value;Cz.arrRemove(i,h),n.next(h)}}catch(y){u={error:y}}finally{try{v&&!v.done&&(c=m.return)&&c.call(m)}finally{if(u)throw u.error}}},function(){var a,s;try{for(var l=Pg(i),u=l.next();!u.done;u=l.next()){var c=u.value;n.next(c)}}catch(f){a={error:f}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}ya.bufferCount=kz});var SR=b(_a=>{"use strict";var Iz=_a&&_a.__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(_a,"__esModule",{value:!0});_a.bufferTime=void 0;var qz=Dt(),jz=G(),Lz=Z(),Fz=en(),Nz=jt(),Dz=Lt(),xR=tn();function Bz(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=Dz.popScheduler(n))!==null&&t!==void 0?t:Nz.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,s=n[1]||1/0;return jz.operate(function(l,u){var c=[],f=!1,p=function(m){var v=m.buffer,y=m.subs;y.unsubscribe(),Fz.arrRemove(c,m),u.next(v),f&&d()},d=function(){if(c){var m=new qz.Subscription;u.add(m);var v=[],y={buffer:v,subs:m};c.push(y),xR.executeSchedule(m,o,function(){return p(y)},e)}};a!==null&&a>=0?xR.executeSchedule(u,o,d,a,!0):f=!0,d();var h=Lz.createOperatorSubscriber(u,function(m){var v,y,w=c.slice();try{for(var _=Iz(w),x=_.next();!x.done;x=_.next()){var S=x.value,E=S.buffer;E.push(m),s<=E.length&&p(S)}}catch(T){v={error:T}}finally{try{x&&!x.done&&(y=_.return)&&y.call(_)}finally{if(v)throw v.error}}},function(){for(;c?.length;)u.next(c.shift().buffer);h?.unsubscribe(),u.complete(),u.unsubscribe()},void 0,function(){return c=null});l.subscribe(h)})}_a.bufferTime=Bz});var AR=b(wa=>{"use strict";var zz=wa&&wa.__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(wa,"__esModule",{value:!0});wa.bufferToggle=void 0;var Uz=Dt(),Wz=G(),OR=fe(),Mg=Z(),ER=lt(),Hz=en();function Vz(e,t){return Wz.operate(function(r,n){var i=[];OR.innerFrom(e).subscribe(Mg.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var s=new Uz.Subscription,l=function(){Hz.arrRemove(i,a),n.next(a),s.unsubscribe()};s.add(OR.innerFrom(t(o)).subscribe(Mg.createOperatorSubscriber(n,l,ER.noop)))},ER.noop)),r.subscribe(Mg.createOperatorSubscriber(n,function(o){var a,s;try{for(var l=zz(i),u=l.next();!u.done;u=l.next()){var c=u.value;c.push(o)}}catch(f){a={error:f}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}wa.bufferToggle=Vz});var TR=b(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.bufferWhen=void 0;var Gz=G(),$z=lt(),RR=Z(),Yz=fe();function Xz(e){return Gz.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),Yz.innerFrom(e()).subscribe(i=RR.createOperatorSubscriber(r,o,$z.noop))};o(),t.subscribe(RR.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}Uf.bufferWhen=Xz});var MR=b(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.catchError=void 0;var Kz=fe(),Zz=Z(),Jz=G();function PR(e){return Jz.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(Zz.createOperatorSubscriber(r,void 0,void 0,function(a){o=Kz.innerFrom(e(a,PR(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}Wf.catchError=PR});var Cg=b(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.scanInternals=void 0;var Qz=Z();function eU(e,t,r,n,i){return function(o,a){var s=r,l=t,u=0;o.subscribe(Qz.createOperatorSubscriber(a,function(c){var f=u++;l=s?e(l,c,f):(s=!0,c),n&&a.next(l)},i&&function(){s&&a.next(l),a.complete()}))}}Hf.scanInternals=eU});var xa=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.reduce=void 0;var tU=Cg(),rU=G();function nU(e,t){return rU.operate(tU.scanInternals(e,t,arguments.length>=2,!1,!0))}Vf.reduce=nU});var kg=b(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.toArray=void 0;var iU=xa(),oU=G(),aU=function(e,t){return e.push(t),e};function sU(){return oU.operate(function(e,t){iU.reduce(aU,[])(e).subscribe(t)})}Gf.toArray=sU});var Ig=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.joinAllInternals=void 0;var uU=ft(),cU=Bn(),lU=Ks(),fU=on(),dU=kg();function pU(e,t){return lU.pipe(dU.toArray(),fU.mergeMap(function(r){return e(r)}),t?cU.mapOneOrManyArgs(t):uU.identity)}$f.joinAllInternals=pU});var qg=b(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.combineLatestAll=void 0;var hU=hf(),mU=Ig();function vU(e){return mU.joinAllInternals(hU.combineLatest,e)}Yf.combineLatestAll=vU});var CR=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.combineAll=void 0;var gU=qg();Xf.combineAll=gU.combineLatestAll});var jR=b(Hn=>{"use strict";var kR=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},IR=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.combineLatest=void 0;var bU=hf(),yU=G(),_U=ga(),wU=Bn(),xU=Ks(),SU=Lt();function qR(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=SU.popResultSelector(e);return r?xU.pipe(qR.apply(void 0,IR([],kR(e))),wU.mapOneOrManyArgs(r)):yU.operate(function(n,i){bU.combineLatestInit(IR([n],kR(_U.argsOrArgArray(e))))(i)})}Hn.combineLatest=qR});var LR=b(Vn=>{"use strict";var OU=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},EU=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.combineLatestWith=void 0;var AU=jR();function RU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return AU.combineLatest.apply(void 0,EU([],OU(e)))}Vn.combineLatestWith=RU});var jg=b(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.concatMap=void 0;var FR=on(),TU=Pe();function PU(e,t){return TU.isFunction(t)?FR.mergeMap(e,t,1):FR.mergeMap(e,1)}Kf.concatMap=PU});var DR=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.concatMapTo=void 0;var NR=jg(),MU=Pe();function CU(e,t){return MU.isFunction(t)?NR.concatMap(function(){return e},t):NR.concatMap(function(){return e})}Zf.concatMapTo=CU});var BR=b(Gn=>{"use strict";var kU=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},IU=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.concat=void 0;var qU=G(),jU=_f(),LU=Lt(),FU=rn();function NU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=LU.popScheduler(e);return qU.operate(function(n,i){jU.concatAll()(FU.from(IU([n],kU(e)),r)).subscribe(i)})}Gn.concat=NU});var zR=b($n=>{"use strict";var DU=$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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},BU=$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.concatWith=void 0;var zU=BR();function UU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return zU.concat.apply(void 0,BU([],DU(e)))}$n.concatWith=UU});var UR=b(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.fromSubscribable=void 0;var WU=ke();function HU(e){return new WU.Observable(function(t){return e.subscribe(t)})}Jf.fromSubscribable=HU});var ed=b(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.connect=void 0;var VU=dt(),GU=fe(),$U=G(),YU=UR(),XU={connector:function(){return new VU.Subject}};function KU(e,t){t===void 0&&(t=XU);var r=t.connector;return $U.operate(function(n,i){var o=r();GU.innerFrom(e(YU.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}Qf.connect=KU});var WR=b(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.count=void 0;var ZU=xa();function JU(e){return ZU.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}td.count=JU});var VR=b(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.debounce=void 0;var QU=G(),eW=lt(),HR=Z(),tW=fe();function rW(e){return QU.operate(function(t,r){var n=!1,i=null,o=null,a=function(){if(o?.unsubscribe(),o=null,n){n=!1;var s=i;i=null,r.next(s)}};t.subscribe(HR.createOperatorSubscriber(r,function(s){o?.unsubscribe(),n=!0,i=s,o=HR.createOperatorSubscriber(r,a,eW.noop),tW.innerFrom(e(s)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}rd.debounce=rW});var GR=b(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.debounceTime=void 0;var nW=jt(),iW=G(),oW=Z();function aW(e,t){return t===void 0&&(t=nW.asyncScheduler),iW.operate(function(r,n){var i=null,o=null,a=null,s=function(){if(i){i.unsubscribe(),i=null;var u=o;o=null,n.next(u)}};function l(){var u=a+e,c=t.now();if(c<u){i=this.schedule(void 0,u-c),n.add(i);return}s()}r.subscribe(oW.createOperatorSubscriber(n,function(u){o=u,a=t.now(),i||(i=t.schedule(l,e),n.add(i))},function(){s(),n.complete()},void 0,function(){o=i=null}))})}nd.debounceTime=aW});var au=b(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.defaultIfEmpty=void 0;var sW=G(),uW=Z();function cW(e){return sW.operate(function(t,r){var n=!1;t.subscribe(uW.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}id.defaultIfEmpty=cW});var su=b(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.take=void 0;var lW=hr(),fW=G(),dW=Z();function pW(e){return e<=0?function(){return lW.EMPTY}:fW.operate(function(t,r){var n=0;t.subscribe(dW.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}od.take=pW});var Lg=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.ignoreElements=void 0;var hW=G(),mW=Z(),vW=lt();function gW(){return hW.operate(function(e,t){e.subscribe(mW.createOperatorSubscriber(t,vW.noop))})}ad.ignoreElements=gW});var Fg=b(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.mapTo=void 0;var bW=Nn();function yW(e){return bW.map(function(){return e})}sd.mapTo=yW});var Ng=b(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.delayWhen=void 0;var _W=iu(),$R=su(),wW=Lg(),xW=Fg(),SW=on(),OW=fe();function YR(e,t){return t?function(r){return _W.concat(t.pipe($R.take(1),wW.ignoreElements()),r.pipe(YR(e)))}:SW.mergeMap(function(r,n){return OW.innerFrom(e(r,n)).pipe($R.take(1),xW.mapTo(r))})}ud.delayWhen=YR});var XR=b(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.delay=void 0;var EW=jt(),AW=Ng(),RW=Un();function TW(e,t){t===void 0&&(t=EW.asyncScheduler);var r=RW.timer(e,t);return AW.delayWhen(function(){return r})}cd.delay=TW});var KR=b(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.dematerialize=void 0;var PW=Zl(),MW=G(),CW=Z();function kW(){return MW.operate(function(e,t){e.subscribe(CW.createOperatorSubscriber(t,function(r){return PW.observeNotification(r,t)}))})}ld.dematerialize=kW});var JR=b(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.distinct=void 0;var IW=G(),ZR=Z(),qW=lt(),jW=fe();function LW(e,t){return IW.operate(function(r,n){var i=new Set;r.subscribe(ZR.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&jW.innerFrom(t).subscribe(ZR.createOperatorSubscriber(n,function(){return i.clear()},qW.noop))})}fd.distinct=LW});var Dg=b(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.distinctUntilChanged=void 0;var FW=ft(),NW=G(),DW=Z();function BW(e,t){return t===void 0&&(t=FW.identity),e=e??zW,NW.operate(function(r,n){var i,o=!0;r.subscribe(DW.createOperatorSubscriber(n,function(a){var s=t(a);(o||!e(i,s))&&(o=!1,i=s,n.next(a))}))})}dd.distinctUntilChanged=BW;function zW(e,t){return e===t}});var QR=b(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.distinctUntilKeyChanged=void 0;var UW=Dg();function WW(e,t){return UW.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}pd.distinctUntilKeyChanged=WW});var uu=b(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.throwIfEmpty=void 0;var HW=Fn(),VW=G(),GW=Z();function $W(e){return e===void 0&&(e=YW),VW.operate(function(t,r){var n=!1;t.subscribe(GW.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}hd.throwIfEmpty=$W;function YW(){return new HW.EmptyError}});var tT=b(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.elementAt=void 0;var eT=vg(),XW=Vi(),KW=uu(),ZW=au(),JW=su();function QW(e,t){if(e<0)throw new eT.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(XW.filter(function(i,o){return o===e}),JW.take(1),r?ZW.defaultIfEmpty(t):KW.throwIfEmpty(function(){return new eT.ArgumentOutOfRangeError}))}}md.elementAt=QW});var rT=b(Yn=>{"use strict";var e4=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},t4=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.endWith=void 0;var r4=iu(),n4=Xl();function i4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return r4.concat(r,n4.of.apply(void 0,t4([],e4(e))))}}Yn.endWith=i4});var nT=b(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.every=void 0;var o4=G(),a4=Z();function s4(e,t){return o4.operate(function(r,n){var i=0;r.subscribe(a4.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}vd.every=s4});var Bg=b(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.exhaustMap=void 0;var u4=Nn(),iT=fe(),c4=G(),oT=Z();function aT(e,t){return t?function(r){return r.pipe(aT(function(n,i){return iT.innerFrom(e(n,i)).pipe(u4.map(function(o,a){return t(n,o,i,a)}))}))}:c4.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(oT.createOperatorSubscriber(n,function(s){o||(o=oT.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),iT.innerFrom(e(s,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}gd.exhaustMap=aT});var zg=b(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.exhaustAll=void 0;var l4=Bg(),f4=ft();function d4(){return l4.exhaustMap(f4.identity)}bd.exhaustAll=d4});var sT=b(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.exhaust=void 0;var p4=zg();yd.exhaust=p4.exhaustAll});var uT=b(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.expand=void 0;var h4=G(),m4=vf();function v4(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,h4.operate(function(n,i){return m4.mergeInternals(n,i,e,t,void 0,!0,r)})}_d.expand=v4});var cT=b(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.finalize=void 0;var g4=G();function b4(e){return g4.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}wd.finalize=b4});var Ug=b(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.createFind=Sa.find=void 0;var y4=G(),_4=Z();function w4(e,t){return y4.operate(lT(e,t,"value"))}Sa.find=w4;function lT(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(_4.createOperatorSubscriber(o,function(s){var l=a++;e.call(t,s,l,i)&&(o.next(n?l:s),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}Sa.createFind=lT});var fT=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.findIndex=void 0;var x4=G(),S4=Ug();function O4(e,t){return x4.operate(S4.createFind(e,t,"index"))}xd.findIndex=O4});var dT=b(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.first=void 0;var E4=Fn(),A4=Vi(),R4=su(),T4=au(),P4=uu(),M4=ft();function C4(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?A4.filter(function(i,o){return e(i,o,n)}):M4.identity,R4.take(1),r?T4.defaultIfEmpty(t):P4.throwIfEmpty(function(){return new E4.EmptyError}))}}Sd.first=C4});var hT=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.groupBy=void 0;var k4=ke(),I4=fe(),q4=dt(),j4=G(),pT=Z();function L4(e,t,r,n){return j4.operate(function(i,o){var a;!t||typeof t=="function"?a=t:(r=t.duration,a=t.element,n=t.connector);var s=new Map,l=function(h){s.forEach(h),h(o)},u=function(h){return l(function(m){return m.error(h)})},c=0,f=!1,p=new pT.OperatorSubscriber(o,function(h){try{var m=e(h),v=s.get(m);if(!v){s.set(m,v=n?n():new q4.Subject);var y=d(m,v);if(o.next(y),r){var w=pT.createOperatorSubscriber(v,function(){v.complete(),w?.unsubscribe()},void 0,void 0,function(){return s.delete(m)});p.add(I4.innerFrom(r(y)).subscribe(w))}}v.next(a?a(h):h)}catch(_){u(_)}},function(){return l(function(h){return h.complete()})},u,function(){return s.clear()},function(){return f=!0,c===0});i.subscribe(p);function d(h,m){var v=new k4.Observable(function(y){c++;var w=m.subscribe(y);return function(){w.unsubscribe(),--c===0&&f&&p.unsubscribe()}});return v.key=h,v}})}Od.groupBy=L4});var mT=b(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.isEmpty=void 0;var F4=G(),N4=Z();function D4(){return F4.operate(function(e,t){e.subscribe(N4.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}Ed.isEmpty=D4});var Wg=b(Oa=>{"use strict";var B4=Oa&&Oa.__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(Oa,"__esModule",{value:!0});Oa.takeLast=void 0;var z4=hr(),U4=G(),W4=Z();function H4(e){return e<=0?function(){return z4.EMPTY}:U4.operate(function(t,r){var n=[];t.subscribe(W4.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=B4(n),s=a.next();!s.done;s=a.next()){var l=s.value;r.next(l)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}Oa.takeLast=H4});var vT=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.last=void 0;var V4=Fn(),G4=Vi(),$4=Wg(),Y4=uu(),X4=au(),K4=ft();function Z4(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?G4.filter(function(i,o){return e(i,o,n)}):K4.identity,$4.takeLast(1),r?X4.defaultIfEmpty(t):Y4.throwIfEmpty(function(){return new V4.EmptyError}))}}Ad.last=Z4});var gT=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.materialize=void 0;var Hg=Zl(),J4=G(),Q4=Z();function e7(){return J4.operate(function(e,t){e.subscribe(Q4.createOperatorSubscriber(t,function(r){t.next(Hg.Notification.createNext(r))},function(){t.next(Hg.Notification.createComplete()),t.complete()},function(r){t.next(Hg.Notification.createError(r)),t.complete()}))})}Rd.materialize=e7});var bT=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.max=void 0;var t7=xa(),r7=Pe();function n7(e){return t7.reduce(r7.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Td.max=n7});var yT=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.flatMap=void 0;var i7=on();Pd.flatMap=i7.mergeMap});var wT=b(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.mergeMapTo=void 0;var _T=on(),o7=Pe();function a7(e,t,r){return r===void 0&&(r=1/0),o7.isFunction(t)?_T.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),_T.mergeMap(function(){return e},r))}Md.mergeMapTo=a7});var xT=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.mergeScan=void 0;var s7=G(),u7=vf();function c7(e,t,r){return r===void 0&&(r=1/0),s7.operate(function(n,i){var o=t;return u7.mergeInternals(n,i,function(a,s){return e(o,a,s)},r,function(a){o=a},!1,void 0,function(){return o=null})})}Cd.mergeScan=c7});var OT=b(Xn=>{"use strict";var l7=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},f7=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.merge=void 0;var d7=G(),p7=nu(),ST=Lt(),h7=rn();function m7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ST.popScheduler(e),n=ST.popNumber(e,1/0);return d7.operate(function(i,o){p7.mergeAll(n)(h7.from(f7([i],l7(e)),r)).subscribe(o)})}Xn.merge=m7});var ET=b(Kn=>{"use strict";var v7=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},g7=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 b7=OT();function y7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return b7.merge.apply(void 0,g7([],v7(e)))}Kn.mergeWith=y7});var AT=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.min=void 0;var _7=xa(),w7=Pe();function x7(e){return _7.reduce(w7.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}kd.min=x7});var qd=b(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.multicast=void 0;var S7=Zs(),RT=Pe(),O7=ed();function E7(e,t){var r=RT.isFunction(e)?e:function(){return e};return RT.isFunction(t)?O7.connect(t,{connector:r}):function(n){return new S7.ConnectableObservable(n,r)}}Id.multicast=E7});var PT=b(Nr=>{"use strict";var A7=Nr&&Nr.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},R7=Nr&&Nr.__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(Nr,"__esModule",{value:!0});Nr.onErrorResumeNext=Nr.onErrorResumeNextWith=void 0;var T7=ga(),P7=Ag();function TT(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=T7.argsOrArgArray(e);return function(n){return P7.onErrorResumeNext.apply(void 0,R7([n],A7(r)))}}Nr.onErrorResumeNextWith=TT;Nr.onErrorResumeNext=TT});var MT=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.pairwise=void 0;var M7=G(),C7=Z();function k7(){return M7.operate(function(e,t){var r,n=!1;e.subscribe(C7.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}jd.pairwise=k7});var CT=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.pluck=void 0;var I7=Nn();function q7(){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 I7.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})}Ld.pluck=q7});var kT=b(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});Fd.publish=void 0;var j7=dt(),L7=qd(),F7=ed();function N7(e){return e?function(t){return F7.connect(e)(t)}:function(t){return L7.multicast(new j7.Subject)(t)}}Fd.publish=N7});var IT=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.publishBehavior=void 0;var D7=Qv(),B7=Zs();function z7(e){return function(t){var r=new D7.BehaviorSubject(e);return new B7.ConnectableObservable(t,function(){return r})}}Nd.publishBehavior=z7});var qT=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.publishLast=void 0;var U7=El(),W7=Zs();function H7(){return function(e){var t=new U7.AsyncSubject;return new W7.ConnectableObservable(e,function(){return t})}}Dd.publishLast=H7});var LT=b(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.publishReplay=void 0;var V7=Ol(),G7=qd(),jT=Pe();function $7(e,t,r,n){r&&!jT.isFunction(r)&&(n=r);var i=jT.isFunction(r)?r:void 0;return function(o){return G7.multicast(new V7.ReplaySubject(e,t,n),i)(o)}}Bd.publishReplay=$7});var FT=b(Zn=>{"use strict";var Y7=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},X7=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.raceWith=void 0;var K7=Rg(),Z7=G(),J7=ft();function Q7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?Z7.operate(function(r,n){K7.raceInit(X7([r],Y7(e)))(n)}):J7.identity}Zn.raceWith=Q7});var DT=b(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.repeat=void 0;var eH=hr(),tH=G(),NT=Z(),rH=fe(),nH=Un();function iH(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 eH.EMPTY}:tH.operate(function(i,o){var a=0,s,l=function(){if(s?.unsubscribe(),s=null,n!=null){var c=typeof n=="number"?nH.timer(n):rH.innerFrom(n(a)),f=NT.createOperatorSubscriber(o,function(){f.unsubscribe(),u()});c.subscribe(f)}else u()},u=function(){var c=!1;s=i.subscribe(NT.createOperatorSubscriber(o,void 0,function(){++a<r?s?l():c=!0:o.complete()})),c&&l()};u()})}zd.repeat=iH});var zT=b(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.repeatWhen=void 0;var oH=fe(),aH=dt(),sH=G(),BT=Z();function uH(e){return sH.operate(function(t,r){var n,i=!1,o,a=!1,s=!1,l=function(){return s&&a&&(r.complete(),!0)},u=function(){return o||(o=new aH.Subject,oH.innerFrom(e(o)).subscribe(BT.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){s=!1,n=t.subscribe(BT.createOperatorSubscriber(r,void 0,function(){s=!0,!l()&&u().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}Ud.repeatWhen=uH});var WT=b(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.retry=void 0;var cH=G(),UT=Z(),lH=ft(),fH=Un(),dH=fe();function pH(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?lH.identity:cH.operate(function(s,l){var u=0,c,f=function(){var p=!1;c=s.subscribe(UT.createOperatorSubscriber(l,function(d){a&&(u=0),l.next(d)},void 0,function(d){if(u++<n){var h=function(){c?(c.unsubscribe(),c=null,f()):p=!0};if(i!=null){var m=typeof i=="number"?fH.timer(i):dH.innerFrom(i(d,u)),v=UT.createOperatorSubscriber(l,function(){v.unsubscribe(),h()},function(){l.complete()});m.subscribe(v)}else h()}else l.error(d)})),p&&(c.unsubscribe(),c=null,f())};f()})}Wd.retry=pH});var VT=b(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.retryWhen=void 0;var hH=fe(),mH=dt(),vH=G(),HT=Z();function gH(e){return vH.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(HT.createOperatorSubscriber(r,void 0,void 0,function(s){o||(o=new mH.Subject,hH.innerFrom(e(o)).subscribe(HT.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(s)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}Hd.retryWhen=gH});var Vg=b(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.sample=void 0;var bH=fe(),yH=G(),_H=lt(),GT=Z();function wH(e){return yH.operate(function(t,r){var n=!1,i=null;t.subscribe(GT.createOperatorSubscriber(r,function(o){n=!0,i=o})),bH.innerFrom(e).subscribe(GT.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},_H.noop))})}Vd.sample=wH});var $T=b(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.sampleTime=void 0;var xH=jt(),SH=Vg(),OH=Og();function EH(e,t){return t===void 0&&(t=xH.asyncScheduler),SH.sample(OH.interval(e,t))}Gd.sampleTime=EH});var YT=b($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.scan=void 0;var AH=G(),RH=Cg();function TH(e,t){return AH.operate(RH.scanInternals(e,t,arguments.length>=2,!0))}$d.scan=TH});var KT=b(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.sequenceEqual=void 0;var PH=G(),MH=Z(),CH=fe();function kH(e,t){return t===void 0&&(t=function(r,n){return r===n}),PH.operate(function(r,n){var i=XT(),o=XT(),a=function(l){n.next(l),n.complete()},s=function(l,u){var c=MH.createOperatorSubscriber(n,function(f){var p=u.buffer,d=u.complete;p.length===0?d?a(!1):l.buffer.push(f):!t(f,p.shift())&&a(!1)},function(){l.complete=!0;var f=u.complete,p=u.buffer;f&&a(p.length===0),c?.unsubscribe()});return c};r.subscribe(s(i,o)),CH.innerFrom(e).subscribe(s(o,i))})}Yd.sequenceEqual=kH;function XT(){return{buffer:[],complete:!1}}});var $g=b(Jn=>{"use strict";var IH=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},qH=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.share=void 0;var ZT=fe(),jH=dt(),JT=Go(),LH=G();function FH(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new jH.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,s=e.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,f,p,d=0,h=!1,m=!1,v=function(){f?.unsubscribe(),f=void 0},y=function(){v(),c=p=void 0,h=m=!1},w=function(){var _=c;y(),_?.unsubscribe()};return LH.operate(function(_,x){d++,!m&&!h&&v();var S=p=p??r();x.add(function(){d--,d===0&&!m&&!h&&(f=Gg(w,l))}),S.subscribe(x),!c&&d>0&&(c=new JT.SafeSubscriber({next:function(E){return S.next(E)},error:function(E){m=!0,v(),f=Gg(y,i,E),S.error(E)},complete:function(){h=!0,v(),f=Gg(y,a),S.complete()}}),ZT.innerFrom(_).subscribe(c))})(u)}}Jn.share=FH;function Gg(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 JT.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return ZT.innerFrom(t.apply(void 0,qH([],IH(r)))).subscribe(i)}}});var QT=b(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.shareReplay=void 0;var NH=Ol(),DH=$g();function BH(e,t,r){var n,i,o,a,s=!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,s=o===void 0?!1:o,r=e.scheduler):a=e??1/0,DH.share({connector:function(){return new NH.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}Xd.shareReplay=BH});var eP=b(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.single=void 0;var zH=Fn(),UH=bg(),WH=gg(),HH=G(),VH=Z();function GH(e){return HH.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(VH.createOperatorSubscriber(r,function(s){o=!0,(!e||e(s,a++,t))&&(n&&r.error(new UH.SequenceError("Too many matching values")),n=!0,i=s)},function(){n?(r.next(i),r.complete()):r.error(o?new WH.NotFoundError("No matching values"):new zH.EmptyError)}))})}Kd.single=GH});var tP=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.skip=void 0;var $H=Vi();function YH(e){return $H.filter(function(t,r){return e<=r})}Zd.skip=YH});var rP=b(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.skipLast=void 0;var XH=ft(),KH=G(),ZH=Z();function JH(e){return e<=0?XH.identity:KH.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(ZH.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var s=a%e,l=n[s];n[s]=o,r.next(l)}})),function(){n=null}})}Jd.skipLast=JH});var iP=b(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.skipUntil=void 0;var QH=G(),nP=Z(),eV=fe(),tV=lt();function rV(e){return QH.operate(function(t,r){var n=!1,i=nP.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},tV.noop);eV.innerFrom(e).subscribe(i),t.subscribe(nP.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}Qd.skipUntil=rV});var oP=b(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});ep.skipWhile=void 0;var nV=G(),iV=Z();function oV(e){return nV.operate(function(t,r){var n=!1,i=0;t.subscribe(iV.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}ep.skipWhile=oV});var sP=b(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.startWith=void 0;var aP=iu(),aV=Lt(),sV=G();function uV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=aV.popScheduler(e);return sV.operate(function(n,i){(r?aP.concat(e,n,r):aP.concat(e,n)).subscribe(i)})}tp.startWith=uV});var cu=b(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.switchMap=void 0;var cV=fe(),lV=G(),uP=Z();function fV(e,t){return lV.operate(function(r,n){var i=null,o=0,a=!1,s=function(){return a&&!i&&n.complete()};r.subscribe(uP.createOperatorSubscriber(n,function(l){i?.unsubscribe();var u=0,c=o++;cV.innerFrom(e(l,c)).subscribe(i=uP.createOperatorSubscriber(n,function(f){return n.next(t?t(l,f,c,u++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}rp.switchMap=fV});var cP=b(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.switchAll=void 0;var dV=cu(),pV=ft();function hV(){return dV.switchMap(pV.identity)}np.switchAll=hV});var fP=b(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.switchMapTo=void 0;var lP=cu(),mV=Pe();function vV(e,t){return mV.isFunction(t)?lP.switchMap(function(){return e},t):lP.switchMap(function(){return e})}ip.switchMapTo=vV});var dP=b(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.switchScan=void 0;var gV=cu(),bV=G();function yV(e,t){return bV.operate(function(r,n){var i=t;return gV.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}op.switchScan=yV});var pP=b(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});ap.takeUntil=void 0;var _V=G(),wV=Z(),xV=fe(),SV=lt();function OV(e){return _V.operate(function(t,r){xV.innerFrom(e).subscribe(wV.createOperatorSubscriber(r,function(){return r.complete()},SV.noop)),!r.closed&&t.subscribe(r)})}ap.takeUntil=OV});var hP=b(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});sp.takeWhile=void 0;var EV=G(),AV=Z();function RV(e,t){return t===void 0&&(t=!1),EV.operate(function(r,n){var i=0;r.subscribe(AV.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}sp.takeWhile=RV});var mP=b(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.tap=void 0;var TV=Pe(),PV=G(),MV=Z(),CV=ft();function kV(e,t,r){var n=TV.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?PV.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var s=!0;i.subscribe(MV.createOperatorSubscriber(o,function(l){var u;(u=n.next)===null||u===void 0||u.call(n,l),o.next(l)},function(){var l;s=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},function(l){var u;s=!1,(u=n.error)===null||u===void 0||u.call(n,l),o.error(l)},function(){var l,u;s&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):CV.identity}up.tap=kV});var Yg=b(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.throttle=void 0;var IV=G(),vP=Z(),qV=fe();function jV(e,t){return IV.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,s=i.trailing,l=s===void 0?!1:s,u=!1,c=null,f=null,p=!1,d=function(){f?.unsubscribe(),f=null,l&&(v(),p&&n.complete())},h=function(){f=null,p&&n.complete()},m=function(y){return f=qV.innerFrom(e(y)).subscribe(vP.createOperatorSubscriber(n,d,h))},v=function(){if(u){u=!1;var y=c;c=null,n.next(y),!p&&m(y)}};r.subscribe(vP.createOperatorSubscriber(n,function(y){u=!0,c=y,!(f&&!f.closed)&&(a?v():m(y))},function(){p=!0,!(l&&u&&f&&!f.closed)&&n.complete()}))})}cp.throttle=jV});var gP=b(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.throttleTime=void 0;var LV=jt(),FV=Yg(),NV=Un();function DV(e,t,r){t===void 0&&(t=LV.asyncScheduler);var n=NV.timer(e,t);return FV.throttle(function(){return n},r)}lp.throttleTime=DV});var yP=b(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.TimeInterval=Ea.timeInterval=void 0;var BV=jt(),zV=G(),UV=Z();function WV(e){return e===void 0&&(e=BV.asyncScheduler),zV.operate(function(t,r){var n=e.now();t.subscribe(UV.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new bP(i,a))}))})}Ea.timeInterval=WV;var bP=function(){function e(t,r){this.value=t,this.interval=r}return e}();Ea.TimeInterval=bP});var _P=b(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.timeoutWith=void 0;var HV=jt(),VV=sf(),GV=uf();function $V(e,t,r){var n,i,o;if(r=r??HV.async,VV.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 GV.timeout({first:n,each:i,scheduler:r,with:o})}fp.timeoutWith=$V});var wP=b(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.timestamp=void 0;var YV=Sl(),XV=Nn();function KV(e){return e===void 0&&(e=YV.dateTimestampProvider),XV.map(function(t){return{value:t,timestamp:e.now()}})}dp.timestamp=KV});var OP=b(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.window=void 0;var xP=dt(),ZV=G(),SP=Z(),JV=lt(),QV=fe();function eG(e){return ZV.operate(function(t,r){var n=new xP.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(SP.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),QV.innerFrom(e).subscribe(SP.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new xP.Subject)},JV.noop,i)),function(){n?.unsubscribe(),n=null}})}pp.window=eG});var AP=b(Aa=>{"use strict";var tG=Aa&&Aa.__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(Aa,"__esModule",{value:!0});Aa.windowCount=void 0;var EP=dt(),rG=G(),nG=Z();function iG(e,t){t===void 0&&(t=0);var r=t>0?t:e;return rG.operate(function(n,i){var o=[new EP.Subject],a=[],s=0;i.next(o[0].asObservable()),n.subscribe(nG.createOperatorSubscriber(i,function(l){var u,c;try{for(var f=tG(o),p=f.next();!p.done;p=f.next()){var d=p.value;d.next(l)}}catch(v){u={error:v}}finally{try{p&&!p.done&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}var h=s-e+1;if(h>=0&&h%r===0&&o.shift().complete(),++s%r===0){var m=new EP.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}))})}Aa.windowCount=iG});var TP=b(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.windowTime=void 0;var oG=dt(),aG=jt(),sG=Dt(),uG=G(),cG=Z(),lG=en(),fG=Lt(),RP=tn();function dG(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=fG.popScheduler(n))!==null&&t!==void 0?t:aG.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,s=n[1]||1/0;return uG.operate(function(l,u){var c=[],f=!1,p=function(v){var y=v.window,w=v.subs;y.complete(),w.unsubscribe(),lG.arrRemove(c,v),f&&d()},d=function(){if(c){var v=new sG.Subscription;u.add(v);var y=new oG.Subject,w={window:y,subs:v,seen:0};c.push(w),u.next(y.asObservable()),RP.executeSchedule(v,o,function(){return p(w)},e)}};a!==null&&a>=0?RP.executeSchedule(u,o,d,a,!0):f=!0,d();var h=function(v){return c.slice().forEach(v)},m=function(v){h(function(y){var w=y.window;return v(w)}),v(u),u.unsubscribe()};return l.subscribe(cG.createOperatorSubscriber(u,function(v){h(function(y){y.window.next(v),s<=++y.seen&&p(y)})},function(){return m(function(v){return v.complete()})},function(v){return m(function(y){return y.error(v)})})),function(){c=null}})}hp.windowTime=dG});var CP=b(Ra=>{"use strict";var pG=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.windowToggle=void 0;var hG=dt(),mG=Dt(),vG=G(),PP=fe(),Xg=Z(),MP=lt(),gG=en();function bG(e,t){return vG.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};PP.innerFrom(e).subscribe(Xg.createOperatorSubscriber(n,function(a){var s=new hG.Subject;i.push(s);var l=new mG.Subscription,u=function(){gG.arrRemove(i,s),s.complete(),l.unsubscribe()},c;try{c=PP.innerFrom(t(a))}catch(f){o(f);return}n.next(s.asObservable()),l.add(c.subscribe(Xg.createOperatorSubscriber(n,u,MP.noop,o)))},MP.noop)),r.subscribe(Xg.createOperatorSubscriber(n,function(a){var s,l,u=i.slice();try{for(var c=pG(u),f=c.next();!f.done;f=c.next()){var p=f.value;p.next(a)}}catch(d){s={error:d}}finally{try{f&&!f.done&&(l=c.return)&&l.call(c)}finally{if(s)throw s.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},o,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}Ra.windowToggle=bG});var IP=b(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.windowWhen=void 0;var yG=dt(),_G=G(),kP=Z(),wG=fe();function xG(e){return _G.operate(function(t,r){var n,i,o=function(s){n.error(s),r.error(s)},a=function(){i?.unsubscribe(),n?.complete(),n=new yG.Subject,r.next(n.asObservable());var s;try{s=wG.innerFrom(e())}catch(l){o(l);return}s.subscribe(i=kP.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(kP.createOperatorSubscriber(r,function(s){return n.next(s)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}mp.windowWhen=xG});var FP=b(Qn=>{"use strict";var qP=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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},jP=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.withLatestFrom=void 0;var SG=G(),LP=Z(),OG=fe(),EG=ft(),AG=lt(),RG=Lt();function TG(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=RG.popResultSelector(e);return SG.operate(function(n,i){for(var o=e.length,a=new Array(o),s=e.map(function(){return!1}),l=!1,u=function(f){OG.innerFrom(e[f]).subscribe(LP.createOperatorSubscriber(i,function(p){a[f]=p,!l&&!s[f]&&(s[f]=!0,(l=s.every(EG.identity))&&(s=null))},AG.noop))},c=0;c<o;c++)u(c);n.subscribe(LP.createOperatorSubscriber(i,function(f){if(l){var p=jP([f],qP(a));i.next(r?r.apply(void 0,jP([],qP(p))):p)}}))})}Qn.withLatestFrom=TG});var NP=b(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.zipAll=void 0;var PG=Nf(),MG=Ig();function CG(e){return MG.joinAllInternals(PG.zip,e)}vp.zipAll=CG});var DP=b(ei=>{"use strict";var kG=ei&&ei.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},IG=ei&&ei.__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(ei,"__esModule",{value:!0});ei.zip=void 0;var qG=Nf(),jG=G();function LG(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return jG.operate(function(r,n){qG.zip.apply(void 0,IG([r],kG(e))).subscribe(n)})}ei.zip=LG});var BP=b(ti=>{"use strict";var FG=ti&&ti.__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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},NG=ti&&ti.__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(ti,"__esModule",{value:!0});ti.zipWith=void 0;var DG=DP();function BG(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return DG.zip.apply(void 0,NG([],FG(e)))}ti.zipWith=BG});var $P=b(g=>{"use strict";var zG=g&&g.__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]}),UG=g&&g.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&zG(t,e,r)};Object.defineProperty(g,"__esModule",{value:!0});g.interval=g.iif=g.generate=g.fromEventPattern=g.fromEvent=g.from=g.forkJoin=g.empty=g.defer=g.connectable=g.concat=g.combineLatest=g.bindNodeCallback=g.bindCallback=g.UnsubscriptionError=g.TimeoutError=g.SequenceError=g.ObjectUnsubscribedError=g.NotFoundError=g.EmptyError=g.ArgumentOutOfRangeError=g.firstValueFrom=g.lastValueFrom=g.isObservable=g.identity=g.noop=g.pipe=g.NotificationKind=g.Notification=g.Subscriber=g.Subscription=g.Scheduler=g.VirtualAction=g.VirtualTimeScheduler=g.animationFrameScheduler=g.animationFrame=g.queueScheduler=g.queue=g.asyncScheduler=g.async=g.asapScheduler=g.asap=g.AsyncSubject=g.ReplaySubject=g.BehaviorSubject=g.Subject=g.animationFrames=g.observable=g.ConnectableObservable=g.Observable=void 0;g.filter=g.expand=g.exhaustMap=g.exhaustAll=g.exhaust=g.every=g.endWith=g.elementAt=g.distinctUntilKeyChanged=g.distinctUntilChanged=g.distinct=g.dematerialize=g.delayWhen=g.delay=g.defaultIfEmpty=g.debounceTime=g.debounce=g.count=g.connect=g.concatWith=g.concatMapTo=g.concatMap=g.concatAll=g.combineLatestWith=g.combineLatestAll=g.combineAll=g.catchError=g.bufferWhen=g.bufferToggle=g.bufferTime=g.bufferCount=g.buffer=g.auditTime=g.audit=g.config=g.NEVER=g.EMPTY=g.scheduled=g.zip=g.using=g.timer=g.throwError=g.range=g.race=g.partition=g.pairs=g.onErrorResumeNext=g.of=g.never=g.merge=void 0;g.switchMap=g.switchAll=g.subscribeOn=g.startWith=g.skipWhile=g.skipUntil=g.skipLast=g.skip=g.single=g.shareReplay=g.share=g.sequenceEqual=g.scan=g.sampleTime=g.sample=g.refCount=g.retryWhen=g.retry=g.repeatWhen=g.repeat=g.reduce=g.raceWith=g.publishReplay=g.publishLast=g.publishBehavior=g.publish=g.pluck=g.pairwise=g.onErrorResumeNextWith=g.observeOn=g.multicast=g.min=g.mergeWith=g.mergeScan=g.mergeMapTo=g.mergeMap=g.flatMap=g.mergeAll=g.max=g.materialize=g.mapTo=g.map=g.last=g.isEmpty=g.ignoreElements=g.groupBy=g.first=g.findIndex=g.find=g.finalize=void 0;g.zipWith=g.zipAll=g.withLatestFrom=g.windowWhen=g.windowToggle=g.windowTime=g.windowCount=g.window=g.toArray=g.timestamp=g.timeoutWith=g.timeout=g.timeInterval=g.throwIfEmpty=g.throttleTime=g.throttle=g.tap=g.takeWhile=g.takeUntil=g.takeLast=g.take=g.switchScan=g.switchMapTo=void 0;var WG=ke();Object.defineProperty(g,"Observable",{enumerable:!0,get:function(){return WG.Observable}});var HG=Zs();Object.defineProperty(g,"ConnectableObservable",{enumerable:!0,get:function(){return HG.ConnectableObservable}});var VG=Xs();Object.defineProperty(g,"observable",{enumerable:!0,get:function(){return VG.observable}});var GG=VE();Object.defineProperty(g,"animationFrames",{enumerable:!0,get:function(){return GG.animationFrames}});var $G=dt();Object.defineProperty(g,"Subject",{enumerable:!0,get:function(){return $G.Subject}});var YG=Qv();Object.defineProperty(g,"BehaviorSubject",{enumerable:!0,get:function(){return YG.BehaviorSubject}});var XG=Ol();Object.defineProperty(g,"ReplaySubject",{enumerable:!0,get:function(){return XG.ReplaySubject}});var KG=El();Object.defineProperty(g,"AsyncSubject",{enumerable:!0,get:function(){return KG.AsyncSubject}});var zP=uA();Object.defineProperty(g,"asap",{enumerable:!0,get:function(){return zP.asap}});Object.defineProperty(g,"asapScheduler",{enumerable:!0,get:function(){return zP.asapScheduler}});var UP=jt();Object.defineProperty(g,"async",{enumerable:!0,get:function(){return UP.async}});Object.defineProperty(g,"asyncScheduler",{enumerable:!0,get:function(){return UP.asyncScheduler}});var WP=fA();Object.defineProperty(g,"queue",{enumerable:!0,get:function(){return WP.queue}});Object.defineProperty(g,"queueScheduler",{enumerable:!0,get:function(){return WP.queueScheduler}});var HP=mA();Object.defineProperty(g,"animationFrame",{enumerable:!0,get:function(){return HP.animationFrame}});Object.defineProperty(g,"animationFrameScheduler",{enumerable:!0,get:function(){return HP.animationFrameScheduler}});var VP=bA();Object.defineProperty(g,"VirtualTimeScheduler",{enumerable:!0,get:function(){return VP.VirtualTimeScheduler}});Object.defineProperty(g,"VirtualAction",{enumerable:!0,get:function(){return VP.VirtualAction}});var ZG=tg();Object.defineProperty(g,"Scheduler",{enumerable:!0,get:function(){return ZG.Scheduler}});var JG=Dt();Object.defineProperty(g,"Subscription",{enumerable:!0,get:function(){return JG.Subscription}});var QG=Go();Object.defineProperty(g,"Subscriber",{enumerable:!0,get:function(){return QG.Subscriber}});var GP=Zl();Object.defineProperty(g,"Notification",{enumerable:!0,get:function(){return GP.Notification}});Object.defineProperty(g,"NotificationKind",{enumerable:!0,get:function(){return GP.NotificationKind}});var e9=Ks();Object.defineProperty(g,"pipe",{enumerable:!0,get:function(){return e9.pipe}});var t9=lt();Object.defineProperty(g,"noop",{enumerable:!0,get:function(){return t9.noop}});var r9=ft();Object.defineProperty(g,"identity",{enumerable:!0,get:function(){return r9.identity}});var n9=jA();Object.defineProperty(g,"isObservable",{enumerable:!0,get:function(){return n9.isObservable}});var i9=LA();Object.defineProperty(g,"lastValueFrom",{enumerable:!0,get:function(){return i9.lastValueFrom}});var o9=FA();Object.defineProperty(g,"firstValueFrom",{enumerable:!0,get:function(){return o9.firstValueFrom}});var a9=vg();Object.defineProperty(g,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return a9.ArgumentOutOfRangeError}});var s9=Fn();Object.defineProperty(g,"EmptyError",{enumerable:!0,get:function(){return s9.EmptyError}});var u9=gg();Object.defineProperty(g,"NotFoundError",{enumerable:!0,get:function(){return u9.NotFoundError}});var c9=Xv();Object.defineProperty(g,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return c9.ObjectUnsubscribedError}});var l9=bg();Object.defineProperty(g,"SequenceError",{enumerable:!0,get:function(){return l9.SequenceError}});var f9=uf();Object.defineProperty(g,"TimeoutError",{enumerable:!0,get:function(){return f9.TimeoutError}});var d9=Lv();Object.defineProperty(g,"UnsubscriptionError",{enumerable:!0,get:function(){return d9.UnsubscriptionError}});var p9=DA();Object.defineProperty(g,"bindCallback",{enumerable:!0,get:function(){return p9.bindCallback}});var h9=BA();Object.defineProperty(g,"bindNodeCallback",{enumerable:!0,get:function(){return h9.bindNodeCallback}});var m9=hf();Object.defineProperty(g,"combineLatest",{enumerable:!0,get:function(){return m9.combineLatest}});var v9=iu();Object.defineProperty(g,"concat",{enumerable:!0,get:function(){return v9.concat}});var g9=YA();Object.defineProperty(g,"connectable",{enumerable:!0,get:function(){return g9.connectable}});var b9=ou();Object.defineProperty(g,"defer",{enumerable:!0,get:function(){return b9.defer}});var y9=hr();Object.defineProperty(g,"empty",{enumerable:!0,get:function(){return y9.empty}});var _9=XA();Object.defineProperty(g,"forkJoin",{enumerable:!0,get:function(){return _9.forkJoin}});var w9=rn();Object.defineProperty(g,"from",{enumerable:!0,get:function(){return w9.from}});var x9=ZA();Object.defineProperty(g,"fromEvent",{enumerable:!0,get:function(){return x9.fromEvent}});var S9=QA();Object.defineProperty(g,"fromEventPattern",{enumerable:!0,get:function(){return S9.fromEventPattern}});var O9=tR();Object.defineProperty(g,"generate",{enumerable:!0,get:function(){return O9.generate}});var E9=rR();Object.defineProperty(g,"iif",{enumerable:!0,get:function(){return E9.iif}});var A9=Og();Object.defineProperty(g,"interval",{enumerable:!0,get:function(){return A9.interval}});var R9=iR();Object.defineProperty(g,"merge",{enumerable:!0,get:function(){return R9.merge}});var T9=Eg();Object.defineProperty(g,"never",{enumerable:!0,get:function(){return T9.never}});var P9=Xl();Object.defineProperty(g,"of",{enumerable:!0,get:function(){return P9.of}});var M9=Ag();Object.defineProperty(g,"onErrorResumeNext",{enumerable:!0,get:function(){return M9.onErrorResumeNext}});var C9=aR();Object.defineProperty(g,"pairs",{enumerable:!0,get:function(){return C9.pairs}});var k9=lR();Object.defineProperty(g,"partition",{enumerable:!0,get:function(){return k9.partition}});var I9=Rg();Object.defineProperty(g,"race",{enumerable:!0,get:function(){return I9.race}});var q9=pR();Object.defineProperty(g,"range",{enumerable:!0,get:function(){return q9.range}});var j9=mg();Object.defineProperty(g,"throwError",{enumerable:!0,get:function(){return j9.throwError}});var L9=Un();Object.defineProperty(g,"timer",{enumerable:!0,get:function(){return L9.timer}});var F9=hR();Object.defineProperty(g,"using",{enumerable:!0,get:function(){return F9.using}});var N9=Nf();Object.defineProperty(g,"zip",{enumerable:!0,get:function(){return N9.zip}});var D9=hg();Object.defineProperty(g,"scheduled",{enumerable:!0,get:function(){return D9.scheduled}});var B9=hr();Object.defineProperty(g,"EMPTY",{enumerable:!0,get:function(){return B9.EMPTY}});var z9=Eg();Object.defineProperty(g,"NEVER",{enumerable:!0,get:function(){return z9.NEVER}});UG(vR(),g);var U9=Ho();Object.defineProperty(g,"config",{enumerable:!0,get:function(){return U9.config}});var W9=Tg();Object.defineProperty(g,"audit",{enumerable:!0,get:function(){return W9.audit}});var H9=bR();Object.defineProperty(g,"auditTime",{enumerable:!0,get:function(){return H9.auditTime}});var V9=_R();Object.defineProperty(g,"buffer",{enumerable:!0,get:function(){return V9.buffer}});var G9=wR();Object.defineProperty(g,"bufferCount",{enumerable:!0,get:function(){return G9.bufferCount}});var $9=SR();Object.defineProperty(g,"bufferTime",{enumerable:!0,get:function(){return $9.bufferTime}});var Y9=AR();Object.defineProperty(g,"bufferToggle",{enumerable:!0,get:function(){return Y9.bufferToggle}});var X9=TR();Object.defineProperty(g,"bufferWhen",{enumerable:!0,get:function(){return X9.bufferWhen}});var K9=MR();Object.defineProperty(g,"catchError",{enumerable:!0,get:function(){return K9.catchError}});var Z9=CR();Object.defineProperty(g,"combineAll",{enumerable:!0,get:function(){return Z9.combineAll}});var J9=qg();Object.defineProperty(g,"combineLatestAll",{enumerable:!0,get:function(){return J9.combineLatestAll}});var Q9=LR();Object.defineProperty(g,"combineLatestWith",{enumerable:!0,get:function(){return Q9.combineLatestWith}});var e$=_f();Object.defineProperty(g,"concatAll",{enumerable:!0,get:function(){return e$.concatAll}});var t$=jg();Object.defineProperty(g,"concatMap",{enumerable:!0,get:function(){return t$.concatMap}});var r$=DR();Object.defineProperty(g,"concatMapTo",{enumerable:!0,get:function(){return r$.concatMapTo}});var n$=zR();Object.defineProperty(g,"concatWith",{enumerable:!0,get:function(){return n$.concatWith}});var i$=ed();Object.defineProperty(g,"connect",{enumerable:!0,get:function(){return i$.connect}});var o$=WR();Object.defineProperty(g,"count",{enumerable:!0,get:function(){return o$.count}});var a$=VR();Object.defineProperty(g,"debounce",{enumerable:!0,get:function(){return a$.debounce}});var s$=GR();Object.defineProperty(g,"debounceTime",{enumerable:!0,get:function(){return s$.debounceTime}});var u$=au();Object.defineProperty(g,"defaultIfEmpty",{enumerable:!0,get:function(){return u$.defaultIfEmpty}});var c$=XR();Object.defineProperty(g,"delay",{enumerable:!0,get:function(){return c$.delay}});var l$=Ng();Object.defineProperty(g,"delayWhen",{enumerable:!0,get:function(){return l$.delayWhen}});var f$=KR();Object.defineProperty(g,"dematerialize",{enumerable:!0,get:function(){return f$.dematerialize}});var d$=JR();Object.defineProperty(g,"distinct",{enumerable:!0,get:function(){return d$.distinct}});var p$=Dg();Object.defineProperty(g,"distinctUntilChanged",{enumerable:!0,get:function(){return p$.distinctUntilChanged}});var h$=QR();Object.defineProperty(g,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return h$.distinctUntilKeyChanged}});var m$=tT();Object.defineProperty(g,"elementAt",{enumerable:!0,get:function(){return m$.elementAt}});var v$=rT();Object.defineProperty(g,"endWith",{enumerable:!0,get:function(){return v$.endWith}});var g$=nT();Object.defineProperty(g,"every",{enumerable:!0,get:function(){return g$.every}});var b$=sT();Object.defineProperty(g,"exhaust",{enumerable:!0,get:function(){return b$.exhaust}});var y$=zg();Object.defineProperty(g,"exhaustAll",{enumerable:!0,get:function(){return y$.exhaustAll}});var _$=Bg();Object.defineProperty(g,"exhaustMap",{enumerable:!0,get:function(){return _$.exhaustMap}});var w$=uT();Object.defineProperty(g,"expand",{enumerable:!0,get:function(){return w$.expand}});var x$=Vi();Object.defineProperty(g,"filter",{enumerable:!0,get:function(){return x$.filter}});var S$=cT();Object.defineProperty(g,"finalize",{enumerable:!0,get:function(){return S$.finalize}});var O$=Ug();Object.defineProperty(g,"find",{enumerable:!0,get:function(){return O$.find}});var E$=fT();Object.defineProperty(g,"findIndex",{enumerable:!0,get:function(){return E$.findIndex}});var A$=dT();Object.defineProperty(g,"first",{enumerable:!0,get:function(){return A$.first}});var R$=hT();Object.defineProperty(g,"groupBy",{enumerable:!0,get:function(){return R$.groupBy}});var T$=Lg();Object.defineProperty(g,"ignoreElements",{enumerable:!0,get:function(){return T$.ignoreElements}});var P$=mT();Object.defineProperty(g,"isEmpty",{enumerable:!0,get:function(){return P$.isEmpty}});var M$=vT();Object.defineProperty(g,"last",{enumerable:!0,get:function(){return M$.last}});var C$=Nn();Object.defineProperty(g,"map",{enumerable:!0,get:function(){return C$.map}});var k$=Fg();Object.defineProperty(g,"mapTo",{enumerable:!0,get:function(){return k$.mapTo}});var I$=gT();Object.defineProperty(g,"materialize",{enumerable:!0,get:function(){return I$.materialize}});var q$=bT();Object.defineProperty(g,"max",{enumerable:!0,get:function(){return q$.max}});var j$=nu();Object.defineProperty(g,"mergeAll",{enumerable:!0,get:function(){return j$.mergeAll}});var L$=yT();Object.defineProperty(g,"flatMap",{enumerable:!0,get:function(){return L$.flatMap}});var F$=on();Object.defineProperty(g,"mergeMap",{enumerable:!0,get:function(){return F$.mergeMap}});var N$=wT();Object.defineProperty(g,"mergeMapTo",{enumerable:!0,get:function(){return N$.mergeMapTo}});var D$=xT();Object.defineProperty(g,"mergeScan",{enumerable:!0,get:function(){return D$.mergeScan}});var B$=ET();Object.defineProperty(g,"mergeWith",{enumerable:!0,get:function(){return B$.mergeWith}});var z$=AT();Object.defineProperty(g,"min",{enumerable:!0,get:function(){return z$.min}});var U$=qd();Object.defineProperty(g,"multicast",{enumerable:!0,get:function(){return U$.multicast}});var W$=tu();Object.defineProperty(g,"observeOn",{enumerable:!0,get:function(){return W$.observeOn}});var H$=PT();Object.defineProperty(g,"onErrorResumeNextWith",{enumerable:!0,get:function(){return H$.onErrorResumeNextWith}});var V$=MT();Object.defineProperty(g,"pairwise",{enumerable:!0,get:function(){return V$.pairwise}});var G$=CT();Object.defineProperty(g,"pluck",{enumerable:!0,get:function(){return G$.pluck}});var $$=kT();Object.defineProperty(g,"publish",{enumerable:!0,get:function(){return $$.publish}});var Y$=IT();Object.defineProperty(g,"publishBehavior",{enumerable:!0,get:function(){return Y$.publishBehavior}});var X$=qT();Object.defineProperty(g,"publishLast",{enumerable:!0,get:function(){return X$.publishLast}});var K$=LT();Object.defineProperty(g,"publishReplay",{enumerable:!0,get:function(){return K$.publishReplay}});var Z$=FT();Object.defineProperty(g,"raceWith",{enumerable:!0,get:function(){return Z$.raceWith}});var J$=xa();Object.defineProperty(g,"reduce",{enumerable:!0,get:function(){return J$.reduce}});var Q$=DT();Object.defineProperty(g,"repeat",{enumerable:!0,get:function(){return Q$.repeat}});var eY=zT();Object.defineProperty(g,"repeatWhen",{enumerable:!0,get:function(){return eY.repeatWhen}});var tY=WT();Object.defineProperty(g,"retry",{enumerable:!0,get:function(){return tY.retry}});var rY=VT();Object.defineProperty(g,"retryWhen",{enumerable:!0,get:function(){return rY.retryWhen}});var nY=$v();Object.defineProperty(g,"refCount",{enumerable:!0,get:function(){return nY.refCount}});var iY=Vg();Object.defineProperty(g,"sample",{enumerable:!0,get:function(){return iY.sample}});var oY=$T();Object.defineProperty(g,"sampleTime",{enumerable:!0,get:function(){return oY.sampleTime}});var aY=YT();Object.defineProperty(g,"scan",{enumerable:!0,get:function(){return aY.scan}});var sY=KT();Object.defineProperty(g,"sequenceEqual",{enumerable:!0,get:function(){return sY.sequenceEqual}});var uY=$g();Object.defineProperty(g,"share",{enumerable:!0,get:function(){return uY.share}});var cY=QT();Object.defineProperty(g,"shareReplay",{enumerable:!0,get:function(){return cY.shareReplay}});var lY=eP();Object.defineProperty(g,"single",{enumerable:!0,get:function(){return lY.single}});var fY=tP();Object.defineProperty(g,"skip",{enumerable:!0,get:function(){return fY.skip}});var dY=rP();Object.defineProperty(g,"skipLast",{enumerable:!0,get:function(){return dY.skipLast}});var pY=iP();Object.defineProperty(g,"skipUntil",{enumerable:!0,get:function(){return pY.skipUntil}});var hY=oP();Object.defineProperty(g,"skipWhile",{enumerable:!0,get:function(){return hY.skipWhile}});var mY=sP();Object.defineProperty(g,"startWith",{enumerable:!0,get:function(){return mY.startWith}});var vY=ru();Object.defineProperty(g,"subscribeOn",{enumerable:!0,get:function(){return vY.subscribeOn}});var gY=cP();Object.defineProperty(g,"switchAll",{enumerable:!0,get:function(){return gY.switchAll}});var bY=cu();Object.defineProperty(g,"switchMap",{enumerable:!0,get:function(){return bY.switchMap}});var yY=fP();Object.defineProperty(g,"switchMapTo",{enumerable:!0,get:function(){return yY.switchMapTo}});var _Y=dP();Object.defineProperty(g,"switchScan",{enumerable:!0,get:function(){return _Y.switchScan}});var wY=su();Object.defineProperty(g,"take",{enumerable:!0,get:function(){return wY.take}});var xY=Wg();Object.defineProperty(g,"takeLast",{enumerable:!0,get:function(){return xY.takeLast}});var SY=pP();Object.defineProperty(g,"takeUntil",{enumerable:!0,get:function(){return SY.takeUntil}});var OY=hP();Object.defineProperty(g,"takeWhile",{enumerable:!0,get:function(){return OY.takeWhile}});var EY=mP();Object.defineProperty(g,"tap",{enumerable:!0,get:function(){return EY.tap}});var AY=Yg();Object.defineProperty(g,"throttle",{enumerable:!0,get:function(){return AY.throttle}});var RY=gP();Object.defineProperty(g,"throttleTime",{enumerable:!0,get:function(){return RY.throttleTime}});var TY=uu();Object.defineProperty(g,"throwIfEmpty",{enumerable:!0,get:function(){return TY.throwIfEmpty}});var PY=yP();Object.defineProperty(g,"timeInterval",{enumerable:!0,get:function(){return PY.timeInterval}});var MY=uf();Object.defineProperty(g,"timeout",{enumerable:!0,get:function(){return MY.timeout}});var CY=_P();Object.defineProperty(g,"timeoutWith",{enumerable:!0,get:function(){return CY.timeoutWith}});var kY=wP();Object.defineProperty(g,"timestamp",{enumerable:!0,get:function(){return kY.timestamp}});var IY=kg();Object.defineProperty(g,"toArray",{enumerable:!0,get:function(){return IY.toArray}});var qY=OP();Object.defineProperty(g,"window",{enumerable:!0,get:function(){return qY.window}});var jY=AP();Object.defineProperty(g,"windowCount",{enumerable:!0,get:function(){return jY.windowCount}});var LY=TP();Object.defineProperty(g,"windowTime",{enumerable:!0,get:function(){return LY.windowTime}});var FY=CP();Object.defineProperty(g,"windowToggle",{enumerable:!0,get:function(){return FY.windowToggle}});var NY=IP();Object.defineProperty(g,"windowWhen",{enumerable:!0,get:function(){return NY.windowWhen}});var DY=FP();Object.defineProperty(g,"withLatestFrom",{enumerable:!0,get:function(){return DY.withLatestFrom}});var BY=NP();Object.defineProperty(g,"zipAll",{enumerable:!0,get:function(){return BY.zipAll}});var zY=BP();Object.defineProperty(g,"zipWith",{enumerable:!0,get:function(){return zY.zipWith}})});var Zg=b(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.checkAbortSignal=XP;Gi.abortBreakPoint=WY;Gi.makeAbortError=KP;Gi.observeAbortSignal=HY;Gi.isAbortException=VY;var YP=$P(),Kg=class extends Error{};function XP(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw KP()}}function UY(e){return new Promise(t=>setTimeout(t,e))}async function WY(e){await UY(1),XP(e)}function KP(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Kg("aborted");return e.code="ERR_ABORTED",e}function HY(e){return e?(0,YP.fromEvent)(e,"abort"):new YP.Observable}function VY(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var ZP=b(Qg=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.makeAbortableReaction=YY;var GY=Dc(),lu=_t(),$Y=Zg(),Jg=iv();function YY(e,t,r,n,i,o,a){let s;function l(u){(0,$Y.isAbortException)(u)||(console.error(u),(0,lu.isAlive)(e)&&a(u))}(0,lu.addDisposer)(e,(0,GY.reaction)(()=>{try{return t(e)}catch(u){l(u);return}},async(u,c)=>{if(s&&(0,Jg.stopStopToken)(s),!!(0,lu.isAlive)(e)){s=(0,Jg.createStopToken)(),i(s);try{let f=await r(u,s,e,c);(0,lu.isAlive)(e)&&o(f)}catch(f){l(f)}}},n)),(0,lu.addDisposer)(e,()=>{s&&(0,Jg.stopStopToken)(s)})}});var Ws=b(C=>{"use strict";var XY=C&&C.__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]}),Yi=C&&C.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&XY(t,e,r)},JP=C&&C.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(C,"__esModule",{value:!0});C.makeAbortableReaction=C.blobToDataURL=C.isFeature=C.SimpleFeature=C.defaultCodonTable=C.defaultStops=C.defaultStarts=C.rIC=C.complementTable=C.isElectron=void 0;C.useDebounce=eX;C.useWidthSetter=tX;C.useDebouncedCallback=rX;C.findParentThat=eM;C.springAnimate=nX;C.findParentThatIs=du;C.getSession=iX;C.getContainingView=tM;C.getContainingTrack=oX;C.getContainingDisplay=aX;C.assembleLocString=sX;C.assembleLocStringFast=rM;C.parseLocStringOneBased=nM;C.parseLocString=eb;C.compareLocs=iM;C.compareLocStrings=uX;C.clamp=cX;C.bpToPx=tb;C.radToDeg=pX;C.degToRad=hX;C.polarToCartesian=mX;C.cartesianToPolar=vX;C.featureSpanPx=gX;C.bpSpanPx=oM;C.iterMap=bX;C.findLastIndex=yX;C.findLast=_X;C.renameRegionIfNeeded=aM;C.renameRegionsIfNeeded=wX;C.minmax=xX;C.shorten=sM;C.shorten2=SX;C.stringify=OX;C.revcom=EX;C.reverse=AX;C.complement=RX;C.measureText=uM;C.getFrame=PX;C.generateCodonTable=MX;C.updateStatus=rb;C.updateStatus2=CX;C.hashCode=cM;C.objectHash=kX;C.bytesForRegions=IX;C.isSupportedIndexingAdapter=qX;C.getBpDisplayStr=jX;C.getProgressDisplayStr=LX;C.toLocale=Ta;C.getTickDisplayStr=FX;C.getViewParams=NX;C.getLayoutId=DX;C.useLocalStorage=BX;C.getUriLink=lM;C.getStr=fM;C.coarseStripHTML=dM;C.linkify=zX;C.measureGridWidth=UX;C.getEnv=WX;C.localStorageGetItem=ib;C.localStorageSetItem=pM;C.max=hM;C.min=HX;C.sum=mM;C.avg=VX;C.groupBy=GX;C.notEmpty=$X;C.mergeIntervals=vM;C.gatherOverlaps=YX;C.stripAlpha=XX;C.getStrokeProps=KX;C.getFillProps=ZX;C.renderToStaticMarkup=JX;C.isGzip=gM;C.fetchAndMaybeUnzip=bM;C.fetchAndMaybeUnzipText=QX;C.isObject=yM;C.localStorageGetNumber=eK;C.localStorageGetBoolean=tK;C.localStorageSetBoolean=rK;C.forEachWithStopTokenCheck=nK;C.testAdapter=iK;var $i=Fe(),KY=MS(),ZY=JP(CS()),mr=_t(),JY=wc(),QY=IS(),nb=JS(),QP=iv(),fu=Qc();Yi(Qc(),C);Yi(iE(),C);Yi(oE(),C);Yi(aE(),C);Yi(Cv(),C);Yi(bE(),C);function eX(e,t){let[r,n]=(0,$i.useState)(e);return(0,$i.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function tX(e,t){let[r,{width:n}]=(0,ZY.default)();return(0,$i.useEffect)(()=>{n&&(0,mr.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function rX(e,t=400){let r=(0,$i.useRef)(null),n=(0,$i.useRef)(null);return(0,$i.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 eM(e,t){if(!(0,mr.hasParent)(e))throw new Error("node does not have parent");let r=(0,mr.getParent)(e);for(;r&&(0,mr.isAlive)(r);){if(t(r))return r;if((0,mr.hasParent)(r))r=(0,mr.getParent)(r);else break}throw new Error("no matching node found")}function nX(e,t,r,n=()=>{},i=0,o=400,a=20,s=!0){i||(i=Math.abs(t-e)/1e3);let u;function c(f){let p=Date.now(),d=f.lastPosition,h=f.lastTime||p,m=f.lastVelocity||0;p>h+64&&(h=p);let v=Math.floor(p-h);for(let S=0;S<v;++S){let E=-o*(d-t),T=-a*m,P=(E+T)/1;m+=P*1/1e3,d+=m*1/1e3}let y=Math.abs(m)<=i,w=o!==0?Math.abs(t-d)<=i:!0;(s&&o!==0?e<t?d>t:d<t:!1)||y&&w?(r(t),n()):(r(d),u=requestAnimationFrame(()=>{c({lastPosition:d,lastTime:p,lastVelocity:m})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(u)}]}function du(e,t){return eM(e,t)}function iX(e){try{return du(e,fu.isSessionModel)}catch{throw new Error("no session model found!")}}function tM(e){try{return du(e,fu.isViewModel)}catch{throw new Error("no containing view found")}}function oX(e){try{return du(e,fu.isTrackModel)}catch{throw new Error("no containing track found")}}function aX(e){try{return du(e,fu.isDisplayModel)}catch{throw new Error("no containing display found")}}function sX(e){return rM(e,Ta)}function rM(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,s=r?`{${r}}`:"",l;i!==void 0?l=`:${t(i+1)}`:o!==void 0?l=":1":l="";let u;o!==void 0?u=i!==void 0&&i+1===o?"":`..${t(o)}`:u=i!==void 0?"..":"";let c="";return a&&(c="[rev]"),`${s}${n}${l}${u}${c}`}function nM(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,s=o;if(!a&&s.startsWith("{}"))throw new Error(`no assembly name was provided in location "${s}"`);let l=s.lastIndexOf(":");if(l===-1){if(t(s,a))return{assemblyName:a,refName:s,reversed:r};throw new Error(`Unknown reference sequence "${s}"`)}let u=s.slice(0,l),c=s.slice(l+1);if(t(u,a)&&t(s,a))throw new Error(`ambiguous location string: "${e}"`);if(t(u,a))if(c){let f=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),p=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(f){let[,d,,,,h]=f;if(d!==void 0&&h!==void 0)return{assemblyName:a,refName:u,start:+d.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(p){let[,d,,,h]=p;if(d!==void 0)return h?{assemblyName:a,refName:u,start:+d.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:u,start:+d.replaceAll(",",""),end:+d.replaceAll(",",""),reversed:r}}else throw new Error(`could not parse range "${c}" on location "${e}"`)}else return{assemblyName:a,refName:u,reversed:r};else if(t(s,a))return{assemblyName:a,refName:s,reversed:r};throw new Error(`unknown reference sequence name in location "${e}"`)}function eb(e,t){let r=nM(e,t);return typeof r.start=="number"&&(r.start-=1),r}function iM(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 uX(e,t,r){let n=eb(e,r),i=eb(t,r);return iM(n,i)}function cX(e,t,r){return e<t?t:e>r?r:e}function lX(e){return Math.round(e*10)/10}function tb(e,{reversed:t,end:r=0,start:n=0},i){return lX((t?r-e:e-n)/i)}var fX=180/Math.PI,dX=Math.PI/180;function pX(e){return e*fX%360}function hX(e){return e*dX%(2*Math.PI)}function mX(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function vX(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function gX(e,t,r){return oM(e.get("start"),e.get("end"),t,r)}function oM(e,t,r,n){let i=tb(e,r,n),o=tb(t,r,n);return r.reversed?[o,i]:[i,o]}function bX(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 yX(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function _X(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function aM(e,t){if((0,mr.isStateTreeNode)(t)&&!(0,mr.isAlive)(t))return t;if(e?.[t.refName]){t=(0,mr.isStateTreeNode)(t)?{...(0,mr.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function wX(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,s)=>aM(o[i[s]],a))}}function xX(e,t){return[Math.min(e,t),Math.max(e,t)]}function sM(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function SX(e,t=70){return e.length>t?`${e.slice(0,t)}...`:e}function OX({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${sM(e)}:${Ta(t)}${n?" (out of bounds)":""}`:""].join("")}C.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");C.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 EX(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=C.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function AX(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function RX(e){var t;let r="";for(let n of e)r+=(t=C.complementTable[n])!==null&&t!==void 0?t:n;return r}C.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var TX=[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 uM(e,t=10){var r;let n=.5279276315789471,i=String(e),o=0;for(let a=0;a<i.length;a++){let s=i.charCodeAt(a);o+=(r=TX[s])!==null&&r!==void 0?r:n}return o*t}function PX(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}C.defaultStarts=["ATG"];C.defaultStops=["TAA","TAG","TGA"];C.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 MX(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 s=0;s<2;s++){let l=i[1][s];for(let u=0;u<2;u++){let c=i[2][u],f=a+l+c;t[f]=n}}}}return t}async function rb(e,t,r){t(e);let n=await r();return t(""),n}async function CX(e,t,r,n){t(e);let i=await n();return(0,QP.checkStopToken)(r),t(""),i}function cM(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 kX(e){return`${cM(JSON.stringify(e))}`}async function IX(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 qX(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function jX(e){return Math.floor(e/1e6)>0?`${ri(e/1e6)}Mbp`:Math.floor(e/1e3)>0?`${ri(e/1e3)}Kbp`:`${Math.floor(e)}bp`}function ri(e){return Ta(Number.parseFloat(e.toPrecision(3)))}function LX(e,t){return Math.floor(t/1e6)>0?`${ri(e/1e6)}/${ri(t/1e6)}Mb`:Math.floor(t/1e3)>0?`${ri(e/1e3)}/${ri(t/1e3)}Kb`:`${ri(e)}/${ri(t)}}bytes`}function Ta(e){return e.toLocaleString("en-US")}function FX(e,t){return Math.floor(t/1e3)>0?`${Ta(Number.parseFloat((e/1e6).toFixed(2)))}M`:Ta(Math.floor(e))}function NX(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=tM(e),o=r?.contentBlocks[0]||{},a=n?.contentBlocks[0]||{},s=n?.contentBlocks[1]||{};return{offsetPx:t?0:i-a.offsetPx,offsetPx1:t?0:i-s.offsetPx,start:o.start,end:o.end}}function DX({sessionId:e,layoutId:t}){return`${e}-${t}`}function BX(e,t){let[r,n]=(0,$i.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 lM(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function fM(e){return yM(e)?(0,fu.isUriLocation)(e)?lM(e):JSON.stringify(e):String(e)}function dM(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function zX(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 UX(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return hM(e.map(s=>fM(s)).map(s=>a?dM(s):s).map(s=>uM(s,i)).map(s=>Math.min(Math.max(s+r,n),o)))}function WX(e){return(0,mr.getEnv)(e)}function ib(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function pM(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function hM(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function HX(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function mM(e){let t=0;for(let r of e)t+=r;return t}function VX(e){return mM(e)/e.length}function GX(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function $X(e){return e!=null}function vM(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 YX(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=>vM(n.sort((i,o)=>i.start-o.start),t))}function XX(e){return(0,nb.colord)(e).alpha(1).toHex()}function KX(e){if(e){let t=(0,nb.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}else return{}}function ZX(e){if(e){let t=(0,nb.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}else return{}}function JX(e){let t=document.createElement("div");return(0,JY.flushSync)(()=>{(0,QY.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function gM(e){return e[0]===31&&e[1]===139&&e[2]===8}async function bM(e,t={}){let{statusCallback:r=()=>{}}=t,n=await rb("Downloading file",r,()=>e.readFile(t));return gM(n)?await rb("Unzipping",r,()=>(0,KY.unzip)(n)):n}async function QX(e,t){let r=await bM(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function yM(e){return typeof e=="object"&&e!==null}function eK(e,t){var r;return+((r=ib(e))!==null&&r!==void 0?r:t)}function tK(e,t){return!!JSON.parse(ib(e)||JSON.stringify(t))}function rK(e,t){pM(e,JSON.stringify(t))}function nK(e,t,r,n=400){let i=performance.now(),o=0;for(let a of e)performance.now()-i>n&&((0,QP.checkStopToken)(t),i=performance.now()),r(a,o++)}function iK(e,t,r,n){return t.test(e)&&!r||r===n}var _M=_E();Object.defineProperty(C,"SimpleFeature",{enumerable:!0,get:function(){return JP(_M).default}});Object.defineProperty(C,"isFeature",{enumerable:!0,get:function(){return _M.isFeature}});var oK=Iv();Object.defineProperty(C,"blobToDataURL",{enumerable:!0,get:function(){return oK.blobToDataURL}});var aK=ZP();Object.defineProperty(C,"makeAbortableReaction",{enumerable:!0,get:function(){return aK.makeAbortableReaction}});Yi(Zg(),C)});var xM=b(ob=>{"use strict";Object.defineProperty(ob,"__esModule",{value:!0});ob.default=sK;var wM=Ws();function sK(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,wM.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return`adp-${(0,wM.hashCode)(t)}`}});var SM=b(pu=>{"use strict";var uK=pu&&pu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pu,"__esModule",{value:!0});pu.adapterConfigCacheKey=lK;var cK=uK(xM());function lK(e={}){return`${(0,cK.default)(e)}`}});var ab=b(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.getAdapter=OM;hu.freeAdapterResources=pK;hu.clearAdapterCache=hK;var fK=SM(),Xi={};async function dK(e,t,r){let n=r?.type;if(!n)throw new Error(`could not determine adapter type from adapter config snapshot ${JSON.stringify(r)}`);let i=e.getAdapterType(n);if(!i)throw new Error(`unknown data adapter type ${n}`);let o=i.configSchema.create(r,{pluginManager:e}),a=OM.bind(null,e,t),s=await i.getAdapterClass();return{dataAdapter:new s(o,a,e),sessionIds:new Set([t])}}async function OM(e,t,r){var n;let i=(0,fK.adapterConfigCacheKey)(r);(n=Xi[i])!==null&&n!==void 0||(Xi[i]=dK(e,t,r));let o=await Xi[i];return o.sessionIds.add(t),o}async function pK(e){let t=Object.keys(e);if(t.length===1&&t[0]==="sessionId"){let{sessionId:r}=e;for(let[n,i]of Object.entries(Xi)){let o=await i;o.sessionIds.delete(r),o.sessionIds.size===0&&delete Xi[n]}}else for(let r of Object.values(Xi)){let n=await r,i=e.regions||(e.region?[e.region]:[]);for(let o of i)o.refName!==void 0&&n.dataAdapter.freeResources(o)}}function hK(){Xi={}}});var EM=b(ub=>{"use strict";Object.defineProperty(ub,"__esModule",{value:!0});var sb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};ub.default=sb});var RM=b(lb=>{"use strict";Object.defineProperty(lb,"__esModule",{value:!0});lb.default=cb;var AM=e=>typeof e=="object"&&e!==null,mK=e=>AM(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function cb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{for(let o of i)t(o),AM(o)&&cb(o,t,r)};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),mK(i)&&(Array.isArray(i)?n(i):cb(i,t,r))}});var PM=b(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.UNSUPPORTED=He.UNKNOWN=void 0;He.getTrackAssemblyNames=vK;He.getConfAssemblyNames=TM;He.getRpcSessionId=gK;He.getParentRenderProps=bK;He.getBlob=yK;He.getBlobMap=_K;He.setBlobMap=wK;He.storeBlobLocation=SK;He.makeIndex=OK;He.makeIndexType=EK;He.getFileName=AK;He.guessAdapter=RK;He.guessTrackType=TK;He.generateUnsupportedTrackConf=PK;He.generateUnknownTrackConf=MK;He.getTrackName=CK;var Ma=_t(),mu=Ws(),Pa=wv();function vK(e){return TM(e.configuration)}function TM(e){let t=(0,Pa.readConfObject)(e,"assemblyNames");if(!t){let r=(0,Ma.getParent)(e);if("sequence"in r)return[(0,Pa.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function gK(e){let t;for(let r=e;!(0,Ma.isRoot)(r);r=(0,Ma.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 bK(e){for(let t=(0,Ma.getParent)(e);!(0,Ma.isRoot)(t);t=(0,Ma.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}He.UNKNOWN="UNKNOWN";He.UNSUPPORTED="UNSUPPORTED";var gp={};function yK(e){return gp[e]}function _K(){return gp}function wK(e){gp=e}var xK=0;function SK(e){if("blob"in e){let t=`b${+Date.now()}-${xK++}`;return gp[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function OK(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function EK(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function AK(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 RK(e,t,r,n){if(n){let{pluginManager:i}=(0,mu.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(s,l,u)=>{})(e,t,r);if(a)return a}return{type:He.UNKNOWN}}function TK(e,t){if(t){let r=(0,mu.getSession)(t),i=(0,mu.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function PK(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,mu.objectHash)(n),n}function MK(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,mu.objectHash)(n),n}function CK(e,t){let r=(0,Pa.readConfObject)(e,"name");if(!r&&(0,Pa.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,Pa.readConfObject)(n,"displayName")||(0,Pa.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var kM=b(vu=>{"use strict";var CM=vu&&vu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vu,"__esModule",{value:!0});var kK=CM(EM()),IK=CM(RM()),MM=PM(),bp=Qc(),fb=class extends kK.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,MM.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,bp.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,MM.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,bp.isAuthNeededException)(a)){let s=(i=this.pluginManager.rootModel)===null||i===void 0?void 0:i.createEphemeralInternetAccount(`HTTPBasicInternetAccount-${new URL(a.url).origin}`,{},a.url);throw new bp.RetryError("Retrying with created internet account",s.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,IK.default)(t,i=>{(0,bp.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};vu.default=fb});var IM=b(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});var qK=mv(),db=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,qK.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)}};pb.default=db});var mb=b(gu=>{"use strict";var qM=gu&&gu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gu,"__esModule",{value:!0});var jK=qM(kM()),LK=Ws(),FK=qM(IM()),hb=class extends jK.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new FK.default({filters:t.filters}):void 0}}async serializeArguments(t,r){var n,i,o;let s=(i=(n=this.pluginManager.rootModel)===null||n===void 0?void 0:n.session)===null||i===void 0?void 0:i.assemblyManager;if(!s)throw new Error("no assembly manager");let l=await(0,LK.renameRegionsIfNeeded)(s,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};gu.default=hb});var DK={};Su(DK,{default:()=>_p});var YM=L(Rb());var Tb="1.3.2";var e0=L(Br());var v_=L(rh(),1);function Yk(e){let t=0;for(let r of e)t+=r.length;return t}function nh(e){let t=new Uint8Array(Yk(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}var{Z_SYNC_FLUSH:Xk,Inflate:Kk}=v_.default;async function Bu(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new Kk,{strm:t}=n,n.push(o,Xk),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return nh(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}var $_=L(zu()),ts=L(ut()),Y_=L(ah()),$u=L(Uu()),X_=L(Wu()),K_=L(k_());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 pt(e){return(e&&e.__isLong__)===!0}function I_(e){var t=Math.clz32(e&-e);return e?31-t:t}Te.isLong=pt;var q_={},j_={};function hi(e,t){var r,n,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(n=j_[e],n)?n:(r=xe(e,0,!0),i&&(j_[e]=r),r)):(e|=0,(i=-128<=e&&e<128)&&(n=q_[e],n)?n:(r=xe(e,e<0?-1:0,!1),i&&(q_[e]=r),r))}Te.fromInt=hi;function Gt(e,t){if(isNaN(e))return t?Vr:nr;if(t){if(e<0)return Vr;if(e>=D_)return U_}else{if(e<=-F_)return Tt;if(e+1>=F_)return z_}return e<0?Gt(-e,t).neg():xe(e%po|0,e/po|0,t)}Te.fromNumber=Gt;function xe(e,t,r){return new Te(e,t,r)}Te.fromBits=xe;var Gu=Math.pow;function _h(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?Vr:nr;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 _h(e.substring(1),t,r).neg();for(var i=Gt(Gu(r,8)),o=nr,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),l=parseInt(e.substring(a,a+s),r);if(s<8){var u=Gt(Gu(r,s));o=o.mul(u).add(Gt(l))}else o=o.mul(i),o=o.add(Gt(l))}return o.unsigned=t,o}Te.fromString=_h;function $t(e,t){return typeof e=="number"?Gt(e,t):typeof e=="string"?_h(e,t):xe(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Te.fromValue=$t;var L_=65536,bI=1<<24,po=L_*L_,D_=po*po,F_=D_/2,N_=hi(bI),nr=hi(0);Te.ZERO=nr;var Vr=hi(0,!0);Te.UZERO=Vr;var fo=hi(1);Te.ONE=fo;var B_=hi(1,!0);Te.UONE=B_;var yh=hi(-1);Te.NEG_ONE=yh;var z_=xe(-1,2147483647,!1);Te.MAX_VALUE=z_;var U_=xe(-1,-1,!0);Te.MAX_UNSIGNED_VALUE=U_;var Tt=xe(0,-2147483648,!1);Te.MIN_VALUE=Tt;var N=Te.prototype;N.toInt=function(){return this.unsigned?this.low>>>0:this.low};N.toNumber=function(){return this.unsigned?(this.high>>>0)*po+(this.low>>>0):this.high*po+(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(Tt)){var r=Gt(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=Gt(Gu(t,6),this.unsigned),a=this,s="";;){var l=a.div(o),u=a.sub(l.mul(o)).toInt()>>>0,c=u.toString(t);if(a=l,a.isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}};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(Tt)?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 pt(t)||(t=$t(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(pt(t)||(t=$t(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(Tt)?Tt:this.not().add(fo)};N.neg=N.negate;N.add=function(t){pt(t)||(t=$t(t));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,o=this.low&65535,a=t.high>>>16,s=t.high&65535,l=t.low>>>16,u=t.low&65535,c=0,f=0,p=0,d=0;return d+=o+u,p+=d>>>16,d&=65535,p+=i+l,f+=p>>>16,p&=65535,f+=n+s,c+=f>>>16,f&=65535,c+=r+a,c&=65535,xe(p<<16|d,c<<16|f,this.unsigned)};N.subtract=function(t){return pt(t)||(t=$t(t)),this.add(t.neg())};N.sub=N.subtract;N.multiply=function(t){if(this.isZero())return this;if(pt(t)||(t=$t(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?Vr:nr;if(this.eq(Tt))return t.isOdd()?Tt:nr;if(t.eq(Tt))return this.isOdd()?Tt:nr;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(N_)&&t.lt(N_))return Gt(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,o=this.low>>>16,a=this.low&65535,s=t.high>>>16,l=t.high&65535,u=t.low>>>16,c=t.low&65535,f=0,p=0,d=0,h=0;return h+=a*c,d+=h>>>16,h&=65535,d+=o*c,p+=d>>>16,d&=65535,d+=a*u,p+=d>>>16,d&=65535,p+=i*c,f+=p>>>16,p&=65535,p+=o*u,f+=p>>>16,p&=65535,p+=a*l,f+=p>>>16,p&=65535,f+=n*c+i*u+o*l+a*s,f&=65535,xe(d<<16|h,f<<16|p,this.unsigned)};N.mul=N.multiply;N.divide=function(t){if(pt(t)||(t=$t(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?Vr:nr;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Vr;if(t.gt(this.shru(1)))return B_;o=Vr}else{if(this.eq(Tt)){if(t.eq(fo)||t.eq(yh))return Tt;if(t.eq(Tt))return fo;var a=this.shr(1);return n=a.div(t).shl(1),n.eq(nr)?t.isNegative()?fo:yh:(i=this.sub(t.mul(n)),o=n.add(i.div(t)),o)}else if(t.eq(Tt))return this.unsigned?Vr:nr;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=nr}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),l=s<=48?1:Gu(2,s-48),u=Gt(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=l,u=Gt(n,this.unsigned),c=u.mul(t);u.isZero()&&(u=fo),o=o.add(u),i=i.sub(c)}return o};N.div=N.divide;N.modulo=function(t){if(pt(t)||(t=$t(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?I_(this.low):I_(this.high)+32};N.ctz=N.countTrailingZeros;N.and=function(t){return pt(t)||(t=$t(t)),xe(this.low&t.low,this.high&t.high,this.unsigned)};N.or=function(t){return pt(t)||(t=$t(t)),xe(this.low|t.low,this.high|t.high,this.unsigned)};N.xor=function(t){return pt(t)||(t=$t(t)),xe(this.low^t.low,this.high^t.high,this.unsigned)};N.shiftLeft=function(t){return pt(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 pt(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 pt(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 pt(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 pt(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):$t(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 es=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 mi(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 s=n[i-1];s===")"||s==="("||s===","?r.name=o:s===":"&&(r.length=Number.parseFloat(o))}}}return r}function yI(e){return typeof e[0]=="string"}function dn(e){return yI(e)?e.map(t=>({id:t,label:t,color:void 0})):e}function H_(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,s]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:s,start:+t[n++],strand:t[n++]==="-"?-1:1,length:+t[n++]})}if(i==="s"){let o=+t[n++],[a,s]=t[n++].split(".");r.push({type:i,row:o,asm:a,ref:s,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 V_(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),s=i.decode(a).trim();if(s){let l=t(s);l&&n.push(l)}r=o+1}return n}var G_=(e=0)=>+(+e).toFixed(1),rs=class extends $_.BaseFeatureDataAdapter{setupP;cache=new K_.default({cache:new Y_.default({maxSize:50}),fill:async({nextEntry:t,firstEntry:r},n,i)=>{let a=await(0,$u.openLocation)(this.getConf("tafGzLocation")).read(t.virtualOffset.blockPosition-r.virtualOffset.blockPosition,r.virtualOffset.blockPosition),l=(await Bu(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,s=0,l=0;if(V_(t,u=>{if(s++%100===0&&n(`Processing ${G_(l/1e6)}/${G_(t.length/1e6)}Mb`),l+=u.length,u){let[c,f]=u.split(" ; ");if(f){for(let d of H_(f))if(d.type==="i"){o.splice(d.row,0,d),i[d.asm]||(i[d.asm]={start:d.start,strand:d.strand,srcSize:d.length,chr:d.ref,data:""});let h=i[d.asm];h.data+=" ".repeat(Math.max(0,s-h.data.length-1))}else if(d.type==="s"){i[d.asm]||(i[d.asm]={start:d.start,strand:d.strand,srcSize:d.length,chr:d.ref,data:""});let h=i[d.asm];h.data+=" ".repeat(Math.max(0,s-h.data.length-1)),o[d.row]=d}else d.type==="d"&&o.splice(d.row,1);a||(a=o[0])}let p=c.length;for(let d=0;d<p;d++){let h=c[d],m=o[d];m&&(i[m.asm].data+=h)}}}),a){let u=i[a.asm];return{uniqueId:`${u.start}-${u.data.length}`,start:u.start,end:u.start+u.data.length,strand:u.strand,alignments:i,seq:u.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,ts.updateStatus)("Downloading index",r,()=>this.setupPre())}async readTaiFile(){let r=(await(0,$u.openLocation)(this.getConf("taiLocation")).readFile("utf8")).split(`
|
|
6
|
+
`).map(s=>s.trim()).filter(s=>!!s),n={},i="",o=0,a=0;for(let s of r){let[l,u,c]=s.split(" "),f=a+ +c,p=l==="*"?i:l.split(".").at(-1),d=W_.fromNumber(f),h=d.shiftRightUnsigned(16),m=d.and(65535),v=new es(h.toNumber(),m.toNumber());n[p]||(n[p]=[],i="",o=0,a=0);let y=+u+o;n[p].push({chrStart:y,virtualOffset:v}),i=p,o=y,a=f}return n}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,X_.ObservableCreate)(async i=>{try{let o=await this.setup(),a=await(0,ts.updateStatus)("Downloading alignments",n,()=>this.getLines(t,o));a?i.next(new ts.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,$u.openLocation)(r).readFile("utf8");return{samples:dn(this.getConf("samples")),tree:n?mi(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 J_=L(pn());var _I=(0,J_.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}),Q_=_I;function wh(e){return e.addAdapterType(()=>new e0.AdapterType({name:"BgzipTaffyAdapter",AdapterClass:rs,configSchema:Q_}))}var y0=L(Br());var p0=L(zu()),is=L(ut()),h0=L(Uu()),m0=L(Wu()),v0=L(_t());var xh=function(e,t){return xh=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])},xh(e,t)};function ns(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Sh(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 ho(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(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function mo(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 xr(e){return typeof e=="function"}function Yu(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 Xu=Yu(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
7
7
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
8
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function
|
|
8
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function Oh(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ku=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 s=Sh(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(m){t={error:m}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(xr(c))try{c()}catch(m){o=m instanceof Xu?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var p=Sh(f),d=p.next();!d.done;d=p.next()){var h=d.value;try{r0(h)}catch(m){o=o??[],m instanceof Xu?o=mo(mo([],ho(o)),ho(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new Xu(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)r0(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)&&Oh(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Oh(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var pJ=Ku.EMPTY;function n0(e){return e instanceof Ku||e&&"closed"in e&&xr(e.remove)&&xr(e.add)&&xr(e.unsubscribe)}function r0(e){xr(e)?e():e.unsubscribe()}var hn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var vo={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=vo.delegate;return i?.setTimeout?i.setTimeout.apply(i,mo([e,t],ho(r))):setTimeout.apply(void 0,mo([e,t],ho(r)))},clearTimeout:function(e){var t=vo.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function i0(e){vo.setTimeout(function(){var t=hn.onUnhandledError;if(t)t(e);else throw e})}function Eh(){}var o0=function(){return Ah("C",void 0,void 0)}();function a0(e){return Ah("E",void 0,e)}function s0(e){return Ah("N",e,void 0)}function Ah(e,t,r){return{kind:e,value:t,error:r}}var Rh=null;function u0(e){hn.useDeprecatedSynchronousErrorHandling&&Rh&&(Rh.errorThrown=!0,Rh.error=e)}var Mh=function(e){ns(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,n0(r)&&r.add(n)):n.destination=OI,n}return t.create=function(r,n,i){return new Ch(r,n,i)},t.prototype.next=function(r){this.isStopped?Ph(s0(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Ph(a0(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Ph(o0,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}(Ku);var wI=Function.prototype.bind;function Th(e,t){return wI.call(e,t)}var xI=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){Zu(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Zu(n)}else Zu(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Zu(r)}},e}(),Ch=function(e){ns(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(xr(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var s;o&&hn.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Th(r.next,s),error:r.error&&Th(r.error,s),complete:r.complete&&Th(r.complete,s)}):a=r}return o.destination=new xI(a),o}return t}(Mh);function Zu(e){hn.useDeprecatedSynchronousErrorHandling?u0(e):i0(e)}function SI(e){throw e}function Ph(e,t){var r=hn.onStoppedNotification;r&&vo.setTimeout(function(){return r(e,t)})}var OI={closed:!0,next:Eh,error:SI,complete:Eh};function EI(e){return xr(e?.lift)}function Ju(e){return function(t){if(EI(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 c0(e,t,r,n,i){return new AI(e,t,r,n,i)}var AI=function(e){ns(t,e);function t(r,n,i,o,a,s){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=n?function(u){try{n(u)}catch(c){r.error(c)}}:e.prototype._next,l._error=o?function(u){try{o(u)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(u){r.error(u)}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}(Mh);var l0=Yu(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function vi(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new Ch({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new l0)}});e.subscribe(o)})}function f0(e,t,r,n,i){return function(o,a){var s=r,l=t,u=0;o.subscribe(c0(a,function(c){var f=u++;l=s?e(l,c,f):(s=!0,c),n&&a.next(l)},i&&function(){s&&a.next(l),a.complete()}))}}function d0(e,t){return Ju(f0(e,t,arguments.length>=2,!1,!0))}var RI=function(e,t){return e.push(t),e};function gi(){return Ju(function(e,t){d0(RI,[])(e).subscribe(t)})}var os=class extends p0.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,v0.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||{},i=/ +/;return(0,m0.ObservableCreate)(async o=>{let{adapter:a}=await this.setup(),s=await(0,is.updateStatus)("Downloading alignments",n,()=>vi(a.getFeatures(t).pipe(gi())));await(0,is.updateStatus)("Processing alignments",n,()=>{for(let l of s){let c=l.get("mafBlock").split(";"),f=0;for(let v of c)v.startsWith("s")&&f++;let p=new Array(f),d={},h=0,m;for(let v of c)if(v.startsWith("s")){let y=v.split(i),w=y[6],_=y[1];p[h]=w,m===void 0&&(m=w);let x=_.indexOf("."),S=_.slice(0,Math.max(0,x)),E=_.slice(Math.max(0,x+1));d[S]={chr:E,start:+y[2],srcSize:+y[3],strand:y[4]==="+"?1:-1,unknown:+y[5],seq:w},h++}o.next(new is.SimpleFeature({id:l.id(),data:{start:l.get("start"),end:l.get("end"),refName:l.get("refName"),seq:m,alignments:d}}))}}),o.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,h0.openLocation)(r).readFile("utf8");return{samples:dn(this.getConf("samples")),tree:n?mi(n):void 0}}freeResources(){}};var g0=L(pn());var TI=(0,g0.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}),b0=TI;function kh(e){return e.addAdapterType(()=>new y0.AdapterType({name:"BigMafAdapter",AdapterClass:os,configSchema:b0}))}var H1=L(Br());var De=L(Fe()),d1=L(mn()),Nc=L(ut()),p1=L(go()),h1=L(Sr());var Qu=L(Fe()),E0=L(bo()),PI=(0,E0.makeStyles)()({cursor:{pointerEvents:"none"}}),MI=({width:e,height:t,scrollTop:r,mouseX:n,mouseY:i})=>{let{classes:o}=PI();return Qu.default.createElement("svg",{className:o.cursor,width:e,height:t,style:{position:"absolute",top:r}},Qu.default.createElement("line",{x1:0,x2:e,y1:i,y2:i,stroke:"black"}),Qu.default.createElement("line",{x1:n,x2:n,y1:0,y2:t,stroke:"black"}))},A0=MI;var Ze=L(Fe()),_o=L(mn()),as=L(ut()),wt=L(go()),M0=L(Sr()),C0=L(bo());var yo=L(Fe()),ec=L(ut()),T0=L(Ih());function P0({model:e,selectionCoords:t,showAllLetters:r}){let[n,i]=(0,yo.useState)(""),[o,a]=(0,yo.useState)(!0),[s,l]=(0,yo.useState)();return(0,yo.useEffect)(()=>{t&&(async()=>{try{a(!0),l(void 0);let{samples:u,adapterConfig:c}=e,{rpcManager:f}=(0,ec.getSession)(e),p=(0,T0.getRpcSessionId)(e),d=(0,ec.getContainingView)(e),{refName:h,assemblyName:m}=d.displayedRegions[0],{dragStartX:v,dragEndX:y}=t,[w,_]=[Math.min(v,y),Math.max(v,y)],S=(await f.call(p,"MafGetSequences",{sessionId:p,adapterConfig:c,samples:u,showAllLetters:r,regions:[{refName:h,start:d.pxToBp(w).coord-1,end:d.pxToBp(_).coord,assemblyName:m}]})).map((E,T)=>`>${u[T].label}
|
|
9
9
|
${E}`).join(`
|
|
10
|
-
`);i(S)}catch(s){console.error(s),l(s)}finally{a(!1)}})()},[e,t,r]),{sequence:n,loading:o,error:u}}var zk=(0,u0.makeStyles)()({dialogContent:{width:"80em"},textAreaInput:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto"},ml:{marginLeft:10}}),Uk=(0,a0.observer)(function({onClose:e,model:t,selectionCoords:r}){let[n,i]=(0,Xe.useState)(!0),{classes:o}=zk(),{sequence:a,loading:u,error:l}=o0({model:t,selectionCoords:r,showAllLetters:n}),s=a?a.length>1e6:!1;return Xe.default.createElement(ho.Dialog,{open:!0,onClose:e,title:"Subsequence Data",maxWidth:"xl"},Xe.default.createElement(wt.DialogContent,null,Xe.default.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"}},Xe.default.createElement(wt.ToggleButtonGroup,{value:n,exclusive:!0,size:"small",onChange:(c,f)=>{f!==null&&i(f)}},Xe.default.createElement(wt.ToggleButton,{value:!0},"Show All Letters"),Xe.default.createElement(wt.ToggleButton,{value:!1},"Show Only Differences")),Xe.default.createElement("div",{style:{flexGrow:1}}),Xe.default.createElement(wt.Button,{variant:"contained",color:"primary",disabled:u||!a,onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(a),(0,Xa.getSession)(t).notify("Sequence copied to clipboard","info")}catch(c){console.error(c),(0,Xa.getSession)(t).notifyError(`${c}`,c)}})()}},"Copy to Clipboard"),Xe.default.createElement(wt.Button,{variant:"contained",color:"secondary",disabled:u||!a,onClick:()=>{try{let c=URL.createObjectURL(new Blob([a],{type:"text/plain"})),f=document.createElement("a");f.href=c,f.download="sequence.fasta",document.body.append(f),f.click(),f.remove(),URL.revokeObjectURL(c),(0,Xa.getSession)(t).notify("Sequence downloaded","info")}catch(c){console.error(c),(0,Xa.getSession)(t).notifyError(`${c}`,c)}}},"Download")),l?Xe.default.createElement(ho.ErrorMessage,{error:l}):Xe.default.createElement(Xe.default.Fragment,null,u?Xe.default.createElement(ho.LoadingEllipses,null):null,Xe.default.createElement(wt.TextField,{variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:s,className:o.dialogContent,fullWidth:!0,value:u?"Loading...":s?"Reference sequence too large to display, use the download FASTA button":a,slotProps:{input:{readOnly:!0,classes:{input:o.textAreaInput}}}}))),Xe.default.createElement(wt.DialogActions,null,Xe.default.createElement(wt.Button,{color:"primary",variant:"outlined",onClick:e},"Close")))}),s0=Uk;var ev=N(Fe()),_1=N(dn()),w1=N(y1()),yn=N(yt()),x1=N(xr()),NI=(0,x1.observer)(function({model:e,mouseY:t,mouseX:r,origMouseX:n,rowHeight:i,sources:o}){let a=(0,yn.getContainingView)(e),u=Object.entries(o[Math.floor(t/i)]||{}).filter(([c])=>c!=="color"&&c!=="id").map(([c,f])=>`${c}:${f}`).join(`
|
|
11
|
-
`),l=n?a.pxToBp(n):void 0,s=a.pxToBp(r);return u?ev.default.createElement(w1.default,null,ev.default.createElement(_1.SanitizedHTML,{html:[u,...l?[`Start: ${l.refName}:${(0,yn.toLocale)(l.coord)}`,`End: ${s.refName}:${(0,yn.toLocale)(s.coord)}`,`Length: ${(0,yn.getBpDisplayStr)(Math.abs(l.coord-s.coord))}`]:[`${s.refName}:${(0,yn.toLocale)(s.coord)}`]].filter(c=>!!c).join("<br/>")})):null}),S1=NI;nv();var VI=(0,D1.observer)(function(e){let{model:t}=e,{pluginManager:r}=(0,xc.getEnv)(t),{rowHeight:n,height:i,scrollTop:o,samples:a}=t,u=(0,De.useRef)(null),l=(0,N1.useTheme)(),s=r.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[f,p]=(0,De.useState)(),[d,h]=(0,De.useState)(),[v,b]=(0,De.useState)(!1),[y,_]=(0,De.useState)(),[w,x]=(0,De.useState)(),[S,E]=(0,De.useState)(!1),[P,R]=(0,De.useState)(),[q,M]=(0,De.useState)(!1),[I,B]=(0,De.useState)(),{width:U}=(0,xc.getContainingView)(t),T=A=>{let W=u.current?.getBoundingClientRect()?.left||0,ce=A.clientX-W;E(!1),b(!0),_(ce),x(ce),A.stopPropagation()},C=A=>{let k=u.current?.getBoundingClientRect(),W=k?.top||0,ce=k?.left||0,F=A.clientX-ce,Z=A.clientY-W;p(Z),h(F),v&&x(F)},V=A=>{v&&y!==void 0&&w!==void 0&&(Math.abs(w-y)>=2?(R({coord:[A.clientX,A.clientY],dragEndX:A.clientX,dragStartX:y}),E(!0)):j()),b(!1)},j=()=>{E(!1),_(void 0),x(void 0)};return(0,De.useEffect)(()=>{let A=W=>{W.key==="Escape"&&S&&j()},k=W=>{u.current&&!u.current.contains(W.target)&&S&&j()};return document.addEventListener("keydown",A),document.addEventListener("click",k),()=>{document.removeEventListener("keydown",A),document.removeEventListener("click",k)}},[S,j]),De.default.createElement("div",{ref:u,onMouseDown:T,onMouseMove:C,onMouseUp:V,onDoubleClick:()=>{S&&j()},onMouseLeave:()=>{p(void 0),h(void 0),b(!1)}},De.default.createElement(c,{...e}),De.default.createElement(wc,{model:t}),f&&d&&a&&!P&&!q?De.default.createElement("div",{style:{position:"relative"}},De.default.createElement(r0,{width:U,height:i,scrollTop:o,mouseX:d,mouseY:f}),De.default.createElement(S1,{model:t,mouseX:d,mouseY:f,origMouseX:y,rowHeight:n,sources:a})):null,(v||S)&&y!==void 0&&w!==void 0?De.default.createElement("div",{style:{position:"absolute",left:Math.min(y,w),top:0,width:Math.abs(w-y),height:i,backgroundColor:"rgba(0, 0, 255, 0.2)",border:"1px solid rgba(0, 0, 255, 0.5)",pointerEvents:"none"}}):null,De.default.createElement(F1.Menu,{open:!!P,onMenuItemClick:(A,k)=>{k(),R(void 0)},onClose:()=>{R(void 0)},slotProps:{transition:{onExit:()=>{R(void 0)}}},anchorReference:"anchorPosition",anchorPosition:P?{top:P.coord[1],left:P.coord[0]}:void 0,style:{zIndex:l.zIndex.tooltip},menuItems:[{label:"View subsequence",onClick:()=>{P&&(B({dragStartX:P.dragStartX,dragEndX:P.dragEndX}),M(!0),R(void 0))}}]}),q?De.default.createElement(s0,{model:t,selectionCoords:I,onClose:()=>{M(!1),B(void 0)}}):null)}),B1=VI;var z1=N(ln());function iv(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,z1.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var dx=N(Fe()),Ac=N(ln()),Er=N(yt()),px=N(hh());function Sc(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Oc(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 HI(e,t){return e.parent===t.parent?1:2}function GI(e){return e.reduce($I,0)/e.length}function $I(e,t){return e+t.x}function KI(e){return 1+e.reduce(ZI,0)}function ZI(e,t){return Math.max(e,t.y)}function YI(e){for(var t;t=e.children;)e=t[0];return e}function XI(e){for(var t;t=e.children;)e=t[t.length-1];return e}function ov(){var e=HI,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(p){var d=p.children;d?(p.x=GI(d),p.y=KI(d)):(p.x=a?u+=e(p,a):0,p.y=0,a=p)});var l=YI(o),s=XI(o),c=l.x-e(l,s)/2,f=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)/(f-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 JI(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 U1(){return this.eachAfter(JI)}function W1(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function V1(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 H1(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 G1(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function $1(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 K1(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Z1(e){for(var t=this,r=QI(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 QI(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 Y1(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function X1(){return Array.from(this)}function J1(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Q1(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*ex(){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 To(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=r2)):t===void 0&&(t=t2);for(var r=new su(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 su(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(i2)}function e2(){return To(this).eachBefore(n2)}function t2(e){return e.children}function r2(e){return Array.isArray(e)?e[1]:null}function n2(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function i2(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function su(e){this.data=e,this.depth=this.height=0,this.parent=null}su.prototype=To.prototype={constructor:su,count:U1,each:W1,eachAfter:H1,eachBefore:V1,find:G1,sum:$1,sort:K1,path:Z1,ancestors:Y1,descendants:X1,leaves:J1,links:Q1,copy:e2,[Symbol.iterator]:ex};var sv=N(rx()),hx=N(Ec()),wn=N(_t());function av(e){return(e.data.length||0)+(e.children&&Oc(e.children,av)||0)}function uv(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{uv(n,t,r)})}var c2=(0,dx.lazy)(()=>Promise.resolve().then(()=>(sx(),ux)));function cv(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return wn.types.compose("LinearMafDisplay",n,wn.types.model({type:wn.types.literal("LinearMafDisplay"),configuration:(0,Ac.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80,showAsUpperCase:!0})).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,sv.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,sv.default)(a,i.volatileTree)||(i.volatileTree=a)},setShowAsUpperCase(o){i.showAsUpperCase=o}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,Ac.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,Er.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?To(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Sc(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 ov().size([this.totalHeight,a]).separation(()=>1)(o),uv(o,o.data.length=0,a/av(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 cn(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:f,mismatchRendering:p,showAsUpperCase:d}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:l,samples:s,rowHeight:c,rowProportion:f,showAllLetters:u,mismatchRendering:p,showAsUpperCase:d}},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,Er.getSession)(i).queueDialog(u=>[c2,{model:i,handleClose:u}])}}]},{label:"Use upper-case",type:"checkbox",checked:i.showAsUpperCase,onClick:()=>{i.setShowAsUpperCase(!i.showAsUpperCase)}},{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,Er.max)(i.samples?.map(a=>(0,Er.measureText)(a.label,this.svgFontSize)).map(a=>this.canDisplayLabel?a:20)||[],0)}})).actions(i=>({afterCreate(){(0,wn.addDisposer)(i,(0,hx.autorun)(async()=>{try{let{rpcManager:o}=(0,Er.getSession)(i),a=(0,px.getRpcSessionId)(i);i.setSamples(await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:u=>{(0,wn.isAlive)(i)&&i.setMessage(u)}}))}catch(o){console.error(o),(0,Er.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(fx(),lx));return u(i,a,o)}}})}function lv(e){e.addDisplayType(()=>{let t=iv(e),r=cv(t,e);return new vx.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:B1,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var _x=N(Br()),Pc=N(yt());var gx=N(dn()),cu=N(yt());var fv=N(yt());function mx(e){return Object.fromEntries(Object.entries(dv(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function dv(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Ar(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function bx(){let e=(0,fv.measureText)("A"),t=(0,fv.measureText)("M")-2;return{charWidth:e,charHeight:t}}function l2(e,t){return t?e.toUpperCase():e}function yx({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:l,rowProportion:s,features:c,showAsUpperCase:f}=t,p=r[0],d=(p.end-p.start)/n,h=i*s,v=(0,gx.createJBrowseTheme)(a),b=dv(v),y=mx(v),{charHeight:_}=bx(),w=new Map(l.map((q,M)=>[q.id,M])),x=1/n,S=.4,E=i/2,P=h/2,R=(i-h)/2;e.font="bold 10px Courier New,monospace";for(let q of c.values()){let[M]=(0,cu.featureSpanPx)(q,p,n),I=q.get("alignments"),B=q.get("seq").toLowerCase(),U=Object.entries(I);for(let[T,C]of U){let V=C.seq,j=V.toLowerCase(),A=w.get(T);if(A===void 0)continue;let k=i*A,W=R+k;e.beginPath(),e.fillStyle="black";for(let F=0,Z=0,fe=j.length;F<fe;F++)if(B[F]!=="-"){if(j[F]==="-"){let z=M+x*Z;e.moveTo(z,k+E),e.lineTo(z+x+S,k+E)}Z++}if(e.stroke(),!o){e.fillStyle="lightgrey";for(let F=0,Z=0,fe=j.length;F<fe;F++)if(B[F]!=="-"){let z=j[F],$=M+x*Z;B[F]===z&&z!=="-"&&z!==" "&&Ar(e,$,W,x+S,h,d),Z++}}for(let F=0,Z=0,fe=j.length;F<fe;F++){let z=j[F];if(B[F]!=="-"){if(z!=="-"){let $=M+x*Z;B[F]!==z&&z!==" "?Ar(e,$,W,x+S,h,d,u?b[z]??"black":"orange"):o&&Ar(e,$,W,x+S,h,d,u?b[z]??"black":"lightblue")}Z++}}let ce=10;if(x>=ce){for(let F=0,Z=0,fe=j.length;F<fe;F++)if(B[F]!=="-"){let z=M+x*Z,$=(x-ce)/2+1,re=j[F];(o||B[F]!==re)&&re!=="-"&&(e.fillStyle=u?y[re]??"white":"black",i>_&&e.fillText(l2(V[F]||"",f),z+$,P+k+3)),Z++}}}}for(let q of c.values()){let[M]=(0,cu.featureSpanPx)(q,p,n),I=q.get("alignments"),B=q.get("seq").toLowerCase();for(let[U,T]of Object.entries(I)){let V=T.seq.toLowerCase(),j=w.get(U);if(j===void 0)continue;let A=i*j,k=R+A;for(let W=0,ce=0,F=V.length;W<F;W++){let Z="";for(;B[W]==="-";)V[W]!=="-"&&V[W]!==" "&&(Z+=V[W]),W++;if(Z.length>0){let fe=M+x*ce-1;if(Z.length>10){let z=`${Z.length}`;if(n>10)Ar(e,fe-1,k,2,h,d,"purple");else if(h>_){let $=(0,cu.measureText)(z,10),re=2;Ar(e,fe-$/2-re,k,$+2*re,h,d,"purple"),e.fillStyle="white",e.fillText(z,fe-$/2,A+h)}else Ar(e,fe-2,k,2*2,h,d,"purple")}else Ar(e,fe,k,1,h,d,"purple"),n<.2&&i>5&&(Ar(e,fe-2,k,5,1,d),Ar(e,fe-2,k+h-1,5,1,d))}ce++}}}}var lu=class extends _x.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),f=await(0,Pc.updateStatus)("Rendering alignment",r,()=>(0,Pc.renderToAbstractCanvas)(s,l,t,d=>{yx({ctx:d,renderArgs:{...t,features:c}})}));return{...await super.render({...t,...f,width:s,height:l}),...f,features:new Map,width:s,height:l,containsNoTransferables:!0}}};var wx=N(Fe()),xx=N(dn()),Sx=N(xr()),f2=(0,Sx.observer)(function(e){return wx.default.createElement(xx.PrerenderedCanvas,{...e})}),Ox=f2;var Ex=N(ln());var d2=(0,Ex.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),Ax=d2;function pv(e){e.addRendererType(()=>new lu({name:"LinearMafRenderer",ReactComponent:Ox,configSchema:Ax,pluginManager:e}))}var Rx=N(Br()),Mx=N(_t());var ge=N(Fe()),$r=N(dn()),Ro=N(yt()),Ue=N(lo()),Px=N(_t()),Tx=N(fo()),p2=(0,Tx.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function hv({model:e}){let{classes:t}=p2(),[r,n]=(0,ge.useState)(""),[i,o]=(0,ge.useState)(),[a,u]=(0,ge.useState)(),[l,s]=(0,ge.useState)(),[c,f]=(0,ge.useState)(),[p,d]=(0,ge.useState)("MAF track"),[h,v]=(0,ge.useState)("BigMafAdapter"),[b,y]=(0,ge.useState)("TBI"),_=(0,Px.getRoot)(e);return ge.default.createElement(Ue.Paper,{className:t.paper},ge.default.createElement(Ue.Paper,null,c?ge.default.createElement($r.ErrorMessage,{error:c}):null,ge.default.createElement(Ue.FormControl,null,ge.default.createElement(Ue.FormLabel,null,"File type"),ge.default.createElement(Ue.RadioGroup,{value:h,onChange:w=>{v(w.target.value)}},["BigMafAdapter","MafTabixAdapter"].map(w=>ge.default.createElement(Ue.FormControlLabel,{key:w,value:w,control:ge.default.createElement(Ue.Radio,null),checked:h===w,label:w})))),h==="BigMafAdapter"?ge.default.createElement($r.FileSelector,{location:i,name:"Path to bigMaf",rootModel:_,setLocation:w=>{o(w)}}):h==="MafTabixAdapter"?ge.default.createElement(ge.default.Fragment,null,ge.default.createElement(Ue.FormControl,null,ge.default.createElement(Ue.FormLabel,null,"Index type"),ge.default.createElement(Ue.RadioGroup,{value:h,onChange:w=>{y(w.target.value)}},["TBI","CSI"].map(w=>ge.default.createElement(Ue.FormControlLabel,{key:w,value:w,control:ge.default.createElement(Ue.Radio,null),checked:b===w,label:w})))),ge.default.createElement($r.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:_,setLocation:w=>{o(w)}}),ge.default.createElement($r.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:_,setLocation:w=>{u(w)}})):ge.default.createElement(ge.default.Fragment,null,ge.default.createElement($r.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:_,setLocation:w=>{o(w)}}),ge.default.createElement($r.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:_,setLocation:w=>{u(w)}}))),ge.default.createElement("div",null,ge.default.createElement($r.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:_,setLocation:w=>{s(w)}}),ge.default.createElement(Ue.TextField,{multiline:!0,rows:10,value:r,onChange:w=>{n(w.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(Ue.TextField,{value:p,helperText:"Track name",onChange:w=>{d(w.target.value)}}),ge.default.createElement(Ue.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let w=(0,Ro.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let S=[`${p.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,w.adminMode?"":"-sessionTrack"].join("");(0,Ro.isSessionWithAddTracks)(w)&&(w.addTrackConf({trackId:S,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:b,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(S)),e.clearData(),(0,Ro.isSessionModelWithWidgets)(w)&&w.hideWidget(e)}catch(w){f(w)}}},"Submit"))}function vv(e){e.addAddTrackWorkflowType(()=>new Rx.AddTrackWorkflowType({name:"MAF track",ReactComponent:hv,stateModel:Mx.types.model({})}))}var HR=N(Lb()),GR=N(Hb()),os=class extends GR.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,HR.getAdapter)(n,u,a);return l.getSamples(o,i)}};function Gb(e){e.addRpcMethod(()=>new os(e))}var KR=N(Lb()),ZR=N(Hb());function $R({regions:e,showAllLetters:t,samples:r,features:n}){let i=e[0],o=new Map(r.map((l,s)=>[l.id,s])),a=i.end-i.start,u=r.map(()=>"-".repeat(a));for(let l of n.values()){let s=l.get("start"),c=l.get("alignments"),f=l.get("seq");for(let[p,d]of Object.entries(c)){let v=d.seq,b=o.get(p);if(b!==void 0){for(let y=0,_=0,w=v.length;y<w;y++)if(f[y]!=="-"){if(v[y]==="-"){let x=s+_-i.start;x>=0&&x<a&&(u[b]=u[b].slice(0,x)+"-"+u[b].slice(x+1))}_++}if(!t){for(let y=0,_=0,w=v.length;y<w;y++)if(f[y]!=="-"){let x=v[y],S=s+_-i.start;S>=0&&S<a&&f[y]===x&&x!=="-"&&x!==" "&&(u[b]=u[b].slice(0,S)+"."+u[b].slice(S+1)),_++}}for(let y=0,_=0,w=v.length;y<w;y++){let x=v[y];if(f[y]!=="-"){if(x!=="-"){let S=s+_-i.start;S>=0&&S<a&&(f[y]!==x&&x!==" "||t)&&(u[b]=u[b].slice(0,S)+x+u[b].slice(S+1))}_++}}}}}return u}var as=class extends ZR.default{name="MafGetSequences";async execute(t,r){let n=await this.deserializeArguments(t,r),{samples:i,regions:o,adapterConfig:a,sessionId:u,showAllLetters:l}=n,s=(await(0,KR.getAdapter)(this.pluginManager,u,a)).dataAdapter,c=await di(s.getFeatures(o[0],n).pipe(pi()));return $R({features:new Map(c.map(f=>[f.id(),f])),samples:i,regions:o,showAllLetters:l})}};function $b(e){e.addRpcMethod(()=>new as(e))}var tM=N(Br());var YR=N(Ts()),xa=N(yt()),XR=N(Rs()),JR=N(Ms()),QR=N(_t());var us=class extends YR.BaseFeatureDataAdapter{setupP;async setupPre(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,QR.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,xa.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,JR.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,xa.updateStatus)("Downloading alignments",n,()=>di(o.getFeatures(t).pipe(pi())));await(0,xa.updateStatus)("Processing alignments",n,()=>{let u="",l=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),f={},p=c.length;for(let d=0;d<p;d++){let h=c[d],v=h.split(":")[5],b=h.split(":"),y=b[0].split("."),[_,w="",...x]=y,S,E="";y.length===2?(S=_,E=w):Number.isNaN(+w)?(S=_,E=[w,...x].join(".")):(S=`${_}.${w}`,E=x.join(".")),S&&(u=u||S,f[S]={chr:E,start:+b[1],srcSize:+b[2],strand:b[3]==="-"?-1:1,unknown:+b[4],seq:v})}i.next(new xa.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:f,seq:f[l||t.assemblyName]?.seq||f[u]?.seq}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,XR.openLocation)(r).readFile("utf8");return{samples:cn(this.getConf("samples")),tree:n?fi(n):void 0}}freeResources(){}};var Kb=N(ln());var IZ=(0,Kb.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,Kb.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}),eM=IZ;function Zb(e){return e.addAdapterType(()=>new tM.AdapterType({name:"MafTabixAdapter",AdapterClass:us,configSchema:eM}))}var ep=N(Br());var rM=N(ln()),nM=N(Br());function Yb(e){return(0,rM.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,nM.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function Xb(e){return e.addTrackType(()=>{let t=Yb(e);return new ep.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,ep.createBaseTrackModel)(e,"MafTrack",t)})})}var tp=class extends iM.default{name="MafViewerPlugin";version=ig;install(t){ph(t),Xb(t),lv(t),pv(t),Zb(t),rh(t),vv(t),$b(t),Gb(t)}configure(t){}};return tg(jZ);})();
|
|
10
|
+
`);i(S)}catch(u){console.error(u),l(u)}finally{a(!1)}})()},[e,t,r]),{sequence:n,loading:o,error:s}}var CI=(0,C0.makeStyles)()({dialogContent:{width:"80em"},textAreaInput:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto"},ml:{marginLeft:10}}),kI=(0,M0.observer)(function({onClose:e,model:t,selectionCoords:r}){let[n,i]=(0,Ze.useState)(!0),{classes:o}=CI(),{sequence:a,loading:s,error:l}=P0({model:t,selectionCoords:r,showAllLetters:n}),u=a?a.length>1e6:!1;return Ze.default.createElement(_o.Dialog,{open:!0,onClose:e,title:"Subsequence Data",maxWidth:"xl"},Ze.default.createElement(wt.DialogContent,null,Ze.default.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"}},Ze.default.createElement(wt.ToggleButtonGroup,{value:n,exclusive:!0,size:"small",onChange:(c,f)=>{f!==null&&i(f)}},Ze.default.createElement(wt.ToggleButton,{value:!0},"Show All Letters"),Ze.default.createElement(wt.ToggleButton,{value:!1},"Show Only Differences")),Ze.default.createElement("div",{style:{flexGrow:1}}),Ze.default.createElement(wt.Button,{variant:"contained",color:"primary",disabled:s||!a,onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(a),(0,as.getSession)(t).notify("Sequence copied to clipboard","info")}catch(c){console.error(c),(0,as.getSession)(t).notifyError(`${c}`,c)}})()}},"Copy to Clipboard"),Ze.default.createElement(wt.Button,{variant:"contained",color:"secondary",disabled:s||!a,onClick:()=>{try{let c=URL.createObjectURL(new Blob([a],{type:"text/plain"})),f=document.createElement("a");f.href=c,f.download="sequence.fasta",document.body.append(f),f.click(),f.remove(),URL.revokeObjectURL(c),(0,as.getSession)(t).notify("Sequence downloaded","info")}catch(c){console.error(c),(0,as.getSession)(t).notifyError(`${c}`,c)}}},"Download")),l?Ze.default.createElement(_o.ErrorMessage,{error:l}):Ze.default.createElement(Ze.default.Fragment,null,s?Ze.default.createElement(_o.LoadingEllipses,null):null,Ze.default.createElement(wt.TextField,{variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:u,className:o.dialogContent,fullWidth:!0,value:s?"Loading...":u?"Reference sequence too large to display, use the download FASTA button":a,slotProps:{input:{readOnly:!0,classes:{input:o.textAreaInput}}}}))),Ze.default.createElement(wt.DialogActions,null,Ze.default.createElement(wt.Button,{color:"primary",variant:"outlined",onClick:e},"Close")))}),k0=kI;var xm=L(Fe()),Yx=L(mn()),Xx=L(Gx()),Kx=L(ut()),Zx=L(Sr());var qo=L(ut());function qc(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jc(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 $x(e,t,r){let n=[];if(t)n.push(`Start: ${t.refName}:${(0,qo.toLocale)(t.coord)}`,`End: ${r.refName}:${(0,qo.toLocale)(r.coord)}`,`Length: ${(0,qo.getBpDisplayStr)(Math.abs(t.coord-r.coord))}`);else if(n.push(`Ref: ${r.refName}:${(0,qo.toLocale)(r.coord)}`),e){let{base:i,sampleId:o,pos:a,chr:s}=e,l=20,u=i.length,c=u>1?` ${u}bp`:"",f=i.length>l?i.slice(0,l)+"...":i;n.push(`Alt ${o}: ${s}:${a.toLocaleString("en-US")} (${f}${c})`)}return n.filter(i=>!!i).join("<br/>")}function _m(e){return(e.data.length||0)+(e.children&&jc(e.children,_m)||0)}function wm(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{wm(n,t,r)})}var N2=(0,Zx.observer)(function({model:e,mouseX:t,origMouseX:r}){let{hoveredInfo:n}=e,i=(0,Kx.getContainingView)(e),o=r?i.pxToBp(r):void 0,a=i.pxToBp(t);return n?xm.default.createElement(Xx.default,null,xm.default.createElement(Yx.SanitizedHTML,{html:$x(n,o,a)})):null}),Jx=N2;Em();var H2=(0,h1.observer)(function(e){let{model:t}=e,{pluginManager:r}=(0,Nc.getEnv)(t),{rowHeight:n,height:i,scrollTop:o,samples:a}=t,s=(0,De.useRef)(null),l=(0,p1.useTheme)(),u=r.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=u.exports,[f,p]=(0,De.useState)(),[d,h]=(0,De.useState)(),[m,v]=(0,De.useState)(!1),[y,w]=(0,De.useState)(),[_,x]=(0,De.useState)(),[S,E]=(0,De.useState)(!1),[T,P]=(0,De.useState)(),[k,M]=(0,De.useState)(!1),[I,U]=(0,De.useState)(),{width:B}=(0,Nc.getContainingView)(t),A=R=>{let H=s.current?.getBoundingClientRect()?.left||0,_e=R.clientX-H;E(!1),v(!0),w(_e),x(_e),R.stopPropagation()},q=R=>{let F=s.current?.getBoundingClientRect(),H=F?.top||0,_e=F?.left||0,Q=R.clientX-_e,$=R.clientY-H;p($),h(Q),m&&x(Q)},W=R=>{m&&y!==void 0&&_!==void 0&&(Math.abs(_-y)>=2?(P({coord:[R.clientX,R.clientY],dragEndX:R.clientX,dragStartX:y}),E(!0)):j()),v(!1)},j=()=>{E(!1),w(void 0),x(void 0)};return(0,De.useEffect)(()=>{let R=H=>{H.key==="Escape"&&S&&j()},F=H=>{s.current&&!s.current.contains(H.target)&&S&&j()};return document.addEventListener("keydown",R),document.addEventListener("click",F),()=>{document.removeEventListener("keydown",R),document.removeEventListener("click",F)}},[S,j]),De.default.createElement("div",{ref:s,onMouseDown:A,onMouseMove:q,onMouseUp:W,onDoubleClick:()=>{S&&j()},onMouseLeave:()=>{p(void 0),h(void 0),v(!1)}},De.default.createElement(c,{...e}),De.default.createElement(Fc,{model:t}),f&&d&&a&&!T&&!k?De.default.createElement("div",{style:{position:"relative"}},De.default.createElement(A0,{width:B,height:i,scrollTop:o,mouseX:d,mouseY:f}),De.default.createElement(Jx,{model:t,mouseX:d,mouseY:f,origMouseX:y,rowHeight:n,sources:a})):null,(m||S)&&y!==void 0&&_!==void 0?De.default.createElement("div",{style:{position:"absolute",left:Math.min(y,_),top:0,width:Math.abs(_-y),height:i,backgroundColor:"rgba(0, 0, 255, 0.2)",border:"1px solid rgba(0, 0, 255, 0.5)",pointerEvents:"none"}}):null,De.default.createElement(d1.Menu,{open:!!T,onMenuItemClick:(R,F)=>{F(),P(void 0)},onClose:()=>{P(void 0)},slotProps:{transition:{onExit:()=>{P(void 0)}}},anchorReference:"anchorPosition",anchorPosition:T?{top:T.coord[1],left:T.coord[0]}:void 0,style:{zIndex:l.zIndex.tooltip},menuItems:[{label:"View subsequence",onClick:()=>{T&&(U({dragStartX:T.dragStartX,dragEndX:T.dragEndX}),M(!0),P(void 0))}}]}),k?De.default.createElement(k0,{model:t,selectionCoords:I,onClose:()=>{M(!1),U(void 0)}}):null)}),m1=H2;var v1=L(pn());function Am(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,v1.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var z1=L(Fe()),Bc=L(pn()),Ar=L(ut()),U1=L(Ih());function V2(e,t){return e.parent===t.parent?1:2}function G2(e){return e.reduce($2,0)/e.length}function $2(e,t){return e+t.x}function Y2(e){return 1+e.reduce(X2,0)}function X2(e,t){return Math.max(e,t.y)}function K2(e){for(var t;t=e.children;)e=t[0];return e}function Z2(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Rm(){var e=V2,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(p){var d=p.children;d?(p.x=G2(d),p.y=Y2(d)):(p.x=a?s+=e(p,a):0,p.y=0,a=p)});var l=K2(o),u=Z2(o),c=l.x-e(l,u)/2,f=u.x+e(u,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)/(f-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 J2(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 g1(){return this.eachAfter(J2)}function b1(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function y1(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 _1(e,t){for(var r=this,n=[r],i=[],o,a,s,l=-1;r=n.pop();)if(i.push(r),o=r.children)for(a=0,s=o.length;a<s;++a)n.push(o[a]);for(;r=i.pop();)e.call(t,r,++l,this);return this}function w1(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function x1(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 S1(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function O1(e){for(var t=this,r=Q2(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 Q2(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 E1(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function A1(){return Array.from(this)}function R1(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T1(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*P1(){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 jo(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=rj)):t===void 0&&(t=tj);for(var r=new gs(e),n,i=[r],o,a,s,l;n=i.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,s=l-1;s>=0;--s)i.push(o=a[s]=new gs(a[s])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(ij)}function ej(){return jo(this).eachBefore(nj)}function tj(e){return e.children}function rj(e){return Array.isArray(e)?e[1]:null}function nj(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function ij(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function gs(e){this.data=e,this.depth=this.height=0,this.parent=null}gs.prototype=jo.prototype={constructor:gs,count:g1,each:b1,eachAfter:_1,eachBefore:y1,find:w1,sum:x1,sort:S1,path:O1,ancestors:E1,descendants:A1,leaves:R1,links:T1,copy:ej,[Symbol.iterator]:P1};var Tm=L(C1()),W1=L(Dc()),En=L(_t());var cj=(0,z1.lazy)(()=>Promise.resolve().then(()=>(F1(),L1)));function Pm(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return En.types.compose("LinearMafDisplay",n,En.types.model({type:En.types.literal("LinearMafDisplay"),configuration:(0,Bc.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80,showAsUpperCase:!0})).volatile(()=>({hoveredInfo:void 0,prefersOffset:!0,volatileSamples:void 0,volatileTree:void 0})).actions(i=>({setHoveredInfo(o){i.hoveredInfo=o},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,Tm.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,Tm.default)(a,i.volatileTree)||(i.volatileTree=a)},setShowAsUpperCase(o){i.showAsUpperCase=o}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,Bc.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,Ar.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?jo(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>qc(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 Rm().size([this.totalHeight,a]).separation(()=>1)(o),wm(o,o.data.length=0,a/_m(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 dn(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:s,rendererConfig:l,samples:u,rowHeight:c,rowProportion:f,mismatchRendering:p,showAsUpperCase:d}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:l,samples:u,rowHeight:c,rowProportion:f,showAllLetters:s,mismatchRendering:p,showAsUpperCase:d}},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,Ar.getSession)(i).queueDialog(s=>[cj,{model:i,handleClose:s}])}}]},{label:"Use upper-case",type:"checkbox",checked:i.showAsUpperCase,onClick:()=>{i.setShowAsUpperCase(!i.showAsUpperCase)}},{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,Ar.max)(i.samples?.map(a=>(0,Ar.measureText)(a.label,this.svgFontSize)).map(a=>this.canDisplayLabel?a:20)||[],0)}})).actions(i=>({afterCreate(){(0,En.addDisposer)(i,(0,W1.autorun)(async()=>{try{let{rpcManager:o}=(0,Ar.getSession)(i),a=(0,U1.getRpcSessionId)(i);i.setSamples(await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:s=>{(0,En.isAlive)(i)&&i.setMessage(s)}}))}catch(o){console.error(o),(0,Ar.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:s}=await Promise.resolve().then(()=>(B1(),D1));return s(i,a,o)}}})}function Mm(e){e.addDisplayType(()=>{let t=Am(e),r=Pm(t,e);return new H1.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:m1,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var fS=L(Br()),Gc=L(ut());var cS=L(mn());function zc(e,t,r=0,n=e.length-1,i=lj){for(;n>r;){if(n-r>600){let l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(r,Math.floor(t-u*f/l+p)),h=Math.min(n,Math.floor(t+(l-u)*f/l+p));zc(e,t,d,h,i)}let o=e[t],a=r,s=n;for(bs(e,r,t),i(e[n],o)>0&&bs(e,r,n);a<s;){for(bs(e,a,s),a++,s--;i(e[a],o)<0;)a++;for(;i(e[s],o)>0;)s--}i(e[r],o)===0?bs(e,r,s):(s++,bs(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}}function bs(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function lj(e,t){return e<t?-1:e>t?1:0}var Pi=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let r=this.data,n=[];if(!Wc(t,r))return n;let i=this.toBBox,o=[];for(;r;){for(let a=0;a<r.children.length;a++){let s=r.children[a],l=r.leaf?i(s):s;Wc(t,l)&&(r.leaf?n.push(s):km(t,l)?this._all(s,n):o.push(s))}r=o.pop()}return n}collides(t){let r=this.data;if(!Wc(t,r))return!1;let n=[];for(;r;){for(let i=0;i<r.children.length;i++){let o=r.children[i],a=r.leaf?this.toBBox(o):o;if(Wc(t,a)){if(r.leaf||km(t,a))return!0;n.push(o)}}r=n.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let n=0;n<t.length;n++)this.insert(t[n]);return this}let r=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=r;else if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){let n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Fo([]),this}remove(t,r){if(!t)return this;let n=this.data,i=this.toBBox(t),o=[],a=[],s,l,u;for(;n||o.length;){if(n||(n=o.pop(),l=o[o.length-1],s=a.pop(),u=!0),n.leaf){let c=fj(t,n.children,r);if(c!==-1)return n.children.splice(c,1),o.push(n),this._condense(o),this}!u&&!n.leaf&&km(n,i)?(o.push(n),a.push(s),s=0,l=n,n=n.children[0]):l?(s++,n=l.children[s],u=!1):n=null}return this}toBBox(t){return t}compareMinX(t,r){return t.minX-r.minX}compareMinY(t,r){return t.minY-r.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,r){let n=[];for(;t;)t.leaf?r.push(...t.children):n.push(...t.children),t=n.pop();return r}_build(t,r,n,i){let o=n-r+1,a=this._maxEntries,s;if(o<=a)return s=Fo(t.slice(r,n+1)),Lo(s,this.toBBox),s;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),s=Fo([]),s.leaf=!1,s.height=i;let l=Math.ceil(o/a),u=l*Math.ceil(Math.sqrt(a));V1(t,r,n,u,this.compareMinX);for(let c=r;c<=n;c+=u){let f=Math.min(c+u-1,n);V1(t,c,f,l,this.compareMinY);for(let p=c;p<=f;p+=l){let d=Math.min(p+l-1,f);s.children.push(this._build(t,p,d,i-1))}}return Lo(s,this.toBBox),s}_chooseSubtree(t,r,n,i){for(;i.push(r),!(r.leaf||i.length-1===n);){let o=1/0,a=1/0,s;for(let l=0;l<r.children.length;l++){let u=r.children[l],c=Cm(u),f=hj(t,u)-c;f<a?(a=f,o=c<o?c:o,s=u):f===a&&c<o&&(o=c,s=u)}r=s||r.children[0]}return r}_insert(t,r,n){let i=n?t:this.toBBox(t),o=[],a=this._chooseSubtree(i,this.data,r,o);for(a.children.push(t),_s(a,i);r>=0&&o[r].children.length>this._maxEntries;)this._split(o,r),r--;this._adjustParentBBoxes(i,o,r)}_split(t,r){let n=t[r],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);let a=this._chooseSplitIndex(n,o,i),s=Fo(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,Lo(n,this.toBBox),Lo(s,this.toBBox),r?t[r-1].children.push(s):this._splitRoot(n,s)}_splitRoot(t,r){this.data=Fo([t,r]),this.data.height=t.height+1,this.data.leaf=!1,Lo(this.data,this.toBBox)}_chooseSplitIndex(t,r,n){let i,o=1/0,a=1/0;for(let s=r;s<=n-r;s++){let l=ys(t,0,s,this.toBBox),u=ys(t,s,n,this.toBBox),c=mj(l,u),f=Cm(l)+Cm(u);c<o?(o=c,i=s,a=f<a?f:a):c===o&&f<a&&(a=f,i=s)}return i||n-r}_chooseSplitAxis(t,r,n){let i=t.leaf?this.compareMinX:dj,o=t.leaf?this.compareMinY:pj,a=this._allDistMargin(t,r,n,i),s=this._allDistMargin(t,r,n,o);a<s&&t.children.sort(i)}_allDistMargin(t,r,n,i){t.children.sort(i);let o=this.toBBox,a=ys(t,0,r,o),s=ys(t,n-r,n,o),l=Uc(a)+Uc(s);for(let u=r;u<n-r;u++){let c=t.children[u];_s(a,t.leaf?o(c):c),l+=Uc(a)}for(let u=n-r-1;u>=r;u--){let c=t.children[u];_s(s,t.leaf?o(c):c),l+=Uc(s)}return l}_adjustParentBBoxes(t,r,n){for(let i=n;i>=0;i--)_s(r[i],t)}_condense(t){for(let r=t.length-1,n;r>=0;r--)t[r].children.length===0?r>0?(n=t[r-1].children,n.splice(n.indexOf(t[r]),1)):this.clear():Lo(t[r],this.toBBox)}};function fj(e,t,r){if(!r)return t.indexOf(e);for(let n=0;n<t.length;n++)if(r(e,t[n]))return n;return-1}function Lo(e,t){ys(e,0,e.children.length,t,e)}function ys(e,t,r,n,i){i||(i=Fo(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o=t;o<r;o++){let a=e.children[o];_s(i,e.leaf?n(a):a)}return i}function _s(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function dj(e,t){return e.minX-t.minX}function pj(e,t){return e.minY-t.minY}function Cm(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function Uc(e){return e.maxX-e.minX+(e.maxY-e.minY)}function hj(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function mj(e,t){let r=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function km(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function Wc(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function Fo(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function V1(e,t,r,n,i){let o=[t,r];for(;o.length;){if(r=o.pop(),t=o.pop(),r-t<=n)continue;let a=t+Math.ceil((r-t)/n/2)*n;zc(e,a,t,r,i),o.push(t,a,a,r)}}var G1="bold 10px Courier New,monospace",ws=10,$r=.4,Mi=1,xs=2,Im=2,$1=3,Y1=10,X1=.2,K1=5,Z1=10,Hc=5,J1=.5;function Ci(e,t,r,n,i,o,a,s,l,u,c,f){return{minX:e,minY:t,maxX:e+r.scale+$r,maxY:t+r.h,pos:n,chr:i,sampleId:o,base:a,isMatch:s,isMismatch:l,isGap:u,isInsertion:c,featureId:f}}function Q1(e,t,r,n,i,o,a,s,l){return{minX:e,minY:t,maxX:e+r,maxY:t+n.h,pos:i,chr:o,sampleId:a,base:s,isMatch:!1,isMismatch:!1,isGap:!1,isInsertion:!0,featureId:l}}function Yr(e,t,r=!1){return r||Math.abs(e-t.lastInsertedX)>J1}function Xr(e,t){e.spatialIndex.insert(t),e.lastInsertedX=t.minX}function eS(e,t,r,n,i,o,a,s,l){let{ctx:u,scale:c}=e,f=e.rowHeight/2;u.beginPath(),u.fillStyle="black";for(let p=0,d=0,h=t.length;p<h;p++)if(r[p]!=="-"){if(t[p]==="-"){let m=n+c*d;if(u.moveTo(m,i+f),u.lineTo(m+c+$r,i+f),Yr(m,e)){let v=Ci(m,i,e,d+s,l,o,"-",!1,!1,!0,!1,a);Xr(e,v)}}d++}u.stroke()}var qm=L(ut());function tS(e){return Object.fromEntries(Object.entries(jm(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function jm(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Zt(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function Vc(){let e=(0,qm.measureText)("A"),t=(0,qm.measureText)("M")-2;return{charWidth:e,charHeight:t}}function rS(e,t,r,n,i,o,a,s,l){if(e.showAllLetters)return;let{ctx:u,scale:c,h:f,canvasWidth:p}=e;u.fillStyle="lightgrey";for(let d=0,h=0,m=t.length;d<m;d++)if(r[d]!=="-"){let v=t[d],y=n+c*h;if(r[d]===v&&v!=="-"&&v!==" "&&(Zt(u,y,i,c+$r,f,p),Yr(y,e))){let w=Ci(y,i,e,h+s,l,o,v||"",!0,!1,!1,!1,a);Xr(e,w)}h++}}function nS(e,t,r,n,i,o,a,s,l){let{ctx:u,scale:c,h:f,canvasWidth:p,showAllLetters:d,mismatchRendering:h,colorForBase:m}=e;for(let v=0,y=0,w=t.length;v<w;v++){let _=t[v];if(r[v]!=="-"){if(_!=="-"){let x=n+c*y;r[v]!==_&&_!==" "?(Zt(u,x,i,c+$r,f,p,h?m[_]??"black":"orange"),Yr(x,e)&&Xr(e,Ci(x,i,e,y+s,l,o,_,!1,!0,!1,!1,a))):d&&(Zt(u,x,i,c+$r,f,p,h?m[_]??"black":"lightblue"),Yr(x,e)&&Xr(e,Ci(x,i,e,y+s,l,o,_,!0,!1,!1,!1,a)))}y++}}}function vj(e,t){return t?e.toUpperCase():e}function iS(e,t,r,n,i,o,a,s){let{ctx:l,scale:u,hp2:c,rowHeight:f,showAllLetters:p,mismatchRendering:d,contrastForBase:h,showAsUpperCase:m}=e,{charHeight:v}=Vc();if(u>=ws){for(let y=0,w=0,_=t.length;y<_;y++)if(n[y]!=="-"){let x=i+u*w,S=(u-ws)/2+1,E=t[y];(p||n[y]!==E)&&E!=="-"&&(l.fillStyle=d?h[E]??"white":"black",f>v&&l.fillText(vj(r[y]||"",m),x+S,c+o+$1)),w++}}}var oS=L(ut());function aS(e,t,r,n,i,o,a,s,l,u){let{ctx:c,scale:f,h:p,canvasWidth:d,rowHeight:h}=e,{charHeight:m}=Vc();for(let v=0,y=0,w=t.length;v<w;v++){let _="";for(;r[v]==="-";)t[v]!=="-"&&t[v]!==" "&&(_+=t[v]),v++;if(_.length>0){let x=n+f*y-Mi,S,E;if(_.length>Y1){let T=`${_.length}`;if(o>Z1)S=x-Mi,E=xs,Zt(c,S,i,E,p,d,"purple");else if(p>m){let P=(0,oS.measureText)(T,ws),k=Im;S=x-P/2-k,E=P+2*k,Zt(c,S,i,E,p,d,"purple"),c.fillStyle="white",c.fillText(T,x-P/2,i+p*7/8)}else{let P=Im;S=x-P,E=2*P,Zt(c,S,i,E,p,d,"purple")}}else S=x,E=Mi,Zt(c,S,i,E,p,d,"purple"),o<X1&&h>K1&&(S=x-xs,E=Hc,Zt(c,x-xs,i,Hc,Mi,d),Zt(c,x-xs,i+p-Mi,Hc,Mi,d));Yr(S,e,!0)&&Xr(e,Q1(S,i,E,e,y+l,u,a,_,s))}y++}}var Lm=L(ut());function sS(e,t,r,n,i){let[o]=(0,Lm.featureSpanPx)(e,t,r),a=e.get("alignments"),s=e.get("seq").toLowerCase(),l=e.id()||`feature_${e.get("start")}_${e.get("end")}`;for(let[u,c]of Object.entries(a)){let f=n.get(u);if(f===void 0)continue;let p=c.seq,d=p.toLowerCase(),h=i.offset+i.rowHeight*f;eS(i,d,s,o,h,u,l,c.start,c.chr),rS(i,d,s,o,h,u,l,c.start,c.chr),nS(i,d,s,o,h,u,l,c.start,c.chr),iS(i,d,p,s,o,h,u,l)}}function uS(e,t,r,n,i){let[o]=(0,Lm.featureSpanPx)(e,t,r),a=e.get("alignments"),s=e.get("seq").toLowerCase(),l=e.id()||`feature_${e.get("start")}_${e.get("end")}`;for(let[u,c]of Object.entries(a)){let f=n.get(u);if(f===void 0)continue;let p=c.seq.toLowerCase(),d=i.offset+i.rowHeight*f;aS(i,p,s,o,d,r,u,l,c.start,c.chr)}}function lS({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:s,samples:l,rowProportion:u,features:c,showAsUpperCase:f}=t,p=r[0],d=(p.end-p.start)/n,h=i*u,m=(0,cS.createJBrowseTheme)(a),v=jm(m),y=tS(m),w=new Map(l.map((T,P)=>[T.id,P])),_=1/n,x=h/2,S=(i-h)/2;e.font=G1;let E={ctx:e,scale:_,canvasWidth:d,rowHeight:i,h,hp2:x,offset:S,colorForBase:v,contrastForBase:y,showAllLetters:o,mismatchRendering:s,showAsUpperCase:f,spatialIndex:new Pi,lastInsertedX:-1/0};for(let T of c.values())sS(T,p,n,w,E);for(let T of c.values())uS(T,p,n,w,E);return{rbush:E.spatialIndex.toJSON()}}var Ss=class extends fS.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,s=n[0],l=o.length*a+100,u=(s.end-s.start)/i,c=await this.getFeatures(t),f=await(0,Gc.updateStatus)("Rendering alignment",r,()=>(0,Gc.renderToAbstractCanvas)(u,l,t,d=>lS({ctx:d,renderArgs:{...t,features:c}})));return{...await super.render({...t,...f,width:u,height:l}),...f,features:new Map,width:u,height:l,containsNoTransferables:!0}}};var ki=L(Fe()),dS=L(mn()),pS=L(Sr());var gj=(0,pS.observer)(function(e){let{displayModel:t,height:r,rbush:n}=e,i=(0,ki.useRef)(null),o=(0,ki.useMemo)(()=>new Pi().fromJSON(n),[n]);function a(s,l){let u=0,c=0;if(i.current){let p=i.current.getBoundingClientRect();u=s-p.left,c=l-p.top}let f=o.search({minX:u,maxX:u+1,minY:c,maxY:c+1});if(f.length){let{minX:p,minY:d,maxX:h,maxY:m,...v}=f.find(y=>y.isInsertion)||f[0];return v}else return}return ki.default.createElement("div",{ref:i,onMouseMove:s=>t.setHoveredInfo?.(a(s.clientX,s.clientY)),onMouseLeave:()=>{t.setHoveredInfo?.(void 0)},onMouseOut:()=>{t.setHoveredInfo?.(void 0)},style:{overflow:"visible",position:"relative",height:r}},ki.default.createElement(dS.PrerenderedCanvas,{...e,style:{position:"absolute",left:0}}))}),hS=gj;var mS=L(pn());var bj=(0,mS.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),vS=bj;function Fm(e){e.addRendererType(()=>new Ss({name:"LinearMafRenderer",ReactComponent:hS,configSchema:vS,pluginManager:e}))}var yS=L(Br()),_S=L(_t());var ge=L(Fe()),Kr=L(mn()),No=L(ut()),Ue=L(go()),gS=L(_t()),bS=L(bo()),yj=(0,bS.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function Nm({model:e}){let{classes:t}=yj(),[r,n]=(0,ge.useState)(""),[i,o]=(0,ge.useState)(),[a,s]=(0,ge.useState)(),[l,u]=(0,ge.useState)(),[c,f]=(0,ge.useState)(),[p,d]=(0,ge.useState)("MAF track"),[h,m]=(0,ge.useState)("BigMafAdapter"),[v,y]=(0,ge.useState)("TBI"),w=(0,gS.getRoot)(e);return ge.default.createElement(Ue.Paper,{className:t.paper},ge.default.createElement(Ue.Paper,null,c?ge.default.createElement(Kr.ErrorMessage,{error:c}):null,ge.default.createElement(Ue.FormControl,null,ge.default.createElement(Ue.FormLabel,null,"File type"),ge.default.createElement(Ue.RadioGroup,{value:h,onChange:_=>{m(_.target.value)}},["BigMafAdapter","MafTabixAdapter"].map(_=>ge.default.createElement(Ue.FormControlLabel,{key:_,value:_,control:ge.default.createElement(Ue.Radio,null),checked:h===_,label:_})))),h==="BigMafAdapter"?ge.default.createElement(Kr.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:_=>{o(_)}}):h==="MafTabixAdapter"?ge.default.createElement(ge.default.Fragment,null,ge.default.createElement(Ue.FormControl,null,ge.default.createElement(Ue.FormLabel,null,"Index type"),ge.default.createElement(Ue.RadioGroup,{value:h,onChange:_=>{y(_.target.value)}},["TBI","CSI"].map(_=>ge.default.createElement(Ue.FormControlLabel,{key:_,value:_,control:ge.default.createElement(Ue.Radio,null),checked:v===_,label:_})))),ge.default.createElement(Kr.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:_=>{o(_)}}),ge.default.createElement(Kr.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:_=>{s(_)}})):ge.default.createElement(ge.default.Fragment,null,ge.default.createElement(Kr.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:_=>{o(_)}}),ge.default.createElement(Kr.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:_=>{s(_)}}))),ge.default.createElement("div",null,ge.default.createElement(Kr.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:w,setLocation:_=>{u(_)}}),ge.default.createElement(Ue.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(Ue.TextField,{value:p,helperText:"Track name",onChange:_=>{d(_.target.value)}}),ge.default.createElement(Ue.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let _=(0,No.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let S=[`${p.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,_.adminMode?"":"-sessionTrack"].join("");(0,No.isSessionWithAddTracks)(_)&&(_.addTrackConf({trackId:S,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:v,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(S)),e.clearData(),(0,No.isSessionModelWithWidgets)(_)&&_.hideWidget(e)}catch(_){f(_)}}},"Submit"))}function Dm(e){e.addAddTrackWorkflowType(()=>new yS.AddTrackWorkflowType({name:"MAF track",ReactComponent:Nm,stateModel:_S.types.model({})}))}var jM=L(ab()),LM=L(mb()),bu=class extends LM.default{name="MafGetSamples";async execute(t,r){let n=this.pluginManager,i=await this.deserializeArguments(t,r),{regions:o,adapterConfig:a,sessionId:s}=i,{dataAdapter:l}=await(0,jM.getAdapter)(n,s,a);return l.getSamples(o,i)}};function vb(e){e.addRpcMethod(()=>new bu(e))}var NM=L(ab()),DM=L(mb());function FM({regions:e,showAllLetters:t,samples:r,features:n}){let i=e[0],o=new Map(r.map((l,u)=>[l.id,u])),a=i.end-i.start,s=r.map(()=>"-".repeat(a));for(let l of n.values()){let u=l.get("start"),c=l.get("alignments"),f=l.get("seq");for(let[p,d]of Object.entries(c)){let m=d.seq,v=o.get(p);if(v!==void 0){for(let y=0,w=0,_=m.length;y<_;y++)if(f[y]!=="-"){if(m[y]==="-"){let x=u+w-i.start;x>=0&&x<a&&(s[v]=s[v].slice(0,x)+"-"+s[v].slice(x+1))}w++}if(!t){for(let y=0,w=0,_=m.length;y<_;y++)if(f[y]!=="-"){let x=m[y],S=u+w-i.start;S>=0&&S<a&&f[y]===x&&x!=="-"&&x!==" "&&(s[v]=s[v].slice(0,S)+"."+s[v].slice(S+1)),w++}}for(let y=0,w=0,_=m.length;y<_;y++){let x=m[y];if(f[y]!=="-"){if(x!=="-"){let S=u+w-i.start;S>=0&&S<a&&(f[y]!==x&&x!==" "||t)&&(s[v]=s[v].slice(0,S)+x+s[v].slice(S+1))}w++}}}}}return s}var yu=class extends DM.default{name="MafGetSequences";async execute(t,r){let n=await this.deserializeArguments(t,r),{samples:i,regions:o,adapterConfig:a,sessionId:s,showAllLetters:l}=n,u=(await(0,NM.getAdapter)(this.pluginManager,s,a)).dataAdapter,c=await vi(u.getFeatures(o[0],n).pipe(gi()));return FM({features:new Map(c.map(f=>[f.id(),f])),samples:i,regions:o,showAllLetters:l})}};function gb(e){e.addRpcMethod(()=>new yu(e))}var VM=L(Br());var BM=L(zu()),Ca=L(ut()),zM=L(Uu()),UM=L(Wu()),WM=L(_t());var _u=class extends BM.BaseFeatureDataAdapter{setupP;async setupPre(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,WM.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,Ca.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,UM.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,Ca.updateStatus)("Downloading alignments",n,()=>vi(o.getFeatures(t).pipe(gi())));await(0,Ca.updateStatus)("Processing alignments",n,()=>{let s="",l=this.getConf("refAssemblyName");for(let u of a){let c=u.get("field5").split(","),f={},p=c.length;for(let d=0;d<p;d++){let m=c[d].split(":"),[v,y,w,_,x,S]=m;if(!v||!S)continue;let E,T,P=v.indexOf(".");if(P===-1)E=v,T="";else{let k=v.indexOf(".",P+1);if(k===-1)E=v.slice(0,Math.max(0,P)),T=v.slice(Math.max(0,P+1));else{let M=v.slice(P+1,k);M.length>0&&!Number.isNaN(+M)?(E=v.slice(0,Math.max(0,k)),T=v.slice(Math.max(0,k+1))):(E=v.slice(0,Math.max(0,P)),T=v.slice(Math.max(0,P+1)))}}E&&(s||(s=E),f[E]={chr:T,start:+y,srcSize:+w,strand:_==="-"?-1:1,unknown:+x,seq:S})}i.next(new Ca.SimpleFeature({id:u.id(),data:{start:u.get("start"),end:u.get("end"),refName:u.get("refName"),name:u.get("name"),score:u.get("score"),alignments:f,seq:f[l||t.assemblyName]?.seq||f[s]?.seq}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,zM.openLocation)(r).readFile("utf8");return{samples:dn(this.getConf("samples")),tree:n?mi(n):void 0}}freeResources(){}};var bb=L(pn());var NK=(0,bb.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,bb.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}),HM=NK;function yb(e){return e.addAdapterType(()=>new VM.AdapterType({name:"MafTabixAdapter",AdapterClass:_u,configSchema:HM}))}var yp=L(Br());var GM=L(pn()),$M=L(Br());function _b(e){return(0,GM.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,$M.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function wb(e){return e.addTrackType(()=>{let t=_b(e);return new yp.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,yp.createBaseTrackModel)(e,"MafTrack",t)})})}var _p=class extends YM.default{name="MafViewerPlugin";version=Tb;install(t){kh(t),wb(t),Mm(t),Fm(t),yb(t),wh(t),Dm(t),gb(t),vb(t)}configure(t){}};return Eb(DK);})();
|
|
12
11
|
/*! Bundled license information:
|
|
13
12
|
|
|
14
13
|
tabbable/dist/index.esm.js:
|