jbrowse-plugin-mafviewer 1.4.3 → 1.4.5
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/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.d.ts +14 -0
- package/dist/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.js +69 -0
- package/dist/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.js.map +1 -0
- package/dist/LinearMafDisplay/components/LinearMafDisplayComponent.js +4 -4
- package/dist/LinearMafDisplay/components/LinearMafDisplayComponent.js.map +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/ColorLegend.js +2 -2
- package/dist/LinearMafDisplay/components/Sidebar/ColorLegend.js.map +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/RectBg.d.ts +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/RectBg.js +2 -3
- package/dist/LinearMafDisplay/components/Sidebar/RectBg.js.map +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/SvgWrapper.js +81 -11
- package/dist/LinearMafDisplay/components/Sidebar/SvgWrapper.js.map +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/Tree.js +30 -9
- package/dist/LinearMafDisplay/components/Sidebar/Tree.js.map +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/YScaleBars.d.ts +0 -1
- package/dist/LinearMafDisplay/components/Sidebar/YScaleBars.js.map +1 -1
- package/dist/LinearMafDisplay/renderSvg.js +1 -1
- package/dist/LinearMafDisplay/renderSvg.js.map +1 -1
- package/dist/LinearMafDisplay/stateModel.d.ts +69 -3
- package/dist/LinearMafDisplay/stateModel.js +96 -1
- package/dist/LinearMafDisplay/stateModel.js.map +1 -1
- package/dist/LinearMafDisplay/util.d.ts +1 -0
- package/dist/LinearMafDisplay/util.js +3 -2
- package/dist/LinearMafDisplay/util.js.map +1 -1
- package/dist/LinearMafRenderer/LinearMafRenderer.d.ts +4 -7
- package/dist/LinearMafRenderer/LinearMafRenderer.js.map +1 -1
- package/dist/LinearMafRenderer/components/LinearMafRendering.js +27 -9
- package/dist/LinearMafRenderer/components/LinearMafRendering.js.map +1 -1
- package/dist/LinearMafRenderer/makeImageData.js +6 -7
- package/dist/LinearMafRenderer/makeImageData.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/features.d.ts +0 -1
- package/dist/LinearMafRenderer/rendering/features.js +1 -14
- package/dist/LinearMafRenderer/rendering/features.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/insertions.js +8 -6
- package/dist/LinearMafRenderer/rendering/insertions.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/matches.d.ts +1 -1
- package/dist/LinearMafRenderer/rendering/matches.js +3 -15
- package/dist/LinearMafRenderer/rendering/matches.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/spatialIndex.js +8 -2
- package/dist/LinearMafRenderer/rendering/spatialIndex.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/text.js +1 -3
- package/dist/LinearMafRenderer/rendering/text.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/types.d.ts +5 -4
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +7 -7
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +4 -4
- package/dist/util/fastaUtils.js +23 -50
- package/dist/util/fastaUtils.js.map +1 -1
- package/package.json +7 -7
- package/src/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.tsx +105 -0
- package/src/LinearMafDisplay/components/LinearMafDisplayComponent.tsx +4 -4
- package/src/LinearMafDisplay/components/Sidebar/ColorLegend.tsx +2 -6
- package/src/LinearMafDisplay/components/Sidebar/RectBg.tsx +8 -3
- package/src/LinearMafDisplay/components/Sidebar/SvgWrapper.tsx +117 -15
- package/src/LinearMafDisplay/components/Sidebar/Tree.tsx +53 -8
- package/src/LinearMafDisplay/components/Sidebar/YScaleBars.tsx +0 -1
- package/src/LinearMafDisplay/renderSvg.tsx +1 -1
- package/src/LinearMafDisplay/stateModel.ts +109 -1
- package/src/LinearMafDisplay/util.ts +4 -2
- package/src/LinearMafRenderer/LinearMafRenderer.ts +2 -4
- package/src/LinearMafRenderer/components/LinearMafRendering.tsx +49 -29
- package/src/LinearMafRenderer/makeImageData.ts +5 -14
- package/src/LinearMafRenderer/rendering/features.ts +2 -36
- package/src/LinearMafRenderer/rendering/insertions.ts +11 -6
- package/src/LinearMafRenderer/rendering/matches.ts +2 -27
- package/src/LinearMafRenderer/rendering/spatialIndex.ts +9 -2
- package/src/LinearMafRenderer/rendering/text.ts +1 -2
- package/src/LinearMafRenderer/rendering/types.ts +7 -4
- package/src/util/fastaUtils.ts +28 -54
- package/dist/LinearMafRenderer/components/util.d.ts +0 -1
- package/dist/LinearMafRenderer/components/util.js +0 -13
- package/dist/LinearMafRenderer/components/util.js.map +0 -1
- package/src/LinearMafRenderer/components/util.ts +0 -13
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";var JBrowsePluginMafViewer=(()=>{var hP=Object.create;var Ku=Object.defineProperty;var mP=Object.getOwnPropertyDescriptor;var vP=Object.getOwnPropertyNames;var bP=Object.getPrototypeOf,gP=Object.prototype.hasOwnProperty;var pt=(e,t)=>()=>(e&&(t=e(e=0)),t);var g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yu=(e,t)=>{for(var r in t)Ku(e,r,{get:t[r],enumerable:!0})},Eb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of vP(t))!gP.call(e,i)&&i!==r&&Ku(e,i,{get:()=>t[i],enumerable:!(n=mP(t,i))||n.enumerable});return e};var L=(e,t,r)=>(r=e!=null?hP(bP(e)):{},Eb(t||!e||!e.__esModule?Ku(r,"default",{value:e,enumerable:!0}):r,e)),Ab=e=>Eb(Ku({},"__esModule",{value:!0}),e);var Rb=g((jK,Tb)=>{Tb.exports=JBrowseExports["@jbrowse/core/Plugin"]});var Gr=g((LK,Mb)=>{Mb.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var Nd=g((NK,Cb)=>{Cb.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var ct=g((DK,kb)=>{kb.exports=JBrowseExports["@jbrowse/core/util"]});var Dd=g((BK,qb)=>{qb.exports=JBrowseExports["@jbrowse/core/util/io"]});var Bd=g((zK,Ib)=>{Ib.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var ht=g((WK,jb)=>{jb.exports=JBrowseExports["mobx-state-tree"]});var Kn=g((YY,Zb)=>{Zb.exports=JBrowseExports["@jbrowse/core/configuration"]});var qe=g((eX,tg)=>{tg.exports=JBrowseExports.react});var Kr=g((tX,rg)=>{rg.exports=JBrowseExports["@jbrowse/core/ui"]});var Wi=g((rX,ng)=>{ng.exports=JBrowseExports["@mui/material"]});var cr=g((nX,ig)=>{ig.exports=JBrowseExports["mobx-react"]});var Ui=g((iX,og)=>{og.exports=JBrowseExports["tss-react/mui"]});var Jd=g((aX,sg)=>{sg.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var ns=g((lX,hg)=>{hg.exports=JBrowseExports["react/jsx-runtime"]});function is(){return typeof window<"u"}function lr(e){return os(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kt(e){var t;return(t=(os(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function os(e){return is()?e instanceof Node||e instanceof it(e).Node:!1}function Te(e){return is()?e instanceof Element||e instanceof it(e).Element:!1}function Ie(e){return is()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function Gi(e){return!is()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function $i(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!qP.has(i)}function mg(e){return IP.has(lr(e))}function wa(e){return jP.some(t=>{try{return e.matches(t)}catch{return!1}})}function as(e){let t=Ki(),r=Te(e)?vt(e):e;return FP.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)||LP.some(n=>(r.willChange||"").includes(n))||NP.some(n=>(r.contain||"").includes(n))}function vg(e){let t=$t(e);for(;Ie(t)&&!Yt(t);){if(as(t))return t;if(wa(t))return null;t=$t(t)}return null}function Ki(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yt(e){return DP.has(lr(e))}function vt(e){return it(e).getComputedStyle(e)}function xa(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $t(e){if(lr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Gi(e)&&e.host||Kt(e);return Gi(t)?t.host:t}function bg(e){let t=$t(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ie(t)&&$i(t)?t:bg(t)}function St(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=bg(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=it(i);if(o){let u=us(a);return t.concat(a,a.visualViewport||[],$i(i)?i:[],u&&r?St(u):[])}return t.concat(i,St(i,[],r))}function us(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var qP,IP,jP,FP,LP,NP,DP,Sa=pt(()=>{qP=new Set(["inline","contents"]);IP=new Set(["table","td","th"]);jP=[":popover-open",":modal"];FP=["transform","translate","scale","rotate","perspective"],LP=["transform","translate","scale","rotate","perspective","filter"],NP=["paint","layout","strict","content"];DP=new Set(["html","body","#document"])});function ss(e,t,r){return We(e,bt(t,r))}function Ot(e,t){return typeof e=="function"?e(t):e}function Et(e){return e.split("-")[0]}function Lt(e){return e.split("-")[1]}function cs(e){return e==="x"?"y":"x"}function ls(e){return e==="y"?"height":"width"}function Nt(e){return WP.has(Et(e))?"y":"x"}function fs(e){return cs(Nt(e))}function tp(e,t,r){r===void 0&&(r=!1);let n=Lt(e),i=fs(e),o=ls(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ea(a)),[a,Ea(a)]}function wg(e){let t=Ea(e);return[Oa(e),t,Oa(t)]}function Oa(e){return e.replace(/start|end/g,t=>zP[t])}function VP(e,t,r){switch(e){case"top":case"bottom":return r?t?_g:yg:t?yg:_g;case"left":case"right":return t?UP:HP;default:return[]}}function xg(e,t,r,n){let i=Lt(e),o=VP(Et(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Oa)))),o}function Ea(e){return e.replace(/left|right|bottom|top/g,t=>BP[t])}function GP(e){return{top:0,right:0,bottom:0,left:0,...e}}function ds(e){return typeof e!="number"?GP(e):{top:e,right:e,bottom:e,left:e}}function kr(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 Qd,gg,ep,bt,We,Yn,Yr,Xt,BP,zP,WP,yg,_g,UP,HP,Yi=pt(()=>{Qd=["top","right","bottom","left"],gg=["start","end"],ep=Qd.reduce((e,t)=>e.concat(t,t+"-"+gg[0],t+"-"+gg[1]),[]),bt=Math.min,We=Math.max,Yn=Math.round,Yr=Math.floor,Xt=e=>({x:e,y:e}),BP={left:"right",right:"left",bottom:"top",top:"bottom"},zP={start:"end",end:"start"};WP=new Set(["top","bottom"]);yg=["left","right"],_g=["right","left"],UP=["top","bottom"],HP=["bottom","top"]});var $P,ps,Og,Xi,hs,ms,KP,Eg,Ag,Tg,Rg,YP,XP,Pg,ZP,JP,QP,eM,tM,rM,nM,Sg,iM,oM,rp,np,aM,uM,Zi,Mg,ip,op=pt(()=>{$P=["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])"],ps=$P.join(","),Og=typeof Element>"u",Xi=Og?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,hs=!Og&&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},ms=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},KP=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Eg=function(t,r,n){if(ms(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ps));return r&&Xi.call(t,ps)&&i.unshift(t),i=i.filter(n),i},Ag=function e(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!ms(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=Xi.call(a,ps);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var f=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),d=!ms(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(f&&d){var p=e(f===!0?a.children:f.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:a,candidates:p})}else o.unshift.apply(o,a.children)}}return i},Tg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||KP(t))&&!Tg(t)?0:t.tabIndex},YP=function(t,r){var n=Rg(t);return n<0&&r&&!Tg(t)?0:n},XP=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Pg=function(t){return t.tagName==="INPUT"},ZP=function(t){return Pg(t)&&t.type==="hidden"},JP=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},QP=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},eM=function(t){if(!t.name)return!0;var r=t.form||hs(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=QP(i,t.form);return!o||o===t},tM=function(t){return Pg(t)&&t.type==="radio"},rM=function(t){return tM(t)&&!eM(t)},nM=function(t){var r,n=t&&hs(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=hs(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},Sg=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},iM=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Xi.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Xi.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=hs(t);if(l&&!l.shadowRoot&&i(l)===!0)return Sg(t);t.assignedSlot?t=t.assignedSlot:!l&&s!==t.ownerDocument?t=s.host:t=l}t=u}if(nM(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Sg(t);return!1},oM=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 Xi.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},rp=function(t,r){return!(r.disabled||ms(r)||ZP(r)||iM(r,t)||JP(r)||oM(r))},np=function(t,r){return!(rM(r)||Rg(r)<0||!rp(t,r))},aM=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},uM=function e(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,l=YP(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(XP).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},Zi=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Ag([t],r.includeContainer,{filter:np.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:aM}):n=Eg(t,r.includeContainer,np.bind(null,r)),uM(n)},Mg=function(t,r){r=r||{};var n;return r.getShadowRoot?n=Ag([t],r.includeContainer,{filter:rp.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Eg(t,r.includeContainer,rp.bind(null,r)),n},ip=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Xi.call(t,ps)===!1?!1:np(r,t)}});function bs(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function gs(){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 cp(){return/apple/i.test(navigator.vendor)}function sp(){let e=/android/i;return e.test(bs())||e.test(gs())}function qg(){return bs().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Ig(){return gs().includes("jsdom/")}function Zt(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 Ke(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&Gi(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Jt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ys(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function jg(e){return e.matches("html,body")}function et(e){return e?.ownerDocument||document}function _s(e){return Ie(e)&&e.matches(sM)}function ws(e){return e?e.getAttribute("role")==="combobox"&&_s(e):!1}function Fg(e){if(!e||Ig())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Aa(e){return e?e.hasAttribute(Cg)?e:e.querySelector("["+Cg+"]")||e:null}function Xr(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,...Xr(e,i.id,r)])}function Lg(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),Xr(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function lp(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 Qe(e){e.preventDefault(),e.stopPropagation()}function Ng(e){return"nativeEvent"in e}function fp(e){return e.mozInputSource===0&&e.isTrusted?!0:sp()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function dp(e){return Ig()?!1:!sp()&&e.width===0&&e.height===0||sp()&&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 Zn(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Ye(e){let t=Ji.useRef(e);return me(()=>{t.current=e}),t}function Me(e){let t=Ji.useRef(()=>{});return mM(()=>{t.current=e}),Ji.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 vs(e,t,r){return Math.floor(e/t)!==r}function Xn(e,t){return t<0||t>=e.current.length}function Ta(e,t){return Je(e,{disabledIndices:t})}function xs(e,t){return Je(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Je(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&&Zr(e,a,i));return a}function pp(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,d=c;if(r.key===cM){if(f&&Qe(r),c===-1)d=s;else if(d=Je(e,{startingIndex:d,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<l||d<0)){let p=c%a,m=s%a,h=s-(m-p);m===p?d=s:d=m>p?h:h-a}Xn(e,d)&&(d=c)}if(r.key===lM&&(f&&Qe(r),c===-1?d=l:(d=Je(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(d=Je(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),Xn(e,d)&&(d=c)),n==="both"){let p=Yr(c/a);r.key===(o?ap:up)&&(f&&Qe(r),c%a!==a-1?(d=Je(e,{startingIndex:c,disabledIndices:u}),i&&vs(d,a,p)&&(d=Je(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(d=Je(e,{startingIndex:c-c%a-1,disabledIndices:u})),vs(d,a,p)&&(d=c)),r.key===(o?up:ap)&&(f&&Qe(r),c%a!==0?(d=Je(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&vs(d,a,p)&&(d=Je(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(d=Je(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),vs(d,a,p)&&(d=c));let m=Yr(s/a)===p;Xn(e,d)&&(i&&m?d=r.key===(o?up:ap)?s:Je(e,{startingIndex:c-c%a-1,disabledIndices:u}):d=c)}return d}function hp(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 d=0;d<l;d++)c.push(i+f+d*t);i%t+u<=t&&c.every(f=>n[f]==null)?(c.forEach(f=>{n[f]=a}),s=!0):i++}}),[...n]}function mp(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 vp(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function Zr(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 Dg(e,t){let r=Zi(e,Qi()),n=r.length;if(n===0)return;let i=Zt(et(e)),o=r.indexOf(i),a=o===-1?t===1?0:n-1:o+t;return r[a]}function bp(e){return Dg(et(e).body,1)||e}function gp(e){return Dg(et(e).body,-1)||e}function eo(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Ke(r,n)}function Bg(e){Zi(e,Qi()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function yp(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 Ji,kg,Cg,sM,ap,up,cM,lM,fM,dM,me,pM,hM,mM,Qi,zg=pt(()=>{Sa();Ji=L(qe(),1),kg=L(qe(),1);Yi();op();Cg="data-floating-ui-focusable",sM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ap="ArrowLeft",up="ArrowRight",cM="ArrowUp",lM="ArrowDown";fM=typeof document<"u",dM=function(){},me=fM?kg.useLayoutEffect:dM,pM={...Ji};hM=pM.useInsertionEffect,mM=hM||(e=>e());Qi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"})});var Ss=g((gX,Wg)=>{Wg.exports=JBrowseExports["react-dom"]});function Ug(e,t,r){let{reference:n,floating:i}=e,o=Nt(t),a=fs(t),u=ls(a),l=Et(t),s=o==="y",c=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[u]/2-i[u]/2,p;switch(l){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-i.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Lt(t)){case"start":p[a]-=d*(r&&s?-1:1);break;case"end":p[a]+=d*(r&&s?-1:1);break}return p}async function Jr(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:d=!1,padding:p=0}=Ot(t,e),m=ds(p),v=u[d?f==="floating"?"reference":"floating":f],y=kr(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(u.floating)),boundary:s,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(u.floating)),x=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},S=kr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:_,strategy:l}):w);return{top:(y.top-S.top+m.top)/x.y,bottom:(S.bottom-y.bottom+m.bottom)/x.y,left:(y.left-S.left+m.left)/x.x,right:(S.right-y.right+m.right)/x.x}}function vM(e,t,r){return(e?[...r.filter(i=>Lt(i)===e),...r.filter(i=>Lt(i)!==e)]:r.filter(i=>Et(i)===i)).filter(i=>e?Lt(i)===e||(t?Oa(i)!==i:!1):!0)}function Hg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vg(e){return Qd.some(t=>e[t]>=0)}function Zg(e){let t=bt(...e.map(o=>o.left)),r=bt(...e.map(o=>o.top)),n=We(...e.map(o=>o.right)),i=We(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function bM(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=>kr(Zg(i)))}async function gM(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Et(r),u=Lt(r),l=Nt(r)==="y",s=Qg.has(a)?-1:1,c=o&&l?-1:1,f=Ot(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return u&&typeof m=="number"&&(p=u==="end"?m*-1:m),l?{x:p*c,y:d*s}:{x:d*s,y:p*c}}var Gg,$g,Kg,Yg,Xg,Jg,Qg,ey,ty,ry,ny,iy=pt(()=>{Yi();Yi();Gg=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}=Ug(s,n,l),d=n,p={},m=0;for(let h=0;h<u.length;h++){let{name:v,fn:y}=u[h],{x:w,y:_,data:x,reset:S}=await y({x:c,y:f,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});c=w??c,f=_??f,p={...p,[v]:{...p[v],...x}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(s=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:c,y:f}=Ug(s,d,l)),h=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:p}};$g=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}=Ot(e,t)||{};if(s==null)return{};let f=ds(c),d={x:r,y:n},p=fs(i),m=ls(p),h=await a.getDimensions(s),v=p==="y",y=v?"top":"left",w=v?"bottom":"right",_=v?"clientHeight":"clientWidth",x=o.reference[m]+o.reference[p]-d[p]-o.floating[m],S=d[p]-o.reference[p],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),R=E?E[_]:0;(!R||!await(a.isElement==null?void 0:a.isElement(E)))&&(R=u.floating[_]||o.floating[m]);let T=x/2-S/2,C=R/2-h[m]/2-1,M=bt(f[y],C),q=bt(f[w],C),z=M,D=R-h[m]-q,A=R/2-h[m]/2+T,I=ss(z,A,D),W=!l.arrow&&Lt(i)!=null&&A!==I&&o.reference[m]/2-(A<z?M:q)-h[m]/2<0,j=W?A<z?A-z:A-D:0;return{[p]:d[p]+j,data:{[p]:I,centerOffset:A-I-j,...W&&{alignmentOffset:j}},reset:W}}});Kg=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:d=ep,autoAlignment:p=!0,...m}=Ot(e,t),h=f!==void 0||d===ep?vM(f||null,p,d):d,v=await Jr(t,m),y=((r=a.autoPlacement)==null?void 0:r.index)||0,w=h[y];if(w==null)return{};let _=tp(w,o,await(l.isRTL==null?void 0:l.isRTL(s.floating)));if(u!==w)return{reset:{placement:h[0]}};let x=[v[Et(w)],v[_[0]],v[_[1]]],S=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],E=h[y+1];if(E)return{data:{index:y+1,overflows:S},reset:{placement:E}};let R=S.map(M=>{let q=Lt(M.placement);return[M.placement,q&&c?M.overflows.slice(0,2).reduce((z,D)=>z+D,0):M.overflows[0],M.overflows]}).sort((M,q)=>M[1]-q[1]),C=((i=R.filter(M=>M[2].slice(0,Lt(M[0])?2:3).every(q=>q<=0))[0])==null?void 0:i[0])||R[0][0];return C!==u?{data:{index:y+1,overflows:S},reset:{placement:C}}:{}}}},Yg=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:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=Ot(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let y=Et(i),w=Nt(u),_=Et(u)===u,x=await(l.isRTL==null?void 0:l.isRTL(s.floating)),S=d||(_||!h?[Ea(u)]:wg(u)),E=m!=="none";!d&&E&&S.push(...xg(u,h,m,x));let R=[u,...S],T=await Jr(t,v),C=[],M=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&C.push(T[y]),f){let A=tp(i,a,x);C.push(T[A[0]],T[A[1]])}if(M=[...M,{placement:i,overflows:C}],!C.every(A=>A<=0)){var q,z;let A=(((q=o.flip)==null?void 0:q.index)||0)+1,I=R[A];if(I&&(!(f==="alignment"?w!==Nt(I):!1)||M.every(P=>Nt(P.placement)===w?P.overflows[0]>0:!0)))return{data:{index:A,overflows:M},reset:{placement:I}};let W=(z=M.filter(j=>j.overflows[0]<=0).sort((j,P)=>j.overflows[1]-P.overflows[1])[0])==null?void 0:z.placement;if(!W)switch(p){case"bestFit":{var D;let j=(D=M.filter(P=>{if(E){let F=Nt(P.placement);return F===w||F==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(F=>F>0).reduce((F,U)=>F+U,0)]).sort((P,F)=>P[1]-F[1])[0])==null?void 0:D[0];j&&(W=j);break}case"initialPlacement":W=u;break}if(i!==W)return{reset:{placement:W}}}return{}}}};Xg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Ot(e,t);switch(n){case"referenceHidden":{let o=await Jr(t,{...i,elementContext:"reference"}),a=Hg(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vg(a)}}}case"escaped":{let o=await Jr(t,{...i,altBoundary:!0}),a=Hg(o,r.floating);return{data:{escapedOffsets:a,escaped:Vg(a)}}}default:return{}}}}};Jg=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}=Ot(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),f=bM(c),d=kr(Zg(c)),p=ds(u);function m(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&s!=null)return f.find(v=>l>v.left-p.left&&l<v.right+p.right&&s>v.top-p.top&&s<v.bottom+p.bottom)||d;if(f.length>=2){if(Nt(r)==="y"){let M=f[0],q=f[f.length-1],z=Et(r)==="top",D=M.top,A=q.bottom,I=z?M.left:q.left,W=z?M.right:q.right,j=W-I,P=A-D;return{top:D,bottom:A,left:I,right:W,width:j,height:P,x:I,y:D}}let v=Et(r)==="left",y=We(...f.map(M=>M.right)),w=bt(...f.map(M=>M.left)),_=f.filter(M=>v?M.left===w:M.right===y),x=_[0].top,S=_[_.length-1].bottom,E=w,R=y,T=R-E,C=S-x;return{top:x,bottom:S,left:E,right:R,width:T,height:C,x:E,y:x}}return d}let h=await o.getElementRects({reference:{getBoundingClientRect:m},floating:n.floating,strategy:a});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Qg=new Set(["left","top"]);ey=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 gM(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}}}}},ty=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:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...l}=Ot(e,t),s={x:r,y:n},c=await Jr(t,l),f=Nt(Et(i)),d=cs(f),p=s[d],m=s[f];if(o){let v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",w=p+c[v],_=p-c[y];p=ss(w,p,_)}if(a){let v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=m+c[v],_=m-c[y];m=ss(w,m,_)}let h=u.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[d]:o,[f]:a}}}}}},ry=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}=Ot(e,t),c={x:r,y:n},f=Nt(i),d=cs(f),p=c[d],m=c[f],h=Ot(u,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let _=d==="y"?"height":"width",x=o.reference[d]-o.floating[_]+v.mainAxis,S=o.reference[d]+o.reference[_]-v.mainAxis;p<x?p=x:p>S&&(p=S)}if(s){var y,w;let _=d==="y"?"width":"height",x=Qg.has(Et(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);m<S?m=S:m>E&&(m=E)}return{[d]:p,[f]:m}}}},ny=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}=Ot(e,t),c=await Jr(t,s),f=Et(i),d=Lt(i),p=Nt(i)==="y",{width:m,height:h}=o.floating,v,y;f==="top"||f==="bottom"?(v=f,y=d===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(y=f,v=d==="end"?"top":"bottom");let w=h-c.top-c.bottom,_=m-c.left-c.right,x=bt(h-c[v],w),S=bt(m-c[y],_),E=!t.middlewareData.shift,R=x,T=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=w),E&&!d){let M=We(c.left,0),q=We(c.right,0),z=We(c.top,0),D=We(c.bottom,0);p?T=m-2*(M!==0||q!==0?M+q:We(c.left,c.right)):R=h-2*(z!==0||D!==0?z+D:We(c.top,c.bottom))}await l({...t,availableWidth:T,availableHeight:R});let C=await a.getDimensions(u.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}}});function uy(e){let t=vt(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=Ie(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=Yn(r)!==o||Yn(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function wp(e){return Te(e)?e:e.contextElement}function to(e){let t=wp(e);if(!Ie(t))return Xt(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=uy(t),a=(o?Yn(r.width):r.width)/n,u=(o?Yn(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function sy(e){let t=it(e);return!Ki()||!t.visualViewport?yM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _M(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==it(e)?!1:t}function Jn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=wp(e),a=Xt(1);t&&(n?Te(n)&&(a=to(n)):a=to(e));let u=_M(o,r,n)?sy(o):Xt(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 d=it(o),p=n&&Te(n)?it(n):n,m=d,h=us(m);for(;h&&n&&p!==m;){let v=to(h),y=h.getBoundingClientRect(),w=vt(h),_=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*v.x,x=y.top+(h.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,s*=v.y,c*=v.x,f*=v.y,l+=_,s+=x,m=it(h),h=us(m)}}return kr({width:c,height:f,x:l,y:s})}function xp(e,t){let r=xa(e).scrollLeft;return t?t.left+r:Jn(Kt(e)).left+r}function cy(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-(r?0:xp(e,n)),o=n.top+t.scrollTop;return{x:i,y:o}}function wM(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=Kt(n),u=t?wa(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},s=Xt(1),c=Xt(0),f=Ie(n);if((f||!f&&!o)&&((lr(n)!=="body"||$i(a))&&(l=xa(n)),Ie(n))){let p=Jn(n);s=to(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}let d=a&&!f&&!o?cy(a,l,!0):Xt(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-l.scrollLeft*s.x+c.x+d.x,y:r.y*s.y-l.scrollTop*s.y+c.y+d.y}}function xM(e){return Array.from(e.getClientRects())}function SM(e){let t=Kt(e),r=xa(e),n=e.ownerDocument.body,i=We(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=We(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+xp(e),u=-r.scrollTop;return vt(n).direction==="rtl"&&(a+=We(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function OM(e,t){let r=it(e),n=Kt(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;let s=Ki();(!s||s&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u,y:l}}function AM(e,t){let r=Jn(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Ie(e)?to(e):Xt(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 oy(e,t,r){let n;if(t==="viewport")n=OM(e,r);else if(t==="document")n=SM(Kt(e));else if(Te(t))n=AM(t,r);else{let i=sy(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return kr(n)}function ly(e,t){let r=$t(e);return r===t||!Te(r)||Yt(r)?!1:vt(r).position==="fixed"||ly(r,t)}function TM(e,t){let r=t.get(e);if(r)return r;let n=St(e,[],!1).filter(u=>Te(u)&&lr(u)!=="body"),i=null,o=vt(e).position==="fixed",a=o?$t(e):e;for(;Te(a)&&!Yt(a);){let u=vt(a),l=as(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&EM.has(i.position)||$i(a)&&!l&&ly(e,a))?n=n.filter(c=>c!==a):i=u,a=$t(a)}return t.set(e,n),n}function RM(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?wa(t)?[]:TM(t,this._c):[].concat(r),n],u=a[0],l=a.reduce((s,c)=>{let f=oy(t,c,i);return s.top=We(f.top,s.top),s.right=bt(f.right,s.right),s.bottom=bt(f.bottom,s.bottom),s.left=We(f.left,s.left),s},oy(t,u,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function PM(e){let{width:t,height:r}=uy(e);return{width:t,height:r}}function MM(e,t,r){let n=Ie(t),i=Kt(t),o=r==="fixed",a=Jn(e,!0,o,t),u={scrollLeft:0,scrollTop:0},l=Xt(0);function s(){l.x=xp(i)}if(n||!n&&!o)if((lr(t)!=="body"||$i(i))&&(u=xa(t)),n){let p=Jn(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&s();o&&!n&&i&&s();let c=i&&!n&&!o?cy(i,u):Xt(0),f=a.left+u.scrollLeft-l.x-c.x,d=a.top+u.scrollTop-l.y-c.y;return{x:f,y:d,width:a.width,height:a.height}}function _p(e){return vt(e).position==="static"}function ay(e,t){if(!Ie(e)||vt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Kt(e)===r&&(r=r.ownerDocument.body),r}function fy(e,t){let r=it(e);if(wa(e))return r;if(!Ie(e)){let i=$t(e);for(;i&&!Yt(i);){if(Te(i)&&!_p(i))return i;i=$t(i)}return r}let n=ay(e,t);for(;n&&mg(n)&&_p(n);)n=ay(n,t);return n&&Yt(n)&&_p(n)&&!as(n)?r:n||vg(e)||r}function kM(e){return vt(e).direction==="rtl"}function dy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qM(e,t){let r=null,n,i=Kt(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:d,height:p}=s;if(u||t(),!d||!p)return;let m=Yr(f),h=Yr(i.clientWidth-(c+d)),v=Yr(i.clientHeight-(f+p)),y=Yr(c),_={rootMargin:-m+"px "+-h+"px "+-v+"px "+-y+"px",threshold:We(0,bt(1,l))||1},x=!0;function S(E){let R=E[0].intersectionRatio;if(R!==l){if(!x)return a();R?a(!1,R):n=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!dy(s,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 Sp(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=wp(e),c=i||o?[...s?St(s):[],...St(t)]:[];c.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),o&&y.addEventListener("resize",r)});let f=s&&u?qM(s,r):null,d=-1,p=null;a&&(p=new ResizeObserver(y=>{let[w]=y;w&&w.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),r()}),s&&!l&&p.observe(s),p.observe(t));let m,h=l?Jn(e):null;l&&v();function v(){let y=Jn(e);h&&!dy(h,y)&&r(),h=y,m=requestAnimationFrame(v)}return r(),()=>{var y;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),f?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var yM,EM,CM,Os,Qn,py,hy,my,vy,by,gy,Op,yy,_y,Ra,Ep=pt(()=>{iy();Yi();Sa();Sa();yM=Xt(0);EM=new Set(["absolute","fixed"]);CM=async function(e){let t=this.getOffsetParent||fy,r=this.getDimensions,n=await r(e.floating);return{reference:MM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};Os={convertOffsetParentRelativeRectToViewportRelativeRect:wM,getDocumentElement:Kt,getClippingRect:RM,getOffsetParent:fy,getElementRects:CM,getClientRects:xM,getDimensions:PM,getScale:to,isElement:Te,isRTL:kM};Qn=Jr,py=ey,hy=Kg,my=ty,vy=Yg,by=ny,gy=Xg,Op=$g,yy=Jg,_y=ry,Ra=(e,t,r)=>{let n=new Map,i={platform:Os,...r},o={...i.platform,_c:n};return Gg(e,t,{...i,platform:o})}});function As(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(!As(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)&&!As(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Oy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wy(e,t){let r=Oy(e);return Math.round(t*r)/r}function Ap(e){let t=Ge.useRef(e);return Es(()=>{t.current=e}),t}function Ey(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]=Ge.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=Ge.useState(n);As(d,n)||p(n);let[m,h]=Ge.useState(null),[v,y]=Ge.useState(null),w=Ge.useCallback(P=>{P!==E.current&&(E.current=P,h(P))},[]),_=Ge.useCallback(P=>{P!==R.current&&(R.current=P,y(P))},[]),x=o||m,S=a||v,E=Ge.useRef(null),R=Ge.useRef(null),T=Ge.useRef(c),C=l!=null,M=Ap(l),q=Ap(i),z=Ap(s),D=Ge.useCallback(()=>{if(!E.current||!R.current)return;let P={placement:t,strategy:r,middleware:d};q.current&&(P.platform=q.current),Ra(E.current,R.current,P).then(F=>{let U={...F,isPositioned:z.current!==!1};A.current&&!As(T.current,U)&&(T.current=U,Sy.flushSync(()=>{f(U)}))})},[d,t,r,q,z]);Es(()=>{s===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[s]);let A=Ge.useRef(!1);Es(()=>(A.current=!0,()=>{A.current=!1}),[]),Es(()=>{if(x&&(E.current=x),S&&(R.current=S),x&&S){if(M.current)return M.current(x,S,D);D()}},[x,S,D,M,C]);let I=Ge.useMemo(()=>({reference:E,floating:R,setReference:w,setFloating:_}),[w,_]),W=Ge.useMemo(()=>({reference:x,floating:S}),[x,S]),j=Ge.useMemo(()=>{let P={position:r,left:0,top:0};if(!W.floating)return P;let F=wy(W.floating,c.x),U=wy(W.floating,c.y);return u?{...P,transform:"translate("+F+"px, "+U+"px)",...Oy(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:U}},[r,u,W.floating,c.x,c.y]);return Ge.useMemo(()=>({...c,update:D,refs:I,elements:W,floatingStyles:j}),[c,D,I,W,j])}var Ge,xy,Sy,IM,jM,Es,FM,Ts,Ay,Ty,Ry,Py,My,Cy,ky,qy,Tp=pt(()=>{Ep();Ep();Ge=L(qe(),1),xy=L(qe(),1),Sy=L(Ss(),1),IM=typeof document<"u",jM=function(){},Es=IM?xy.useLayoutEffect:jM;FM=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?Op({element:n.current,padding:i}).fn(r):{}:n?Op({element:n,padding:i}).fn(r):{}}}},Ts=(e,t)=>({...py(e),options:[e,t]}),Ay=(e,t)=>({...my(e),options:[e,t]}),Ty=(e,t)=>({..._y(e),options:[e,t]}),Ry=(e,t)=>({...vy(e),options:[e,t]}),Py=(e,t)=>({...by(e),options:[e,t]}),My=(e,t)=>({...hy(e),options:[e,t]}),Cy=(e,t)=>({...gy(e),options:[e,t]}),ky=(e,t)=>({...yy(e),options:[e,t]}),qy=(e,t)=>({...FM(e),options:[e,t]})});var O_={};Yu(O_,{Composite:()=>DM,CompositeItem:()=>BM,FloatingArrow:()=>VM,FloatingDelayGroup:()=>XM,FloatingFocusManager:()=>lC,FloatingList:()=>o_,FloatingNode:()=>$M,FloatingOverlay:()=>dC,FloatingPortal:()=>oC,FloatingTree:()=>KM,NextFloatingDelayGroup:()=>JM,arrow:()=>qy,autoPlacement:()=>My,autoUpdate:()=>Sp,computePosition:()=>Ra,detectOverflow:()=>Qn,flip:()=>Ry,getOverflowAncestors:()=>St,hide:()=>Cy,inline:()=>ky,inner:()=>MC,limitShift:()=>Ty,offset:()=>Ts,platform:()=>Os,safePolygon:()=>qC,shift:()=>Ay,size:()=>Py,useClick:()=>hC,useClientPoint:()=>vC,useDelayGroup:()=>ZM,useDelayGroupContext:()=>m_,useDismiss:()=>yC,useFloating:()=>_C,useFloatingNodeId:()=>GM,useFloatingParentNodeId:()=>ni,useFloatingPortalNode:()=>y_,useFloatingRootContext:()=>w_,useFloatingTree:()=>ii,useFocus:()=>wC,useHover:()=>YM,useId:()=>io,useInnerOffset:()=>CC,useInteractions:()=>xC,useListItem:()=>a_,useListNavigation:()=>OC,useMergeRefs:()=>n_,useNextDelayGroup:()=>QM,useRole:()=>AC,useTransitionStatus:()=>x_,useTransitionStyles:()=>RC,useTypeahead:()=>PC});function n_(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 LM(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 o_(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(LM).forEach((f,d)=>{s.set(f,d)}),s},[i]);return(0,Re.jsx)(i_.Provider,{value:O.useMemo(()=>({register:a,unregister:u,map:l,elementsRef:r,labelsRef:n}),[a,u,l,r,n]),children:t})}function a_(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=O.useContext(i_),[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 d;let p=t!==void 0;a.current[u]=p?t:(d=f?.textContent)!=null?d: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 u_(e,t){return typeof e=="function"?e(t):e?O.cloneElement(e,t):(0,Re.jsx)("div",{...t})}function UM(){let[e,t]=O.useState(()=>Fy?Ly():void 0);return me(()=>{e==null&&t(Ly())},[]),O.useEffect(()=>{Fy=!0},[]),e}function f_(){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 GM(e){let t=io(),r=ii(),n=ni(),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 $M(e){let{children:t,id:r}=e,n=ni();return(0,Re.jsx)(d_.Provider,{value:O.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function KM(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(()=>f_());return(0,Re.jsx)(p_.Provider,{value:O.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function ri(e){return"data-floating-ui-"+e}function tt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Pa(e,t,r){if(r&&!Zn(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 Pp(e){return typeof e=="function"?e():e}function YM(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:d=!0}=t,p=ii(),m=ni(),h=Ye(s),v=Ye(l),y=Ye(r),w=Ye(f),_=O.useRef(),x=O.useRef(-1),S=O.useRef(),E=O.useRef(-1),R=O.useRef(!0),T=O.useRef(!1),C=O.useRef(()=>{}),M=O.useRef(!1),q=Me(()=>{var j;let P=(j=i.current.openEvent)==null?void 0:j.type;return P?.includes("mouse")&&P!=="mousedown"});O.useEffect(()=>{if(!u)return;function j(P){let{open:F}=P;F||(tt(x),tt(E),R.current=!0,M.current=!1)}return o.on("openchange",j),()=>{o.off("openchange",j)}},[u,o]),O.useEffect(()=>{if(!u||!h.current||!r)return;function j(F){q()&&n(!1,F,"hover")}let P=et(a.floating).documentElement;return P.addEventListener("mouseleave",j),()=>{P.removeEventListener("mouseleave",j)}},[a.floating,r,n,u,h,q]);let z=O.useCallback(function(j,P,F){P===void 0&&(P=!0),F===void 0&&(F="hover");let U=Pa(v.current,"close",_.current);U&&!S.current?(tt(x),x.current=window.setTimeout(()=>n(!1,j,F),U)):P&&(tt(x),n(!1,j,F))},[v,n]),D=Me(()=>{C.current(),S.current=void 0}),A=Me(()=>{if(T.current){let j=et(a.floating).body;j.style.pointerEvents="",j.removeAttribute(Ny),T.current=!1}}),I=Me(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);O.useEffect(()=>{if(!u)return;function j(J){if(tt(x),R.current=!1,c&&!Zn(_.current)||Pp(w.current)>0&&!Pa(v.current,"open"))return;let G=Pa(v.current,"open",_.current);G?x.current=window.setTimeout(()=>{y.current||n(!0,J,"hover")},G):r||n(!0,J,"hover")}function P(J){if(I()){A();return}C.current();let G=et(a.floating);if(tt(E),M.current=!1,h.current&&i.current.floatingContext){r||tt(x),S.current=h.current({...i.current.floatingContext,tree:p,x:J.clientX,y:J.clientY,onClose(){A(),D(),I()||z(J,!0,"safe-polygon")}});let N=S.current;G.addEventListener("mousemove",N),C.current=()=>{G.removeEventListener("mousemove",N)};return}(_.current==="touch"?!Ke(a.floating,J.relatedTarget):!0)&&z(J)}function F(J){I()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:J.clientX,y:J.clientY,onClose(){A(),D(),I()||z(J)}})(J))}function U(){tt(x)}function ye(J){I()||z(J,!1)}if(Te(a.domReference)){let J=a.domReference,G=a.floating;return r&&J.addEventListener("mouseleave",F),d&&J.addEventListener("mousemove",j,{once:!0}),J.addEventListener("mouseenter",j),J.addEventListener("mouseleave",P),G&&(G.addEventListener("mouseleave",F),G.addEventListener("mouseenter",U),G.addEventListener("mouseleave",ye)),()=>{r&&J.removeEventListener("mouseleave",F),d&&J.removeEventListener("mousemove",j),J.removeEventListener("mouseenter",j),J.removeEventListener("mouseleave",P),G&&(G.removeEventListener("mouseleave",F),G.removeEventListener("mouseenter",U),G.removeEventListener("mouseleave",ye))}}},[a,u,e,c,d,z,D,A,n,r,y,p,v,h,i,I,w]),me(()=>{var j;if(u&&r&&(j=h.current)!=null&&(j=j.__options)!=null&&j.blockPointerEvents&&q()){T.current=!0;let F=a.floating;if(Te(a.domReference)&&F){var P;let U=et(a.floating).body;U.setAttribute(Ny,"");let ye=a.domReference,J=p==null||(P=p.nodesRef.current.find(G=>G.id===m))==null||(P=P.context)==null?void 0:P.elements.floating;return J&&(J.style.pointerEvents=""),U.style.pointerEvents="none",ye.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{U.style.pointerEvents="",ye.style.pointerEvents="",F.style.pointerEvents=""}}}},[u,r,m,a,p,h,q]),me(()=>{r||(_.current=void 0,M.current=!1,D(),A())},[r,D,A]),O.useEffect(()=>()=>{D(),tt(x),tt(E),A()},[u,a.domReference,D,A]);let W=O.useMemo(()=>{function j(P){_.current=P.pointerType}return{onPointerDown:j,onPointerEnter:j,onMouseMove(P){let{nativeEvent:F}=P;function U(){!R.current&&!y.current&&n(!0,F,"hover")}c&&!Zn(_.current)||r||Pp(w.current)===0||M.current&&P.movementX**2+P.movementY**2<2||(tt(E),_.current==="touch"?U():(M.current=!0,E.current=window.setTimeout(U,Pp(w.current))))}}},[c,n,r,y,w]);return O.useMemo(()=>u?{reference:W}:{},[u,W])}function XM(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,Re.jsx)(h_.Provider,{value:O.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function ZM(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,l=m_(),{currentId:s,setCurrentId:c,initialDelay:f,setState:d,timeoutMs:p}=l;return me(()=>{a&&s&&(d({delay:{open:1,close:Pa(f,"close")}}),s!==u&&n(!1))},[a,u,n,d,s,f]),me(()=>{function m(){n(!1),d({delay:f,currentId:null})}if(a&&s&&!r&&s===u){if(p){let h=window.setTimeout(m,p);return()=>{clearTimeout(h)}}m()}},[a,r,d,s,u,n,f,p]),me(()=>{a&&(c===jp||!r||c(u))},[a,r,c,u]),l}function JM(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,Re.jsx)(v_.Provider,{value:O.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:n,currentContextRef:u,timeoutIdRef:l}),[n]),children:t})}function QM(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{enabled:o=!0}=t,a=O.useContext(v_),{currentIdRef:u,delayRef:l,timeoutMs:s,initialDelayRef:c,currentContextRef:f,hasProvider:d,timeoutIdRef:p}=a,[m,h]=O.useState(!1);return me(()=>{function v(){var y;h(!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(h(!1),s)return p.current=window.setTimeout(v,s),()=>{clearTimeout(p.current)};v()}},[o,r,i,u,l,s,c,f,p]),me(()=>{if(!o||!r)return;let v=f.current,y=u.current;f.current={onOpenChange:n,setIsInstantPhase:h},u.current=i,l.current={open:0,close:Pa(c.current,"close")},y!==null&&y!==i?(tt(p),h(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1)):(h(!1),v?.setIsInstantPhase(!1))},[o,r,i,n,u,l,s,c,f,p]),me(()=>()=>{f.current=null},[f]),O.useMemo(()=>({hasProvider:d,delayRef:l,isInstantPhase:m}),[d,l,m])}function ei(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(Dy);let o=()=>e?.focus({preventScroll:r});i?o():Dy=requestAnimationFrame(o)}function Mp(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&Gi(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function eC(e){return"composedPath"in e?e.composedPath()[0]:e.target}function tC(e){return e?.ownerDocument||document}function By(e){return e==="inert"?no.inert:e==="aria-hidden"?no["aria-hidden"]:no.none}function iC(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=nC(t,e),u=new Set,l=new Set(a),s=[];Ps[i]||(Ps[i]=new WeakMap);let c=Ps[i];a.forEach(f),d(t),u.clear();function f(p){!p||u.has(p)||(u.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||[].forEach.call(p.children,m=>{if(lr(m)!=="script")if(u.has(m))d(m);else{let h=o?m.getAttribute(o):null,v=h!==null&&h!=="false",y=By(o),w=(y.get(m)||0)+1,_=(c.get(m)||0)+1;y.set(m,w),c.set(m,_),s.push(m),w===1&&v&&Rs.add(m),_===1&&m.setAttribute(i,""),!v&&o&&m.setAttribute(o,o==="inert"?"":"true")}})}return Cp++,()=>{s.forEach(p=>{let m=By(o),v=(m.get(p)||0)-1,y=(c.get(p)||0)-1;m.set(p,v),c.set(p,y),v||(!Rs.has(p)&&o&&p.removeAttribute(o),Rs.delete(p)),y||p.removeAttribute(i)}),Cp--,Cp||(no.inert=new WeakMap,no["aria-hidden"]=new WeakMap,no.none=new WeakMap,Rs=new WeakSet,Ps={})}}function zy(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=tC(e[0]).body;return iC(e.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,t,r)}function y_(e){e===void 0&&(e={});let{id:t,root:r}=e,n=io(),i=__(),[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(Wy,""),l.appendChild(s),u.current=s,a(s)},[t,n]),me(()=>{if(r===null||!n||u.current)return;let l=r||i?.portalNode;l&&!os(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(Wy,""),l=s||l,l.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function oC(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=y_({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),d=a?.modal,p=a?.open,m=!!a&&!a.modal&&a.open&&i&&!!(n||o);return O.useEffect(()=>{if(!o||!i||d)return;function h(v){o&&eo(v)&&(v.type==="focusin"?yp:Bg)(o)}return o.addEventListener("focusin",h,!0),o.addEventListener("focusout",h,!0),()=>{o.removeEventListener("focusin",h,!0),o.removeEventListener("focusout",h,!0)}},[o,i,d]),O.useEffect(()=>{o&&(p||yp(o))},[p,o]),(0,Re.jsxs)(g_.Provider,{value:O.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:f,portalNode:o,setFocusManagerState:u}),[i,o]),children:[m&&o&&(0,Re.jsx)(ks,{"data-type":"outside",ref:l,onFocus:h=>{if(eo(h,o)){var v;(v=c.current)==null||v.focus()}else{let y=a?a.domReference:null,w=gp(y);w?.focus()}}}),m&&o&&(0,Re.jsx)("span",{"aria-owns":o.id,style:qs}),o&&ti.createPortal(t,o),m&&o&&(0,Re.jsx)(ks,{"data-type":"outside",ref:s,onFocus:h=>{if(eo(h,o)){var v;(v=f.current)==null||v.focus()}else{let y=a?a.domReference:null,w=bp(y);w?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,h.nativeEvent,"focus-out")}}})]})}function Uy(e){return O.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}function Fp(){Qr=Qr.filter(e=>e.isConnected)}function uC(e){Fp(),e&&lr(e)!=="body"&&(Qr.push(e),Qr.length>aC&&(Qr=Qr.slice(-20)))}function Hy(){return Fp(),Qr[Qr.length-1]}function sC(e){let t=Qi();return ip(e,t)?e:Zi(e,t)[0]||e}function Vy(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;let n=Qi(),o=Mg(e,n).filter(u=>{let l=u.getAttribute("data-tabindex")||"";return ip(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 lC(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:d=!1,getInsideElements:p=()=>[]}=e,{open:m,onOpenChange:h,events:v,dataRef:y,elements:{domReference:w,floating:_}}=t,x=Me(()=>{var Z;return(Z=y.current.floatingContext)==null?void 0:Z.nodeId}),S=Me(p),E=typeof a=="number"&&a<0,R=ws(w)&&E,T=rC(),C=T?o:!0,M=!C||T&&d,q=Ye(i),z=Ye(a),D=Ye(u),A=ii(),I=__(),W=O.useRef(null),j=O.useRef(null),P=O.useRef(!1),F=O.useRef(!1),U=O.useRef(-1),ye=O.useRef(-1),J=I!=null,G=Aa(_),we=Me(function(Z){return Z===void 0&&(Z=G),Z?Zi(Z,Qi()):[]}),N=Me(Z=>{let ue=we(Z);return q.current.map(ee=>w&&ee==="reference"?w:G&&ee==="floating"?G:ue).filter(Boolean).flat()});O.useEffect(()=>{if(n||!s)return;function Z(ee){if(ee.key==="Tab"){Ke(G,Zt(et(G)))&&we().length===0&&!R&&Qe(ee);let fe=N(),he=Jt(ee);q.current[0]==="reference"&&he===w&&(Qe(ee),ee.shiftKey?ei(fe[fe.length-1]):ei(fe[1])),q.current[1]==="floating"&&he===G&&ee.shiftKey&&(Qe(ee),ei(fe[0]))}}let ue=et(G);return ue.addEventListener("keydown",Z),()=>{ue.removeEventListener("keydown",Z)}},[n,w,G,s,q,R,we,N]),O.useEffect(()=>{if(n||!_)return;function Z(ue){let ee=Jt(ue),he=we().indexOf(ee);he!==-1&&(U.current=he)}return _.addEventListener("focusin",Z),()=>{_.removeEventListener("focusin",Z)}},[n,_,we]),O.useEffect(()=>{if(n||!f)return;function Z(){F.current=!0,setTimeout(()=>{F.current=!1})}function ue(he){let re=he.relatedTarget,Y=he.currentTarget,ie=Jt(he);queueMicrotask(()=>{let ce=x(),ae=!(Ke(w,re)||Ke(_,re)||Ke(re,_)||Ke(I?.portalNode,re)||re!=null&&re.hasAttribute(ri("focus-guard"))||A&&(Xr(A.nodesRef.current,ce).find(B=>{var $,H;return Ke(($=B.context)==null?void 0:$.elements.floating,re)||Ke((H=B.context)==null?void 0:H.elements.domReference,re)})||lp(A.nodesRef.current,ce).find(B=>{var $,H,se;return[($=B.context)==null?void 0:$.elements.floating,Aa((H=B.context)==null?void 0:H.elements.floating)].includes(re)||((se=B.context)==null?void 0:se.elements.domReference)===re})));if(Y===w&&G&&Vy(G,q),l&&Y!==w&&!(ie!=null&&ie.isConnected)&&Zt(et(G))===et(G).body){Ie(G)&&G.focus();let B=U.current,$=we(),H=$[B]||$[$.length-1]||G;Ie(H)&&H.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(R||!s)&&re&&ae&&!F.current&&re!==Hy()&&(P.current=!0,h(!1,he,"focus-out"))})}let ee=!!(!A&&I);function fe(){tt(ye),y.current.insideReactTree=!0,ye.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(_&&Ie(w))return w.addEventListener("focusout",ue),w.addEventListener("pointerdown",Z),_.addEventListener("focusout",ue),ee&&_.addEventListener("focusout",fe,!0),()=>{w.removeEventListener("focusout",ue),w.removeEventListener("pointerdown",Z),_.removeEventListener("focusout",ue),ee&&_.removeEventListener("focusout",fe,!0)}},[n,w,_,G,s,A,I,h,f,l,we,R,x,q,y]);let Q=O.useRef(null),oe=O.useRef(null),ne=Uy([Q,I?.beforeInsideRef]),K=Uy([oe,I?.afterInsideRef]);O.useEffect(()=>{var Z,ue;if(n||!_)return;let ee=Array.from((I==null||(Z=I.portalNode)==null?void 0:Z.querySelectorAll("["+ri("portal")+"]"))||[]),he=(ue=(A?lp(A.nodesRef.current,x()):[]).find(ie=>{var ce;return ws(((ce=ie.context)==null?void 0:ce.elements.domReference)||null)}))==null||(ue=ue.context)==null?void 0:ue.elements.domReference,re=[_,he,...ee,...S(),W.current,j.current,Q.current,oe.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,q.current.includes("reference")||R?w:null].filter(ie=>ie!=null),Y=s||R?zy(re,!M,M):zy(re);return()=>{Y()}},[n,w,_,s,q,I,R,C,M,A,x,S]),me(()=>{if(n||!Ie(G))return;let Z=et(G),ue=Zt(Z);queueMicrotask(()=>{let ee=N(G),fe=z.current,he=(typeof fe=="number"?ee[fe]:fe.current)||G,re=Ke(G,ue);!E&&!re&&m&&ei(he,{preventScroll:he===G})})},[n,m,G,E,N,z]),me(()=>{if(n||!G)return;let Z=et(G),ue=Zt(Z);uC(ue);function ee(re){let{reason:Y,event:ie,nested:ce}=re;if(["hover","safe-polygon"].includes(Y)&&ie.type==="mouseleave"&&(P.current=!0),Y==="outside-press")if(ce)P.current=!1;else if(fp(ie)||dp(ie))P.current=!1;else{let ae=!1;document.createElement("div").focus({get preventScroll(){return ae=!0,!1}}),ae?P.current=!1:P.current=!0}}v.on("openchange",ee);let fe=Z.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,qs),J&&w&&w.insertAdjacentElement("afterend",fe);function he(){if(typeof D.current=="boolean"){let re=w||Hy();return re&&re.isConnected?re:fe}return D.current.current||fe}return()=>{v.off("openchange",ee);let re=Zt(Z),Y=Ke(_,re)||A&&Xr(A.nodesRef.current,x(),!1).some(ce=>{var ae;return Ke((ae=ce.context)==null?void 0:ae.elements.floating,re)}),ie=he();queueMicrotask(()=>{let ce=sC(ie);D.current&&!P.current&&Ie(ce)&&(!(ce!==re&&re!==Z.body)||Y)&&ce.focus({preventScroll:!0}),fe.remove()})}},[n,_,G,D,y,v,A,J,w,x]),O.useEffect(()=>(queueMicrotask(()=>{P.current=!1}),()=>{queueMicrotask(Fp)}),[n]),me(()=>{if(!n&&I)return I.setFocusManagerState({modal:s,closeOnFocusOut:f,open:m,onOpenChange:h,domReference:w}),()=>{I.setFocusManagerState(null)}},[n,I,s,m,h,f,w]),me(()=>{n||G&&Vy(G,q)},[n,G,q]);function te(Z){return n||!c||!s?null:(0,Re.jsx)(cC,{ref:Z==="start"?W:j,onClick:ue=>h(!1,ue.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let de=!n&&C&&(s?!R:!0)&&(J||s);return(0,Re.jsxs)(Re.Fragment,{children:[de&&(0,Re.jsx)(ks,{"data-type":"inside",ref:ne,onFocus:Z=>{if(s){let ee=N();ei(i[0]==="reference"?ee[0]:ee[ee.length-1])}else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(P.current=!1,eo(Z,I.portalNode)){let ee=bp(w);ee?.focus()}else{var ue;(ue=I.beforeOutsideRef.current)==null||ue.focus()}}}),!R&&te("start"),r,te("end"),de&&(0,Re.jsx)(ks,{"data-type":"inside",ref:K,onFocus:Z=>{if(s)ei(N()[0]);else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(f&&(P.current=!0),eo(Z,I.portalNode)){let ee=gp(w);ee?.focus()}else{var ue;(ue=I.afterOutsideRef.current)==null||ue.focus()}}})]})}function fC(){let e=bs(),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(Gy,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(Gy),t&&(Object.assign(r,{position:"",top:"",left:"",right:""}),window.scrollTo(a,u))}}function Ky(e){return Ie(e.target)&&e.target.tagName==="BUTTON"}function pC(e){return Ie(e.target)&&e.target.tagName==="A"}function Yy(e){return _s(e)}function hC(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,d=O.useRef(),p=O.useRef(!1),m=O.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){let v=d.current;h.button===0&&u!=="click"&&(Zn(v,!0)&&s||(r&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){let v=d.current;if(u==="mousedown"&&d.current){d.current=void 0;return}Zn(v,!0)&&s||(r&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!c||Ky(h))&&(h.key===" "&&!Yy(o)&&(h.preventDefault(),p.current=!0),!pC(h)&&h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!c||Ky(h)||Yy(o)||h.key===" "&&p.current&&(p.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,f,l]);return O.useMemo(()=>a?{reference:m}:{},[a,m])}function mC(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,d=a.x,p=a.y;return r==null&&t.x&&u&&(r=a.x-t.x),n==null&&t.y&&l&&(n=a.y-t.y),d-=r||0,p-=n||0,c=0,f=0,!i||s?(c=t.axis==="y"?a.width:0,f=t.axis==="x"?a.height:0,d=u&&t.x!=null?t.x:d,p=l&&t.y!=null?t.y:p):i&&!s&&(f=t.axis==="x"?a.height:f,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:f,x:d,y:p,top:p,right:d+c,bottom:p+f,left:d}}}}function Xy(e){return e!=null&&e.clientX!=null}function vC(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),d=O.useRef(null),[p,m]=O.useState(),[h,v]=O.useState([]),y=Me((E,R)=>{f.current||n.current.openEvent&&!Xy(n.current.openEvent)||a.setPositionReference(mC(o,{x:E,y:R,axis:l,dataRef:n,pointerType:p}))}),w=Me(E=>{s!=null||c!=null||(r?d.current||v([]):y(E.clientX,E.clientY))}),_=Zn(p)?i:r,x=O.useCallback(()=>{if(!_||!u||s!=null||c!=null)return;let E=it(i);function R(T){let C=Jt(T);Ke(i,C)?(E.removeEventListener("mousemove",R),d.current=null):y(T.clientX,T.clientY)}if(!n.current.openEvent||Xy(n.current.openEvent)){E.addEventListener("mousemove",R);let T=()=>{E.removeEventListener("mousemove",R),d.current=null};return d.current=T,T}a.setPositionReference(o)},[_,u,s,c,i,n,a,o,y]);O.useEffect(()=>x(),[x,h]),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(R){let{pointerType:T}=R;m(T)}return{onPointerDown:E,onPointerEnter:E,onMouseMove:w,onMouseEnter:w}},[w]);return O.useMemo(()=>u?{reference:S}:{},[u,S])}function yC(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:d=!1,bubbles:p,capture:m}=t,h=ii(),v=Me(typeof l=="function"?l:()=>!1),y=typeof l=="function"?v:l,w=O.useRef(!1),{escapeKey:_,outsidePress:x}=Zy(p),{escapeKey:S,outsidePress:E}=Zy(m),R=O.useRef(!1),T=Me(A=>{var I;if(!r||!a||!u||A.key!=="Escape"||R.current)return;let W=(I=o.current.floatingContext)==null?void 0:I.nodeId,j=h?Xr(h.nodesRef.current,W):[];if(!_&&(A.stopPropagation(),j.length>0)){let P=!0;if(j.forEach(F=>{var U;if((U=F.context)!=null&&U.open&&!F.context.dataRef.current.__escapeKeyBubbles){P=!1;return}}),!P)return}n(!1,Ng(A)?A.nativeEvent:A,"escape-key")}),C=Me(A=>{var I;let W=()=>{var j;T(A),(j=Jt(A))==null||j.removeEventListener("keydown",W)};(I=Jt(A))==null||I.addEventListener("keydown",W)}),M=Me(A=>{var I;let W=o.current.insideReactTree;o.current.insideReactTree=!1;let j=w.current;if(w.current=!1,s==="click"&&j||W||typeof y=="function"&&!y(A))return;let P=Jt(A),F="["+ri("inert")+"]",U=et(i.floating).querySelectorAll(F),ye=Te(P)?P:null;for(;ye&&!Yt(ye);){let N=$t(ye);if(Yt(N)||!Te(N))break;ye=N}if(U.length&&Te(P)&&!jg(P)&&!Ke(P,i.floating)&&Array.from(U).every(N=>!Ke(ye,N)))return;if(Ie(P)&&D){let N=Yt(P),Q=vt(P),oe=/auto|scroll/,ne=N||oe.test(Q.overflowX),K=N||oe.test(Q.overflowY),te=ne&&P.clientWidth>0&&P.scrollWidth>P.clientWidth,de=K&&P.clientHeight>0&&P.scrollHeight>P.clientHeight,Z=Q.direction==="rtl",ue=de&&(Z?A.offsetX<=P.offsetWidth-P.clientWidth:A.offsetX>P.clientWidth),ee=te&&A.offsetY>P.clientHeight;if(ue||ee)return}let J=(I=o.current.floatingContext)==null?void 0:I.nodeId,G=h&&Xr(h.nodesRef.current,J).some(N=>{var Q;return ys(A,(Q=N.context)==null?void 0:Q.elements.floating)});if(ys(A,i.floating)||ys(A,i.domReference)||G)return;let we=h?Xr(h.nodesRef.current,J):[];if(we.length>0){let N=!0;if(we.forEach(Q=>{var oe;if((oe=Q.context)!=null&&oe.open&&!Q.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}n(!1,A,"outside-press")}),q=Me(A=>{var I;let W=()=>{var j;M(A),(j=Jt(A))==null||j.removeEventListener(s,W)};(I=Jt(A))==null||I.addEventListener(s,W)});O.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=_,o.current.__outsidePressBubbles=x;let A=-1;function I(U){n(!1,U,"ancestor-scroll")}function W(){window.clearTimeout(A),R.current=!0}function j(){A=window.setTimeout(()=>{R.current=!1},Ki()?5:0)}let P=et(i.floating);u&&(P.addEventListener("keydown",S?C:T,S),P.addEventListener("compositionstart",W),P.addEventListener("compositionend",j)),y&&P.addEventListener(s,E?q:M,E);let F=[];return d&&(Te(i.domReference)&&(F=St(i.domReference)),Te(i.floating)&&(F=F.concat(St(i.floating))),!Te(i.reference)&&i.reference&&i.reference.contextElement&&(F=F.concat(St(i.reference.contextElement)))),F=F.filter(U=>{var ye;return U!==((ye=P.defaultView)==null?void 0:ye.visualViewport)}),F.forEach(U=>{U.addEventListener("scroll",I,{passive:!0})}),()=>{u&&(P.removeEventListener("keydown",S?C:T,S),P.removeEventListener("compositionstart",W),P.removeEventListener("compositionend",j)),y&&P.removeEventListener(s,E?q:M,E),F.forEach(U=>{U.removeEventListener("scroll",I)}),window.clearTimeout(A)}},[o,i,u,y,s,r,n,d,a,_,x,T,S,C,M,E,q]),O.useEffect(()=>{o.current.insideReactTree=!1},[o,y,s]);let z=O.useMemo(()=>({onKeyDown:T,...c&&{[bC[f]]:A=>{n(!1,A.nativeEvent,"reference-press")},...f!=="click"&&{onClick(A){n(!1,A.nativeEvent,"reference-press")}}}}),[T,n,c,f]),D=O.useMemo(()=>({onKeyDown:T,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[gC[s]]:()=>{o.current.insideReactTree=!0}}),[T,s,o]);return O.useMemo(()=>a?{reference:z,floating:D}:{},[a,z,D])}function w_(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=io(),o=O.useRef({}),[a]=O.useState(()=>f_()),u=ni()!=null,[l,s]=O.useState(n.reference),c=Me((p,m,h)=>{o.current.openEvent=p?m:void 0,a.emit("openchange",{open:p,event:m,reason:h,nested:u}),r?.(p,m,h)}),f=O.useMemo(()=>({setPositionReference:s}),[]),d=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:d,events:a,floatingId:i,refs:f}),[t,c,d,a,i,f])}function _C(e){e===void 0&&(e={});let{nodeId:t}=e,r=w_({...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),d=ii();me(()=>{c&&(f.current=c)},[c]);let p=Ey({...e,elements:{...i,...u&&{reference:u}}}),m=O.useCallback(_=>{let x=Te(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;l(x),p.refs.setReference(x)},[p.refs]),h=O.useCallback(_=>{(Te(_)||_===null)&&(f.current=_,a(_)),(Te(p.refs.reference.current)||p.refs.reference.current===null||_!==null&&!Te(_))&&p.refs.setReference(_)},[p.refs]),v=O.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:f}),[p.refs,h,m]),y=O.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),w=O.useMemo(()=>({...p,...n,refs:v,elements:y,nodeId:t}),[p,v,y,t,n]);return me(()=>{n.dataRef.current.floatingContext=w;let _=d?.nodesRef.current.find(x=>x.id===t);_&&(_.context=w)}),O.useMemo(()=>({...p,context:w,refs:v,elements:y}),[p,v,y,w])}function kp(){return qg()&&cp()}function wC(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 p=it(a.domReference);function m(){!r&&Ie(a.domReference)&&a.domReference===Zt(et(a.domReference))&&(s.current=!0)}function h(){f.current=!0}function v(){f.current=!1}return p.addEventListener("blur",m),kp()&&(p.addEventListener("keydown",h,!0),p.addEventListener("pointerdown",v,!0)),()=>{p.removeEventListener("blur",m),kp()&&(p.removeEventListener("keydown",h,!0),p.removeEventListener("pointerdown",v,!0))}},[a.domReference,r,u]),O.useEffect(()=>{if(!u)return;function p(m){let{reason:h}=m;(h==="reference-press"||h==="escape-key")&&(s.current=!0)}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,u]),O.useEffect(()=>()=>{tt(c)},[]);let d=O.useMemo(()=>({onMouseLeave(){s.current=!1},onFocus(p){if(s.current)return;let m=Jt(p.nativeEvent);if(l&&Te(m)){if(kp()&&!p.relatedTarget){if(!f.current&&!_s(m))return}else if(!Fg(m))return}n(!0,p.nativeEvent,"focus")},onBlur(p){s.current=!1;let m=p.relatedTarget,h=p.nativeEvent,v=Te(m)&&m.hasAttribute(ri("focus-guard"))&&m.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var y;let w=Zt(a.domReference?a.domReference.ownerDocument:document);!m&&w===a.domReference||Ke((y=o.current.floatingContext)==null?void 0:y.refs.floating.current,w)||Ke(a.domReference,w)||v||n(!1,h,"focus")})}}),[o,a.domReference,n,l]);return O.useMemo(()=>u?{reference:d}:{},[u,d])}function qp(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[Iy]:a,[jy]:u,...l}=e;o=l}return{...r==="floating"&&{tabIndex:-1,[NM]:""},...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&&[Iy,jy].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 d,p=arguments.length,m=new Array(p),h=0;h<p;h++)m[h]=arguments[h];return(d=n.get(s))==null?void 0:d.map(v=>v(...m)).find(v=>v!==void 0)}}}else a[s]=c}),a),{})}}function xC(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=>qp(u,e,"reference"),t),o=O.useCallback(u=>qp(u,e,"floating"),r),a=O.useCallback(u=>qp(u,e,"item"),n);return O.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function Is(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Cs(e,t){return Is(t,e===Ma||e===en,e===tn||e===rn)}function Ip(e,t,r){return Is(t,e===en,r?e===tn:e===rn)||e==="Enter"||e===" "||e===""}function Jy(e,t,r){return Is(t,r?e===tn:e===rn,e===en)}function Qy(e,t,r,n){let i=r?e===rn:e===tn,o=e===Ma;return t==="both"||t==="horizontal"&&n&&n>1?e===SC:Is(t,i,o)}function OC(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:d=!1,nested:p=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:w=!0,disabledIndices:_=void 0,orientation:x="vertical",parentOrientation:S,cols:E=1,scrollItemIntoView:R=!0,virtualItemRef:T,itemSizes:C,dense:M=!1}=t,q=Aa(i.floating),z=Ye(q),D=ni(),A=ii();me(()=>{e.dataRef.current.orientation=x},[e,x]);let I=Me(()=>{l(P.current===-1?null:P.current)}),W=ws(i.domReference),j=O.useRef(v),P=O.useRef(c??-1),F=O.useRef(null),U=O.useRef(!0),ye=O.useRef(I),J=O.useRef(!!i.floating),G=O.useRef(r),we=O.useRef(!1),N=O.useRef(!1),Q=Ye(_),oe=Ye(r),ne=Ye(R),K=Ye(c),[te,de]=O.useState(),[Z,ue]=O.useState(),ee=Me(()=>{function B(pe){if(h){var Ee;(Ee=pe.id)!=null&&Ee.endsWith("-fui-option")&&(pe.id=o+"-"+Math.random().toString(16).slice(2,10)),de(pe.id),A?.events.emit("virtualfocus",pe),T&&(T.current=pe)}else ei(pe,{sync:we.current,preventScroll:!0})}let $=a.current[P.current],H=N.current;$&&B($),(we.current?pe=>pe():requestAnimationFrame)(()=>{let pe=a.current[P.current]||$;if(!pe)return;$||B(pe);let Ee=ne.current;Ee&&he&&(H||!U.current)&&(pe.scrollIntoView==null||pe.scrollIntoView(typeof Ee=="boolean"?{block:"nearest",inline:"nearest"}:Ee))})});me(()=>{s&&(r&&i.floating?j.current&&c!=null&&(N.current=!0,P.current=c,I()):J.current&&(P.current=-1,ye.current()))},[s,r,i.floating,c,I]),me(()=>{if(s&&r&&i.floating)if(u==null){if(we.current=!1,K.current!=null)return;if(J.current&&(P.current=-1,ee()),(!G.current||!J.current)&&j.current&&(F.current!=null||j.current===!0&&F.current==null)){let B=0,$=()=>{a.current[0]==null?(B<2&&(B?requestAnimationFrame:queueMicrotask)($),B++):(P.current=F.current==null||Ip(F.current,x,m)||p?Ta(a,Q.current):xs(a,Q.current),F.current=null,I())};$()}}else Xn(a,u)||(P.current=u,ee(),N.current=!1)},[s,r,i.floating,u,K,p,a,x,m,I,ee,Q]),me(()=>{var B;if(!s||i.floating||!A||h||!J.current)return;let $=A.nodesRef.current,H=(B=$.find(Ee=>Ee.id===D))==null||(B=B.context)==null?void 0:B.elements.floating,se=Zt(et(i.floating)),pe=$.some(Ee=>Ee.context&&Ke(Ee.context.elements.floating,se));H&&!pe&&U.current&&H.focus({preventScroll:!0})},[s,i.floating,A,D,h]),me(()=>{if(!s||!A||!h||D)return;function B($){ue($.id),T&&(T.current=$)}return A.events.on("virtualfocus",B),()=>{A.events.off("virtualfocus",B)}},[s,A,h,D,T]),me(()=>{ye.current=I,G.current=r,J.current=!!i.floating}),me(()=>{r||(F.current=null,j.current=v)},[r,v]);let fe=u!=null,he=O.useMemo(()=>{function B(H){if(!oe.current)return;let se=a.current.indexOf(H);se!==-1&&P.current!==se&&(P.current=se,I())}return{onFocus(H){let{currentTarget:se}=H;we.current=!0,B(se)},onClick:H=>{let{currentTarget:se}=H;return se.focus({preventScroll:!0})},onMouseMove(H){let{currentTarget:se}=H;we.current=!0,N.current=!1,y&&B(se)},onPointerLeave(H){let{pointerType:se}=H;if(!(!U.current||se==="touch")&&(we.current=!0,!!y&&(P.current=-1,I(),!h))){var pe;(pe=z.current)==null||pe.focus({preventScroll:!0})}}}},[oe,z,y,a,I,h]),re=O.useCallback(()=>{var B;return S??(A==null||(B=A.nodesRef.current.find($=>$.id===D))==null||(B=B.context)==null||(B=B.dataRef)==null?void 0:B.current.orientation)},[D,A,S]),Y=Me(B=>{if(U.current=!1,we.current=!0,B.which===229||!oe.current&&B.currentTarget===z.current)return;if(p&&Qy(B.key,x,m,E)){Cs(B.key,re())||Qe(B),n(!1,B.nativeEvent,"list-navigation"),Ie(i.domReference)&&(h?A?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let $=P.current,H=Ta(a,_),se=xs(a,_);if(W||(B.key==="Home"&&(Qe(B),P.current=H,I()),B.key==="End"&&(Qe(B),P.current=se,I())),E>1){let pe=C||Array.from({length:a.current.length},()=>({width:1,height:1})),Ee=hp(pe,E,M),ke=Ee.findIndex(ge=>ge!=null&&!Zr(a,ge,_)),jt=Ee.reduce((ge,ft,Un)=>ft!=null&&!Zr(a,ft,_)?Un:ge,-1),_t=Ee[pp({current:Ee.map(ge=>ge!=null?a.current[ge]:null)},{event:B,orientation:x,loop:d,rtl:m,cols:E,disabledIndices:vp([...(typeof _!="function"?_:null)||a.current.map((ge,ft)=>Zr(a,ft,_)?ft:void 0),void 0],Ee),minIndex:ke,maxIndex:jt,prevIndex:mp(P.current>se?H:P.current,pe,Ee,E,B.key===en?"bl":B.key===(m?tn:rn)?"tr":"tl"),stopEvent:!0})];if(_t!=null&&(P.current=_t,I()),x==="both")return}if(Cs(B.key,x)){if(Qe(B),r&&!h&&Zt(B.currentTarget.ownerDocument)===B.currentTarget){P.current=Ip(B.key,x,m)?H:se,I();return}Ip(B.key,x,m)?d?P.current=$>=se?f&&$!==a.current.length?-1:H:Je(a,{startingIndex:$,disabledIndices:_}):P.current=Math.min(se,Je(a,{startingIndex:$,disabledIndices:_})):d?P.current=$<=H?f&&$!==-1?a.current.length:se:Je(a,{startingIndex:$,decrement:!0,disabledIndices:_}):P.current=Math.max(H,Je(a,{startingIndex:$,decrement:!0,disabledIndices:_})),Xn(a,P.current)&&(P.current=-1),I()}}),ie=O.useMemo(()=>h&&r&&fe&&{"aria-activedescendant":Z||te},[h,r,fe,Z,te]),ce=O.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...W?{}:ie,onKeyDown:Y,onPointerMove(){U.current=!0}}),[ie,Y,x,W]),ae=O.useMemo(()=>{function B(H){v==="auto"&&fp(H.nativeEvent)&&(j.current=!0)}function $(H){j.current=v,v==="auto"&&dp(H.nativeEvent)&&(j.current=!0)}return{...ie,onKeyDown(H){U.current=!1;let se=H.key.startsWith("Arrow"),pe=["Home","End"].includes(H.key),Ee=se||pe,ke=Jy(H.key,x,m),jt=Qy(H.key,x,m,E),_t=Jy(H.key,re(),m),ge=Cs(H.key,x),ft=(p?_t:ge)||H.key==="Enter"||H.key.trim()==="";if(h&&r){let Ft=A?.nodesRef.current.find(Ce=>Ce.parentId==null),Oe=A&&Ft?Lg(A.nodesRef.current,Ft.id):null;if(Ee&&Oe&&T){let Ce=new KeyboardEvent("keydown",{key:H.key,bubbles:!0});if(ke||jt){var Un,pa;let ur=((Un=Oe.context)==null?void 0:Un.elements.domReference)===H.currentTarget,nt=jt&&!ur?(pa=Oe.context)==null?void 0:pa.elements.domReference:ke?a.current.find(ji=>ji?.id===te):null;nt&&(Qe(H),nt.dispatchEvent(Ce),ue(void 0))}if((ge||pe)&&Oe.context&&Oe.context.open&&Oe.parentId&&H.currentTarget!==Oe.context.elements.domReference){var ha;Qe(H),(ha=Oe.context.elements.domReference)==null||ha.dispatchEvent(Ce);return}}return Y(H)}if(!(!r&&!w&&se)){if(ft){let Ft=Cs(H.key,re());F.current=p&&Ft?null:H.key}if(p){_t&&(Qe(H),r?(P.current=Ta(a,Q.current),I()):n(!0,H.nativeEvent,"list-navigation"));return}ge&&(c!=null&&(P.current=c),Qe(H),!r&&w?n(!0,H.nativeEvent,"list-navigation"):Y(H),r&&I())}},onFocus(){r&&!h&&(P.current=-1,I())},onPointerDown:$,onPointerEnter:$,onMouseDown:B,onClick:B}},[te,ie,E,Y,Q,v,a,p,I,n,r,w,x,re,m,c,A,h,T]);return O.useMemo(()=>s?{reference:ae,floating:ce,item:he}:{},[s,ae,ce,he])}function AC(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=io(),c=((r=o.domReference)==null?void 0:r.id)||s,f=O.useMemo(()=>{var w;return((w=Aa(o.floating))==null?void 0:w.id)||a},[o.floating,a]),d=(n=EC.get(l))!=null?n:l,m=ni()!=null,h=O.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:c},...d==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[d,f,m,i,c,l]),v=O.useMemo(()=>{let w={id:f,...d&&{role:d}};return d==="tooltip"||l==="label"?w:{...w,...d==="menu"&&{"aria-labelledby":c}}},[d,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(()=>u?{reference:h,floating:v,item:y}:{},[u,h,v,y])}function ro(e,t){return typeof e=="function"?e(t):e}function TC(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 x_(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=TC(r,a);return!s&&u==="close"&&l("unmounted"),me(()=>{if(n){if(r){l("initial");let c=requestAnimationFrame(()=>{ti.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(c)}}l("close")}},[r,n]),{isMounted:s,status:u}}function RC(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,d=(c?a:a.close)||0,[p,m]=O.useState(()=>({...ro(o,s),...ro(r,s)})),{isMounted:h,status:v}=x_(e,{duration:a}),y=Ye(r),w=Ye(n),_=Ye(i),x=Ye(o);return me(()=>{let S=ro(y.current,s),E=ro(_.current,s),R=ro(x.current,s),T=ro(w.current,s)||Object.keys(S).reduce((C,M)=>(C[M]="",C),{});if(v==="initial"&&m(C=>({transitionProperty:C.transitionProperty,...R,...S})),v==="open"&&m({transitionProperty:Object.keys(T).map(e_).join(","),transitionDuration:f+"ms",...R,...T}),v==="close"){let C=E||S;m({transitionProperty:Object.keys(C).map(e_).join(","),transitionDuration:d+"ms",...R,...C})}},[d,_,y,w,x,f,v,s]),{isMounted:h,styles:p}}function PC(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:d=[],selectedIndex:p=null}=t,m=O.useRef(-1),h=O.useRef(""),v=O.useRef((r=p??a)!=null?r:-1),y=O.useRef(null),w=Me(u),_=Me(l),x=Ye(c),S=Ye(d);me(()=>{n&&(tt(m),y.current=null,h.current="")},[n]),me(()=>{if(n&&h.current===""){var M;v.current=(M=p??a)!=null?M:-1}},[n,p,a]);let E=Me(M=>{M?i.current.typing||(i.current.typing=M,_(M)):i.current.typing&&(i.current.typing=M,_(M))}),R=Me(M=>{function q(W,j,P){let F=x.current?x.current(j,P):j.find(U=>U?.toLocaleLowerCase().indexOf(P.toLocaleLowerCase())===0);return F?W.indexOf(F):-1}let z=o.current;if(h.current.length>0&&h.current[0]!==" "&&(q(z,z,h.current)===-1?E(!1):M.key===" "&&Qe(M)),z==null||S.current.includes(M.key)||M.key.length!==1||M.ctrlKey||M.metaKey||M.altKey)return;n&&M.key!==" "&&(Qe(M),E(!0)),z.every(W=>{var j,P;return W?((j=W[0])==null?void 0:j.toLocaleLowerCase())!==((P=W[1])==null?void 0:P.toLocaleLowerCase()):!0})&&h.current===M.key&&(h.current="",v.current=y.current),h.current+=M.key,tt(m),m.current=window.setTimeout(()=>{h.current="",v.current=y.current,E(!1)},f);let A=v.current,I=q(z,[...z.slice((A||0)+1),...z.slice(0,(A||0)+1)],h.current);I!==-1?(w(I),y.current=I):M.key!==" "&&(h.current="",E(!1))}),T=O.useMemo(()=>({onKeyDown:R}),[R]),C=O.useMemo(()=>({onKeyDown:R,onKeyUp(M){M.key===" "&&E(!1)}}),[R,E]);return O.useMemo(()=>s?{reference:T,floating:C}:{},[s,T,C])}function t_(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function CC(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,l=Me(u),s=O.useRef(!1),c=O.useRef(null),f=O.useRef(null);O.useEffect(()=>{if(!i)return;function p(h){if(h.ctrlKey||!m||o.current==null)return;let v=h.deltaY,y=o.current.top>=-.5,w=o.current.bottom>=-.5,_=m.scrollHeight-m.clientHeight,x=v<0?-1:1,S=v<0?"max":"min";m.scrollHeight<=m.clientHeight||(!y&&v>0||!w&&v<0?(h.preventDefault(),ti.flushSync(()=>{l(E=>E+Math[S](v,_*x))})):/firefox/i.test(gs())&&(m.scrollTop+=v))}let m=a?.current||n.floating;if(r&&m)return m.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=m.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{c.current=null,f.current=null,m.removeEventListener("wheel",p)}},[i,r,n.floating,o,a,l]);let d=O.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let p=a?.current||n.floating;if(!(!o.current||!p||!s.current)){if(c.current!==null){let m=p.scrollTop-c.current;(o.current.bottom<-.5&&m<-1||o.current.top<-.5&&m>1)&&ti.flushSync(()=>l(h=>h+m))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,l,o,a]);return O.useMemo(()=>i?{floating:d}:{},[i,d])}function S_(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,...S_(e,i.id,r)])}function r_(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 kC(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qC(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=typeof performance<"u"?performance.now():0;function s(f,d){let p=performance.now(),m=p-l;if(a===null||u===null||m===0)return a=f,u=d,l=p,null;let h=f-a,v=d-u,w=Math.sqrt(h*h+v*v)/m;return a=f,u=d,l=p,w}let c=f=>{let{x:d,y:p,placement:m,elements:h,onClose:v,nodeId:y,tree:w}=f;return function(x){function S(){tt(i),v()}if(tt(i),!h.domReference||!h.floating||m==null||d==null||p==null)return;let{clientX:E,clientY:R}=x,T=[E,R],C=eC(x),M=x.type==="mouseleave",q=Mp(h.floating,C),z=Mp(h.domReference,C),D=h.domReference.getBoundingClientRect(),A=h.floating.getBoundingClientRect(),I=m.split("-")[0],W=d>A.right-A.width/2,j=p>A.bottom-A.height/2,P=kC(T,D),F=A.width>D.width,U=A.height>D.height,ye=(F?D:A).left,J=(F?D:A).right,G=(U?D:A).top,we=(U?D:A).bottom;if(q&&(o=!0,!M))return;if(z&&(o=!1),z&&!M){o=!0;return}if(M&&Te(x.relatedTarget)&&Mp(h.floating,x.relatedTarget)||w&&S_(w.nodesRef.current,y).length)return;if(I==="top"&&p>=D.bottom-1||I==="bottom"&&p<=D.top+1||I==="left"&&d>=D.right-1||I==="right"&&d<=D.left+1)return S();let N=[];switch(I){case"top":N=[[ye,D.top+1],[ye,A.bottom-1],[J,A.bottom-1],[J,D.top+1]];break;case"bottom":N=[[ye,A.top+1],[ye,D.bottom-1],[J,D.bottom-1],[J,A.top+1]];break;case"left":N=[[A.right-1,we],[A.right-1,G],[D.left+1,G],[D.left+1,we]];break;case"right":N=[[D.right-1,we],[D.right-1,G],[A.left+1,G],[A.left+1,we]];break}function Q(oe){let[ne,K]=oe;switch(I){case"top":{let te=[F?ne+t/2:W?ne+t*4:ne-t*4,K+t+1],de=[F?ne-t/2:W?ne+t*4:ne-t*4,K+t+1],Z=[[A.left,W||F?A.bottom-t:A.top],[A.right,W?F?A.bottom-t:A.top:A.bottom-t]];return[te,de,...Z]}case"bottom":{let te=[F?ne+t/2:W?ne+t*4:ne-t*4,K-t],de=[F?ne-t/2:W?ne+t*4:ne-t*4,K-t],Z=[[A.left,W||F?A.top+t:A.bottom],[A.right,W?F?A.top+t:A.bottom:A.top+t]];return[te,de,...Z]}case"left":{let te=[ne+t+1,U?K+t/2:j?K+t*4:K-t*4],de=[ne+t+1,U?K-t/2:j?K+t*4:K-t*4];return[...[[j||U?A.right-t:A.left,A.top],[j?U?A.right-t:A.left:A.right-t,A.bottom]],te,de]}case"right":{let te=[ne-t,U?K+t/2:j?K+t*4:K-t*4],de=[ne-t,U?K-t/2:j?K+t*4:K-t*4],Z=[[j||U?A.left+t:A.right,A.top],[j?U?A.left+t:A.right:A.left+t,A.bottom]];return[te,de,...Z]}}}if(!r_([E,R],N)){if(o&&!P)return S();if(!M&&n){let oe=s(x.clientX,x.clientY);if(oe!==null&&oe<.1)return S()}r_([E,R],Q([d,p]))?!o&&n&&(i.current=window.setTimeout(S,40)):S()}}};return c.__options={blockPointerEvents:r},c}var O,Re,ti,i_,NM,Iy,jy,tn,rn,Ma,en,s_,c_,l_,Rp,DM,BM,zM,Fy,WM,Ly,HM,io,VM,d_,p_,ni,ii,Ny,jp,h_,m_,v_,Dy,no,Rs,Ps,Cp,rC,b_,nC,qs,ks,g_,Wy,__,aC,Qr,cC,Ms,Gy,$y,dC,bC,gC,Zy,SC,EC,e_,MC,E_=pt(()=>{O=L(qe());zg();Re=L(ns());Sa();op();ti=L(Ss());Tp();Tp();Yi();i_=O.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});NM="data-floating-ui-focusable",Iy="active",jy="selected",tn="ArrowLeft",rn="ArrowRight",Ma="ArrowUp",en="ArrowDown";s_=O.createContext({activeIndex:0,onNavigate:()=>{}}),c_=[tn,rn],l_=[Ma,en],Rp=[...c_,...l_],DM=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:d=!1,...p}=t,[m,h]=O.useState(0),v=s??m,y=Me(c??h),w=O.useRef([]),_=n&&typeof n!="function"?n.props:{},x=O.useMemo(()=>({activeIndex:v,onNavigate:y}),[v,y]),S=u>1;function E(T){if(!Rp.includes(T.key))return;let C=v,M=Ta(w,l),q=xs(w,l),z=a?tn:rn,D=a?rn:tn;if(S){let P=f||Array.from({length:w.current.length},()=>({width:1,height:1})),F=hp(P,u,d),U=F.findIndex(G=>G!=null&&!Zr(w,G,l)),ye=F.reduce((G,we,N)=>we!=null&&!Zr(w,we,l)?N:G,-1),J=F[pp({current:F.map(G=>G?w.current[G]:null)},{event:T,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:vp([...(typeof l!="function"?l:null)||w.current.map((G,we)=>Zr(w,we,l)?we:void 0),void 0],F),minIndex:U,maxIndex:ye,prevIndex:mp(v>q?M:v,P,F,u,T.key===en?"bl":T.key===z?"tr":"tl")})];J!=null&&(C=J)}let A={horizontal:[z],vertical:[en],both:[z,en]}[i],I={horizontal:[D],vertical:[Ma],both:[D,Ma]}[i],W=S?Rp:{horizontal:c_,vertical:l_,both:Rp}[i];if(C===v&&[...A,...I].includes(T.key)&&(o&&C===q&&A.includes(T.key)?C=M:o&&C===M&&I.includes(T.key)?C=q:C=Je(w,{startingIndex:C,decrement:I.includes(T.key),disabledIndices:l})),C!==v&&!Xn(w,C)){var j;T.stopPropagation(),W.includes(T.key)&&T.preventDefault(),y(C),(j=w.current[C])==null||j.focus()}}let R={...p,..._,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(T){p.onKeyDown==null||p.onKeyDown(T),_.onKeyDown==null||_.onKeyDown(T),E(T)}};return(0,Re.jsx)(s_.Provider,{value:x,children:(0,Re.jsx)(o_,{elementsRef:w,children:u_(n,R)})})}),BM=O.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=O.useContext(s_),{ref:l,index:s}=a_(),c=n_([l,r,o.ref]),f=a===s,d={...i,...o,ref:c,tabIndex:f?0:-1,"data-active":f?"":void 0,onFocus(p){i.onFocus==null||i.onFocus(p),o.onFocus==null||o.onFocus(p),u(s)}};return u_(n,d)}),zM={...O},Fy=!1,WM=0,Ly=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+WM++;HM=zM.useId,io=HM||UM,VM=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:d,d:p,style:{transform:m,...h}={},...v}=t,y=io(),[w,_]=O.useState(!1);if(me(()=>{if(!i)return;vt(i).direction==="rtl"&&_(!0)},[i]),!i)return null;let[x,S]=n.split("-"),E=x==="top"||x==="bottom",R=f;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(R=null);let T=c*2,C=T/2,M=u/2*(s/-8+1),q=l/2*s/4,z=!!p,D=R&&S==="end"?"bottom":"top",A=R&&S==="end"?"right":"left";R&&w&&(A=S==="end"?"left":"right");let I=o?.x!=null?R||o.x:"",W=o?.y!=null?R||o.y:"",j=p||"M0,0"+(" H"+u)+(" L"+(u-M)+","+(l-q))+(" Q"+u/2+","+l+" "+M+","+(l-q))+" Z",P={top:z?"rotate(180deg)":"",left:z?"rotate(90deg)":"rotate(-90deg)",bottom:z?"":"rotate(180deg)",right:z?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Re.jsxs)("svg",{...v,"aria-hidden":!0,ref:r,width:z?u:u+T,height:u,viewBox:"0 0 "+u+" "+(l>u?l:u),style:{position:"absolute",pointerEvents:"none",[A]:I,[D]:W,[x]:E||z?"100%":"calc(100% - "+T/2+"px)",transform:[P,m].filter(F=>!!F).join(" "),...h},children:[T>0&&(0,Re.jsx)("path",{clipPath:"url(#"+y+")",fill:"none",stroke:d,strokeWidth:T+(p?0:1),d:j}),(0,Re.jsx)("path",{stroke:T&&!p?v.fill:"none",d:j}),(0,Re.jsx)("clipPath",{id:y,children:(0,Re.jsx)("rect",{x:-C,y:C*(z?-1:1),width:u+T,height:u})})]})});d_=O.createContext(null),p_=O.createContext(null),ni=()=>{var e;return((e=O.useContext(d_))==null?void 0:e.id)||null},ii=()=>O.useContext(p_);Ny=ri("safe-polygon");jp=()=>{},h_=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:jp,setState:jp,isInstantPhase:!1}),m_=()=>O.useContext(h_);v_=O.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});Dy=0;no={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};Rs=new WeakSet,Ps={},Cp=0,rC=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,b_=e=>e&&(e.host||b_(e.parentNode)),nC=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=b_(r);return e.contains(n)?n:null}).filter(r=>r!=null);qs={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},ks=O.forwardRef(function(t,r){let[n,i]=O.useState();me(()=>{cp()&&i("button")},[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[ri("focus-guard")]:"",style:qs};return(0,Re.jsx)("span",{...t,...o})}),g_=O.createContext(null),Wy=ri("portal");__=()=>O.useContext(g_);aC=20,Qr=[];cC=O.forwardRef(function(t,r){return(0,Re.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:qs})});Ms=0,Gy="--floating-ui-scrollbar-width";$y=()=>{},dC=O.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return me(()=>{if(n)return Ms++,Ms===1&&($y=fC()),()=>{Ms--,Ms===0&&$y()}},[n]),(0,Re.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});bC={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},gC={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zy=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}};SC="Escape";EC=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);e_=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());MC=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}=Ot(e,t),{rects:f,elements:{floating:d}}=t,p=r.current[a],m=s?.current||d,h=d.clientTop||m.clientTop,v=d.clientTop!==0,y=m.clientTop!==0,w=d===m;if(!p)return{};let _={...t,...await Ts(-p.offsetTop-d.clientTop-f.reference.height/2-p.offsetHeight/2-o).fn(t)},x=await Qn(t_(_,m.scrollHeight+h+d.clientTop),c),S=await Qn(_,{...c,elementContext:"reference"}),E=We(0,x.top),R=_.y+E,M=(m.scrollHeight>m.clientHeight?q=>q:Yn)(We(0,m.scrollHeight+(v&&w||y?h*2:0)-E-We(0,x.bottom)));if(m.style.maxHeight=M+"px",m.scrollTop=E,i){let q=m.offsetHeight<p.offsetHeight*bt(u,r.current.length)-1||S.top>=-l||S.bottom>=-l;ti.flushSync(()=>i(q))}return n&&(n.current=await Qn(t_({..._,y:R},m.offsetHeight+h+d.clientTop),c)),{y:R}}})});var T_=g(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.default=LC;var A_=ns(),js=(E_(),Ab(O_)),Lp=Wi(),IC=Ui();function jC(e){return Math.round(e*1e5)/1e5}var FC=(0,IC.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Lp.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:`${jC(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function LC({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Lp.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=FC(),{refs:l,floatingStyles:s,context:c}=(0,js.useFloating)({placement:r,strategy:"fixed",middleware:[(0,js.offset)(5)]}),f=(0,js.useClientPoint)(c,e),{getFloatingProps:d}=(0,js.useInteractions)([f]);return(0,A_.jsx)(Lp.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,A_.jsx)("div",{className:u.tooltip,ref:l.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...d(),children:t})})}});var I_,DC,Wp,j_=pt(()=>{"use strict";I_=L(qe()),DC=e=>{let{color:t="rgb(255,255,255,0.5)"}=e;return I_.default.createElement("rect",{...e,fill:t})},Wp=DC});var oi,F_,BC,L_,N_=pt(()=>{"use strict";oi=L(qe()),F_=L(cr()),BC=(0,F_.observer)(function({model:e}){let{rowHeight:t,hierarchy:r,showBranchLen:n}=e;return oi.default.createElement(oi.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 oi.default.createElement(oi.default.Fragment,{key:[u,l,s,c].join("-")},oi.default.createElement("line",{stroke:"black",x1:c,y1:u,x2:c,y2:l}),oi.default.createElement("line",{stroke:"black",x1:c,y1:l,x2:s,y2:l}))}):null)}),L_=BC});var nn,D_,zC,B_,z_=pt(()=>{"use strict";nn=L(qe()),D_=L(cr());j_();N_();zC=(0,D_.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 nn.default.createElement(nn.default.Fragment,null,nn.default.createElement(Wp,{y:0,x:0,width:t+5+i,height:n}),nn.default.createElement(L_,{model:e}),nn.default.createElement("g",{transform:`translate(${i+5},0)`},o.map((s,c)=>nn.default.createElement(Wp,{key:`${s.id}-${c}`,y:c*a,x:0,width:t+5,height:l,color:s.color})),r?o.map((s,c)=>nn.default.createElement("text",{key:`${s.id}-${c}`,dominantBaseline:"middle",fontSize:u,x:2,y:c*a+a/2},s.label)):null))}),B_=zC});var Ns,W_,U_,WC,H_,V_=pt(()=>{"use strict";Ns=L(qe()),W_=L(ct()),U_=L(cr()),WC=(0,U_.observer)(function({children:e,model:t,exportSVG:r}){if(r)return Ns.default.createElement(Ns.default.Fragment,null,e);{let{totalHeight:n}=t,{width:i}=(0,W_.getContainingView)(t);return Ns.default.createElement("svg",{style:{position:"absolute",userSelect:"none",top:0,left:0,pointerEvents:"none",height:n,width:i}},e)}}),H_=WC});var Up,G_,UC,Ds,Hp=pt(()=>{"use strict";Up=L(qe()),G_=L(cr());z_();V_();UC=(0,G_.observer)(function(e){let{model:t}=e;return Up.default.createElement(H_,{...e},Up.default.createElement(B_,{model:t}))}),Ds=UC});var d0=g((NZ,f0)=>{"use strict";f0.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 zs=g((DZ,p0)=>{p0.exports=JBrowseExports.mobx});var b0={};Yu(b0,{default:()=>uk});var kt,h0,Dt,m0,v0,ok,ak,uk,g0=pt(()=>{"use strict";kt=L(qe()),h0=L(Kr()),Dt=L(Wi()),m0=L(cr()),v0=L(Ui()),ok=(0,v0.makeStyles)()({root:{width:500}}),ak=(0,m0.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=ok(),[i,o]=(0,kt.useState)(`${t.rowHeight}`),[a,u]=(0,kt.useState)(`${t.rowProportion}`);return kt.default.createElement(h0.Dialog,{open:!0,onClose:r,title:"Set row height"},kt.default.createElement("form",{onSubmit:l=>{l.preventDefault(),t.setRowProportion(+a),t.setRowHeight(+i),r()}},kt.default.createElement(Dt.DialogContent,{className:n.root},kt.default.createElement(Dt.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),kt.default.createElement(Dt.TextField,{value:i,helperText:"Enter row height",autoFocus:!0,onChange:l=>{o(l.target.value)}}),kt.default.createElement(Dt.TextField,{value:a,helperText:"Enter row proportion",onChange:l=>{u(l.target.value)}}),kt.default.createElement(Dt.DialogActions,null,kt.default.createElement(Dt.Button,{variant:"contained",color:"primary",type:"submit"},"Submit"),kt.default.createElement(Dt.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel")))))}),uk=ak});var _0={};Yu(_0,{renderSvg:()=>sk});async function sk(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,y0.getContainingView)(e),u=`mafclip-${i}`;return fr.default.createElement(fr.default.Fragment,null,fr.default.createElement("defs",null,fr.default.createElement("clipPath",{id:u},fr.default.createElement("rect",{x:0,y:0,width:a,height:n}))),fr.default.createElement("g",{clipPath:`url(#${u})`},fr.default.createElement("g",{id:"snpcov"},await r(t)),fr.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},fr.default.createElement(Ds,{model:e,orientation:"left",exportSVG:!0}))))}var fr,y0,w0=pt(()=>{"use strict";fr=L(qe()),y0=L(ct());Hp()});var Z0=g(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.TWO_PWR_32_DBL=hr.TWO_PWR_16_DBL=void 0;hr.longFromBytesToUnsigned=xk;hr.TWO_PWR_16_DBL=65536;hr.TWO_PWR_32_DBL=hr.TWO_PWR_16_DBL*hr.TWO_PWR_16_DBL;function xk(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)*hr.TWO_PWR_32_DBL+(r>>>0)}});var Q0=g(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var oh=Z0(),$s=1;function J0(e,t,r){let n=t[$s],i=r?r[$s]:1/0;return n<=e&&i>e?0:n<e?-1:1}var ah=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,oh.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 u=(0,oh.longFromBytesToUnsigned)(o,a*16),l=(0,oh.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=J0(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=J0(r,i[l],i[l+1]);o.push(i[l]);let c=l+1;for(;c<i.length&&(o.push(i[c]),!(i[c][$s]>=n));c+=1);return o[o.length-1][$s]<n&&o.push([]),o}};uh.default=ah});var Ir=g(gt=>{"use strict";var Sk=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Ok(e,t){return Object.prototype.hasOwnProperty.call(e,t)}gt.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)Ok(r,n)&&(e[n]=r[n])}}return e};gt.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var Ek={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}},Ak={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)}};gt.setTyped=function(e){e?(gt.Buf8=Uint8Array,gt.Buf16=Uint16Array,gt.Buf32=Int32Array,gt.assign(gt,Ek)):(gt.Buf8=Array,gt.Buf16=Array,gt.Buf32=Array,gt.assign(gt,Ak))};gt.setTyped(Sk)});var xw=g(fo=>{"use strict";var Tk=Ir(),Rk=4,ew=0,tw=1,Pk=2;function lo(e){for(var t=e.length;--t>=0;)e[t]=0}var Mk=0,uw=1,Ck=2,kk=3,qk=258,hh=29,Da=256,ja=Da+1+hh,co=30,mh=19,sw=2*ja+1,li=15,sh=16,Ik=7,vh=256,cw=16,lw=17,fw=18,dh=[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],Ks=[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],jk=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],dw=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Fk=512,jr=new Array((ja+2)*2);lo(jr);var Ia=new Array(co*2);lo(Ia);var Fa=new Array(Fk);lo(Fa);var La=new Array(qk-kk+1);lo(La);var bh=new Array(hh);lo(bh);var Ys=new Array(co);lo(Ys);function ch(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 pw,hw,mw;function lh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function vw(e){return e<256?Fa[e]:Fa[256+(e>>>7)]}function Na(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function At(e,t,r){e.bi_valid>sh-r?(e.bi_buf|=t<<e.bi_valid&65535,Na(e,e.bi_buf),e.bi_buf=t>>sh-e.bi_valid,e.bi_valid+=r-sh):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function mr(e,t,r){At(e,r[t*2],r[t*2+1])}function bw(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function Lk(e){e.bi_valid===16?(Na(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 Nk(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,d,p,m,h=0;for(d=0;d<=li;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<sw;s++)c=e.heap[s],d=r[r[c*2+1]*2+1]+1,d>l&&(d=l,h++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,p=0,c>=u&&(p=a[c-u]),m=r[c*2],e.opt_len+=m*(d+p),o&&(e.static_len+=m*(i[c*2+1]+p)));if(h!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,h-=2}while(h>0);for(d=l;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--s],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),c--)}}function gw(e,t,r){var n=new Array(li+1),i=0,o,a;for(o=1;o<=li;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]=bw(n[u]++,u))}}function Dk(){var e,t,r,n,i,o=new Array(li+1);for(r=0,n=0;n<hh-1;n++)for(bh[n]=r,e=0;e<1<<dh[n];e++)La[r++]=n;for(La[r-1]=n,i=0,n=0;n<16;n++)for(Ys[n]=i,e=0;e<1<<Ks[n];e++)Fa[i++]=n;for(i>>=7;n<co;n++)for(Ys[n]=i<<7,e=0;e<1<<Ks[n]-7;e++)Fa[256+i++]=n;for(t=0;t<=li;t++)o[t]=0;for(e=0;e<=143;)jr[e*2+1]=8,e++,o[8]++;for(;e<=255;)jr[e*2+1]=9,e++,o[9]++;for(;e<=279;)jr[e*2+1]=7,e++,o[7]++;for(;e<=287;)jr[e*2+1]=8,e++,o[8]++;for(gw(jr,ja+1,o),e=0;e<co;e++)Ia[e*2+1]=5,Ia[e*2]=bw(e,5);pw=new ch(jr,dh,Da+1,ja,li),hw=new ch(Ia,Ks,0,co,li),mw=new ch(new Array(0),jk,0,mh,Ik)}function yw(e){var t;for(t=0;t<ja;t++)e.dyn_ltree[t*2]=0;for(t=0;t<co;t++)e.dyn_dtree[t*2]=0;for(t=0;t<mh;t++)e.bl_tree[t*2]=0;e.dyn_ltree[vh*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function _w(e){e.bi_valid>8?Na(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 Bk(e,t,r,n){_w(e),n&&(Na(e,r),Na(e,~r)),Tk.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function rw(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 fh(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&rw(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!rw(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function nw(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=La[i],mr(e,a+Da+1,t),u=dh[a],u!==0&&(i-=bh[a],At(e,i,u)),n--,a=vw(n),mr(e,a,r),u=Ks[a],u!==0&&(n-=Ys[a],At(e,n,u)));while(o<e.last_lit);mr(e,vh,t)}function ph(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=sw,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--)fh(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],fh(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++,fh(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Nk(e,t),gw(r,l,e.bl_count)}function iw(e,t,r){var n,i=-1,o,a=t[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[cw*2]++):u<=10?e.bl_tree[lw*2]++:e.bl_tree[fw*2]++,u=0,i=o,a===0?(l=138,s=3):o===a?(l=6,s=3):(l=7,s=4))}function ow(e,t,r){var n,i=-1,o,a=t[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,cw,e.bl_tree),At(e,u-3,2)):u<=10?(mr(e,lw,e.bl_tree),At(e,u-3,3)):(mr(e,fw,e.bl_tree),At(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 zk(e){var t;for(iw(e,e.dyn_ltree,e.l_desc.max_code),iw(e,e.dyn_dtree,e.d_desc.max_code),ph(e,e.bl_desc),t=mh-1;t>=3&&e.bl_tree[dw[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Wk(e,t,r,n){var i;for(At(e,t-257,5),At(e,r-1,5),At(e,n-4,4),i=0;i<n;i++)At(e,e.bl_tree[dw[i]*2+1],3);ow(e,e.dyn_ltree,t-1),ow(e,e.dyn_dtree,r-1)}function Uk(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ew;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return tw;for(r=32;r<Da;r++)if(e.dyn_ltree[r*2]!==0)return tw;return ew}var aw=!1;function Hk(e){aw||(Dk(),aw=!0),e.l_desc=new lh(e.dyn_ltree,pw),e.d_desc=new lh(e.dyn_dtree,hw),e.bl_desc=new lh(e.bl_tree,mw),e.bi_buf=0,e.bi_valid=0,yw(e)}function ww(e,t,r,n){At(e,(Mk<<1)+(n?1:0),3),Bk(e,t,r,!0)}function Vk(e){At(e,uw<<1,3),mr(e,vh,jr),Lk(e)}function Gk(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===Pk&&(e.strm.data_type=Uk(e)),ph(e,e.l_desc),ph(e,e.d_desc),a=zk(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?ww(e,t,r,n):e.strategy===Rk||o===i?(At(e,(uw<<1)+(n?1:0),3),nw(e,jr,Ia)):(At(e,(Ck<<1)+(n?1:0),3),Wk(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),nw(e,e.dyn_ltree,e.dyn_dtree)),yw(e),n&&_w(e)}function $k(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[(La[r]+Da+1)*2]++,e.dyn_dtree[vw(t)*2]++),e.last_lit===e.lit_bufsize-1}fo._tr_init=Hk;fo._tr_stored_block=ww;fo._tr_flush_block=Gk;fo._tr_tally=$k;fo._tr_align=Vk});var gh=g((aQ,Sw)=>{"use strict";function Kk(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}Sw.exports=Kk});var yh=g((uQ,Ow)=>{"use strict";function Yk(){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 Xk=Yk();function Zk(e,t,r,n){var i=Xk,o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}Ow.exports=Zk});var Xs=g((sQ,Ew)=>{"use strict";Ew.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 Iw=g(gr=>{"use strict";var yt=Ir(),zt=xw(),Pw=gh(),an=yh(),Jk=Xs(),hi=0,Qk=1,eq=3,fn=4,Aw=5,br=0,Tw=1,Wt=-2,tq=-3,_h=-5,rq=-1,nq=1,Zs=2,iq=3,oq=4,aq=0,uq=2,tc=8,sq=9,cq=15,lq=8,fq=29,dq=256,xh=dq+1+fq,pq=30,hq=19,mq=2*xh+1,vq=15,_e=3,cn=258,Qt=cn+_e+1,bq=32,rc=42,Sh=69,Js=73,Qs=91,ec=103,fi=113,za=666,Xe=1,Wa=2,di=3,mo=4,gq=3;function ln(e,t){return e.msg=Jk[t],t}function Rw(e){return(e<<1)-(e>4?9:0)}function sn(e){for(var t=e.length;--t>=0;)e[t]=0}function un(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 ot(e,t){zt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,un(e.strm)}function xe(e,t){e.pending_buf[e.pending++]=t}function Ba(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function yq(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=Pw(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 Mw(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-Qt?e.strstart-(e.w_size-Qt):0,s=e.window,c=e.w_mask,f=e.prev,d=e.strstart+cn,p=s[n+a-1],m=s[n+a];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(s[i+a]!==m||s[i+a-1]!==p||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<d);if(o=cn-(d-n),n=d-cn,o>a){if(e.match_start=t,a=o,o>=u)break;p=s[n+a-1],m=s[n+a]}}while((t=f[t&c])>l&&--r!==0);return a<=e.lookahead?a:e.lookahead}function pi(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-Qt)){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=yq(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=_e)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+_e-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<_e)););}while(e.lookahead<Qt&&e.strm.avail_in!==0)}function _q(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(pi(e),e.lookahead===0&&t===hi)return Xe;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,ot(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Qt&&(ot(e,!1),e.strm.avail_out===0))return Xe}return e.insert=0,t===fn?(ot(e,!0),e.strm.avail_out===0?di:mo):(e.strstart>e.block_start&&(ot(e,!1),e.strm.avail_out===0),Xe)}function wh(e,t){for(var r,n;;){if(e.lookahead<Qt){if(pi(e),e.lookahead<Qt&&t===hi)return Xe;if(e.lookahead===0)break}if(r=0,e.lookahead>=_e&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_e-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-Qt&&(e.match_length=Mw(e,r)),e.match_length>=_e)if(n=zt._tr_tally(e,e.strstart-e.match_start,e.match_length-_e),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=_e){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_e-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=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(ot(e,!1),e.strm.avail_out===0))return Xe}return e.insert=e.strstart<_e-1?e.strstart:_e-1,t===fn?(ot(e,!0),e.strm.avail_out===0?di:mo):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Xe:Wa}function po(e,t){for(var r,n,i;;){if(e.lookahead<Qt){if(pi(e),e.lookahead<Qt&&t===hi)return Xe;if(e.lookahead===0)break}if(r=0,e.lookahead>=_e&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_e-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=_e-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Qt&&(e.match_length=Mw(e,r),e.match_length<=5&&(e.strategy===nq||e.match_length===_e&&e.strstart-e.match_start>4096)&&(e.match_length=_e-1)),e.prev_length>=_e&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-_e,n=zt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-_e),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+_e-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=_e-1,e.strstart++,n&&(ot(e,!1),e.strm.avail_out===0))return Xe}else if(e.match_available){if(n=zt._tr_tally(e,0,e.window[e.strstart-1]),n&&ot(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Xe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=zt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<_e-1?e.strstart:_e-1,t===fn?(ot(e,!0),e.strm.avail_out===0?di:mo):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Xe:Wa}function wq(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=cn){if(pi(e),e.lookahead<=cn&&t===hi)return Xe;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=_e&&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>=_e?(r=zt._tr_tally(e,1,e.match_length-_e),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ot(e,!1),e.strm.avail_out===0))return Xe}return e.insert=0,t===fn?(ot(e,!0),e.strm.avail_out===0?di:mo):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Xe:Wa}function xq(e,t){for(var r;;){if(e.lookahead===0&&(pi(e),e.lookahead===0)){if(t===hi)return Xe;break}if(e.match_length=0,r=zt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ot(e,!1),e.strm.avail_out===0))return Xe}return e.insert=0,t===fn?(ot(e,!0),e.strm.avail_out===0?di:mo):e.last_lit&&(ot(e,!1),e.strm.avail_out===0)?Xe:Wa}function vr(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var ho;ho=[new vr(0,0,0,0,_q),new vr(4,4,8,4,wh),new vr(4,5,16,8,wh),new vr(4,6,32,32,wh),new vr(4,4,16,16,po),new vr(8,16,32,32,po),new vr(8,16,128,128,po),new vr(8,32,128,256,po),new vr(32,128,258,1024,po),new vr(32,258,258,4096,po)];function Sq(e){e.window_size=2*e.w_size,sn(e.head),e.max_lazy_match=ho[e.level].max_lazy,e.good_match=ho[e.level].good_length,e.nice_match=ho[e.level].nice_length,e.max_chain_length=ho[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=_e-1,e.match_available=0,e.ins_h=0}function Oq(){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=tc,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(mq*2),this.dyn_dtree=new yt.Buf16((2*pq+1)*2),this.bl_tree=new yt.Buf16((2*hq+1)*2),sn(this.dyn_ltree),sn(this.dyn_dtree),sn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new yt.Buf16(vq+1),this.heap=new yt.Buf16(2*xh+1),sn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new yt.Buf16(2*xh+1),sn(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 Cw(e){var t;return!e||!e.state?ln(e,Wt):(e.total_in=e.total_out=0,e.data_type=uq,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?rc:fi,e.adler=t.wrap===2?0:1,t.last_flush=hi,zt._tr_init(t),br)}function kw(e){var t=Cw(e);return t===br&&Sq(e.state),t}function Eq(e,t){return!e||!e.state||e.state.wrap!==2?Wt:(e.state.gzhead=t,br)}function qw(e,t,r,n,i,o){if(!e)return Wt;var a=1;if(t===rq&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>sq||r!==tc||n<8||n>15||t<0||t>9||o<0||o>oq)return ln(e,Wt);n===8&&(n=9);var u=new Oq;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+_e-1)/_e),u.window=new yt.Buf8(u.w_size*2),u.head=new yt.Buf16(u.hash_size),u.prev=new yt.Buf16(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new yt.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,kw(e)}function Aq(e,t){return qw(e,t,tc,cq,lq,aq)}function Tq(e,t){var r,n,i,o;if(!e||!e.state||t>Aw||t<0)return e?ln(e,Wt):Wt;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===za&&t!==fn)return ln(e,e.avail_out===0?_h:Wt);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===rc)if(n.wrap===2)e.adler=0,xe(n,31),xe(n,139),xe(n,8),n.gzhead?(xe(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)),xe(n,n.gzhead.time&255),xe(n,n.gzhead.time>>8&255),xe(n,n.gzhead.time>>16&255),xe(n,n.gzhead.time>>24&255),xe(n,n.level===9?2:n.strategy>=Zs||n.level<2?4:0),xe(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(xe(n,n.gzhead.extra.length&255),xe(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=Sh):(xe(n,0),xe(n,0),xe(n,0),xe(n,0),xe(n,0),xe(n,n.level===9?2:n.strategy>=Zs||n.level<2?4:0),xe(n,gq),n.status=fi);else{var a=tc+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=Zs||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=bq),a+=31-a%31,n.status=fi,Ba(n,a),n.strstart!==0&&(Ba(n,e.adler>>>16),Ba(n,e.adler&65535)),e.adler=1}if(n.status===Sh)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)),un(e),i=n.pending,n.pending===n.pending_buf_size));)xe(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=Js)}else n.status=Js;if(n.status===Js)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)),un(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,xe(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=Qs)}else n.status=Qs;if(n.status===Qs)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)),un(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,xe(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=ec)}else n.status=ec;if(n.status===ec&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&un(e),n.pending+2<=n.pending_buf_size&&(xe(n,e.adler&255),xe(n,e.adler>>8&255),e.adler=0,n.status=fi)):n.status=fi),n.pending!==0){if(un(e),e.avail_out===0)return n.last_flush=-1,br}else if(e.avail_in===0&&Rw(t)<=Rw(r)&&t!==fn)return ln(e,_h);if(n.status===za&&e.avail_in!==0)return ln(e,_h);if(e.avail_in!==0||n.lookahead!==0||t!==hi&&n.status!==za){var l=n.strategy===Zs?xq(n,t):n.strategy===iq?wq(n,t):ho[n.level].func(n,t);if((l===di||l===mo)&&(n.status=za),l===Xe||l===di)return e.avail_out===0&&(n.last_flush=-1),br;if(l===Wa&&(t===Qk?zt._tr_align(n):t!==Aw&&(zt._tr_stored_block(n,0,0,!1),t===eq&&(sn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),un(e),e.avail_out===0))return n.last_flush=-1,br}return t!==fn?br:n.wrap<=0?Tw:(n.wrap===2?(xe(n,e.adler&255),xe(n,e.adler>>8&255),xe(n,e.adler>>16&255),xe(n,e.adler>>24&255),xe(n,e.total_in&255),xe(n,e.total_in>>8&255),xe(n,e.total_in>>16&255),xe(n,e.total_in>>24&255)):(Ba(n,e.adler>>>16),Ba(n,e.adler&65535)),un(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?br:Tw)}function Rq(e){var t;return!e||!e.state?Wt:(t=e.state.status,t!==rc&&t!==Sh&&t!==Js&&t!==Qs&&t!==ec&&t!==fi&&t!==za?ln(e,Wt):(e.state=null,t===fi?ln(e,tq):br))}function Pq(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!==rc||n.lookahead))return Wt;for(a===1&&(e.adler=Pw(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(sn(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),u=e.avail_in,l=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,pi(n);n.lookahead>=_e;){i=n.strstart,o=n.lookahead-(_e-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+_e-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=_e-1,pi(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=_e-1,n.match_available=0,e.next_in=l,e.input=s,e.avail_in=u,n.wrap=a,br}gr.deflateInit=Aq;gr.deflateInit2=qw;gr.deflateReset=kw;gr.deflateResetKeep=Cw;gr.deflateSetHeader=Eq;gr.deflate=Tq;gr.deflateEnd=Rq;gr.deflateSetDictionary=Pq;gr.deflateInfo="pako deflate (from Nodeca project)"});var Oh=g(vo=>{"use strict";var nc=Ir(),jw=!0,Fw=!0;try{String.fromCharCode.apply(null,[0])}catch{jw=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Fw=!1}var Ua=new nc.Buf8(256);for(Fr=0;Fr<256;Fr++)Ua[Fr]=Fr>=252?6:Fr>=248?5:Fr>=240?4:Fr>=224?3:Fr>=192?2:1;var Fr;Ua[254]=Ua[254]=1;vo.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 nc.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 Lw(e,t){if(t<65534&&(e.subarray&&Fw||!e.subarray&&jw))return String.fromCharCode.apply(null,nc.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}vo.buf2binstring=function(e){return Lw(e,e.length)};vo.binstring2buf=function(e){for(var t=new nc.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t};vo.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=Ua[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 Lw(u,n)};vo.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+Ua[e[r]]>t?r:t}});var Eh=g((fQ,Nw)=>{"use strict";function Mq(){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}Nw.exports=Mq});var Ww=g(Ga=>{"use strict";var Ha=Iw(),Va=Ir(),Th=Oh(),Rh=Xs(),Cq=Eh(),zw=Object.prototype.toString,kq=0,Ah=4,bo=0,Dw=1,Bw=2,qq=-1,Iq=0,jq=8;function mi(e){if(!(this instanceof mi))return new mi(e);this.options=Va.assign({level:qq,method:jq,chunkSize:16384,windowBits:15,memLevel:8,strategy:Iq,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 Cq,this.strm.avail_out=0;var r=Ha.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==bo)throw new Error(Rh[r]);if(t.header&&Ha.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Th.string2buf(t.dictionary):zw.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Ha.deflateSetDictionary(this.strm,n),r!==bo)throw new Error(Rh[r]);this._dict_set=!0}}mi.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?Ah:kq,typeof e=="string"?r.input=Th.string2buf(e):zw.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 Va.Buf8(n),r.next_out=0,r.avail_out=n),i=Ha.deflate(r,o),i!==Dw&&i!==bo)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===Ah||o===Bw))&&(this.options.to==="string"?this.onData(Th.buf2binstring(Va.shrinkBuf(r.output,r.next_out))):this.onData(Va.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==Dw);return o===Ah?(i=Ha.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===bo):(o===Bw&&(this.onEnd(bo),r.avail_out=0),!0)};mi.prototype.onData=function(e){this.chunks.push(e)};mi.prototype.onEnd=function(e){e===bo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Va.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ph(e,t){var r=new mi(t);if(r.push(e,!0),r.err)throw r.msg||Rh[r.err];return r.result}function Fq(e,t){return t=t||{},t.raw=!0,Ph(e,t)}function Lq(e,t){return t=t||{},t.gzip=!0,Ph(e,t)}Ga.Deflate=mi;Ga.deflate=Ph;Ga.deflateRaw=Fq;Ga.gzip=Lq});var Hw=g((pQ,Uw)=>{"use strict";var ic=30,Nq=12;Uw.exports=function(t,r){var n,i,o,a,u,l,s,c,f,d,p,m,h,v,y,w,_,x,S,E,R,T,C,M,q;n=t.state,i=t.next_in,M=t.input,o=i+(t.avail_in-5),a=t.next_out,q=t.output,u=a-(r-t.avail_out),l=a+(t.avail_out-257),s=n.dmax,c=n.wsize,f=n.whave,d=n.wnext,p=n.window,m=n.hold,h=n.bits,v=n.lencode,y=n.distcode,w=(1<<n.lenbits)-1,_=(1<<n.distbits)-1;e:do{h<15&&(m+=M[i++]<<h,h+=8,m+=M[i++]<<h,h+=8),x=v[m&w];t:for(;;){if(S=x>>>24,m>>>=S,h-=S,S=x>>>16&255,S===0)q[a++]=x&65535;else if(S&16){E=x&65535,S&=15,S&&(h<S&&(m+=M[i++]<<h,h+=8),E+=m&(1<<S)-1,m>>>=S,h-=S),h<15&&(m+=M[i++]<<h,h+=8,m+=M[i++]<<h,h+=8),x=y[m&_];r:for(;;){if(S=x>>>24,m>>>=S,h-=S,S=x>>>16&255,S&16){if(R=x&65535,S&=15,h<S&&(m+=M[i++]<<h,h+=8,h<S&&(m+=M[i++]<<h,h+=8)),R+=m&(1<<S)-1,R>s){t.msg="invalid distance too far back",n.mode=ic;break e}if(m>>>=S,h-=S,S=a-u,R>S){if(S=R-S,S>f&&n.sane){t.msg="invalid distance too far back",n.mode=ic;break e}if(T=0,C=p,d===0){if(T+=c-S,S<E){E-=S;do q[a++]=p[T++];while(--S);T=a-R,C=q}}else if(d<S){if(T+=c+d-S,S-=d,S<E){E-=S;do q[a++]=p[T++];while(--S);if(T=0,d<E){S=d,E-=S;do q[a++]=p[T++];while(--S);T=a-R,C=q}}}else if(T+=d-S,S<E){E-=S;do q[a++]=p[T++];while(--S);T=a-R,C=q}for(;E>2;)q[a++]=C[T++],q[a++]=C[T++],q[a++]=C[T++],E-=3;E&&(q[a++]=C[T++],E>1&&(q[a++]=C[T++]))}else{T=a-R;do q[a++]=q[T++],q[a++]=q[T++],q[a++]=q[T++],E-=3;while(E>2);E&&(q[a++]=q[T++],E>1&&(q[a++]=q[T++]))}}else if((S&64)===0){x=y[(x&65535)+(m&(1<<S)-1)];continue r}else{t.msg="invalid distance code",n.mode=ic;break e}break}}else if((S&64)===0){x=v[(x&65535)+(m&(1<<S)-1)];continue t}else if(S&32){n.mode=Nq;break e}else{t.msg="invalid literal/length code",n.mode=ic;break e}break}}while(i<o&&a<l);E=h>>3,i-=E,h-=E<<3,m&=(1<<h)-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=m,n.bits=h}});var Zw=g((hQ,Xw)=>{"use strict";var Vw=Ir(),go=15,Gw=852,$w=592,Kw=0,Mh=1,Yw=2,Dq=[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],Bq=[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],zq=[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],Wq=[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];Xw.exports=function(t,r,n,i,o,a,u,l){var s=l.bits,c=0,f=0,d=0,p=0,m=0,h=0,v=0,y=0,w=0,_=0,x,S,E,R,T,C=null,M=0,q,z=new Vw.Buf16(go+1),D=new Vw.Buf16(go+1),A=null,I=0,W,j,P;for(c=0;c<=go;c++)z[c]=0;for(f=0;f<i;f++)z[r[n+f]]++;for(m=s,p=go;p>=1&&z[p]===0;p--);if(m>p&&(m=p),p===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d<p&&z[d]===0;d++);for(m<d&&(m=d),y=1,c=1;c<=go;c++)if(y<<=1,y-=z[c],y<0)return-1;if(y>0&&(t===Kw||p!==1))return-1;for(D[1]=0,c=1;c<go;c++)D[c+1]=D[c]+z[c];for(f=0;f<i;f++)r[n+f]!==0&&(u[D[r[n+f]]++]=f);if(t===Kw?(C=A=u,q=19):t===Mh?(C=Dq,M-=257,A=Bq,I-=257,q=256):(C=zq,A=Wq,q=-1),_=0,f=0,c=d,T=a,h=m,v=0,E=-1,w=1<<m,R=w-1,t===Mh&&w>Gw||t===Yw&&w>$w)return 1;for(;;){W=c-v,u[f]<q?(j=0,P=u[f]):u[f]>q?(j=A[I+u[f]],P=C[M+u[f]]):(j=96,P=0),x=1<<c-v,S=1<<h,d=S;do S-=x,o[T+(_>>v)+S]=W<<24|j<<16|P|0;while(S!==0);for(x=1<<c-1;_&x;)x>>=1;if(x!==0?(_&=x-1,_+=x):_=0,f++,--z[c]===0){if(c===p)break;c=r[n+u[f]]}if(c>m&&(_&R)!==E){for(v===0&&(v=m),T+=d,h=c-v,y=1<<h;h+v<p&&(y-=z[h+v],!(y<=0));)h++,y<<=1;if(w+=1<<h,t===Mh&&w>Gw||t===Yw&&w>$w)return 1;E=_&R,o[E]=m<<24|h<<16|T-a|0}}return _!==0&&(o[T+_]=c-v<<24|64<<16|0),l.bits=m,0}});var kx=g(er=>{"use strict";var qt=Ir(),Fh=gh(),yr=yh(),Uq=Hw(),$a=Zw(),Hq=0,Sx=1,Ox=2,Jw=4,Vq=5,oc=6,vi=0,Gq=1,$q=2,Ut=-2,Ex=-3,Lh=-4,Kq=-5,Qw=8,Ax=1,ex=2,tx=3,rx=4,nx=5,ix=6,ox=7,ax=8,ux=9,sx=10,sc=11,Lr=12,Ch=13,cx=14,kh=15,lx=16,fx=17,dx=18,px=19,ac=20,uc=21,hx=22,mx=23,vx=24,bx=25,gx=26,qh=27,yx=28,_x=29,Fe=30,Nh=31,Yq=32,Xq=852,Zq=592,Jq=15,Qq=Jq;function wx(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function eI(){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 qt.Buf16(320),this.work=new qt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Tx(e){var t;return!e||!e.state?Ut:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ax,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new qt.Buf32(Xq),t.distcode=t.distdyn=new qt.Buf32(Zq),t.sane=1,t.back=-1,vi)}function Rx(e){var t;return!e||!e.state?Ut:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Tx(e))}function Px(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ut:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Rx(e))}function Mx(e,t){var r,n;return e?(n=new eI,e.state=n,n.window=null,r=Px(e,t),r!==vi&&(e.state=null),r):Ut}function tI(e){return Mx(e,Qq)}var xx=!0,Ih,jh;function rI(e){if(xx){var t;for(Ih=new qt.Buf32(512),jh=new qt.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($a(Sx,e.lens,0,288,Ih,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;$a(Ox,e.lens,0,32,jh,0,e.work,{bits:5}),xx=!1}e.lencode=Ih,e.lenbits=9,e.distcode=jh,e.distbits=5}function Cx(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 qt.Buf8(o.wsize)),n>=o.wsize?(qt.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),qt.arraySet(o.window,t,r-n,i,o.wnext),n-=i,n?(qt.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 nI(e,t){var r,n,i,o,a,u,l,s,c,f,d,p,m,h,v=0,y,w,_,x,S,E,R,T,C=new qt.Buf8(4),M,q,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ut;r=e.state,r.mode===Lr&&(r.mode=Ch),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,d=l,T=vi;e:for(;;)switch(r.mode){case Ax:if(r.wrap===0){r.mode=Ch;break}for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.wrap&2&&s===35615){r.check=0,C[0]=s&255,C[1]=s>>>8&255,r.check=yr(r.check,C,2,0),s=0,c=0,r.mode=ex;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=Fe;break}if((s&15)!==Qw){e.msg="unknown compression method",r.mode=Fe;break}if(s>>>=4,c-=4,R=(s&15)+8,r.wbits===0)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=Fe;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=s&512?sx:Lr,s=0,c=0;break;case ex:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==Qw){e.msg="unknown compression method",r.mode=Fe;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Fe;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=yr(r.check,C,2,0)),s=0,c=0,r.mode=tx;case tx:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.time=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,C[2]=s>>>16&255,C[3]=s>>>24&255,r.check=yr(r.check,C,4,0)),s=0,c=0,r.mode=rx;case rx:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=yr(r.check,C,2,0)),s=0,c=0,r.mode=nx;case nx:if(r.flags&1024){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=yr(r.check,C,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=ix;case ix:if(r.flags&1024&&(p=r.length,p>u&&(p=u),p&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),qt.arraySet(r.head.extra,n,o,p,R)),r.flags&512&&(r.check=yr(r.check,n,p,o)),u-=p,o+=p,r.length-=p),r.length))break e;r.length=0,r.mode=ox;case ox:if(r.flags&2048){if(u===0)break e;p=0;do R=n[o+p++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R));while(R&&p<u);if(r.flags&512&&(r.check=yr(r.check,n,p,o)),u-=p,o+=p,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=ax;case ax:if(r.flags&4096){if(u===0)break e;p=0;do R=n[o+p++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R));while(R&&p<u);if(r.flags&512&&(r.check=yr(r.check,n,p,o)),u-=p,o+=p,R)break e}else r.head&&(r.head.comment=null);r.mode=ux;case ux: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=Fe;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=Lr;break;case sx:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=wx(s),s=0,c=0,r.mode=sc;case sc: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,$q;e.adler=r.check=1,r.mode=Lr;case Lr:if(t===Vq||t===oc)break e;case Ch:if(r.last){s>>>=c&7,c-=c&7,r.mode=qh;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=cx;break;case 1:if(rI(r),r.mode=ac,t===oc){s>>>=2,c-=2;break e}break;case 2:r.mode=fx;break;case 3:e.msg="invalid block type",r.mode=Fe}s>>>=2,c-=2;break;case cx: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=Fe;break}if(r.length=s&65535,s=0,c=0,r.mode=kh,t===oc)break e;case kh:r.mode=lx;case lx:if(p=r.length,p){if(p>u&&(p=u),p>l&&(p=l),p===0)break e;qt.arraySet(i,n,o,p,a),u-=p,o+=p,l-=p,a+=p,r.length-=p;break}r.mode=Lr;break;case fx: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=Fe;break}r.have=0,r.mode=dx;case dx:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[z[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},T=$a(Hq,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,T){e.msg="invalid code lengths set",r.mode=Fe;break}r.have=0,r.mode=px;case px:for(;r.have<r.nlen+r.ndist;){for(;v=r.lencode[s&(1<<r.lenbits)-1],y=v>>>24,w=v>>>16&255,_=v&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(_<16)s>>>=y,c-=y,r.lens[r.have++]=_;else{if(_===16){for(q=y+2;c<q;){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=Fe;break}R=r.lens[r.have-1],p=3+(s&3),s>>>=2,c-=2}else if(_===17){for(q=y+3;c<q;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=y,c-=y,R=0,p=3+(s&7),s>>>=3,c-=3}else{for(q=y+7;c<q;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=y,c-=y,R=0,p=11+(s&127),s>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Fe;break}for(;p--;)r.lens[r.have++]=R}}if(r.mode===Fe)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Fe;break}if(r.lenbits=9,M={bits:r.lenbits},T=$a(Sx,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,T){e.msg="invalid literal/lengths set",r.mode=Fe;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},T=$a(Ox,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,T){e.msg="invalid distances set",r.mode=Fe;break}if(r.mode=ac,t===oc)break e;case ac:r.mode=uc;case uc: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,Uq(e,d),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===Lr&&(r.back=-1);break}for(r.back=0;v=r.lencode[s&(1<<r.lenbits)-1],y=v>>>24,w=v>>>16&255,_=v&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=y,S=w,E=_;v=r.lencode[E+((s&(1<<x+S)-1)>>x)],y=v>>>24,w=v>>>16&255,_=v&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=gx;break}if(w&32){r.back=-1,r.mode=Lr;break}if(w&64){e.msg="invalid literal/length code",r.mode=Fe;break}r.extra=w&15,r.mode=hx;case hx:if(r.extra){for(q=r.extra;c<q;){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=mx;case mx:for(;v=r.distcode[s&(1<<r.distbits)-1],y=v>>>24,w=v>>>16&255,_=v&65535,!(y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((w&240)===0){for(x=y,S=w,E=_;v=r.distcode[E+((s&(1<<x+S)-1)>>x)],y=v>>>24,w=v>>>16&255,_=v&65535,!(x+y<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=y,c-=y,r.back+=y,w&64){e.msg="invalid distance code",r.mode=Fe;break}r.offset=_,r.extra=w&15,r.mode=vx;case vx:if(r.extra){for(q=r.extra;c<q;){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=Fe;break}r.mode=bx;case bx:if(l===0)break e;if(p=d-l,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Fe;break}p>r.wnext?(p-=r.wnext,m=r.wsize-p):m=r.wnext-p,p>r.length&&(p=r.length),h=r.window}else h=i,m=a-r.offset,p=r.length;p>l&&(p=l),l-=p,r.length-=p;do i[a++]=h[m++];while(--p);r.length===0&&(r.mode=uc);break;case gx:if(l===0)break e;i[a++]=r.length,l--,r.mode=uc;break;case qh:if(r.wrap){for(;c<32;){if(u===0)break e;u--,s|=n[o++]<<c,c+=8}if(d-=l,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?yr(r.check,i,d,a-d):Fh(r.check,i,d,a-d)),d=l,(r.flags?s:wx(s))!==r.check){e.msg="incorrect data check",r.mode=Fe;break}s=0,c=0}r.mode=yx;case yx: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=Fe;break}s=0,c=0}r.mode=_x;case _x:T=Gq;break e;case Fe:T=Ex;break e;case Nh:return Lh;case Yq:default:return Ut}return e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<Fe&&(r.mode<qh||t!==Jw))&&Cx(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Nh,Lh):(f-=e.avail_in,d-=e.avail_out,e.total_in+=f,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?yr(r.check,i,d,e.next_out-d):Fh(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Lr?128:0)+(r.mode===ac||r.mode===kh?256:0),(f===0&&d===0||t===Jw)&&T===vi&&(T=Kq),T)}function iI(e){if(!e||!e.state)return Ut;var t=e.state;return t.window&&(t.window=null),e.state=null,vi}function oI(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Ut:(r.head=t,t.done=!1,vi)}function aI(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==sc)?Ut:n.mode===sc&&(i=1,i=Fh(i,t,r,0),i!==n.check)?Ex:(o=Cx(e,t,r,r),o?(n.mode=Nh,Lh):(n.havedict=1,vi))}er.inflateReset=Rx;er.inflateReset2=Px;er.inflateResetKeep=Tx;er.inflateInit=tI;er.inflateInit2=Mx;er.inflate=nI;er.inflateEnd=iI;er.inflateGetHeader=oI;er.inflateSetDictionary=aI;er.inflateInfo="pako inflate (from Nodeca project)"});var Dh=g((vQ,qx)=>{"use strict";qx.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 jx=g((bQ,Ix)=>{"use strict";function uI(){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}Ix.exports=uI});var Lx=g(Ya=>{"use strict";var yo=kx(),Ka=Ir(),cc=Oh(),He=Dh(),Bh=Xs(),sI=Eh(),cI=jx(),Fx=Object.prototype.toString;function bi(e){if(!(this instanceof bi))return new bi(e);this.options=Ka.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 sI,this.strm.avail_out=0;var r=yo.inflateInit2(this.strm,t.windowBits);if(r!==He.Z_OK)throw new Error(Bh[r]);if(this.header=new cI,yo.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=cc.string2buf(t.dictionary):Fx.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=yo.inflateSetDictionary(this.strm,t.dictionary),r!==He.Z_OK)))throw new Error(Bh[r])}bi.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?He.Z_FINISH:He.Z_NO_FLUSH,typeof e=="string"?r.input=cc.binstring2buf(e):Fx.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Ka.Buf8(n),r.next_out=0,r.avail_out=n),o=yo.inflate(r,He.Z_NO_FLUSH),o===He.Z_NEED_DICT&&i&&(o=yo.inflateSetDictionary(this.strm,i)),o===He.Z_BUF_ERROR&&c===!0&&(o=He.Z_OK,c=!1),o!==He.Z_STREAM_END&&o!==He.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===He.Z_STREAM_END||r.avail_in===0&&(a===He.Z_FINISH||a===He.Z_SYNC_FLUSH))&&(this.options.to==="string"?(u=cc.utf8border(r.output,r.next_out),l=r.next_out-u,s=cc.buf2string(r.output,u),r.next_out=l,r.avail_out=n-l,l&&Ka.arraySet(r.output,r.output,u,l,0),this.onData(s)):this.onData(Ka.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!==He.Z_STREAM_END);return o===He.Z_STREAM_END&&(a=He.Z_FINISH),a===He.Z_FINISH?(o=yo.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===He.Z_OK):(a===He.Z_SYNC_FLUSH&&(this.onEnd(He.Z_OK),r.avail_out=0),!0)};bi.prototype.onData=function(e){this.chunks.push(e)};bi.prototype.onEnd=function(e){e===He.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ka.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function zh(e,t){var r=new bi(t);if(r.push(e,!0),r.err)throw r.msg||Bh[r.err];return r.result}function lI(e,t){return t=t||{},t.raw=!0,zh(e,t)}Ya.Inflate=bi;Ya.inflate=zh;Ya.inflateRaw=lI;Ya.ungzip=zh});var Bx=g((yQ,Dx)=>{"use strict";var fI=Ir().assign,dI=Ww(),pI=Lx(),hI=Dh(),Nx={};fI(Nx,dI,pI,hI);Dx.exports=Nx});var Wh=g(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.sum=zx;lc.concatUint8Array=mI;function zx(e){let t=0;for(let r of e)t+=r.length;return t}function mI(e){let t=new Uint8Array(zx(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}});var Uh=g(_o=>{"use strict";var vI=_o&&_o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_o,"__esModule",{value:!0});_o.unzip=gI;_o.unzipChunkSlice=yI;var bI=vI(Bx()),Wx=Wh(),{Z_SYNC_FLUSH:Ux,Inflate:Hx}=bI.default;async function gI(e){try{let t,r=0,n,i=[];do{let o=e.subarray(r);if(n=new Hx,{strm:t}=n,n.push(o,Ux),n.err)throw new Error(n.msg);r+=t.next_in,i.push(n.result)}while(t.avail_in);return(0,Wx.concatUint8Array)(i)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function yI(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),d=new Hx;if({strm:r}=d,d.push(f,Ux),d.err)throw new Error(d.msg);let p=d.result;u.push(p);let m=p.length;l.push(o),s.push(a),u.length===1&&n.dataPosition&&(u[0]=u[0].subarray(n.dataPosition),m=u[0].length);let h=o;if(o+=r.next_in,a+=m,h>=i.blockPosition){u[c]=u[c].subarray(0,i.blockPosition===n.blockPosition?i.dataPosition-n.dataPosition+1:i.dataPosition+1),l.push(o),s.push(a);break}c++}while(r.avail_in);return{buffer:(0,Wx.concatUint8Array)(u),cpositions:l,dpositions:s}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}});var Vx=g(Xa=>{"use strict";var _I=Xa&&Xa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xa,"__esModule",{value:!0});var wI=_I(Q0()),xI=Uh(),SI=Wh(),Hh=class{constructor({filehandle:t,gziFilehandle:r}){this.filehandle=t,this.gzi=new wI.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,xI.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,SI.concatUint8Array)(i)}};Xa.default=Hh});var $x=g(_r=>{"use strict";var OI=_r&&_r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_r,"__esModule",{value:!0});_r.unzipChunkSlice=_r.unzip=_r.BgzfFilehandle=void 0;var EI=Vx();Object.defineProperty(_r,"BgzfFilehandle",{enumerable:!0,get:function(){return OI(EI).default}});var Gx=Uh();Object.defineProperty(_r,"unzip",{enumerable:!0,get:function(){return Gx.unzip}});Object.defineProperty(_r,"unzipChunkSlice",{enumerable:!0,get:function(){return Gx.unzipChunkSlice}})});var Kx=g(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});Gh.default=AI;var Vh=qe();function AI(){let e=(0,Vh.useRef)(null),[t,r]=(0,Vh.useState)({width:void 0,height:void 0});return(0,Vh.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 Xx=g((EQ,Yx)=>{Yx.exports=JBrowseExports["react-dom/client"]});var Zh=g(gi=>{Object.defineProperty(gi,"__esModule",{value:!0});var TI={grad:.9,turn:360,rad:360/(2*Math.PI)},Nr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},rt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Ht=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},i1=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Zx=function(e){return{r:Ht(e.r,0,255),g:Ht(e.g,0,255),b:Ht(e.b,0,255),a:Ht(e.a)}},$h=function(e){return{r:rt(e.r),g:rt(e.g),b:rt(e.b),a:rt(e.a,3)}},RI=/^#([0-9a-f]{3,8})$/i,fc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},o1=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}},a1=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}},Jx=function(e){return{h:i1(e.h),s:Ht(e.s,0,100),l:Ht(e.l,0,100),a:Ht(e.a)}},Qx=function(e){return{h:rt(e.h),s:rt(e.s),l:rt(e.l),a:rt(e.a,3)}},e1=function(e){return a1((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},Za=function(e){return{h:(t=o1(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},PI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,MI=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,CI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kI=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xh={string:[[function(e){var t=RI.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?rt(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?rt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=CI.exec(e)||kI.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Zx({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=PI.exec(e)||MI.exec(e);if(!t)return null;var r,n,i=Jx({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(TI[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return e1(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 Nr(t)&&Nr(r)&&Nr(n)?Zx({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(!Nr(t)||!Nr(r)||!Nr(n))return null;var a=Jx({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return e1(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Nr(t)||!Nr(r)||!Nr(n))return null;var a=function(u){return{h:i1(u.h),s:Ht(u.s,0,100),v:Ht(u.v,0,100),a:Ht(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return a1(a)},"hsv"]]},t1=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]},u1=function(e){return typeof e=="string"?t1(e.trim(),Xh.string):typeof e=="object"&&e!==null?t1(e,Xh.object):[null,void 0]},Kh=function(e,t){var r=Za(e);return{h:r.h,s:Ht(r.s+100*t,0,100),l:r.l,a:r.a}},Yh=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},r1=function(e,t){var r=Za(e);return{h:r.h,s:r.s,l:Ht(r.l+100*t,0,100),a:r.a}},Ja=function(){function e(t){this.parsed=u1(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return rt(Yh(this.rgba),2)},e.prototype.isDark=function(){return Yh(this.rgba)<.5},e.prototype.isLight=function(){return Yh(this.rgba)>=.5},e.prototype.toHex=function(){return t=$h(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?fc(rt(255*o)):"","#"+fc(r)+fc(n)+fc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return $h(this.rgba)},e.prototype.toRgbString=function(){return t=$h(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 Qx(Za(this.rgba))},e.prototype.toHslString=function(){return t=Qx(Za(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=o1(this.rgba),{h:rt(t.h),s:rt(t.s),v:rt(t.v),a:rt(t.a,3)};var t},e.prototype.invert=function(){return wr({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),wr(Kh(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),wr(Kh(this.rgba,-t))},e.prototype.grayscale=function(){return wr(Kh(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),wr(r1(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),wr(r1(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"?wr({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):rt(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=Za(this.rgba);return typeof t=="number"?wr({h:t,s:r.s,l:r.l,a:r.a}):rt(r.h)},e.prototype.isEqual=function(t){return this.toHex()===wr(t).toHex()},e}(),wr=function(e){return e instanceof Ja?e:new Ja(e)},n1=[];gi.Colord=Ja,gi.colord=wr,gi.extend=function(e){e.forEach(function(t){n1.indexOf(t)<0&&(t(Ja,Xh),n1.push(t))})},gi.getFormat=function(e){return u1(e)[1]},gi.random=function(){return new Ja({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var l1=g((TQ,c1)=>{var xr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Jh=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Qh=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},em=96.422,tm=100,rm=82.521,qI=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:Qh(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:Qh(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:Qh(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:xr(r.r,0,255),g:xr(r.g,0,255),b:xr(r.b,0,255),a:xr(r.a)}},II=function(e){var t=Jh(e.r),r=Jh(e.g),n=Jh(e.b);return function(i){return{x:xr(i.x,0,em),y:xr(i.y,0,tm),z:xr(i.z,0,rm),a:xr(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}))},Qa=216/24389,wo=24389/27,s1=function(e){var t=II(e),r=t.x/em,n=t.y/tm,i=t.z/rm;return r=r>Qa?Math.cbrt(r):(wo*r+16)/116,{l:116*(n=n>Qa?Math.cbrt(n):(wo*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>Qa?Math.cbrt(i):(wo*i+16)/116)),alpha:t.a}},jI=function(e,t,r){var n,i=s1(e),o=s1(t);return function(a){var u=(a.l+16)/116,l=a.a/500+u,s=u-a.b/200;return qI({x:(Math.pow(l,3)>Qa?Math.pow(l,3):(116*l-16)/wo)*em,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/wo)*tm,z:(Math.pow(s,3)>Qa?Math.pow(s,3):(116*s-16)/wo)*rm,a:a.alpha})}({l:xr((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:xr(n.alpha)})};c1.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=jI(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 d1=g((RQ,f1)=>{f1.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,d="black";if(!o.length)for(var p in r)o[p]=new e(r[p]).toRgb();for(var m in r){var h=(u=c,l=o[m],Math.pow(u.r-l.r,2)+Math.pow(u.g-l.g,2)+Math.pow(u.b-l.b,2));h<f&&(f=h,d=m)}return d}},t.string.push([function(a){var u=a.toLowerCase(),l=u==="transparent"?"#0000":r[u];return l?new e(l).toRgb():null},"name"])}});var m1=g(dn=>{"use strict";var p1=dn&&dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dn,"__esModule",{value:!0});dn.colord=dn.Colord=void 0;var FI=Zh(),LI=p1(l1()),NI=p1(d1());(0,FI.extend)([LI.default,NI.default]);var h1=Zh();Object.defineProperty(dn,"Colord",{enumerable:!0,get:function(){return h1.Colord}});Object.defineProperty(dn,"colord",{enumerable:!0,get:function(){return h1.colord}})});var nm=g(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.createStopToken=BI;eu.stopStopToken=zI;eu.checkStopToken=WI;function DI(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function BI(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function zI(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function WI(e){if(typeof jest>"u"&&e!==void 0&&DI()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var b1=g(v1=>{"use strict";Object.defineProperty(v1,"__esModule",{value:!0})});var O1=g((kQ,S1)=>{"use strict";var w1=(e,t)=>e>t?1:e<t?-1:0,im=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),g1="eexxaacctt",UI=/\p{P}/gu,HI=["en",{numeric:!0,sensitivity:"base"}],xo=(e,t,r)=>e.replace("A-Z",t).replace("a-z",r),y1={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=w1)=>{let{idx:i,chars:o,terms:a,interLft2:u,interLft1:l,start:s,intraIns:c,interIns:f,cases:d}=e;return i.map((p,m)=>m).sort((p,m)=>o[m]-o[p]||c[p]-c[m]||a[m]+u[m]+.5*l[m]-(a[p]+u[p]+.5*l[p])||f[p]-f[m]||s[p]-s[m]||d[m]-d[p]||n(t[i[p]],t[i[m]]))}},om=(e,t)=>t==0?"":t==1?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`,_1="(?:\\b|_)";function dc(e){e=Object.assign({},y1,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:d,intraBound:p,interBound:m,intraChars:h,toUpper:v,toLower:y,compare:w}=e;a??=i,u??=i,l??=i,s??=i,w??=typeof Intl>"u"?w1:new Intl.Collator(...HI).compare;let _=e.letters??e.alpha;if(_!=null){let N=v(_),Q=y(_);d=xo(d,N,Q),f=xo(f,N,Q),m=xo(m,N,Q),p=xo(p,N,Q),h=xo(h,N,Q),c=xo(c,N,Q)}let x=t?"u":"",S='".+?"',E=new RegExp(S,"gi"+x),R=new RegExp(`(?:\\s+|^)-(?:${h}+|${S})`,"gi"+x),{intraRules:T}=e;T==null&&(T=N=>{let Q=y1.intraSlice,oe=0,ne=0,K=0,te=0;if(/[^\d]/.test(N)){let de=N.length;de<=4?de>=3&&(K=Math.min(l,1),de==4&&(oe=Math.min(a,1))):(Q=o,oe=a,ne=u,K=l,te=s)}return{intraSlice:Q,intraIns:oe,intraSub:ne,intraTrn:K,intraDel:te}});let C=!!f,M=new RegExp(f,"g"+x),q=new RegExp(d,"g"+x),z=new RegExp("^"+d+"|"+d+"$","g"+x),D=new RegExp(c,"gi"+x),A=(N,Q=!1)=>{let oe=[];N=N.replace(E,K=>(oe.push(K),g1)),N=N.replace(z,""),Q||(N=y(N)),C&&(N=N.replace(M,K=>K[0]+" "+K[1]));let ne=0;return N.split(q).filter(K=>K!="").map(K=>K===g1?oe[ne++]:K)},I=/[^\d]+|\d+/g,W=(N,Q=0,oe=!1)=>{let ne=A(N);if(ne.length==0)return[];let K=Array(ne.length).fill("");ne=ne.map((ee,fe)=>ee.replace(D,he=>(K[fe]=he,"")));let te;if(i==1)te=ne.map((ee,fe)=>{if(ee[0]==='"')return im(ee.slice(1,-1));let he="";for(let re of ee.matchAll(I)){let Y=re[0],{intraSlice:ie,intraIns:ce,intraSub:ae,intraTrn:B,intraDel:$}=T(Y);if(ce+ae+B+$==0)he+=Y+K[fe];else{let[H,se]=ie,pe=Y.slice(0,H),Ee=Y.slice(se),ke=Y.slice(H,se);ce==1&&pe.length==1&&pe!=ke[0]&&(pe+="(?!"+pe+")");let jt=ke.length,_t=[Y];if(ae)for(let ge=0;ge<jt;ge++)_t.push(pe+ke.slice(0,ge)+h+ke.slice(ge+1)+Ee);if(B)for(let ge=0;ge<jt-1;ge++)ke[ge]!=ke[ge+1]&&_t.push(pe+ke.slice(0,ge)+ke[ge+1]+ke[ge]+ke.slice(ge+2)+Ee);if($)for(let ge=0;ge<jt;ge++)_t.push(pe+ke.slice(0,ge+1)+"?"+ke.slice(ge+1)+Ee);if(ce){let ge=om(h,1);for(let ft=0;ft<jt;ft++)_t.push(pe+ke.slice(0,ft)+ge+ke.slice(ft)+Ee)}he+="(?:"+_t.join("|")+")"+K[fe]}}return he});else{let ee=om(h,a);Q==2&&a>0&&(ee=")("+ee+")("),te=ne.map((fe,he)=>fe[0]==='"'?im(fe.slice(1,-1)):fe.split("").map((re,Y,ie)=>(a==1&&Y==0&&ie.length>1&&re!=ie[Y+1]&&(re+="(?!"+re+")"),re)).join(ee)+K[he])}let de=r==2?_1:"",Z=n==2?_1:"",ue=Z+om(e.interChars,e.interIns)+de;return Q>0?oe?te=de+"("+te.join(")"+Z+"|"+de+"(")+")"+Z:(te="("+te.join(")("+ue+")(")+")",te="(.??"+de+")"+te+"("+Z+".*)"):(te=te.join(ue),te=de+te+Z),[new RegExp(te,"i"+x),ne,K]},j=(N,Q,oe)=>{let[ne]=W(Q);if(ne==null)return null;let K=[];if(oe!=null)for(let te=0;te<oe.length;te++){let de=oe[te];ne.test(N[de])&&K.push(de)}else for(let te=0;te<N.length;te++)ne.test(N[te])&&K.push(te);return K},P=!!p,F=new RegExp(m,x),U=new RegExp(p,x),ye=(N,Q,oe)=>{let[ne,K,te]=W(oe,1),de=A(oe,!0),[Z]=W(oe,2),ue=K.length,ee=Array(ue),fe=Array(ue);for(let ae=0;ae<ue;ae++){let B=K[ae],$=de[ae],H=B[0]=='"'?B.slice(1,-1):B+te[ae],se=$[0]=='"'?$.slice(1,-1):$+te[ae];ee[ae]=H,fe[ae]=se}let he=N.length,re=Array(he).fill(0),Y={idx:Array(he),start:re.slice(),chars:re.slice(),cases:re.slice(),terms:re.slice(),interIns:re.slice(),intraIns:re.slice(),interLft2:re.slice(),interRgt2:re.slice(),interLft1:re.slice(),interRgt1:re.slice(),ranges:Array(he)},ie=r==1||n==1,ce=0;for(let ae=0;ae<N.length;ae++){let B=Q[N[ae]],$=B.match(ne),H=$.index+$[1].length,se=H,pe=!1,Ee=0,ke=0,jt=0,_t=0,ge=0,ft=0,Un=0,pa=0,ha=0,Ft=[];for(let Oe=0,Ce=2;Oe<ue;Oe++,Ce+=2){let ur=y($[Ce]),nt=ee[Oe],ji=fe[Oe],wt=nt.length,xt=ur.length,dt=ur==nt;if($[Ce]==ji&&Un++,!dt&&$[Ce+1].length>=wt){let Ue=y($[Ce+1]).indexOf(nt);Ue>-1&&(Ft.push(se,xt,Ue,wt),se+=J($,Ce,Ue,wt),ur=nt,xt=wt,dt=!0,Oe==0&&(H=se))}if(ie||dt){let Ue=se-1,Cr=se+xt,Hn=!1,ma=!1;if(Ue==-1||F.test(B[Ue]))dt&&Ee++,Hn=!0;else{if(r==2){pe=!0;break}if(P&&U.test(B[Ue]+B[Ue+1]))dt&&ke++,Hn=!0;else if(r==1){let $u=$[Ce+1],Fi=se+xt;if($u.length>=wt){let Vn=0,Li=!1,pP=new RegExp(nt,"ig"+x),Sb;for(;Sb=pP.exec($u);){Vn=Sb.index;let Ob=Fi+Vn,Ld=Ob-1;if(Ld==-1||F.test(B[Ld])){Ee++,Li=!0;break}else if(U.test(B[Ld]+B[Ob])){ke++,Li=!0;break}}Li&&(Hn=!0,Ft.push(se,xt,Vn,wt),se+=J($,Ce,Vn,wt),ur=nt,xt=wt,dt=!0,Oe==0&&(H=se))}if(!Hn){pe=!0;break}}}if(Cr==B.length||F.test(B[Cr]))dt&&jt++,ma=!0;else{if(n==2){pe=!0;break}if(P&&U.test(B[Cr-1]+B[Cr]))dt&&_t++,ma=!0;else if(n==1){pe=!0;break}}dt&&(ge+=wt,Hn&&ma&&ft++)}if(xt>wt&&(ha+=xt-wt),Oe>0&&(pa+=$[Ce-1].length),!e.intraFilt(nt,ur,se)){pe=!0;break}Oe<ue-1&&(se+=xt+$[Ce+1].length)}if(!pe){Y.idx[ce]=N[ae],Y.interLft2[ce]=Ee,Y.interLft1[ce]=ke,Y.interRgt2[ce]=jt,Y.interRgt1[ce]=_t,Y.chars[ce]=ge,Y.terms[ce]=ft,Y.cases[ce]=Un,Y.interIns[ce]=pa,Y.intraIns[ce]=ha,Y.start[ce]=H;let Oe=B.match(Z),Ce=Oe.index+Oe[1].length,ur=Ft.length,nt=ur>0?0:1/0,ji=ur-4;for(let Ue=2;Ue<Oe.length;){let Cr=Oe[Ue].length;if(nt<=ji&&Ft[nt]==Ce){let Hn=Ft[nt+1],ma=Ft[nt+2],$u=Ft[nt+3],Fi=Ue,Vn="";for(let Li=0;Li<Hn;Fi++)Vn+=Oe[Fi],Li+=Oe[Fi].length;Oe.splice(Ue,Fi-Ue,Vn),Ce+=J(Oe,Ue,ma,$u),nt+=4}else Ce+=Cr,Ue++}Ce=Oe.index+Oe[1].length;let wt=Y.ranges[ce]=[],xt=Ce,dt=Ce;for(let Ue=2;Ue<Oe.length;Ue++){let Cr=Oe[Ue].length;Ce+=Cr,Ue%2==0?dt=Ce:Cr>0&&(wt.push(xt,dt),xt=dt=Ce)}dt>xt&&wt.push(xt,dt),ce++}}if(ce<N.length)for(let ae in Y)Y[ae]=Y[ae].slice(0,ce);return Y},J=(N,Q,oe,ne)=>{let K=N[Q]+N[Q+1].slice(0,oe);return N[Q-1]+=K,N[Q]=N[Q+1].slice(oe,oe+ne),N[Q+1]=N[Q+1].slice(oe+ne),K.length},G=5,we=(N,Q,oe,ne=1e3,K)=>{oe=oe?oe===!0?G:oe:0;let te=null,de=null,Z=[];Q=Q.replace(R,Y=>{let ie=Y.trim().slice(1);return ie=ie[0]==='"'?im(ie.slice(1,-1)):ie.replace(UI,""),ie!=""&&Z.push(ie),""});let ue=A(Q),ee;if(Z.length>0){if(ee=new RegExp(Z.join("|"),"i"+x),ue.length==0){let Y=[];for(let ie=0;ie<N.length;ie++)ee.test(N[ie])||Y.push(ie);return[Y,null,null]}}else if(ue.length==0)return[null,null,null];if(oe>0){let Y=A(Q);if(Y.length>1){let ie=Y.slice().sort((ae,B)=>B.length-ae.length);for(let ae=0;ae<ie.length;ae++){if(K?.length==0)return[[],null,null];K=j(N,ie[ae],K)}if(Y.length>oe)return[K,null,null];te=x1(Y).map(ae=>ae.join(" ")),de=[];let ce=new Set;for(let ae=0;ae<te.length;ae++)if(ce.size<K.length){let B=K.filter(H=>!ce.has(H)),$=j(N,te[ae],B);for(let H=0;H<$.length;H++)ce.add($[H]);de.push($)}else de.push([])}}te==null&&(te=[Q],de=[K?.length>0?K:j(N,Q)]);let fe=null,he=null;if(Z.length>0&&(de=de.map(Y=>Y.filter(ie=>!ee.test(N[ie])))),de.reduce((Y,ie)=>Y+ie.length,0)<=ne){fe={},he=[];for(let Y=0;Y<de.length;Y++){let ie=de[Y];if(ie==null||ie.length==0)continue;let ce=te[Y],ae=ye(ie,N,ce),B=e.sort(ae,N,ce,w);if(Y>0)for(let $=0;$<B.length;$++)B[$]+=he.length;for(let $ in ae)fe[$]=(fe[$]??[]).concat(ae[$]);he=he.concat(B)}}return[[].concat(...de),fe,he]};return{search:(...N)=>we(...N),split:A,filter:j,info:ye,sort:e.sort}}var VI=(()=>{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 x1(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 GI=(e,t)=>t?`<mark>${e}</mark>`:e,$I=(e,t)=>e+t;function KI(e,t,r=GI,n="",i=$I){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}dc.latinize=VI;dc.permute=e=>x1([...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]));dc.highlight=KI;S1.exports=dc});var pn=g((qQ,tu)=>{function YI(e){return e&&e.__esModule?e:{default:e}}tu.exports=YI,tu.exports.__esModule=!0,tu.exports.default=tu.exports});var um=g((IQ,Dr)=>{function am(e){"@babel/helpers - typeof";return Dr.exports=am=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},Dr.exports.__esModule=!0,Dr.exports.default=Dr.exports,am(e)}Dr.exports=am,Dr.exports.__esModule=!0,Dr.exports.default=Dr.exports});var A1=g((jQ,ru)=>{var E1=um().default;function XI(e,t){if(E1(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(E1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}ru.exports=XI,ru.exports.__esModule=!0,ru.exports.default=ru.exports});var sm=g((FQ,nu)=>{var ZI=um().default,JI=A1();function QI(e){var t=JI(e,"string");return ZI(t)=="symbol"?t:t+""}nu.exports=QI,nu.exports.__esModule=!0,nu.exports.default=nu.exports});var T1=g((LQ,iu)=>{var ej=sm();function tj(e,t,r){return(t=ej(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}iu.exports=tj,iu.exports.__esModule=!0,iu.exports.default=iu.exports});var yi=g((NQ,ou)=>{function rj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}ou.exports=rj,ou.exports.__esModule=!0,ou.exports.default=ou.exports});var _i=g((DQ,au)=>{var nj=sm();function R1(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,nj(n.key),n)}}function ij(e,t,r){return t&&R1(e.prototype,t),r&&R1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}au.exports=ij,au.exports.__esModule=!0,au.exports.default=au.exports});var cm=g((BQ,uu)=>{function oj(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}uu.exports=oj,uu.exports.__esModule=!0,uu.exports.default=uu.exports});var P1=g((zQ,su)=>{var aj=cm();function uj(e){if(Array.isArray(e))return aj(e)}su.exports=uj,su.exports.__esModule=!0,su.exports.default=su.exports});var M1=g((WQ,cu)=>{function sj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}cu.exports=sj,cu.exports.__esModule=!0,cu.exports.default=cu.exports});var k1=g((UQ,lu)=>{var C1=cm();function cj(e,t){if(e){if(typeof e=="string")return C1(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)?C1(e,t):void 0}}lu.exports=cj,lu.exports.__esModule=!0,lu.exports.default=lu.exports});var q1=g((HQ,fu)=>{function lj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}fu.exports=lj,fu.exports.__esModule=!0,fu.exports.default=fu.exports});var I1=g((VQ,du)=>{var fj=P1(),dj=M1(),pj=k1(),hj=q1();function mj(e){return fj(e)||dj(e)||pj(e)||hj()}du.exports=mj,du.exports.__esModule=!0,du.exports.default=du.exports});var j1=g(Sr=>{"use strict";var vj=pn(),bj=vj(I1()),gj={functions:"Jexl Function",transforms:"Transform"};Sr.ArrayLiteral=function(e){return this.evalArray(e.value)};Sr.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])})};Sr.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)})};Sr.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)})};Sr.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]};Sr.Literal=function(e){return e.value};Sr.ObjectLiteral=function(e){return this.evalMap(e.value)};Sr.FunctionCall=function(e){var t=gj[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,bj.default)(i))})};Sr.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var N1=g(($Q,L1)=>{"use strict";var F1=pn(),yj=F1(yi()),_j=F1(_i()),wj=j1(),xj=function(){function e(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Promise;(0,yj.default)(this,e),this._grammar=t,this._context=r||{},this._relContext=n||this._context,this.Promise=i}return(0,_j.default)(e,[{key:"eval",value:function(r){var n=this;return this.Promise.resolve().then(function(){return wj[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}();L1.exports=xj});var W1=g((KQ,z1)=>{"use strict";var B1=pn(),Sj=B1(yi()),Oj=B1(_i()),Ej=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,D1=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,Aj=/\\\\/,Tj=/^\s*$/,Rj=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Pj=["[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]+)"],Mj=["binaryOp","unaryOp","openParen","openBracket","question","colon"],Cj=function(){function e(t){(0,Sj.default)(this,e),this._grammar=t}return(0,Oj.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(Ej))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(D1))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(D1)&&(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("("+[Rj.join("|"),n.join("|"),Pj.join("|")].join("|")+")")}return this._splitRegex}},{key:"_isNegative",value:function(r){return r.length?Mj.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(Tj)}},{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(Aj,"\\")}}]),e}();z1.exports=Cj});var lm=g(Ze=>{"use strict";Ze.argVal=function(e){e&&this._cursor.args.push(e)};Ze.arrayStart=function(){this._placeAtCursor({type:"ArrayLiteral",value:[]})};Ze.arrayVal=function(e){e&&this._cursor.value.push(e)};Ze.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)};Ze.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)};Ze.filter=function(e){this._placeBeforeCursor({type:"FilterExpression",expr:e,relative:this._subParser.isRelative(),subject:this._cursor})};Ze.functionCall=function(){this._placeBeforeCursor({type:"FunctionCall",name:this._cursor.value,args:[],pool:"functions"})};Ze.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))};Ze.literal=function(e){this._placeAtCursor({type:"Literal",value:e.value})};Ze.objKey=function(e){this._curObjKey=e.value};Ze.objStart=function(){this._placeAtCursor({type:"ObjectLiteral",value:{}})};Ze.objVal=function(e){this._cursor.value[this._curObjKey]=e};Ze.subExpression=function(e){this._placeAtCursor(e)};Ze.ternaryEnd=function(e){this._cursor.alternate=e};Ze.ternaryMid=function(e){this._cursor.consequent=e};Ze.ternaryStart=function(){this._tree={type:"ConditionalExpression",test:this._tree},this._cursor=this._tree};Ze.transform=function(e){this._placeBeforeCursor({type:"FunctionCall",name:e.value,args:[this._cursor],pool:"transforms"})};Ze.unaryOp=function(e){this._placeAtCursor({type:"UnaryExpression",operator:e.value})}});var H1=g(U1=>{"use strict";var Tt=lm();U1.states={expectOperand:{tokenTypes:{literal:{toState:"expectBinOp"},identifier:{toState:"identifier"},unaryOp:{},openParen:{toState:"subExpression"},openCurl:{toState:"expectObjKey",handler:Tt.objStart},dot:{toState:"traverse"},openBracket:{toState:"arrayVal",handler:Tt.arrayStart}}},expectBinOp:{tokenTypes:{binaryOp:{toState:"expectOperand"},pipe:{toState:"expectTransform"},dot:{toState:"traverse"},question:{toState:"ternaryMid",handler:Tt.ternaryStart}},completable:!0},expectTransform:{tokenTypes:{identifier:{toState:"postTransform",handler:Tt.transform}}},expectObjKey:{tokenTypes:{identifier:{toState:"expectKeyValSep",handler:Tt.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:Tt.functionCall},pipe:{toState:"expectTransform"},question:{toState:"ternaryMid",handler:Tt.ternaryStart}},completable:!0},traverse:{tokenTypes:{identifier:{toState:"identifier"}}},filter:{subHandler:Tt.filter,endStates:{closeBracket:"identifier"}},subExpression:{subHandler:Tt.subExpression,endStates:{closeParen:"expectBinOp"}},argVal:{subHandler:Tt.argVal,endStates:{comma:"argVal",closeParen:"postArgs"}},objVal:{subHandler:Tt.objVal,endStates:{comma:"expectObjKey",closeCurl:"expectBinOp"}},arrayVal:{subHandler:Tt.arrayVal,endStates:{comma:"arrayVal",closeBracket:"expectBinOp"}},ternaryMid:{subHandler:Tt.ternaryMid,endStates:{colon:"ternaryEnd"}},ternaryEnd:{subHandler:Tt.ternaryEnd,completable:!0}}});var $1=g((ZQ,G1)=>{"use strict";var V1=pn(),kj=V1(yi()),qj=V1(_i()),Ij=lm(),pc=H1().states,jj=function(){function e(t,r,n){(0,kj.default)(this,e),this._grammar=t,this._state="expectOperand",this._tree=null,this._exprStr=r||"",this._relative=!1,this._stopMap=n||{}}return(0,qj.default)(e,[{key:"addToken",value:function(r){if(this._state==="complete")throw new Error("Cannot add a new token to a completed Parser");var n=pc[this._state],i=this._exprStr;if(this._exprStr+=r.raw,n.subHandler){this._subParser||this._startSubExpression(i);var o=this._subParser.addToken(r);if(o){if(this._endSubExpression(),this._parentStop)return o;this._state=o}}else if(n.tokenTypes[r.type]){var a=n.tokenTypes[r.type],u=Ij[r.type];a.handler&&(u=a.handler),u&&u.call(this,r),a.toState&&(this._state=a.toState)}else{if(this._stopMap[r.type])return this._stopMap[r.type];throw new Error("Token ".concat(r.raw," (").concat(r.type,") unexpected in expression: ").concat(this._exprStr))}return!1}},{key:"addTokens",value:function(r){r.forEach(this.addToken,this)}},{key:"complete",value:function(){if(this._cursor&&!pc[this._state].completable)throw new Error("Unexpected end of expression: ".concat(this._exprStr));return this._subParser&&this._endSubExpression(),this._state="complete",this._cursor?this._tree:null}},{key:"isRelative",value:function(){return this._relative}},{key:"_endSubExpression",value:function(){pc[this._state].subHandler.call(this,this._subParser.complete()),this._subParser=null}},{key:"_placeAtCursor",value:function(r){this._cursor?(this._cursor.right=r,this._setParent(r,this._cursor)):this._tree=r,this._cursor=r}},{key:"_placeBeforeCursor",value:function(r){this._cursor=this._cursor._parent,this._placeAtCursor(r)}},{key:"_setParent",value:function(r,n){Object.defineProperty(r,"_parent",{value:n,writable:!0})}},{key:"_startSubExpression",value:function(r){var n=pc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e}();G1.exports=jj});var X1=g((JQ,Y1)=>{"use strict";var K1=pn(),Fj=K1(yi()),Lj=K1(_i()),hn=function(){function e(t){(0,Fj.default)(this,e),t(this._resolve.bind(this),this._reject.bind(this))}return(0,Lj.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}();hn.all=function(e){return new hn(function(t){var r=e.map(function(n){for(;n instanceof hn;){if(n.error)throw Error(n.error);n=n.value}return n});t(r)})};hn.resolve=function(e){return new hn(function(t){return t(e)})};hn.reject=function(e){return new hn(function(t,r){return r(e)})};Y1.exports=hn});var Q1=g((QQ,J1)=>{"use strict";var Z1=pn(),Nj=Z1(yi()),Dj=Z1(_i()),Bj=N1(),zj=W1(),Wj=$1(),Uj=X1(),Hj=function(){function e(t,r){(0,Nj.default)(this,e),this._grammar=t,this._exprStr=r,this._ast=null}return(0,Dj.default)(e,[{key:"compile",value:function(){var r=new zj(this._grammar),n=new Wj(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,Uj);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 Bj(i._grammar,r,void 0,n);return a.eval(o)})}},{key:"_getAst",value:function(){return this._ast||this.compile(),this._ast}}]),e}();J1.exports=Hj});var tS=g(eS=>{"use strict";eS.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 nS=g((tee,dm)=>{"use strict";var fm=pn(),Vj=fm(T1()),Gj=fm(yi()),$j=fm(_i()),Kj=Q1(),Yj=tS(),Xj=Yj.getGrammar,rS=function(){function e(){(0,Gj.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Xj()}return(0,$j.default)(e,[{key:"addBinaryOp",value:function(r,n,i,o){this._addGrammarElement(r,(0,Vj.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 Kj(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}();dm.exports=new rS;dm.exports.Jexl=rS});var iS=g(pu=>{"use strict";var Zj=pu&&pu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pu,"__esModule",{value:!0});pu.default=Qj;var Jj=Zj(nS());function Qj(){let e=new Jj.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 hm=g(hu=>{"use strict";var e2=hu&&hu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hu,"__esModule",{value:!0});hu.stringToJexlExpression=r2;var t2=e2(iS()),pm={};function r2(e,t){let r=`nosig|${e}`;if(!pm[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,t2.default)().compile(i);pm[r]=o}return pm[r]}});var oS=g(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.nanoid=Rt.customAlphabet=Rt.customRandom=Rt.random=Rt.urlAlphabet=void 0;Rt.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var n2=e=>crypto.getRandomValues(new Uint8Array(e));Rt.random=n2;var i2=(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}}};Rt.customRandom=i2;var o2=(e,t=21)=>(0,Rt.customRandom)(e,t,Rt.random);Rt.customAlphabet=o2;var a2=(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),"");Rt.nanoid=a2});var mm=g(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.FileLocation=Be.UriLocation=Be.UriLocationRaw=Be.BlobLocation=Be.LocalPathLocation=Be.Region=Be.NoAssemblyRegion=Be.ElementId=void 0;var Se=ht(),u2=oS();Be.ElementId=Se.types.optional(Se.types.identifier,()=>(0,u2.nanoid)());Be.NoAssemblyRegion=Se.types.model("NoAssemblyRegion",{refName:Se.types.string,start:Se.types.number,end:Se.types.number,reversed:Se.types.optional(Se.types.boolean,!1)}).actions(e=>({setRefName(t){e.refName=t}}));Be.Region=Se.types.compose("Region",Be.NoAssemblyRegion,Se.types.model({assemblyName:Se.types.string}));Be.LocalPathLocation=Se.types.model("LocalPathLocation",{locationType:Se.types.literal("LocalPathLocation"),localPath:Se.types.string});Be.BlobLocation=Se.types.model("BlobLocation",{locationType:Se.types.literal("BlobLocation"),name:Se.types.string,blobId:Se.types.string});Be.UriLocationRaw=Se.types.model("UriLocation",{locationType:Se.types.literal("UriLocation"),uri:Se.types.string,baseUri:Se.types.maybe(Se.types.string),internetAccountId:Se.types.maybe(Se.types.string),internetAccountPreAuthorization:Se.types.maybe(Se.types.model("InternetAccountPreAuthorization",{internetAccountType:Se.types.string,authInfo:Se.types.frozen()}))});Be.UriLocation=Se.types.snapshotProcessor(Be.UriLocationRaw,{postProcessor:e=>{let{baseUri:t,...r}=e;return t?e:r}});Be.FileLocation=Se.types.snapshotProcessor(Se.types.union(Be.LocalPathLocation,Be.UriLocation,Be.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 cS=g(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.default=m2;var Le=ht(),s2=mu(),c2=hm(),l2=mm();function f2(){return!0}var d2={stringArray:Le.types.array(Le.types.string),stringArrayMap:Le.types.map(Le.types.array(Le.types.string)),numberMap:Le.types.map(Le.types.number),boolean:Le.types.boolean,color:Le.types.refinement("Color",Le.types.string,f2),integer:Le.types.integer,number:Le.types.number,string:Le.types.string,text:Le.types.string,fileLocation:l2.FileLocation,frozen:Le.types.frozen()},aS={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},vm=e=>({views:{get valueJSON(){return e.value}}}),uS=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),sS={fileLocation:uS,number:vm,integer:vm,boolean:vm,frozen:uS,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)}}})},p2=Le.types.refinement("JexlString",Le.types.string,e=>e.startsWith("jexl:"));function h2(e){return e?.toJSON?e.toJSON():`"${e}"`}function m2(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=d2[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=Le.types.model(a,{name:Le.types.literal(e),description:Le.types.literal(t),type:Le.types.literal(n),value:Le.types.optional(Le.types.union(p2,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,s2.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,c2.stringToJexlExpression)(String(c.value),f?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return h2(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 aS))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=aS[n]}}}));sS[n]&&(u=u.extend(sS[n]));let s=Le.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var fS=g(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.getSubType=gm;vn.getUnionSubTypes=lS;vn.getPropertyType=v2;vn.getDefaultValue=b2;vn.getEnumerationValues=g2;vn.resolveLateType=y2;var mn=ht();function gm(e){let t;if((0,mn.isOptionalType)(e))t=e._subtype||e.type;else if((0,mn.isArrayType)(e)||(0,mn.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 lS(e){if(!(0,mn.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||gm(e)._types||gm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function v2(e,t){return e.properties[t]}function b2(e){if(!(0,mn.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function g2(e){return lS(e).map(r=>r.value)}function y2(e){return!(0,mn.isUnionType)(e)&&!(0,mn.isArrayType)(e)&&(0,mn.isLateType)(e)?e.getSubType():e}});var ym=g(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.readConfObject=hc;Br.getConf=_2;Br.getTypeNamesFromExplicitlyTypedUnion=dS;Br.isBareConfigurationSchemaType=pS;Br.isConfigurationSchemaType=So;Br.isConfigurationModel=hS;Br.isConfigurationSlotType=w2;var Ve=ht(),bn=fS();function hc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ve.isStateTreeNode)(e)&&(0,Ve.isMapType)((0,Ve.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ve.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ve.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,Ve.isStateTreeNode)(e)&&(0,Ve.isMapType)((0,Ve.getType)(e))&&(o=e.get(n)),o?hc(o,i,r):void 0}return hc(e,n,r)}}else return structuredClone((0,Ve.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function _2(e,t,r){let{configuration:n}=e;if(hS(n))return hc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function dS(e){if((0,Ve.isType)(e)&&(e=(0,bn.resolveLateType)(e),(0,Ve.isUnionType)(e))){let t=[];for(let r of(0,bn.getUnionSubTypes)(e)){r=(0,bn.resolveLateType)(r);let n=dS(r);if(n.length||(n=[(0,bn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}return t}return[]}function pS(e){return!!((0,Ve.isType)(e)&&((0,Ve.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ve.isLateType)(e)))}function So(e){return(0,Ve.isType)(e)?pS(e)?!0:(0,Ve.isUnionType)(e)?(0,bn.getUnionSubTypes)(e).every(t=>So(t)||t.name==="undefined"):(0,Ve.isOptionalType)(e)&&So((0,bn.getSubType)(e))||(0,Ve.isArrayType)(e)&&So((0,bn.getSubType)(e))?!0:!!((0,Ve.isMapType)(e)&&So((0,bn.getSubType)(e))):!1}function hS(e){return(0,Ve.isStateTreeNode)(e)&&So((0,Ve.getType)(e))}function w2(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var bS=g(Oo=>{"use strict";var x2=Oo&&Oo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.ConfigurationSchema=R2;Oo.ConfigurationReference=P2;var Vt=ht(),S2=x2(cS()),mS=ym(),vS=mm();function O2(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function E2(e){return Array.isArray(e)&&e.length===0}function A2(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 T2(e,t,r){let n={},i;if(r.explicitlyTyped&&(n.type=Vt.types.optional(Vt.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]=Vt.types.identifier,i=r.explicitIdentifier):(n.id=Vt.types.identifier,i="id"):r.implicitIdentifier&&(typeof r.implicitIdentifier=="string"?(n[r.implicitIdentifier]=vS.ElementId,i=r.implicitIdentifier):(n.id=vS.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};for(let[c,f]of Object.entries(t))if((0,Vt.isType)(f)&&(0,Vt.isLateType)(f)||(0,mS.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,S2.default)(c,f)}catch(d){throw new Error(`invalid config slot definition for ${e}.${c}: ${d}`)}}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=Vt.types.model(`${e}ConfigurationSchema`,n).actions(c=>({setSubschema(f,d){if(!(0,mS.isConfigurationSchemaType)(n[f]))throw new Error(`${f} is not a subschema, cannot replace`);let p=(0,Vt.isStateTreeNode)(d)?d:n[f].create(d);return c[f]=p,p}}));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,Vt.getSnapshot)(a.create(l));return a=a.postProcessSnapshot(c=>{let f={},d=!0;for(let[p,m]of Object.entries(c))d&&(typeof s[p]=="object"&&typeof m=="object"?JSON.stringify(s[p])!==JSON.stringify(m)&&(d=!1):s[p]!==m&&(d=!1)),m!==void 0&&o[p]===void 0&&!O2(m)&&!E2(m)&&(f[p]=m);return d?{}:f}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Vt.types.optional(a,l)}function R2(e,t,r){let{schemaDefinition:n,options:i}=A2(e,t,r),o=T2(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function P2(e){return Vt.types.union(Vt.types.reference(e),e)}});var _m=g(tr=>{"use strict";var M2=tr&&tr.__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]}),C2=tr&&tr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&M2(t,e,r)};Object.defineProperty(tr,"__esModule",{value:!0});tr.ConfigurationSchema=tr.ConfigurationReference=void 0;var gS=bS();Object.defineProperty(tr,"ConfigurationReference",{enumerable:!0,get:function(){return gS.ConfigurationReference}});Object.defineProperty(tr,"ConfigurationSchema",{enumerable:!0,get:function(){return gS.ConfigurationSchema}});C2(ym(),tr)});var yS=g(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var wm=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()])}};xm.default=wm});var wS=g(vu=>{"use strict";var _S=vu&&vu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vu,"__esModule",{value:!0});var k2=_S(O1()),Sm=_m(),q2=_S(yS()),Om=class{constructor(t){this.pluginManager=t,this.adapterCache=new q2.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,Sm.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,Sm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,Sm.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 k2.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)}};vu.default=Om});var mc=g(be=>{"use strict";var I2=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]}),j2=be&&be.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&I2(t,e,r)},F2=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=N2;be.isSessionModel=gn;be.isSessionModelWithConfigEditing=D2;be.isSessionWithAddTracks=B2;be.isSessionWithShareURL=z2;be.isSessionModelWithWidgets=W2;be.isSessionModelWithConnections=U2;be.isSessionModelWithConnectionEditing=H2;be.isSessionWithSessionPlugins=V2;be.isSelectionContainer=G2;be.isViewModel=$2;be.isTrackModel=K2;be.isDisplayModel=Y2;be.isTrackViewModel=X2;be.isAppRootModel=Z2;be.isRootModelWithInternetAccounts=J2;be.isAbstractMenuManager=Q2;be.isUriLocation=eF;be.isLocalPathLocation=tF;be.isBlobLocation=rF;be.isAuthNeededException=nF;be.isRetryException=iF;var L2=ht();j2(b1(),be);function N2(e){return(0,L2.isStateTreeNode)(e)&&"removeView"in e&&"addView"in e&&"views"in e}function gn(e){return typeof e=="object"&&e!==null&&"rpcManager"in e&&"configuration"in e}function D2(e){return gn(e)&&"editConfiguration"in e}function B2(e){return gn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function z2(e){return gn(e)&&"shareURL"in e&&!!e.shareURL}function W2(e){return gn(e)&&"widgets"in e}function U2(e){return gn(e)&&"makeConnection"in e}function H2(e){return gn(e)&&"addConnectionConf"in e}function V2(e){return gn(e)&&"sessionPlugins"in e}function G2(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function $2(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function K2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function Y2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function X2(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function Z2(e){return typeof e=="object"&&e!==null&&"findAppropriateInternetAccount"in e}function J2(e){return typeof e=="object"&&e!==null&&"internetAccounts"in e&&"findAppropriateInternetAccount"in e}function Q2(e){return typeof e=="object"&&e!==null&&"appendMenu"in e&&"appendToSubMenu"in e}function eF(e){return typeof e=="object"&&e!==null&&"uri"in e&&!!e.uri}function tF(e){return typeof e=="object"&&e!==null&&"localPath"in e&&!!e.localPath}function rF(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)}};be.AuthNeededError=Em;var Am=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};be.RetryError=Am;function nF(e){return e instanceof Error&&(e.name==="AuthNeededError"||e.url!==void 0)}function iF(e){return e.name==="RetryError"||e.internetAccountId!==void 0}var oF=wS();Object.defineProperty(be,"TextSearchManager",{enumerable:!0,get:function(){return F2(oF).default}})});var xS=g(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.when=void 0;var aF=zs();Object.defineProperty(vc,"when",{enumerable:!0,get:function(){return aF.when}})});var SS=g(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.intersection2=uF;bu.doesIntersect2=sF;bu.isContainedWithin=cF;function uF(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 sF(e,t,r,n){return t>r&&e<n}function cF(e,t,r,n){return r<=e&&n>=t}});var OS=g(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.dedupe=lF;function lF(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 Cm=g((bee,RS)=>{"use strict";var bc={},_c={},gu={METHOD:"method",PROPERTY:"property"},gc=class{constructor(t,r){this.inst=t,this.args=r}},Rm=class extends gc{constructor(t,r){super(t,r),this.type=gu.METHOD}execute(t){t[this.inst](...this.args)}},Pm=class extends gc{constructor(t,r){super(t,r),this.type=gu.PROPERTY}execute(t){t[this.inst]=this.args[0]}},fF={[gu.METHOD]:Rm,[gu.PROPERTY]:Pm},yc=class{constructor(t,r,n){return new fF[t](r,n)}};Object.entries(gu).forEach(([e,t])=>{Object.defineProperty(yc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});_c=yc;var AS=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"]}),Or=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push"),fromJSON:Symbol.for("fromJSON")}),yu=class{constructor(t=null){this[Or.sequence]=[],t&&this[Or.fromJSON](t)}[Or.fromJSON](t={sequence:[]}){t.sequence.forEach(({type:r,inst:n,args:i})=>{this[Or.push](r,n,i)})}[Or.push](t,r,n){this[Or.sequence].push(new _c(t,r,n))}execute(t){t.save(),this[Or.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[Or.sequence]}}};AS.METHODS.forEach(e=>{Object.defineProperty(yu.prototype,e,{value:function(...r){this[Or.push](_c.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});AS.PROPERTIES.forEach(e=>{Object.defineProperty(yu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[Or.push](_c.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});bc=yu;var TS={},ES=Object.freeze({sequence:Symbol.for("sequence"),push:Symbol.for("push")});function dF(e,t){let r=e.replace(/^\{|\}$/gu,"");return r!==e?t.hasOwnProperty(r)?t[r]:r:e}var Mm=class extends bc{build(t={}){let r=new bc;return this[ES.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?dF(u,t):u);r[ES.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};TS=Mm;RS.exports={CanvasSequence:bc,CanvasBlueprint:TS}});var MS=g((gee,PS)=>{PS.exports=!1});var km=g(lt=>{"use strict";var pF=lt&<.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});lt.ImageBitmapType=lt.createImageBitmap=lt.createCanvas=void 0;lt.drawImageOntoCanvasContext=mF;var kS=Cm(),hF=pF(MS());function mF(e,t){e.serializedCommands?new kS.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var CS={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:hF.default};CS.realOffscreenCanvas?(lt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),lt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,lt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):CS.node?(lt.createCanvas=(...e)=>nodeCreateCanvas(...e),lt.createImageBitmap=async e=>{let t=e.toDataURL(),r=new nodeImage;return new Promise((n,i)=>{r.onload=()=>{n(r)},r.onerror=i,r.src=t})}):(lt.createCanvas=(e,t)=>{let r=new kS.CanvasSequence;return{width:e,height:t,getContext(){return r}}},lt.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},lt.ImageBitmapType=String)});var Im=g(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.blobToDataURL=vF;function vF(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 qS=g((wee,wc)=>{(function(){"use strict";var e,t,r,n,i;function o(f,d){var p=Object.keys(d),m;for(m=0;m<p.length;m++)f=f.replace(new RegExp("\\{"+p[m]+"\\}","gi"),d[p[m]]);return f}function a(f){var d,p,m;if(!f)throw new Error("cannot create a random attribute name for an undefined object");d="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",p="";do for(p="",m=0;m<12;m++)p+=d[Math.floor(Math.random()*d.length)];while(f[p]);return p}function u(f,d){var p,m,h={},v,y;for(f=f.split(","),d=d||10,p=0;p<f.length;p+=2)m="&"+f[p+1]+";",v=parseInt(f[p],d),h[m]="&#"+v+";";return h["\\xa0"]=" ",h}function l(f){var d={left:"start",right:"end",center:"middle",start:"start",end:"end"};return d[f]||d.start}function s(f){var d={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return d[f]||d.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,d){this.__root=f,this.__ctx=d},r.prototype.addColorStop=function(f,d){var p=this.__ctx.__createElement("stop"),m,h;p.setAttribute("offset",f),d.indexOf("rgba")!==-1?(m=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,h=m.exec(d),p.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:h[1],g:h[2],b:h[3]})),p.setAttribute("stop-opacity",h[4])):p.setAttribute("stop-color",d),this.__root.appendChild(p)},n=function(f,d){this.__root=f,this.__ctx=d},t=function(f){var d={width:500,height:500,enableMirroring:!1},p;if(arguments.length>1?(p=d,p.width=arguments[0],p.height=arguments[1]):f?p=f:p=d,!(this instanceof t))return new t(p);this.width=p.width||d.width,this.height=p.height||d.height,this.enableMirroring=p.enableMirroring!==void 0?p.enableMirroring:d.enableMirroring,this.canvas=this,this.__document=p.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,d,p){typeof d>"u"&&(d={});var m=this.__document.createElementNS("http://www.w3.org/2000/svg",f),h=Object.keys(d),v,y;for(p&&(m.setAttribute("fill","none"),m.setAttribute("stroke","none")),v=0;v<h.length;v++)y=h[v],m.setAttribute(y,d[y]);return m},t.prototype.__setDefaultStyles=function(){var f=Object.keys(e),d,p;for(d=0;d<f.length;d++)p=f[d],this[p]=e[p].canvas},t.prototype.__applyStyleState=function(f){var d=Object.keys(f),p,m;for(p=0;p<d.length;p++)m=d[p],this[m]=f[m]},t.prototype.__getStyleState=function(){var f,d={},p=Object.keys(e),m;for(f=0;f<p.length;f++)m=p[f],d[m]=this[m];return d},t.prototype.__applyStyleToCurrentElement=function(f){var d=Object.keys(e),p,m,h,v,y,w;for(p=0;p<d.length;p++)if(m=e[d[p]],h=this[d[p]],m.apply)if(m.apply.indexOf("fill")!==-1&&h instanceof n){if(h.__ctx)for(;h.__ctx.__defs.childNodes.length;)v=h.__ctx.__defs.childNodes[0].getAttribute("id"),this.__ids[v]=v,this.__defs.appendChild(h.__ctx.__defs.childNodes[0]);this.__currentElement.setAttribute("fill",o("url(#{id})",{id:h.__root.getAttribute("id")}))}else m.apply.indexOf("fill")!==-1&&h instanceof r?this.__currentElement.setAttribute("fill",o("url(#{id})",{id:h.__root.getAttribute("id")})):m.apply.indexOf(f)!==-1&&m.svg!==h&&((m.svgAttr==="stroke"||m.svgAttr==="fill")&&h.indexOf("rgba")!==-1?(y=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=y.exec(h),this.__currentElement.setAttribute(m.svgAttr,o("rgb({r},{g},{b})",{r:w[1],g:w[2],b:w[3]})),this.__currentElement.setAttribute(m.svgAttr+"-opacity",w[4])):this.__currentElement.setAttribute(m.svgAttr,h))},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 d=new XMLSerializer().serializeToString(this.__root),p,m,h,v,y,w;if(w=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,w.test(d)&&(d=d.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),f)for(p=Object.keys(i),m=0;m<p.length;m++)h=p[m],v=i[h],y=new RegExp(h,"gi"),y.test(d)&&(d=d.replace(y,v));return d},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var f=this.__createElement("g"),d=this.__closestGroupOrSvg();this.__groupStack.push(d),d.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 d=this.__closestGroupOrSvg();if(d.childNodes.length>0){var p=this.__createElement("g");d.appendChild(p),this.__currentElement=p}var m=this.__currentElement.getAttribute("transform");m?m+=" ":m="",m+=f,this.__currentElement.setAttribute("transform",m)},t.prototype.scale=function(f,d){d===void 0&&(d=f),this.__addTransform(o("scale({x},{y})",{x:f,y:d}))},t.prototype.rotate=function(f){var d=f*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:d,cx:0,cy:0}))},t.prototype.translate=function(f,d){this.__addTransform(o("translate({x},{y})",{x:f,y:d}))},t.prototype.transform=function(f,d,p,m,h,v){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:f,b:d,c:p,d:m,e:h,f:v}))},t.prototype.beginPath=function(){var f,d;this.__currentDefaultPath="",this.__currentPosition={},f=this.__createElement("path",{},!0),d=this.__closestGroupOrSvg(),d.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,d){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:f,y:d},this.__addPathCommand(o("M {x} {y}",{x:f,y:d}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(f,d){this.__currentPosition={x:f,y:d},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:f,y:d})):this.__addPathCommand(o("M {x} {y}",{x:f,y:d}))},t.prototype.bezierCurveTo=function(f,d,p,m,h,v){this.__currentPosition={x:h,y:v},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:f,cp1y:d,cp2x:p,cp2y:m,x:h,y:v}))},t.prototype.quadraticCurveTo=function(f,d,p,m){this.__currentPosition={x:p,y:m},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:f,cpy:d,x:p,y:m}))};var c=function(f){var d=Math.sqrt(f[0]*f[0]+f[1]*f[1]);return[f[0]/d,f[1]/d]};t.prototype.arcTo=function(f,d,p,m,h){var v=this.__currentPosition&&this.__currentPosition.x,y=this.__currentPosition&&this.__currentPosition.y;if(!(typeof v>"u"||typeof y>"u")){if(h<0)throw new Error("IndexSizeError: The radius provided ("+h+") is negative.");if(v===f&&y===d||f===p&&d===m||h===0){this.lineTo(f,d);return}var w=c([v-f,y-d]),_=c([p-f,m-d]);if(w[0]*_[1]===w[1]*_[0]){this.lineTo(f,d);return}var x=w[0]*_[0]+w[1]*_[1],S=Math.acos(Math.abs(x)),E=c([w[0]+_[0],w[1]+_[1]]),R=h/Math.sin(S/2),T=f+R*E[0],C=d+R*E[1],M=[-w[1],w[0]],q=[_[1],-_[0]],z=function(I){var W=I[0],j=I[1];return j>=0?Math.acos(W):-Math.acos(W)},D=z(M),A=z(q);this.lineTo(T+M[0]*h,C+M[1]*h),this.arc(T,C,h,D,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,d,p,m){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(f,d),this.lineTo(f+p,d),this.lineTo(f+p,d+m),this.lineTo(f,d+m),this.lineTo(f,d),this.closePath()},t.prototype.fillRect=function(f,d,p,m){var h,v;h=this.__createElement("rect",{x:f,y:d,width:p,height:m},!0),v=this.__closestGroupOrSvg(),v.appendChild(h),this.__currentElement=h,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(f,d,p,m){var h,v;h=this.__createElement("rect",{x:f,y:d,width:p,height:m},!0),v=this.__closestGroupOrSvg(),v.appendChild(h),this.__currentElement=h,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(f,d,p,m){var h,v=this.__closestGroupOrSvg();h=this.__createElement("rect",{x:f,y:d,width:p,height:m,fill:"#FFFFFF"},!0),v.appendChild(h)},t.prototype.createLinearGradient=function(f,d,p,m){var h=this.__createElement("linearGradient",{id:a(this.__ids),x1:f+"px",x2:p+"px",y1:d+"px",y2:m+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(h),new r(h,this)},t.prototype.createRadialGradient=function(f,d,p,m,h,v){var y=this.__createElement("radialGradient",{id:a(this.__ids),cx:m+"px",cy:h+"px",r:v+"px",fx:f+"px",fy:d+"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,d=f.exec(this.font),p={style:d[1]||"normal",size:d[4]||"10px",family:d[6]||"sans-serif",weight:d[3]||"normal",decoration:d[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(p.decoration="underline"),this.__fontHref&&(p.href=this.__fontHref),p},t.prototype.__wrapTextLink=function(f,d){if(f.href){var p=this.__createElement("a");return p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.href),p.appendChild(d),p}return d},t.prototype.__applyText=function(f,d,p,m){var h=this.__parseFont(),v=this.__closestGroupOrSvg(),y=this.__createElement("text",{"font-family":h.family,"font-size":h.size,"font-style":h.style,"font-weight":h.weight,"text-decoration":h.decoration,x:d,y:p,"text-anchor":l(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);y.appendChild(this.__document.createTextNode(f)),this.__currentElement=y,this.__applyStyleToCurrentElement(m),v.appendChild(this.__wrapTextLink(h,y))},t.prototype.fillText=function(f,d,p){this.__applyText(f,d,p,"fill")},t.prototype.strokeText=function(f,d,p){this.__applyText(f,d,p,"stroke")},t.prototype.measureText=function(f){return this.__ctx.font=this.font,this.__ctx.measureText(f)},t.prototype.arc=function(f,d,p,m,h,v){if(m!==h){m=m%(2*Math.PI),h=h%(2*Math.PI),m===h&&(h=(h+2*Math.PI-.001*(v?-1:1))%(2*Math.PI));var y=f+p*Math.cos(h),w=d+p*Math.sin(h),_=f+p*Math.cos(m),x=d+p*Math.sin(m),S=v?0:1,E=0,R=h-m;R<0&&(R+=2*Math.PI),v?E=R>Math.PI?0:1:E=R>Math.PI?1:0,this.lineTo(_,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:p,ry:p,xAxisRotation:0,largeArcFlag:E,sweepFlag:S,endX:y,endY:w})),this.__currentPosition={x:y,y:w}}},t.prototype.clip=function(){var f=this.__closestGroupOrSvg(),d=this.__createElement("clipPath"),p=a(this.__ids),m=this.__createElement("g");f.removeChild(this.__currentElement),d.setAttribute("id",p),d.appendChild(this.__currentElement),this.__defs.appendChild(d),f.setAttribute("clip-path",o("url(#{id})",{id:p})),f.appendChild(m),this.__currentElement=m},t.prototype.drawImage=function(){var f=Array.prototype.slice.call(arguments),d=f[0],p,m,h,v,y=0,w=0,_,x,S,E,R,T,C,M,q,z,D;if(f.length===3)p=f[1],m=f[2],_=d.width,x=d.height,h=_,v=x;else if(f.length===5)p=f[1],m=f[2],h=f[3],v=f[4],_=d.width,x=d.height;else if(f.length===9)y=f[1],w=f[2],_=f[3],x=f[4],p=f[5],m=f[6],h=f[7],v=f[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(S=this.__closestGroupOrSvg(),C=this.__currentElement,d instanceof t){for(E=d.getSvg(),R=E.childNodes[0];R.childNodes.length;)D=R.childNodes[0].getAttribute("id"),this.__ids[D]=D,this.__defs.appendChild(R.childNodes[0]);T=E.childNodes[1],S.appendChild(T),this.__currentElement=T,this.translate(p,m),this.__currentElement=C}else(d.nodeName==="CANVAS"||d.nodeName==="IMG")&&(M=this.__createElement("image"),M.setAttribute("width",h),M.setAttribute("height",v),M.setAttribute("preserveAspectRatio","none"),(y||w||_!==d.width||x!==d.height)&&(q=this.__document.createElement("canvas"),q.width=h,q.height=v,z=q.getContext("2d"),z.drawImage(d,y,w,_,x,0,0,h,v),d=q),M.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.nodeName==="CANVAS"?d.toDataURL():d.getAttribute("src")),S.appendChild(M),this.__currentElement=M,this.translate(p,m),this.__currentElement=C)},t.prototype.createPattern=function(f,d){var p=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),m=a(this.__ids),h;return p.setAttribute("id",m),p.setAttribute("width",f.width),p.setAttribute("height",f.height),f.nodeName==="CANVAS"||f.nodeName==="IMG"?(h=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),h.setAttribute("width",f.width),h.setAttribute("height",f.height),h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f.nodeName==="CANVAS"?f.toDataURL():f.getAttribute("src")),p.appendChild(h),this.__defs.appendChild(p)):f instanceof t&&(p.appendChild(f.__root.childNodes[1]),this.__defs.appendChild(p)),new n(p,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 wc=="object"&&typeof wc.exports=="object"&&(wc.exports=t)})()});var FS=g(rr=>{"use strict";var bF=rr&&rr.__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]}),gF=rr&&rr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),yF=rr&&rr.__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"&&bF(r,t,n[i]);return gF(r,t),r}}();Object.defineProperty(rr,"__esModule",{value:!0});rr.renderToAbstractCanvas=xF;rr.getSerializedSvg=SF;rr.ReactRendering=OF;var IS=ns(),_F=qe(),jS=Cm(),wF=Im(),jm=km();async function xF(e,t,r,n){let{exportSVG:i,highResolutionScaling:o=1}=r;if(i)if(i.rasterizeLayers){let a=i.scale||o,u=(0,jm.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,IS.jsx)("image",{width:e,height:t,xlinkHref:"convertToBlob"in u?await(0,wF.blobToDataURL)(await u.convertToBlob({type:"image/png"})):u.toDataURL("image/png")})}}else{let a=new jS.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,jm.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,jm.createImageBitmap)(u)}}}async function SF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>yF(qS())),o=new i.default(t,r);return new jS.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function OF({rendering:e}){return(0,_F.isValidElement)(e.reactElement)?e.reactElement:(0,IS.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var NS=g(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.isFeature=EF;function EF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function LS(e){return"uniqueId"in e&&typeof e.data!="object"}var Fm=class e{constructor(t){var r;LS(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=LS(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})}};xc.default=Fm});var Ae=g(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.isFunction=void 0;function AF(e){return typeof e=="function"}Sc.isFunction=AF});var yn=g(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.createErrorClass=void 0;function TF(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}Oc.createErrorClass=TF});var Lm=g(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.UnsubscriptionError=void 0;var RF=yn();Ec.UnsubscriptionError=RF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
1
|
+
"use strict";var JBrowsePluginMafViewer=(()=>{var wP=Object.create;var es=Object.defineProperty;var xP=Object.getOwnPropertyDescriptor;var SP=Object.getOwnPropertyNames;var OP=Object.getPrototypeOf,EP=Object.prototype.hasOwnProperty;var pt=(e,t)=>()=>(e&&(t=e(e=0)),t);var g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wa=(e,t)=>{for(var r in t)es(e,r,{get:t[r],enumerable:!0})},Lb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of SP(t))!EP.call(e,i)&&i!==r&&es(e,i,{get:()=>t[i],enumerable:!(n=xP(t,i))||n.enumerable});return e};var j=(e,t,r)=>(r=e!=null?wP(OP(e)):{},Lb(t||!e||!e.__esModule?es(r,"default",{value:e,enumerable:!0}):r,e)),Nb=e=>Lb(es({},"__esModule",{value:!0}),e);var Bb=g((LZ,Db)=>{Db.exports=JBrowseExports["@jbrowse/core/Plugin"]});var rn=g((DZ,Ub)=>{Ub.exports=JBrowseExports["@jbrowse/core/pluggableElementTypes"]});var Bd=g((BZ,Wb)=>{Wb.exports=JBrowseExports["@jbrowse/core/data_adapters/BaseAdapter"]});var ht=g((zZ,Hb)=>{Hb.exports=JBrowseExports["@jbrowse/core/util"]});var zd=g((UZ,Vb)=>{Vb.exports=JBrowseExports["@jbrowse/core/util/io"]});var Ud=g((WZ,Gb)=>{Gb.exports=JBrowseExports["@jbrowse/core/util/rxjs"]});var mt=g((HZ,$b)=>{$b.exports=JBrowseExports["mobx-state-tree"]});var ii=g((XK,cg)=>{cg.exports=JBrowseExports["@jbrowse/core/configuration"]});var Fe=g((rY,pg)=>{pg.exports=JBrowseExports.react});var gr=g((nY,hg)=>{hg.exports=JBrowseExports["@jbrowse/core/ui"]});var oi=g((iY,mg)=>{mg.exports=JBrowseExports["@mui/material"]});var er=g((oY,vg)=>{vg.exports=JBrowseExports["mobx-react"]});var on=g((aY,bg)=>{bg.exports=JBrowseExports["tss-react/mui"]});var ep=g((sY,yg)=>{yg.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var ss=g((dY,Ag)=>{Ag.exports=JBrowseExports["react/jsx-runtime"]});function cs(){return typeof window<"u"}function _r(e){return ls(e)?(e.nodeName||"").toLowerCase():"#document"}function ut(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rr(e){var t;return(t=(ls(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ls(e){return cs()?e instanceof Node||e instanceof ut(e).Node:!1}function Me(e){return cs()?e instanceof Element||e instanceof ut(e).Element:!1}function Ne(e){return cs()?e instanceof HTMLElement||e instanceof ut(e).HTMLElement:!1}function Xi(e){return!cs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ut(e).ShadowRoot}function Ji(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=yt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!BP.has(i)}function Rg(e){return zP.has(_r(e))}function Ra(e){return UP.some(t=>{try{return e.matches(t)}catch{return!1}})}function fs(e){let t=Qi(),r=Me(e)?yt(e):e;return WP.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)||HP.some(n=>(r.willChange||"").includes(n))||VP.some(n=>(r.contain||"").includes(n))}function Tg(e){let t=tr(e);for(;Ne(t)&&!nr(t);){if(fs(t))return t;if(Ra(t))return null;t=tr(t)}return null}function Qi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nr(e){return GP.has(_r(e))}function yt(e){return ut(e).getComputedStyle(e)}function Ta(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tr(e){if(_r(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Xi(e)&&e.host||rr(e);return Xi(t)?t.host:t}function Pg(e){let t=tr(e);return nr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ne(t)&&Ji(t)?t:Pg(t)}function Tt(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let i=Pg(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=ut(i);if(o){let u=ds(a);return t.concat(a,a.visualViewport||[],Ji(i)?i:[],u&&r?Tt(u):[])}return t.concat(i,Tt(i,[],r))}function ds(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var BP,zP,UP,WP,HP,VP,GP,Pa=pt(()=>{BP=new Set(["inline","contents"]);zP=new Set(["table","td","th"]);UP=[":popover-open",":modal"];WP=["transform","translate","scale","rotate","perspective"],HP=["transform","translate","scale","rotate","perspective","filter"],VP=["paint","layout","strict","content"];GP=new Set(["html","body","#document"])});function ps(e,t,r){return Ve(e,wt(t,r))}function Pt(e,t){return typeof e=="function"?e(t):e}function Mt(e){return e.split("-")[0]}function Vt(e){return e.split("-")[1]}function hs(e){return e==="x"?"y":"x"}function ms(e){return e==="y"?"height":"width"}function Gt(e){return KP.has(Mt(e))?"y":"x"}function vs(e){return hs(Gt(e))}function np(e,t,r){r===void 0&&(r=!1);let n=Vt(e),i=vs(e),o=ms(i),a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ca(a)),[a,Ca(a)]}function kg(e){let t=Ca(e);return[Ma(e),t,Ma(t)]}function Ma(e){return e.replace(/start|end/g,t=>ZP[t])}function JP(e,t,r){switch(e){case"top":case"bottom":return r?t?Ig:Cg:t?Cg:Ig;case"left":case"right":return t?YP:XP;default:return[]}}function qg(e,t,r,n){let i=Vt(e),o=JP(Mt(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Ma)))),o}function Ca(e){return e.replace(/left|right|bottom|top/g,t=>$P[t])}function QP(e){return{top:0,right:0,bottom:0,left:0,...e}}function bs(e){return typeof e!="number"?QP(e):{top:e,right:e,bottom:e,left:e}}function zr(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 tp,Mg,rp,wt,Ve,ai,an,ir,$P,ZP,KP,Cg,Ig,YP,XP,eo=pt(()=>{tp=["top","right","bottom","left"],Mg=["start","end"],rp=tp.reduce((e,t)=>e.concat(t,t+"-"+Mg[0],t+"-"+Mg[1]),[]),wt=Math.min,Ve=Math.max,ai=Math.round,an=Math.floor,ir=e=>({x:e,y:e}),$P={left:"right",right:"left",bottom:"top",top:"bottom"},ZP={start:"end",end:"start"};KP=new Set(["top","bottom"]);Cg=["left","right"],Ig=["right","left"],YP=["top","bottom"],XP=["bottom","top"]});var eM,gs,Fg,to,_s,Ia,tM,Lg,ys,Ng,Dg,rM,nM,Bg,iM,oM,aM,uM,sM,cM,lM,jg,fM,dM,ip,op,pM,zg,ro,Ug,ap,up=pt(()=>{eM=["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])"],gs=eM.join(","),Fg=typeof Element>"u",to=Fg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_s=!Fg&&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},Ia=function(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&&Ia(t.parentNode);return a},tM=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Lg=function(t,r,n){if(Ia(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(gs));return r&&to.call(t,gs)&&i.unshift(t),i=i.filter(n),i},ys=function(t,r,n){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Ia(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),f=u.length?u:a.children,s=ys(f,!0,n);n.flatten?i.push.apply(i,s):i.push({scopeParent:a,candidates:s})}else{var c=to.call(a,gs);c&&n.filter(a)&&(r||!t.includes(a))&&i.push(a);var l=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),d=!Ia(l,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(l&&d){var p=ys(l===!0?a.children:l.children,!0,n);n.flatten?i.push.apply(i,p):i.push({scopeParent:a,candidates:p})}else o.unshift.apply(o,a.children)}}return i},Ng=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Dg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||tM(t))&&!Ng(t)?0:t.tabIndex},rM=function(t,r){var n=Dg(t);return n<0&&r&&!Ng(t)?0:n},nM=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Bg=function(t){return t.tagName==="INPUT"},iM=function(t){return Bg(t)&&t.type==="hidden"},oM=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},aM=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},uM=function(t){if(!t.name)return!0;var r=t.form||_s(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=aM(i,t.form);return!o||o===t},sM=function(t){return Bg(t)&&t.type==="radio"},cM=function(t){return sM(t)&&!uM(t)},lM=function(t){var r,n=t&&_s(t),i=(r=n)===null||r===void 0?void 0:r.host,o=!1;if(n&&n!==t){var a,u,f;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!o&&i;){var s,c,l;n=_s(i),i=(s=n)===null||s===void 0?void 0:s.host,o=!!((c=i)!==null&&c!==void 0&&(l=c.ownerDocument)!==null&&l!==void 0&&l.contains(i))}}return o},jg=function(t){var r=t.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},fM=function(t,r){var n=r.displayCheck,i=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=to.call(t,"details>summary:first-of-type"),u=a?t.parentElement:t;if(to.call(u,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof i=="function"){for(var f=t;t;){var s=t.parentElement,c=_s(t);if(s&&!s.shadowRoot&&i(s)===!0)return jg(t);t.assignedSlot?t=t.assignedSlot:!s&&c!==t.ownerDocument?t=c.host:t=s}t=f}if(lM(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return jg(t);return!1},dM=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 to.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},ip=function(t,r){return!(r.disabled||Ia(r)||iM(r)||fM(r,t)||oM(r)||dM(r))},op=function(t,r){return!(cM(r)||Dg(r)<0||!ip(t,r))},pM=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},zg=function(t){var r=[],n=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,f=rM(u,a),s=a?zg(i.candidates):u;f===0?a?r.push.apply(r,s):r.push(u):n.push({documentOrder:o,tabIndex:f,item:i,isScope:a,content:s})}),n.sort(nM).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(r)},ro=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ys([t],r.includeContainer,{filter:op.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:pM}):n=Lg(t,r.includeContainer,op.bind(null,r)),zg(n)},Ug=function(t,r){r=r||{};var n;return r.getShadowRoot?n=ys([t],r.includeContainer,{filter:ip.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=Lg(t,r.includeContainer,ip.bind(null,r)),n},ap=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return to.call(t,gs)===!1?!1:op(r,t)}});function xs(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ss(){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 fp(){return/apple/i.test(navigator.vendor)}function lp(){let e=/android/i;return e.test(xs())||e.test(Ss())}function Vg(){return xs().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Gg(){return Ss().includes("jsdom/")}function or(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 Xe(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&Xi(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ar(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Os(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 $g(e){return e.matches("html,body")}function nt(e){return e?.ownerDocument||document}function Es(e){return Ne(e)&&e.matches(hM)}function As(e){return e?e.getAttribute("role")==="combobox"&&Es(e):!1}function Zg(e){if(!e||Gg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ka(e){return e?e.hasAttribute(Wg)?e:e.querySelector("["+Wg+"]")||e:null}function un(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,...un(e,i.id,r)])}function Kg(e,t){let r,n=-1;function i(o,a){a>n&&(r=o,n=a),un(e,o).forEach(f=>{i(f.id,a+1)})}return i(t,0),e.find(o=>o.id===r)}function dp(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 Yg(e){return"nativeEvent"in e}function pp(e){return e.mozInputSource===0&&e.isTrusted?!0:lp()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function hp(e){return Gg()?!1:!lp()&&e.width===0&&e.height===0||lp()&&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 si(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function Je(e){let t=no.useRef(e);return be(()=>{t.current=e}),t}function ke(e){let t=no.useRef(()=>{});return wM(()=>{t.current=e}),no.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 ws(e,t,r){return Math.floor(e/t)!==r}function ui(e,t){return t<0||t>=e.current.length}function qa(e,t){return tt(e,{disabledIndices:t})}function Rs(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&&sn(e,a,i));return a}function mp(e,t){let{event:r,orientation:n,loop:i,rtl:o,cols:a,disabledIndices:u,minIndex:f,maxIndex:s,prevIndex:c,stopEvent:l=!1}=t,d=c;if(r.key===mM){if(l&&rt(r),c===-1)d=s;else if(d=tt(e,{startingIndex:d,amount:a,decrement:!0,disabledIndices:u}),i&&(c-a<f||d<0)){let p=c%a,h=s%a,m=s-(h-p);h===p?d=s:d=h>p?m:m-a}ui(e,d)&&(d=c)}if(r.key===vM&&(l&&rt(r),c===-1?d=f:(d=tt(e,{startingIndex:c,amount:a,disabledIndices:u}),i&&c+a>s&&(d=tt(e,{startingIndex:c%a-a,amount:a,disabledIndices:u}))),ui(e,d)&&(d=c)),n==="both"){let p=an(c/a);r.key===(o?sp:cp)&&(l&&rt(r),c%a!==a-1?(d=tt(e,{startingIndex:c,disabledIndices:u}),i&&ws(d,a,p)&&(d=tt(e,{startingIndex:c-c%a-1,disabledIndices:u}))):i&&(d=tt(e,{startingIndex:c-c%a-1,disabledIndices:u})),ws(d,a,p)&&(d=c)),r.key===(o?cp:sp)&&(l&&rt(r),c%a!==0?(d=tt(e,{startingIndex:c,decrement:!0,disabledIndices:u}),i&&ws(d,a,p)&&(d=tt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u}))):i&&(d=tt(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:u})),ws(d,a,p)&&(d=c));let h=an(s/a)===p;ui(e,d)&&(i&&h?d=r.key===(o?cp:sp)?s:tt(e,{startingIndex:c-c%a-1,disabledIndices:u}):d=c)}return d}function vp(e,t,r){let n=[],i=0;return e.forEach((o,a)=>{let{width:u,height:f}=o;u>t;let s=!1;for(r&&(i=0);!s;){let c=[];for(let l=0;l<u;l++)for(let d=0;d<f;d++)c.push(i+l+d*t);i%t+u<=t&&c.every(l=>n[l]==null)?(c.forEach(l=>{n[l]=a}),s=!0):i++}}),[...n]}function bp(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 gp(e,t){return t.flatMap((r,n)=>e.includes(r)?[n]:[])}function sn(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 Xg(e,t){let r=ro(e,io()),n=r.length;if(n===0)return;let i=or(nt(e)),o=r.indexOf(i),a=o===-1?t===1?0:n-1:o+t;return r[a]}function _p(e){return Xg(nt(e).body,1)||e}function yp(e){return Xg(nt(e).body,-1)||e}function oo(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!Xe(r,n)}function Jg(e){ro(e,io()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function wp(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 no,Hg,Wg,hM,sp,cp,mM,vM,bM,gM,be,_M,yM,wM,io,Qg=pt(()=>{Pa();no=j(Fe(),1),Hg=j(Fe(),1);eo();up();Wg="data-floating-ui-focusable",hM="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",sp="ArrowLeft",cp="ArrowRight",mM="ArrowUp",vM="ArrowDown";bM=typeof document<"u",gM=function(){},be=bM?Hg.useLayoutEffect:gM,_M={...no};yM=_M.useInsertionEffect,wM=yM||(e=>e());io=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"})});var Ts=g((yY,e_)=>{e_.exports=JBrowseExports["react-dom"]});function t_(e,t,r){let{reference:n,floating:i}=e,o=Gt(t),a=vs(t),u=ms(a),f=Mt(t),s=o==="y",c=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2,d=n[u]/2-i[u]/2,p;switch(f){case"top":p={x:c,y:n.y-i.height};break;case"bottom":p={x:c,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:l};break;case"left":p={x:n.x-i.width,y:l};break;default:p={x:n.x,y:n.y}}switch(Vt(t)){case"start":p[a]-=d*(r&&s?-1:1);break;case"end":p[a]+=d*(r&&s?-1:1);break}return p}async function cn(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:o,rects:a,elements:u,strategy:f}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:l="floating",altBoundary:d=!1,padding:p=0}=Pt(t,e),h=bs(p),v=u[d?l==="floating"?"reference":"floating":l],_=zr(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(u.floating)),boundary:s,rootBoundary:c,strategy:f})),w=l==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),x=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},O=zr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:y,strategy:f}):w);return{top:(_.top-O.top+h.top)/x.y,bottom:(O.bottom-_.bottom+h.bottom)/x.y,left:(_.left-O.left+h.left)/x.x,right:(O.right-_.right+h.right)/x.x}}function xM(e,t,r){return(e?[...r.filter(i=>Vt(i)===e),...r.filter(i=>Vt(i)!==e)]:r.filter(i=>Mt(i)===i)).filter(i=>e?Vt(i)===e||(t?Ma(i)!==i:!1):!0)}function r_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function n_(e){return tp.some(t=>e[t]>=0)}function c_(e){let t=wt(...e.map(o=>o.left)),r=wt(...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 SM(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=>zr(c_(i)))}async function OM(e,t){let{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Mt(r),u=Vt(r),f=Gt(r)==="y",s=f_.has(a)?-1:1,c=o&&f?-1:1,l=Pt(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return u&&typeof h=="number"&&(p=u==="end"?h*-1:h),f?{x:p*c,y:d*s}:{x:d*s,y:p*c}}var i_,o_,a_,u_,s_,l_,f_,d_,p_,h_,m_,v_=pt(()=>{eo();eo();i_=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=o.filter(Boolean),f=await(a.isRTL==null?void 0:a.isRTL(t)),s=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:l}=t_(s,n,f),d=n,p={},h=0;for(let m=0;m<u.length;m++){let{name:v,fn:_}=u[m],{x:w,y,data:x,reset:O}=await _({x:c,y:l,initialPlacement:n,placement:d,strategy:i,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});c=w??c,l=y??l,p={...p,[v]:{...p[v],...x}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(d=O.placement),O.rects&&(s=O.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:c,y:l}=t_(s,d,f)),m=-1)}return{x:c,y:l,placement:d,strategy:i,middlewareData:p}};o_=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:f}=t,{element:s,padding:c=0}=Pt(e,t)||{};if(s==null)return{};let l=bs(c),d={x:r,y:n},p=vs(i),h=ms(p),m=await a.getDimensions(s),v=p==="y",_=v?"top":"left",w=v?"bottom":"right",y=v?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[p]-d[p]-o.floating[h],O=d[p]-o.reference[p],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s)),E=M?M[y]:0;(!E||!await(a.isElement==null?void 0:a.isElement(M)))&&(E=u.floating[y]||o.floating[h]);let P=x/2-O/2,C=E/2-m[h]/2-1,R=wt(l[_],C),L=wt(l[w],C),z=R,D=E-m[h]-L,A=E/2-m[h]/2+P,k=ps(z,A,D),U=!f.arrow&&Vt(i)!=null&&A!==k&&o.reference[h]/2-(A<z?R:L)-m[h]/2<0,q=U?A<z?A-z:A-D:0;return{[p]:d[p]+q,data:{[p]:k,centerOffset:A-k-q,...U&&{alignmentOffset:q}},reset:U}}});a_=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:f,elements:s}=t,{crossAxis:c=!1,alignment:l,allowedPlacements:d=rp,autoAlignment:p=!0,...h}=Pt(e,t),m=l!==void 0||d===rp?xM(l||null,p,d):d,v=await cn(t,h),_=((r=a.autoPlacement)==null?void 0:r.index)||0,w=m[_];if(w==null)return{};let y=np(w,o,await(f.isRTL==null?void 0:f.isRTL(s.floating)));if(u!==w)return{reset:{placement:m[0]}};let x=[v[Mt(w)],v[y[0]],v[y[1]]],O=[...((n=a.autoPlacement)==null?void 0:n.overflows)||[],{placement:w,overflows:x}],M=m[_+1];if(M)return{data:{index:_+1,overflows:O},reset:{placement:M}};let E=O.map(R=>{let L=Vt(R.placement);return[R.placement,L&&c?R.overflows.slice(0,2).reduce((z,D)=>z+D,0):R.overflows[0],R.overflows]}).sort((R,L)=>R[1]-L[1]),C=((i=E.filter(R=>R[2].slice(0,Vt(R[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||E[0][0];return C!==u?{data:{index:_+1,overflows:O},reset:{placement:C}}:{}}}},u_=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:f,elements:s}=t,{mainAxis:c=!0,crossAxis:l=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Pt(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};let _=Mt(i),w=Gt(u),y=Mt(u)===u,x=await(f.isRTL==null?void 0:f.isRTL(s.floating)),O=d||(y||!m?[Ca(u)]:kg(u)),M=h!=="none";!d&&M&&O.push(...qg(u,m,h,x));let E=[u,...O],P=await cn(t,v),C=[],R=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&C.push(P[_]),l){let A=np(i,a,x);C.push(P[A[0]],P[A[1]])}if(R=[...R,{placement:i,overflows:C}],!C.every(A=>A<=0)){var L,z;let A=(((L=o.flip)==null?void 0:L.index)||0)+1,k=E[A];if(k&&(!(l==="alignment"?w!==Gt(k):!1)||R.every(T=>Gt(T.placement)===w?T.overflows[0]>0:!0)))return{data:{index:A,overflows:R},reset:{placement:k}};let U=(z=R.filter(q=>q.overflows[0]<=0).sort((q,T)=>q.overflows[1]-T.overflows[1])[0])==null?void 0:z.placement;if(!U)switch(p){case"bestFit":{var D;let q=(D=R.filter(T=>{if(M){let F=Gt(T.placement);return F===w||F==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(F=>F>0).reduce((F,W)=>F+W,0)]).sort((T,F)=>T[1]-F[1])[0])==null?void 0:D[0];q&&(U=q);break}case"initialPlacement":U=u;break}if(i!==U)return{reset:{placement:U}}}return{}}}};s_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=Pt(e,t);switch(n){case"referenceHidden":{let o=await cn(t,{...i,elementContext:"reference"}),a=r_(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:n_(a)}}}case"escaped":{let o=await cn(t,{...i,altBoundary:!0}),a=r_(o,r.floating);return{data:{escapedOffsets:a,escaped:n_(a)}}}default:return{}}}}};l_=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:f,y:s}=Pt(e,t),c=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),l=SM(c),d=zr(c_(c)),p=bs(u);function h(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&s!=null)return l.find(v=>f>v.left-p.left&&f<v.right+p.right&&s>v.top-p.top&&s<v.bottom+p.bottom)||d;if(l.length>=2){if(Gt(r)==="y"){let R=l[0],L=l[l.length-1],z=Mt(r)==="top",D=R.top,A=L.bottom,k=z?R.left:L.left,U=z?R.right:L.right,q=U-k,T=A-D;return{top:D,bottom:A,left:k,right:U,width:q,height:T,x:k,y:D}}let v=Mt(r)==="left",_=Ve(...l.map(R=>R.right)),w=wt(...l.map(R=>R.left)),y=l.filter(R=>v?R.left===w:R.right===_),x=y[0].top,O=y[y.length-1].bottom,M=w,E=_,P=E-M,C=O-x;return{top:x,bottom:O,left:M,right:E,width:P,height:C,x:M,y:x}}return d}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}}:{}}}},f_=new Set(["left","top"]);d_=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,f=await OM(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:a}}}}},p_=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:v=>{let{x:_,y:w}=v;return{x:_,y:w}}},...f}=Pt(e,t),s={x:r,y:n},c=await cn(t,f),l=Gt(Mt(i)),d=hs(l),p=s[d],h=s[l];if(o){let v=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=p+c[v],y=p-c[_];p=ps(w,p,y)}if(a){let v=l==="y"?"top":"left",_=l==="y"?"bottom":"right",w=h+c[v],y=h-c[_];h=ps(w,h,y)}let m=u.fn({...t,[d]:p,[l]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[d]:o,[l]:a}}}}}},h_=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:f=!0,crossAxis:s=!0}=Pt(e,t),c={x:r,y:n},l=Gt(i),d=hs(l),p=c[d],h=c[l],m=Pt(u,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(f){let y=d==="y"?"height":"width",x=o.reference[d]-o.floating[y]+v.mainAxis,O=o.reference[d]+o.reference[y]-v.mainAxis;p<x?p=x:p>O&&(p=O)}if(s){var _,w;let y=d==="y"?"width":"height",x=f_.has(Mt(i)),O=o.reference[l]-o.floating[y]+(x&&((_=a.offset)==null?void 0:_[l])||0)+(x?0:v.crossAxis),M=o.reference[l]+o.reference[y]+(x?0:((w=a.offset)==null?void 0:w[l])||0)-(x?v.crossAxis:0);h<O?h=O:h>M&&(h=M)}return{[d]:p,[l]:h}}}},m_=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:f=()=>{},...s}=Pt(e,t),c=await cn(t,s),l=Mt(i),d=Vt(i),p=Gt(i)==="y",{width:h,height:m}=o.floating,v,_;l==="top"||l==="bottom"?(v=l,_=d===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(_=l,v=d==="end"?"top":"bottom");let w=m-c.top-c.bottom,y=h-c.left-c.right,x=wt(m-c[v],w),O=wt(h-c[_],y),M=!t.middlewareData.shift,E=x,P=O;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=w),M&&!d){let R=Ve(c.left,0),L=Ve(c.right,0),z=Ve(c.top,0),D=Ve(c.bottom,0);p?P=h-2*(R!==0||L!==0?R+L:Ve(c.left,c.right)):E=m-2*(z!==0||D!==0?z+D:Ve(c.top,c.bottom))}await f({...t,availableWidth:P,availableHeight:E});let C=await a.getDimensions(u.floating);return h!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}}});function y_(e){let t=yt(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=ai(r)!==o||ai(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Sp(e){return Me(e)?e:e.contextElement}function ao(e){let t=Sp(e);if(!Ne(t))return ir(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:o}=y_(t),a=(o?ai(r.width):r.width)/n,u=(o?ai(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}function w_(e){let t=ut(e);return!Qi()||!t.visualViewport?EM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AM(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ut(e)?!1:t}function ci(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let i=e.getBoundingClientRect(),o=Sp(e),a=ir(1);t&&(n?Me(n)&&(a=ao(n)):a=ao(e));let u=AM(o,r,n)?w_(o):ir(0),f=(i.left+u.x)/a.x,s=(i.top+u.y)/a.y,c=i.width/a.x,l=i.height/a.y;if(o){let d=ut(o),p=n&&Me(n)?ut(n):n,h=d,m=ds(h);for(;m&&n&&p!==h;){let v=ao(m),_=m.getBoundingClientRect(),w=yt(m),y=_.left+(m.clientLeft+parseFloat(w.paddingLeft))*v.x,x=_.top+(m.clientTop+parseFloat(w.paddingTop))*v.y;f*=v.x,s*=v.y,c*=v.x,l*=v.y,f+=y,s+=x,h=ut(m),m=ds(h)}}return zr({width:c,height:l,x:f,y:s})}function Ps(e,t){let r=Ta(e).scrollLeft;return t?t.left+r:ci(rr(e)).left+r}function x_(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Ps(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function RM(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,o=i==="fixed",a=rr(n),u=t?Ra(t.floating):!1;if(n===a||u&&o)return r;let f={scrollLeft:0,scrollTop:0},s=ir(1),c=ir(0),l=Ne(n);if((l||!l&&!o)&&((_r(n)!=="body"||Ji(a))&&(f=Ta(n)),Ne(n))){let p=ci(n);s=ao(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}let d=a&&!l&&!o?x_(a,f):ir(0);return{width:r.width*s.x,height:r.height*s.y,x:r.x*s.x-f.scrollLeft*s.x+c.x+d.x,y:r.y*s.y-f.scrollTop*s.y+c.y+d.y}}function TM(e){return Array.from(e.getClientRects())}function PM(e){let t=rr(e),r=Ta(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+Ps(e),u=-r.scrollTop;return yt(n).direction==="rtl"&&(a+=Ve(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}function MM(e,t){let r=ut(e),n=rr(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,f=0;if(i){o=i.width,a=i.height;let c=Qi();(!c||c&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}let s=Ps(n);if(s<=0){let c=n.ownerDocument,l=c.body,d=getComputedStyle(l),p=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,h=Math.abs(n.clientWidth-l.clientWidth-p);h<=b_&&(o-=h)}else s<=b_&&(o+=s);return{width:o,height:a,x:u,y:f}}function IM(e,t){let r=ci(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Ne(e)?ao(e):ir(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,f=i*o.x,s=n*o.y;return{width:a,height:u,x:f,y:s}}function g_(e,t,r){let n;if(t==="viewport")n=MM(e,r);else if(t==="document")n=PM(rr(e));else if(Me(t))n=IM(t,r);else{let i=w_(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zr(n)}function S_(e,t){let r=tr(e);return r===t||!Me(r)||nr(r)?!1:yt(r).position==="fixed"||S_(r,t)}function kM(e,t){let r=t.get(e);if(r)return r;let n=Tt(e,[],!1).filter(u=>Me(u)&&_r(u)!=="body"),i=null,o=yt(e).position==="fixed",a=o?tr(e):e;for(;Me(a)&&!nr(a);){let u=yt(a),f=fs(a);!f&&u.position==="fixed"&&(i=null),(o?!f&&!i:!f&&u.position==="static"&&!!i&&CM.has(i.position)||Ji(a)&&!f&&S_(e,a))?n=n.filter(c=>c!==a):i=u,a=tr(a)}return t.set(e,n),n}function qM(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,a=[...r==="clippingAncestors"?Ra(t)?[]:kM(t,this._c):[].concat(r),n],u=a[0],f=a.reduce((s,c)=>{let l=g_(t,c,i);return s.top=Ve(l.top,s.top),s.right=wt(l.right,s.right),s.bottom=wt(l.bottom,s.bottom),s.left=Ve(l.left,s.left),s},g_(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function jM(e){let{width:t,height:r}=y_(e);return{width:t,height:r}}function FM(e,t,r){let n=Ne(t),i=rr(t),o=r==="fixed",a=ci(e,!0,o,t),u={scrollLeft:0,scrollTop:0},f=ir(0);function s(){f.x=Ps(i)}if(n||!n&&!o)if((_r(t)!=="body"||Ji(i))&&(u=Ta(t)),n){let p=ci(t,!0,o,t);f.x=p.x+t.clientLeft,f.y=p.y+t.clientTop}else i&&s();o&&!n&&i&&s();let c=i&&!n&&!o?x_(i,u):ir(0),l=a.left+u.scrollLeft-f.x-c.x,d=a.top+u.scrollTop-f.y-c.y;return{x:l,y:d,width:a.width,height:a.height}}function xp(e){return yt(e).position==="static"}function __(e,t){if(!Ne(e)||yt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rr(e)===r&&(r=r.ownerDocument.body),r}function O_(e,t){let r=ut(e);if(Ra(e))return r;if(!Ne(e)){let i=tr(e);for(;i&&!nr(i);){if(Me(i)&&!xp(i))return i;i=tr(i)}return r}let n=__(e,t);for(;n&&Rg(n)&&xp(n);)n=__(n,t);return n&&nr(n)&&xp(n)&&!fs(n)?r:n||Tg(e)||r}function NM(e){return yt(e).direction==="rtl"}function E_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function DM(e,t){let r=null,n,i=rr(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),o();let s=e.getBoundingClientRect(),{left:c,top:l,width:d,height:p}=s;if(u||t(),!d||!p)return;let h=an(l),m=an(i.clientWidth-(c+d)),v=an(i.clientHeight-(l+p)),_=an(c),y={rootMargin:-h+"px "+-m+"px "+-v+"px "+-_+"px",threshold:Ve(0,wt(1,f))||1},x=!0;function O(M){let E=M[0].intersectionRatio;if(E!==f){if(!x)return a();E?a(!1,E):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!E_(s,e.getBoundingClientRect())&&a(),x=!1}try{r=new IntersectionObserver(O,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(O,y)}r.observe(e)}return a(!0),o}function Op(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:f=!1}=n,s=Sp(e),c=i||o?[...s?Tt(s):[],...Tt(t)]:[];c.forEach(_=>{i&&_.addEventListener("scroll",r,{passive:!0}),o&&_.addEventListener("resize",r)});let l=s&&u?DM(s,r):null,d=-1,p=null;a&&(p=new ResizeObserver(_=>{let[w]=_;w&&w.target===s&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),s&&!f&&p.observe(s),p.observe(t));let h,m=f?ci(e):null;f&&v();function v(){let _=ci(e);m&&!E_(m,_)&&r(),m=_,h=requestAnimationFrame(v)}return r(),()=>{var _;c.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),l?.(),(_=p)==null||_.disconnect(),p=null,f&&cancelAnimationFrame(h)}}var EM,b_,CM,LM,Ms,li,A_,R_,T_,P_,M_,C_,Ep,I_,k_,ja,Ap=pt(()=>{v_();eo();Pa();Pa();EM=ir(0);b_=25;CM=new Set(["absolute","fixed"]);LM=async function(e){let t=this.getOffsetParent||O_,r=this.getDimensions,n=await r(e.floating);return{reference:FM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};Ms={convertOffsetParentRelativeRectToViewportRelativeRect:RM,getDocumentElement:rr,getClippingRect:qM,getOffsetParent:O_,getElementRects:LM,getClientRects:TM,getDimensions:jM,getScale:ao,isElement:Me,isRTL:NM};li=cn,A_=d_,R_=a_,T_=p_,P_=u_,M_=m_,C_=s_,Ep=o_,I_=l_,k_=h_,ja=(e,t,r)=>{let n=new Map,i={platform:Ms,...r},o={...i.platform,_c:n};return i_(e,t,{...i,platform:o})}});function Is(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(!Is(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)&&!Is(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function L_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function q_(e,t){let r=L_(e);return Math.round(t*r)/r}function Rp(e){let t=Ke.useRef(e);return Cs(()=>{t.current=e}),t}function N_(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:f,open:s}=e,[c,l]=Ke.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=Ke.useState(n);Is(d,n)||p(n);let[h,m]=Ke.useState(null),[v,_]=Ke.useState(null),w=Ke.useCallback(T=>{T!==M.current&&(M.current=T,m(T))},[]),y=Ke.useCallback(T=>{T!==E.current&&(E.current=T,_(T))},[]),x=o||h,O=a||v,M=Ke.useRef(null),E=Ke.useRef(null),P=Ke.useRef(c),C=f!=null,R=Rp(f),L=Rp(i),z=Rp(s),D=Ke.useCallback(()=>{if(!M.current||!E.current)return;let T={placement:t,strategy:r,middleware:d};L.current&&(T.platform=L.current),ja(M.current,E.current,T).then(F=>{let W={...F,isPositioned:z.current!==!1};A.current&&!Is(P.current,W)&&(P.current=W,F_.flushSync(()=>{l(W)}))})},[d,t,r,L,z]);Cs(()=>{s===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,l(T=>({...T,isPositioned:!1})))},[s]);let A=Ke.useRef(!1);Cs(()=>(A.current=!0,()=>{A.current=!1}),[]),Cs(()=>{if(x&&(M.current=x),O&&(E.current=O),x&&O){if(R.current)return R.current(x,O,D);D()}},[x,O,D,R,C]);let k=Ke.useMemo(()=>({reference:M,floating:E,setReference:w,setFloating:y}),[w,y]),U=Ke.useMemo(()=>({reference:x,floating:O}),[x,O]),q=Ke.useMemo(()=>{let T={position:r,left:0,top:0};if(!U.floating)return T;let F=q_(U.floating,c.x),W=q_(U.floating,c.y);return u?{...T,transform:"translate("+F+"px, "+W+"px)",...L_(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:W}},[r,u,U.floating,c.x,c.y]);return Ke.useMemo(()=>({...c,update:D,refs:k,elements:U,floatingStyles:q}),[c,D,k,U,q])}var Ke,j_,F_,BM,zM,Cs,UM,ks,D_,B_,z_,U_,W_,H_,V_,G_,Tp=pt(()=>{Ap();Ap();Ke=j(Fe(),1),j_=j(Fe(),1),F_=j(Ts(),1),BM=typeof document<"u",zM=function(){},Cs=BM?j_.useLayoutEffect:zM;UM=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?Ep({element:n.current,padding:i}).fn(r):{}:n?Ep({element:n,padding:i}).fn(r):{}}}},ks=(e,t)=>({...A_(e),options:[e,t]}),D_=(e,t)=>({...T_(e),options:[e,t]}),B_=(e,t)=>({...k_(e),options:[e,t]}),z_=(e,t)=>({...P_(e),options:[e,t]}),U_=(e,t)=>({...M_(e),options:[e,t]}),W_=(e,t)=>({...R_(e),options:[e,t]}),H_=(e,t)=>({...C_(e),options:[e,t]}),V_=(e,t)=>({...I_(e),options:[e,t]}),G_=(e,t)=>({...UM(e),options:[e,t]})});var Ly={};wa(Ly,{Composite:()=>VM,CompositeItem:()=>GM,FloatingArrow:()=>XM,FloatingDelayGroup:()=>rC,FloatingFocusManager:()=>vC,FloatingList:()=>gy,FloatingNode:()=>QM,FloatingOverlay:()=>gC,FloatingPortal:()=>fC,FloatingTree:()=>eC,NextFloatingDelayGroup:()=>iC,arrow:()=>G_,autoPlacement:()=>W_,autoUpdate:()=>Op,computePosition:()=>ja,detectOverflow:()=>li,flip:()=>z_,getOverflowAncestors:()=>Tt,hide:()=>H_,inline:()=>V_,inner:()=>FC,limitShift:()=>B_,offset:()=>ks,platform:()=>Ms,safePolygon:()=>DC,shift:()=>D_,size:()=>U_,useClick:()=>yC,useClientPoint:()=>xC,useDelayGroup:()=>nC,useDelayGroupContext:()=>Ty,useDismiss:()=>EC,useFloating:()=>AC,useFloatingNodeId:()=>JM,useFloatingParentNodeId:()=>hi,useFloatingPortalNode:()=>Iy,useFloatingRootContext:()=>qy,useFloatingTree:()=>mi,useFocus:()=>RC,useHover:()=>tC,useId:()=>co,useInnerOffset:()=>LC,useInteractions:()=>TC,useListItem:()=>_y,useListNavigation:()=>MC,useMergeRefs:()=>vy,useNextDelayGroup:()=>oC,useRole:()=>IC,useTransitionStatus:()=>jy,useTransitionStyles:()=>qC,useTypeahead:()=>jC});function vy(e){let t=S.useRef(void 0),r=S.useCallback(n=>{let i=e.map(o=>{if(o!=null){if(typeof o=="function"){let a=o,u=a(n);return typeof u=="function"?u:()=>{a(null)}}return o.current=n,()=>{o.current=null}}});return()=>{i.forEach(o=>o?.())}},e);return S.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}function WM(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 gy(e){let{children:t,elementsRef:r,labelsRef:n}=e,[i,o]=S.useState(()=>new Set),a=S.useCallback(s=>{o(c=>new Set(c).add(s))},[]),u=S.useCallback(s=>{o(c=>{let l=new Set(c);return l.delete(s),l})},[]),f=S.useMemo(()=>{let s=new Map;return Array.from(i.keys()).sort(WM).forEach((l,d)=>{s.set(l,d)}),s},[i]);return(0,Ce.jsx)(by.Provider,{value:S.useMemo(()=>({register:a,unregister:u,map:f,elementsRef:r,labelsRef:n}),[a,u,f,r,n]),children:t})}function _y(e){e===void 0&&(e={});let{label:t}=e,{register:r,unregister:n,map:i,elementsRef:o,labelsRef:a}=S.useContext(by),[u,f]=S.useState(null),s=S.useRef(null),c=S.useCallback(l=>{if(s.current=l,u!==null&&(o.current[u]=l,a)){var d;let p=t!==void 0;a.current[u]=p?t:(d=l?.textContent)!=null?d:null}},[u,o,a,t]);return be(()=>{let l=s.current;if(l)return r(l),()=>{n(l)}},[r,n]),be(()=>{let l=s.current?i.get(s.current):null;l!=null&&f(l)},[i]),S.useMemo(()=>({ref:c,index:u??-1}),[u,c])}function yy(e,t){return typeof e=="function"?e(t):e?S.cloneElement(e,t):(0,Ce.jsx)("div",{...t})}function KM(){let[e,t]=S.useState(()=>K_?Y_():void 0);return be(()=>{e==null&&t(Y_())},[]),S.useEffect(()=>{K_=!0},[]),e}function Oy(){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 JM(e){let t=co(),r=mi(),n=hi(),i=e||n;return be(()=>{if(!t)return;let o={id:t,parentId:i};return r?.addNode(o),()=>{r?.removeNode(o)}},[r,t,i]),t}function QM(e){let{children:t,id:r}=e,n=hi();return(0,Ce.jsx)(Ey.Provider,{value:S.useMemo(()=>({id:r,parentId:n}),[r,n]),children:t})}function eC(e){let{children:t}=e,r=S.useRef([]),n=S.useCallback(a=>{r.current=[...r.current,a]},[]),i=S.useCallback(a=>{r.current=r.current.filter(u=>u!==a)},[]),[o]=S.useState(()=>Oy());return(0,Ce.jsx)(Ay.Provider,{value:S.useMemo(()=>({nodesRef:r,addNode:n,removeNode:i,events:o}),[n,i,o]),children:t})}function pi(e){return"data-floating-ui-"+e}function it(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Fa(e,t,r){if(r&&!si(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 Mp(e){return typeof e=="function"?e():e}function tC(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,events:o,elements:a}=e,{enabled:u=!0,delay:f=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:d=!0}=t,p=mi(),h=hi(),m=Je(s),v=Je(f),_=Je(r),w=Je(l),y=S.useRef(),x=S.useRef(-1),O=S.useRef(),M=S.useRef(-1),E=S.useRef(!0),P=S.useRef(!1),C=S.useRef(()=>{}),R=S.useRef(!1),L=ke(()=>{var q;let T=(q=i.current.openEvent)==null?void 0:q.type;return T?.includes("mouse")&&T!=="mousedown"});S.useEffect(()=>{if(!u)return;function q(T){let{open:F}=T;F||(it(x),it(M),E.current=!0,R.current=!1)}return o.on("openchange",q),()=>{o.off("openchange",q)}},[u,o]),S.useEffect(()=>{if(!u||!m.current||!r)return;function q(F){L()&&n(!1,F,"hover")}let T=nt(a.floating).documentElement;return T.addEventListener("mouseleave",q),()=>{T.removeEventListener("mouseleave",q)}},[a.floating,r,n,u,m,L]);let z=S.useCallback(function(q,T,F){T===void 0&&(T=!0),F===void 0&&(F="hover");let W=Fa(v.current,"close",y.current);W&&!O.current?(it(x),x.current=window.setTimeout(()=>n(!1,q,F),W)):T&&(it(x),n(!1,q,F))},[v,n]),D=ke(()=>{C.current(),O.current=void 0}),A=ke(()=>{if(P.current){let q=nt(a.floating).body;q.style.pointerEvents="",q.removeAttribute(X_),P.current=!1}}),k=ke(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);S.useEffect(()=>{if(!u)return;function q(ee){if(it(x),E.current=!1,c&&!si(y.current)||Mp(w.current)>0&&!Fa(v.current,"open"))return;let G=Fa(v.current,"open",y.current);G?x.current=window.setTimeout(()=>{_.current||n(!0,ee,"hover")},G):r||n(!0,ee,"hover")}function T(ee){if(k()){A();return}C.current();let G=nt(a.floating);if(it(M),R.current=!1,m.current&&i.current.floatingContext){r||it(x),O.current=m.current({...i.current.floatingContext,tree:p,x:ee.clientX,y:ee.clientY,onClose(){A(),D(),k()||z(ee,!0,"safe-polygon")}});let N=O.current;G.addEventListener("mousemove",N),C.current=()=>{G.removeEventListener("mousemove",N)};return}(y.current!=="touch"||!Xe(a.floating,ee.relatedTarget))&&z(ee)}function F(ee){k()||i.current.floatingContext&&(m.current==null||m.current({...i.current.floatingContext,tree:p,x:ee.clientX,y:ee.clientY,onClose(){A(),D(),k()||z(ee)}})(ee))}function W(){it(x)}function we(ee){k()||z(ee,!1)}if(Me(a.domReference)){let ee=a.domReference,G=a.floating;return r&&ee.addEventListener("mouseleave",F),d&&ee.addEventListener("mousemove",q,{once:!0}),ee.addEventListener("mouseenter",q),ee.addEventListener("mouseleave",T),G&&(G.addEventListener("mouseleave",F),G.addEventListener("mouseenter",W),G.addEventListener("mouseleave",we)),()=>{r&&ee.removeEventListener("mouseleave",F),d&&ee.removeEventListener("mousemove",q),ee.removeEventListener("mouseenter",q),ee.removeEventListener("mouseleave",T),G&&(G.removeEventListener("mouseleave",F),G.removeEventListener("mouseenter",W),G.removeEventListener("mouseleave",we))}}},[a,u,e,c,d,z,D,A,n,r,_,p,v,m,i,k,w]),be(()=>{var q;if(u&&r&&(q=m.current)!=null&&(q=q.__options)!=null&&q.blockPointerEvents&&L()){P.current=!0;let F=a.floating;if(Me(a.domReference)&&F){var T;let W=nt(a.floating).body;W.setAttribute(X_,"");let we=a.domReference,ee=p==null||(T=p.nodesRef.current.find(G=>G.id===h))==null||(T=T.context)==null?void 0:T.elements.floating;return ee&&(ee.style.pointerEvents=""),W.style.pointerEvents="none",we.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{W.style.pointerEvents="",we.style.pointerEvents="",F.style.pointerEvents=""}}}},[u,r,h,a,p,m,L]),be(()=>{r||(y.current=void 0,R.current=!1,D(),A())},[r,D,A]),S.useEffect(()=>()=>{D(),it(x),it(M),A()},[u,a.domReference,D,A]);let U=S.useMemo(()=>{function q(T){y.current=T.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(T){let{nativeEvent:F}=T;function W(){!E.current&&!_.current&&n(!0,F,"hover")}c&&!si(y.current)||r||Mp(w.current)===0||R.current&&T.movementX**2+T.movementY**2<2||(it(M),y.current==="touch"?W():(R.current=!0,M.current=window.setTimeout(W,Mp(w.current))))}}},[c,n,r,_,w]);return S.useMemo(()=>u?{reference:U}:{},[u,U])}function rC(e){let{children:t,delay:r,timeoutMs:n=0}=e,[i,o]=S.useReducer((f,s)=>({...f,...s}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=S.useRef(null),u=S.useCallback(f=>{o({currentId:f})},[]);return be(()=>{i.currentId?a.current===null?a.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),a.current=null)},[i.currentId,i.isInstantPhase]),(0,Ce.jsx)(Ry.Provider,{value:S.useMemo(()=>({...i,setState:o,setCurrentId:u}),[i,u]),children:t})}function nC(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{id:o,enabled:a=!0}=t,u=o??i,f=Ty(),{currentId:s,setCurrentId:c,initialDelay:l,setState:d,timeoutMs:p}=f;return be(()=>{a&&s&&(d({delay:{open:1,close:Fa(l,"close")}}),s!==u&&n(!1))},[a,u,n,d,s,l]),be(()=>{function h(){n(!1),d({delay:l,currentId:null})}if(a&&s&&!r&&s===u){if(p){let m=window.setTimeout(h,p);return()=>{clearTimeout(m)}}h()}},[a,r,d,s,u,n,l,p]),be(()=>{a&&(c===Fp||!r||c(u))},[a,r,c,u]),f}function iC(e){let{children:t,delay:r,timeoutMs:n=0}=e,i=S.useRef(r),o=S.useRef(r),a=S.useRef(null),u=S.useRef(null),f=S.useRef(-1);return(0,Ce.jsx)(Py.Provider,{value:S.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:n,currentContextRef:u,timeoutIdRef:f}),[n]),children:t})}function oC(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:i}=e,{enabled:o=!0}=t,a=S.useContext(Py),{currentIdRef:u,delayRef:f,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:d,timeoutIdRef:p}=a,[h,m]=S.useState(!1);return be(()=>{function v(){var _;m(!1),(_=l.current)==null||_.setIsInstantPhase(!1),u.current=null,l.current=null,f.current=c.current}if(o&&u.current&&!r&&u.current===i){if(m(!1),s)return p.current=window.setTimeout(v,s),()=>{clearTimeout(p.current)};v()}},[o,r,i,u,f,s,c,l,p]),be(()=>{if(!o||!r)return;let v=l.current,_=u.current;l.current={onOpenChange:n,setIsInstantPhase:m},u.current=i,f.current={open:0,close:Fa(c.current,"close")},_!==null&&_!==i?(it(p),m(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1)):(m(!1),v?.setIsInstantPhase(!1))},[o,r,i,n,u,f,s,c,l,p]),be(()=>()=>{l.current=null},[l]),S.useMemo(()=>({hasProvider:d,delayRef:f,isInstantPhase:h}),[d,f,h])}function fi(e,t){t===void 0&&(t={});let{preventScroll:r=!1,cancelPrevious:n=!0,sync:i=!1}=t;n&&cancelAnimationFrame(J_);let o=()=>e?.focus({preventScroll:r});i?o():J_=requestAnimationFrame(o)}function Cp(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&Xi(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function aC(e){return"composedPath"in e?e.composedPath()[0]:e.target}function uC(e){return e?.ownerDocument||document}function Q_(e){return e==="inert"?so.inert:e==="aria-hidden"?so["aria-hidden"]:so.none}function lC(e,t,r,n){let i="data-floating-ui-inert",o=n?"inert":r?"aria-hidden":null,a=cC(t,e),u=new Set,f=new Set(a),s=[];js[i]||(js[i]=new WeakMap);let c=js[i];a.forEach(l),d(t),u.clear();function l(p){!p||u.has(p)||(u.add(p),p.parentNode&&l(p.parentNode))}function d(p){!p||f.has(p)||[].forEach.call(p.children,h=>{if(_r(h)!=="script")if(u.has(h))d(h);else{let m=o?h.getAttribute(o):null,v=m!==null&&m!=="false",_=Q_(o),w=(_.get(h)||0)+1,y=(c.get(h)||0)+1;_.set(h,w),c.set(h,y),s.push(h),w===1&&v&&qs.add(h),y===1&&h.setAttribute(i,""),!v&&o&&h.setAttribute(o,o==="inert"?"":"true")}})}return Ip++,()=>{s.forEach(p=>{let h=Q_(o),v=(h.get(p)||0)-1,_=(c.get(p)||0)-1;h.set(p,v),c.set(p,_),v||(!qs.has(p)&&o&&p.removeAttribute(o),qs.delete(p)),_||p.removeAttribute(i)}),Ip--,Ip||(so.inert=new WeakMap,so["aria-hidden"]=new WeakMap,so.none=new WeakMap,qs=new WeakSet,js={})}}function ey(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=uC(e[0]).body;return lC(e.concat(Array.from(n.querySelectorAll('[aria-live],[role="status"],output'))),n,t,r)}function Iy(e){e===void 0&&(e={});let{id:t,root:r}=e,n=co(),i=ky(),[o,a]=S.useState(null),u=S.useRef(null);return be(()=>()=>{o?.remove(),queueMicrotask(()=>{u.current=null})},[o]),be(()=>{if(!n||u.current)return;let f=t?document.getElementById(t):null;if(!f)return;let s=document.createElement("div");s.id=n,s.setAttribute(ty,""),f.appendChild(s),u.current=s,a(s)},[t,n]),be(()=>{if(r===null||!n||u.current)return;let f=r||i?.portalNode;f&&!ls(f)&&(f=f.current),f=f||document.body;let s=null;t&&(s=document.createElement("div"),s.id=t,f.appendChild(s));let c=document.createElement("div");c.id=n,c.setAttribute(ty,""),f=s||f,f.appendChild(c),u.current=c,a(c)},[t,r,n,i]),o}function fC(e){let{children:t,id:r,root:n,preserveTabOrder:i=!0}=e,o=Iy({id:r,root:n}),[a,u]=S.useState(null),f=S.useRef(null),s=S.useRef(null),c=S.useRef(null),l=S.useRef(null),d=a?.modal,p=a?.open,h=!!a&&!a.modal&&a.open&&i&&!!(n||o);return S.useEffect(()=>{if(!o||!i||d)return;function m(v){o&&oo(v)&&(v.type==="focusin"?wp:Jg)(o)}return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)}},[o,i,d]),S.useEffect(()=>{o&&(p||wp(o))},[p,o]),(0,Ce.jsxs)(Cy.Provider,{value:S.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:f,afterOutsideRef:s,beforeInsideRef:c,afterInsideRef:l,portalNode:o,setFocusManagerState:u}),[i,o]),children:[h&&o&&(0,Ce.jsx)(Ns,{"data-type":"outside",ref:f,onFocus:m=>{if(oo(m,o)){var v;(v=c.current)==null||v.focus()}else{let _=a?a.domReference:null,w=yp(_);w?.focus()}}}),h&&o&&(0,Ce.jsx)("span",{"aria-owns":o.id,style:Ds}),o&&di.createPortal(t,o),h&&o&&(0,Ce.jsx)(Ns,{"data-type":"outside",ref:s,onFocus:m=>{if(oo(m,o)){var v;(v=l.current)==null||v.focus()}else{let _=a?a.domReference:null,w=_p(_);w?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}function ry(e){return S.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}function Lp(){ln=ln.filter(e=>e.isConnected)}function pC(e){Lp(),e&&_r(e)!=="body"&&(ln.push(e),ln.length>dC&&(ln=ln.slice(-20)))}function ny(){return Lp(),ln[ln.length-1]}function hC(e){let t=io();return ap(e,t)?e:ro(e,t)[0]||e}function iy(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;let n=io(),o=Ug(e,n).filter(u=>{let f=u.getAttribute("data-tabindex")||"";return ap(u,n)||u.hasAttribute("data-tabindex")&&!f.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 vC(e){let{context:t,children:r,disabled:n=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:u=!0,restoreFocus:f=!1,modal:s=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:l=!0,outsideElementsInert:d=!1,getInsideElements:p=()=>[]}=e,{open:h,onOpenChange:m,events:v,dataRef:_,elements:{domReference:w,floating:y}}=t,x=ke(()=>{var J;return(J=_.current.floatingContext)==null?void 0:J.nodeId}),O=ke(p),M=typeof a=="number"&&a<0,E=As(w)&&M,P=sC(),C=P?o:!0,R=!C||P&&d,L=Je(i),z=Je(a),D=Je(u),A=mi(),k=ky(),U=S.useRef(null),q=S.useRef(null),T=S.useRef(!1),F=S.useRef(!1),W=S.useRef(-1),we=S.useRef(-1),ee=k!=null,G=ka(y),Se=ke(function(J){return J===void 0&&(J=G),J?ro(J,io()):[]}),N=ke(J=>{let ce=Se(J);return L.current.map(re=>w&&re==="reference"?w:G&&re==="floating"?G:ce).filter(Boolean).flat()});S.useEffect(()=>{if(n||!s)return;function J(re){if(re.key==="Tab"){Xe(G,or(nt(G)))&&Se().length===0&&!E&&rt(re);let pe=N(),ve=ar(re);L.current[0]==="reference"&&ve===w&&(rt(re),re.shiftKey?fi(pe[pe.length-1]):fi(pe[1])),L.current[1]==="floating"&&ve===G&&re.shiftKey&&(rt(re),fi(pe[0]))}}let ce=nt(G);return ce.addEventListener("keydown",J),()=>{ce.removeEventListener("keydown",J)}},[n,w,G,s,L,E,Se,N]),S.useEffect(()=>{if(n||!y)return;function J(ce){let re=ar(ce),ve=Se().indexOf(re);ve!==-1&&(W.current=ve)}return y.addEventListener("focusin",J),()=>{y.removeEventListener("focusin",J)}},[n,y,Se]),S.useEffect(()=>{if(n||!l)return;function J(){F.current=!0,setTimeout(()=>{F.current=!1})}function ce(ve){let ie=ve.relatedTarget,K=ve.currentTarget,ae=ar(ve);queueMicrotask(()=>{let fe=x(),se=!(Xe(w,ie)||Xe(y,ie)||Xe(ie,y)||Xe(k?.portalNode,ie)||ie!=null&&ie.hasAttribute(pi("focus-guard"))||A&&(un(A.nodesRef.current,fe).find(B=>{var $,H;return Xe(($=B.context)==null?void 0:$.elements.floating,ie)||Xe((H=B.context)==null?void 0:H.elements.domReference,ie)})||dp(A.nodesRef.current,fe).find(B=>{var $,H,le;return[($=B.context)==null?void 0:$.elements.floating,ka((H=B.context)==null?void 0:H.elements.floating)].includes(ie)||((le=B.context)==null?void 0:le.elements.domReference)===ie})));if(K===w&&G&&iy(G,L),f&&K!==w&&!(ae!=null&&ae.isConnected)&&or(nt(G))===nt(G).body){Ne(G)&&G.focus();let B=W.current,$=Se(),H=$[B]||$[$.length-1]||G;Ne(H)&&H.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(E||!s)&&ie&&se&&!F.current&&ie!==ny()&&(T.current=!0,m(!1,ve,"focus-out"))})}let re=!!(!A&&k);function pe(){it(we),_.current.insideReactTree=!0,we.current=window.setTimeout(()=>{_.current.insideReactTree=!1})}if(y&&Ne(w))return w.addEventListener("focusout",ce),w.addEventListener("pointerdown",J),y.addEventListener("focusout",ce),re&&y.addEventListener("focusout",pe,!0),()=>{w.removeEventListener("focusout",ce),w.removeEventListener("pointerdown",J),y.removeEventListener("focusout",ce),re&&y.removeEventListener("focusout",pe,!0)}},[n,w,y,G,s,A,k,m,l,f,Se,E,x,L,_]);let te=S.useRef(null),ue=S.useRef(null),oe=ry([te,k?.beforeInsideRef]),Z=ry([ue,k?.afterInsideRef]);S.useEffect(()=>{var J,ce;if(n||!y)return;let re=Array.from((k==null||(J=k.portalNode)==null?void 0:J.querySelectorAll("["+pi("portal")+"]"))||[]),ve=(ce=(A?dp(A.nodesRef.current,x()):[]).find(ae=>{var fe;return As(((fe=ae.context)==null?void 0:fe.elements.domReference)||null)}))==null||(ce=ce.context)==null?void 0:ce.elements.domReference,ie=[y,ve,...re,...O(),U.current,q.current,te.current,ue.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,L.current.includes("reference")||E?w:null].filter(ae=>ae!=null),K=s||E?ey(ie,!R,R):ey(ie);return()=>{K()}},[n,w,y,s,L,k,E,C,R,A,x,O]),be(()=>{if(n||!Ne(G))return;let J=nt(G),ce=or(J);queueMicrotask(()=>{let re=N(G),pe=z.current,ve=(typeof pe=="number"?re[pe]:pe.current)||G,ie=Xe(G,ce);!M&&!ie&&h&&fi(ve,{preventScroll:ve===G})})},[n,h,G,M,N,z]),be(()=>{if(n||!G)return;let J=nt(G),ce=or(J);pC(ce);function re(ie){let{reason:K,event:ae,nested:fe}=ie;if(["hover","safe-polygon"].includes(K)&&ae.type==="mouseleave"&&(T.current=!0),K==="outside-press")if(fe)T.current=!1;else if(pp(ae)||hp(ae))T.current=!1;else{let se=!1;document.createElement("div").focus({get preventScroll(){return se=!0,!1}}),se?T.current=!1:T.current=!0}}v.on("openchange",re);let pe=J.createElement("span");pe.setAttribute("tabindex","-1"),pe.setAttribute("aria-hidden","true"),Object.assign(pe.style,Ds),ee&&w&&w.insertAdjacentElement("afterend",pe);function ve(){if(typeof D.current=="boolean"){let ie=w||ny();return ie&&ie.isConnected?ie:pe}return D.current.current||pe}return()=>{v.off("openchange",re);let ie=or(J),K=Xe(y,ie)||A&&un(A.nodesRef.current,x(),!1).some(fe=>{var se;return Xe((se=fe.context)==null?void 0:se.elements.floating,ie)}),ae=ve();queueMicrotask(()=>{let fe=hC(ae);D.current&&!T.current&&Ne(fe)&&(!(fe!==ie&&ie!==J.body)||K)&&fe.focus({preventScroll:!0}),pe.remove()})}},[n,y,G,D,_,v,A,ee,w,x]),S.useEffect(()=>(queueMicrotask(()=>{T.current=!1}),()=>{queueMicrotask(Lp)}),[n]),be(()=>{if(!n&&k)return k.setFocusManagerState({modal:s,closeOnFocusOut:l,open:h,onOpenChange:m,domReference:w}),()=>{k.setFocusManagerState(null)}},[n,k,s,h,m,l,w]),be(()=>{n||G&&iy(G,L)},[n,G,L]);function ne(J){return n||!c||!s?null:(0,Ce.jsx)(mC,{ref:J==="start"?U:q,onClick:ce=>m(!1,ce.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let he=!n&&C&&(s?!E:!0)&&(ee||s);return(0,Ce.jsxs)(Ce.Fragment,{children:[he&&(0,Ce.jsx)(Ns,{"data-type":"inside",ref:oe,onFocus:J=>{if(s){let re=N();fi(i[0]==="reference"?re[0]:re[re.length-1])}else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(T.current=!1,oo(J,k.portalNode)){let re=_p(w);re?.focus()}else{var ce;(ce=k.beforeOutsideRef.current)==null||ce.focus()}}}),!E&&ne("start"),r,ne("end"),he&&(0,Ce.jsx)(Ns,{"data-type":"inside",ref:Z,onFocus:J=>{if(s)fi(N()[0]);else if(k!=null&&k.preserveTabOrder&&k.portalNode)if(l&&(T.current=!0),oo(J,k.portalNode)){let re=yp(w);re?.focus()}else{var ce;(ce=k.afterOutsideRef.current)==null||ce.focus()}}})]})}function bC(){let e=xs(),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(oy,o+"px"),o&&(r[i]=o+"px"),t){var f,s;let c=((f=window.visualViewport)==null?void 0:f.offsetLeft)||0,l=((s=window.visualViewport)==null?void 0:s.offsetTop)||0;Object.assign(r,{position:"fixed",top:-(u-Math.floor(l))+"px",left:-(a-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(r,{overflow:"",[i]:""}),r.removeProperty(oy),t&&(Object.assign(r,{position:"",top:"",left:"",right:""}),window.scrollTo(a,u))}}function uy(e){return Ne(e.target)&&e.target.tagName==="BUTTON"}function _C(e){return Ne(e.target)&&e.target.tagName==="A"}function sy(e){return Es(e)}function yC(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:u="click",toggle:f=!0,ignoreMouse:s=!1,keyboardHandlers:c=!0,stickIfOpen:l=!0}=t,d=S.useRef(),p=S.useRef(!1),h=S.useMemo(()=>({onPointerDown(m){d.current=m.pointerType},onMouseDown(m){let v=d.current;m.button===0&&u!=="click"&&(si(v,!0)&&s||(r&&f&&(!(i.current.openEvent&&l)||i.current.openEvent.type==="mousedown")?n(!1,m.nativeEvent,"click"):(m.preventDefault(),n(!0,m.nativeEvent,"click"))))},onClick(m){let v=d.current;if(u==="mousedown"&&d.current){d.current=void 0;return}si(v,!0)&&s||(r&&f&&(!(i.current.openEvent&&l)||i.current.openEvent.type==="click")?n(!1,m.nativeEvent,"click"):n(!0,m.nativeEvent,"click"))},onKeyDown(m){d.current=void 0,!(m.defaultPrevented||!c||uy(m))&&(m.key===" "&&!sy(o)&&(m.preventDefault(),p.current=!0),!_C(m)&&m.key==="Enter"&&n(!(r&&f),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!c||uy(m)||sy(o)||m.key===" "&&p.current&&(p.current=!1,n(!(r&&f),m.nativeEvent,"click"))}}),[i,o,u,s,c,n,r,l,f]);return S.useMemo(()=>a?{reference:h}:{},[a,h])}function wC(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",f=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,l=a.height,d=a.x,p=a.y;return r==null&&t.x&&u&&(r=a.x-t.x),n==null&&t.y&&f&&(n=a.y-t.y),d-=r||0,p-=n||0,c=0,l=0,!i||s?(c=t.axis==="y"?a.width:0,l=t.axis==="x"?a.height:0,d=u&&t.x!=null?t.x:d,p=f&&t.y!=null?t.y:p):i&&!s&&(l=t.axis==="x"?a.height:l,c=t.axis==="y"?a.width:c),i=!0,{width:c,height:l,x:d,y:p,top:p,right:d+c,bottom:p+l,left:d}}}}function cy(e){return e!=null&&e.clientX!=null}function xC(e,t){t===void 0&&(t={});let{open:r,dataRef:n,elements:{floating:i,domReference:o},refs:a}=e,{enabled:u=!0,axis:f="both",x:s=null,y:c=null}=t,l=S.useRef(!1),d=S.useRef(null),[p,h]=S.useState(),[m,v]=S.useState([]),_=ke((M,E)=>{l.current||n.current.openEvent&&!cy(n.current.openEvent)||a.setPositionReference(wC(o,{x:M,y:E,axis:f,dataRef:n,pointerType:p}))}),w=ke(M=>{s!=null||c!=null||(r?d.current||v([]):_(M.clientX,M.clientY))}),y=si(p)?i:r,x=S.useCallback(()=>{if(!y||!u||s!=null||c!=null)return;let M=ut(i);function E(P){let C=ar(P);Xe(i,C)?(M.removeEventListener("mousemove",E),d.current=null):_(P.clientX,P.clientY)}if(!n.current.openEvent||cy(n.current.openEvent)){M.addEventListener("mousemove",E);let P=()=>{M.removeEventListener("mousemove",E),d.current=null};return d.current=P,P}a.setPositionReference(o)},[y,u,s,c,i,n,a,o,_]);S.useEffect(()=>x(),[x,m]),S.useEffect(()=>{u&&!i&&(l.current=!1)},[u,i]),S.useEffect(()=>{!u&&r&&(l.current=!0)},[u,r]),be(()=>{u&&(s!=null||c!=null)&&(l.current=!1,_(s,c))},[u,s,c,_]);let O=S.useMemo(()=>{function M(E){let{pointerType:P}=E;h(P)}return{onPointerDown:M,onPointerEnter:M,onMouseMove:w,onMouseEnter:w}},[w]);return S.useMemo(()=>u?{reference:O}:{},[u,O])}function EC(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:u=!0,outsidePress:f=!0,outsidePressEvent:s="pointerdown",referencePress:c=!1,referencePressEvent:l="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:h}=t,m=mi(),v=ke(typeof f=="function"?f:()=>!1),_=typeof f=="function"?v:f,w=S.useRef(!1),{escapeKey:y,outsidePress:x}=ly(p),{escapeKey:O,outsidePress:M}=ly(h),E=S.useRef(!1),P=ke(A=>{var k;if(!r||!a||!u||A.key!=="Escape"||E.current)return;let U=(k=o.current.floatingContext)==null?void 0:k.nodeId,q=m?un(m.nodesRef.current,U):[];if(!y&&(A.stopPropagation(),q.length>0)){let T=!0;if(q.forEach(F=>{var W;if((W=F.context)!=null&&W.open&&!F.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}n(!1,Yg(A)?A.nativeEvent:A,"escape-key")}),C=ke(A=>{var k;let U=()=>{var q;P(A),(q=ar(A))==null||q.removeEventListener("keydown",U)};(k=ar(A))==null||k.addEventListener("keydown",U)}),R=ke(A=>{var k;let U=o.current.insideReactTree;o.current.insideReactTree=!1;let q=w.current;if(w.current=!1,s==="click"&&q||U||typeof _=="function"&&!_(A))return;let T=ar(A),F="["+pi("inert")+"]",W=nt(i.floating).querySelectorAll(F),we=Me(T)?T:null;for(;we&&!nr(we);){let N=tr(we);if(nr(N)||!Me(N))break;we=N}if(W.length&&Me(T)&&!$g(T)&&!Xe(T,i.floating)&&Array.from(W).every(N=>!Xe(we,N)))return;if(Ne(T)&&D){let N=nr(T),te=yt(T),ue=/auto|scroll/,oe=N||ue.test(te.overflowX),Z=N||ue.test(te.overflowY),ne=oe&&T.clientWidth>0&&T.scrollWidth>T.clientWidth,he=Z&&T.clientHeight>0&&T.scrollHeight>T.clientHeight,J=te.direction==="rtl",ce=he&&(J?A.offsetX<=T.offsetWidth-T.clientWidth:A.offsetX>T.clientWidth),re=ne&&A.offsetY>T.clientHeight;if(ce||re)return}let ee=(k=o.current.floatingContext)==null?void 0:k.nodeId,G=m&&un(m.nodesRef.current,ee).some(N=>{var te;return Os(A,(te=N.context)==null?void 0:te.elements.floating)});if(Os(A,i.floating)||Os(A,i.domReference)||G)return;let Se=m?un(m.nodesRef.current,ee):[];if(Se.length>0){let N=!0;if(Se.forEach(te=>{var ue;if((ue=te.context)!=null&&ue.open&&!te.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}n(!1,A,"outside-press")}),L=ke(A=>{var k;let U=()=>{var q;R(A),(q=ar(A))==null||q.removeEventListener(s,U)};(k=ar(A))==null||k.addEventListener(s,U)});S.useEffect(()=>{if(!r||!a)return;o.current.__escapeKeyBubbles=y,o.current.__outsidePressBubbles=x;let A=-1;function k(W){n(!1,W,"ancestor-scroll")}function U(){window.clearTimeout(A),E.current=!0}function q(){A=window.setTimeout(()=>{E.current=!1},Qi()?5:0)}let T=nt(i.floating);u&&(T.addEventListener("keydown",O?C:P,O),T.addEventListener("compositionstart",U),T.addEventListener("compositionend",q)),_&&T.addEventListener(s,M?L:R,M);let F=[];return d&&(Me(i.domReference)&&(F=Tt(i.domReference)),Me(i.floating)&&(F=F.concat(Tt(i.floating))),!Me(i.reference)&&i.reference&&i.reference.contextElement&&(F=F.concat(Tt(i.reference.contextElement)))),F=F.filter(W=>{var we;return W!==((we=T.defaultView)==null?void 0:we.visualViewport)}),F.forEach(W=>{W.addEventListener("scroll",k,{passive:!0})}),()=>{u&&(T.removeEventListener("keydown",O?C:P,O),T.removeEventListener("compositionstart",U),T.removeEventListener("compositionend",q)),_&&T.removeEventListener(s,M?L:R,M),F.forEach(W=>{W.removeEventListener("scroll",k)}),window.clearTimeout(A)}},[o,i,u,_,s,r,n,d,a,y,x,P,O,C,R,M,L]),S.useEffect(()=>{o.current.insideReactTree=!1},[o,_,s]);let z=S.useMemo(()=>({onKeyDown:P,...c&&{[SC[l]]:A=>{n(!1,A.nativeEvent,"reference-press")},...l!=="click"&&{onClick(A){n(!1,A.nativeEvent,"reference-press")}}}}),[P,n,c,l]),D=S.useMemo(()=>({onKeyDown:P,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[OC[s]]:()=>{o.current.insideReactTree=!0}}),[P,s,o]);return S.useMemo(()=>a?{reference:z,floating:D}:{},[a,z,D])}function qy(e){let{open:t=!1,onOpenChange:r,elements:n}=e,i=co(),o=S.useRef({}),[a]=S.useState(()=>Oy()),u=hi()!=null,[f,s]=S.useState(n.reference),c=ke((p,h,m)=>{o.current.openEvent=p?h:void 0,a.emit("openchange",{open:p,event:h,reason:m,nested:u}),r?.(p,h,m)}),l=S.useMemo(()=>({setPositionReference:s}),[]),d=S.useMemo(()=>({reference:f||n.reference||null,floating:n.floating||null,domReference:n.reference}),[f,n.reference,n.floating]);return S.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:d,events:a,floatingId:i,refs:l}),[t,c,d,a,i,l])}function AC(e){e===void 0&&(e={});let{nodeId:t}=e,r=qy({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,i=n.elements,[o,a]=S.useState(null),[u,f]=S.useState(null),c=i?.domReference||o,l=S.useRef(null),d=mi();be(()=>{c&&(l.current=c)},[c]);let p=N_({...e,elements:{...i,...u&&{reference:u}}}),h=S.useCallback(y=>{let x=Me(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;f(x),p.refs.setReference(x)},[p.refs]),m=S.useCallback(y=>{(Me(y)||y===null)&&(l.current=y,a(y)),(Me(p.refs.reference.current)||p.refs.reference.current===null||y!==null&&!Me(y))&&p.refs.setReference(y)},[p.refs]),v=S.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:l}),[p.refs,m,h]),_=S.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),w=S.useMemo(()=>({...p,...n,refs:v,elements:_,nodeId:t}),[p,v,_,t,n]);return be(()=>{n.dataRef.current.floatingContext=w;let y=d?.nodesRef.current.find(x=>x.id===t);y&&(y.context=w)}),S.useMemo(()=>({...p,context:w,refs:v,elements:_}),[p,v,_,w])}function kp(){return Vg()&&fp()}function RC(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:i,dataRef:o,elements:a}=e,{enabled:u=!0,visibleOnly:f=!0}=t,s=S.useRef(!1),c=S.useRef(-1),l=S.useRef(!0);S.useEffect(()=>{if(!u)return;let p=ut(a.domReference);function h(){!r&&Ne(a.domReference)&&a.domReference===or(nt(a.domReference))&&(s.current=!0)}function m(){l.current=!0}function v(){l.current=!1}return p.addEventListener("blur",h),kp()&&(p.addEventListener("keydown",m,!0),p.addEventListener("pointerdown",v,!0)),()=>{p.removeEventListener("blur",h),kp()&&(p.removeEventListener("keydown",m,!0),p.removeEventListener("pointerdown",v,!0))}},[a.domReference,r,u]),S.useEffect(()=>{if(!u)return;function p(h){let{reason:m}=h;(m==="reference-press"||m==="escape-key")&&(s.current=!0)}return i.on("openchange",p),()=>{i.off("openchange",p)}},[i,u]),S.useEffect(()=>()=>{it(c)},[]);let d=S.useMemo(()=>({onMouseLeave(){s.current=!1},onFocus(p){if(s.current)return;let h=ar(p.nativeEvent);if(f&&Me(h)){if(kp()&&!p.relatedTarget){if(!l.current&&!Es(h))return}else if(!Zg(h))return}n(!0,p.nativeEvent,"focus")},onBlur(p){s.current=!1;let h=p.relatedTarget,m=p.nativeEvent,v=Me(h)&&h.hasAttribute(pi("focus-guard"))&&h.getAttribute("data-type")==="outside";c.current=window.setTimeout(()=>{var _;let w=or(a.domReference?a.domReference.ownerDocument:document);!h&&w===a.domReference||Xe((_=o.current.floatingContext)==null?void 0:_.refs.floating.current,w)||Xe(a.domReference,w)||v||n(!1,m,"focus")})}}),[o,a.domReference,n,f]);return S.useMemo(()=>u?{reference:d}:{},[u,d])}function qp(e,t,r){let n=new Map,i=r==="item",o=e;if(i&&e){let{[$_]:a,[Z_]:u,...f}=e;o=f}return{...r==="floating"&&{tabIndex:-1,[HM]:""},...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(f=>{let[s,c]=f;if(!(i&&[$_,Z_].includes(s)))if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var l;(l=n.get(s))==null||l.push(c),a[s]=function(){for(var d,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(d=n.get(s))==null?void 0:d.map(v=>v(...h)).find(v=>v!==void 0)}}}else a[s]=c}),a),{})}}function TC(e){e===void 0&&(e=[]);let t=e.map(u=>u?.reference),r=e.map(u=>u?.floating),n=e.map(u=>u?.item),i=S.useCallback(u=>qp(u,e,"reference"),t),o=S.useCallback(u=>qp(u,e,"floating"),r),a=S.useCallback(u=>qp(u,e,"item"),n);return S.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function Bs(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Ls(e,t){return Bs(t,e===La||e===fn,e===dn||e===pn)}function jp(e,t,r){return Bs(t,e===fn,r?e===dn:e===pn)||e==="Enter"||e===" "||e===""}function fy(e,t,r){return Bs(t,r?e===dn:e===pn,e===fn)}function dy(e,t,r,n){let i=r?e===pn:e===dn,o=e===La;return t==="both"||t==="horizontal"&&n&&n>1?e===PC:Bs(t,i,o)}function MC(e,t){let{open:r,onOpenChange:n,elements:i,floatingId:o}=e,{listRef:a,activeIndex:u,onNavigate:f=()=>{},enabled:s=!0,selectedIndex:c=null,allowEscape:l=!1,loop:d=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:v="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:w=!0,disabledIndices:y=void 0,orientation:x="vertical",parentOrientation:O,cols:M=1,scrollItemIntoView:E=!0,virtualItemRef:P,itemSizes:C,dense:R=!1}=t,L=ka(i.floating),z=Je(L),D=hi(),A=mi();be(()=>{e.dataRef.current.orientation=x},[e,x]);let k=ke(()=>{f(T.current===-1?null:T.current)}),U=As(i.domReference),q=S.useRef(v),T=S.useRef(c??-1),F=S.useRef(null),W=S.useRef(!0),we=S.useRef(k),ee=S.useRef(!!i.floating),G=S.useRef(r),Se=S.useRef(!1),N=S.useRef(!1),te=Je(y),ue=Je(r),oe=Je(E),Z=Je(c),[ne,he]=S.useState(),[J,ce]=S.useState(),re=ke(()=>{function B(me){if(m){var Te;(Te=me.id)!=null&&Te.endsWith("-fui-option")&&(me.id=o+"-"+Math.random().toString(16).slice(2,10)),he(me.id),A?.events.emit("virtualfocus",me),P&&(P.current=me)}else fi(me,{sync:Se.current,preventScroll:!0})}let $=a.current[T.current],H=N.current;$&&B($),(Se.current?me=>me():requestAnimationFrame)(()=>{let me=a.current[T.current]||$;if(!me)return;$||B(me);let Te=oe.current;Te&&ve&&(H||!W.current)&&(me.scrollIntoView==null||me.scrollIntoView(typeof Te=="boolean"?{block:"nearest",inline:"nearest"}:Te))})});be(()=>{s&&(r&&i.floating?q.current&&c!=null&&(N.current=!0,T.current=c,k()):ee.current&&(T.current=-1,we.current()))},[s,r,i.floating,c,k]),be(()=>{if(s&&r&&i.floating)if(u==null){if(Se.current=!1,Z.current!=null)return;if(ee.current&&(T.current=-1,re()),(!G.current||!ee.current)&&q.current&&(F.current!=null||q.current===!0&&F.current==null)){let B=0,$=()=>{a.current[0]==null?(B<2&&(B?requestAnimationFrame:queueMicrotask)($),B++):(T.current=F.current==null||jp(F.current,x,h)||p?qa(a,te.current):Rs(a,te.current),F.current=null,k())};$()}}else ui(a,u)||(T.current=u,re(),N.current=!1)},[s,r,i.floating,u,Z,p,a,x,h,k,re,te]),be(()=>{var B;if(!s||i.floating||!A||m||!ee.current)return;let $=A.nodesRef.current,H=(B=$.find(Te=>Te.id===D))==null||(B=B.context)==null?void 0:B.elements.floating,le=or(nt(i.floating)),me=$.some(Te=>Te.context&&Xe(Te.context.elements.floating,le));H&&!me&&W.current&&H.focus({preventScroll:!0})},[s,i.floating,A,D,m]),be(()=>{if(!s||!A||!m||D)return;function B($){ce($.id),P&&(P.current=$)}return A.events.on("virtualfocus",B),()=>{A.events.off("virtualfocus",B)}},[s,A,m,D,P]),be(()=>{we.current=k,G.current=r,ee.current=!!i.floating}),be(()=>{r||(F.current=null,q.current=v)},[r,v]);let pe=u!=null,ve=S.useMemo(()=>{function B(H){if(!ue.current)return;let le=a.current.indexOf(H);le!==-1&&T.current!==le&&(T.current=le,k())}return{onFocus(H){let{currentTarget:le}=H;Se.current=!0,B(le)},onClick:H=>{let{currentTarget:le}=H;return le.focus({preventScroll:!0})},onMouseMove(H){let{currentTarget:le}=H;Se.current=!0,N.current=!1,_&&B(le)},onPointerLeave(H){let{pointerType:le}=H;if(!(!W.current||le==="touch")&&(Se.current=!0,!!_&&(T.current=-1,k(),!m))){var me;(me=z.current)==null||me.focus({preventScroll:!0})}}}},[ue,z,_,a,k,m]),ie=S.useCallback(()=>{var B;return O??(A==null||(B=A.nodesRef.current.find($=>$.id===D))==null||(B=B.context)==null||(B=B.dataRef)==null?void 0:B.current.orientation)},[D,A,O]),K=ke(B=>{if(W.current=!1,Se.current=!0,B.which===229||!ue.current&&B.currentTarget===z.current)return;if(p&&dy(B.key,x,h,M)){Ls(B.key,ie())||rt(B),n(!1,B.nativeEvent,"list-navigation"),Ne(i.domReference)&&(m?A?.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}let $=T.current,H=qa(a,y),le=Rs(a,y);if(U||(B.key==="Home"&&(rt(B),T.current=H,k()),B.key==="End"&&(rt(B),T.current=le,k())),M>1){let me=C||Array.from({length:a.current.length},()=>({width:1,height:1})),Te=vp(me,M,R),Le=Te.findIndex(ye=>ye!=null&&!sn(a,ye,y)),Wt=Te.reduce((ye,bt,Qn)=>bt!=null&&!sn(a,bt,y)?Qn:ye,-1),Et=Te[mp({current:Te.map(ye=>ye!=null?a.current[ye]:null)},{event:B,orientation:x,loop:d,rtl:h,cols:M,disabledIndices:gp([...(typeof y!="function"?y:null)||a.current.map((ye,bt)=>sn(a,bt,y)?bt:void 0),void 0],Te),minIndex:Le,maxIndex:Wt,prevIndex:bp(T.current>le?H:T.current,me,Te,M,B.key===fn?"bl":B.key===(h?dn:pn)?"tr":"tl"),stopEvent:!0})];if(Et!=null&&(T.current=Et,k()),x==="both")return}if(Ls(B.key,x)){if(rt(B),r&&!m&&or(B.currentTarget.ownerDocument)===B.currentTarget){T.current=jp(B.key,x,h)?H:le,k();return}jp(B.key,x,h)?d?T.current=$>=le?l&&$!==a.current.length?-1:H:tt(a,{startingIndex:$,disabledIndices:y}):T.current=Math.min(le,tt(a,{startingIndex:$,disabledIndices:y})):d?T.current=$<=H?l&&$!==-1?a.current.length:le:tt(a,{startingIndex:$,decrement:!0,disabledIndices:y}):T.current=Math.max(H,tt(a,{startingIndex:$,decrement:!0,disabledIndices:y})),ui(a,T.current)&&(T.current=-1),k()}}),ae=S.useMemo(()=>m&&r&&pe&&{"aria-activedescendant":J||ne},[m,r,pe,J,ne]),fe=S.useMemo(()=>({"aria-orientation":x==="both"?void 0:x,...U?{}:ae,onKeyDown:K,onPointerMove(){W.current=!0}}),[ae,K,x,U]),se=S.useMemo(()=>{function B(H){v==="auto"&&pp(H.nativeEvent)&&(q.current=!0)}function $(H){q.current=v,v==="auto"&&hp(H.nativeEvent)&&(q.current=!0)}return{...ae,onKeyDown(H){W.current=!1;let le=H.key.startsWith("Arrow"),me=["Home","End"].includes(H.key),Te=le||me,Le=fy(H.key,x,h),Wt=dy(H.key,x,h,M),Et=fy(H.key,ie(),h),ye=Ls(H.key,x),bt=(p?Et:ye)||H.key==="Enter"||H.key.trim()==="";if(m&&r){let Ht=A?.nodesRef.current.find(je=>je.parentId==null),Ae=A&&Ht?Kg(A.nodesRef.current,Ht.id):null;if(Te&&Ae&&P){let je=new KeyboardEvent("keydown",{key:H.key,bubbles:!0});if(Le||Wt){var Qn,ga;let vr=((Qn=Ae.context)==null?void 0:Qn.elements.domReference)===H.currentTarget,at=Wt&&!vr?(ga=Ae.context)==null?void 0:ga.elements.domReference:Le?a.current.find(Ui=>Ui?.id===ne):null;at&&(rt(H),at.dispatchEvent(je),ce(void 0))}if((ye||me)&&Ae.context&&Ae.context.open&&Ae.parentId&&H.currentTarget!==Ae.context.elements.domReference){var _a;rt(H),(_a=Ae.context.elements.domReference)==null||_a.dispatchEvent(je);return}}return K(H)}if(!(!r&&!w&&le)){if(bt){let Ht=Ls(H.key,ie());F.current=p&&Ht?null:H.key}if(p){Et&&(rt(H),r?(T.current=qa(a,te.current),k()):n(!0,H.nativeEvent,"list-navigation"));return}ye&&(c!=null&&(T.current=c),rt(H),!r&&w?n(!0,H.nativeEvent,"list-navigation"):K(H),r&&k())}},onFocus(){r&&!m&&(T.current=-1,k())},onPointerDown:$,onPointerEnter:$,onMouseDown:B,onClick:B}},[ne,ae,M,K,te,v,a,p,k,n,r,w,x,ie,h,c,A,m,P]);return S.useMemo(()=>s?{reference:se,floating:fe,item:ve}:{},[s,se,fe,ve])}function IC(e,t){var r,n;t===void 0&&(t={});let{open:i,elements:o,floatingId:a}=e,{enabled:u=!0,role:f="dialog"}=t,s=co(),c=((r=o.domReference)==null?void 0:r.id)||s,l=S.useMemo(()=>{var w;return((w=ka(o.floating))==null?void 0:w.id)||a},[o.floating,a]),d=(n=CC.get(f))!=null?n:f,h=hi()!=null,m=S.useMemo(()=>d==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:i?l:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?l:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:c},...d==="menu"&&h&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[d,l,h,i,c,f]),v=S.useMemo(()=>{let w={id:l,...d&&{role:d}};return d==="tooltip"||f==="label"?w:{...w,...d==="menu"&&{"aria-labelledby":c}}},[d,l,c,f]),_=S.useCallback(w=>{let{active:y,selected:x}=w,O={role:"option",...y&&{id:l+"-fui-option"}};switch(f){case"select":case"combobox":return{...O,"aria-selected":x}}return{}},[l,f]);return S.useMemo(()=>u?{reference:m,floating:v,item:_}:{},[u,m,v,_])}function uo(e,t){return typeof e=="function"?e(t):e}function kC(e,t){let[r,n]=S.useState(e);return e&&!r&&n(!0),S.useEffect(()=>{if(!e&&r){let i=setTimeout(()=>n(!1),t);return()=>clearTimeout(i)}},[e,r,t]),r}function jy(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,f]=S.useState("unmounted"),s=kC(r,a);return!s&&u==="close"&&f("unmounted"),be(()=>{if(n){if(r){f("initial");let c=requestAnimationFrame(()=>{di.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(c)}}f("close")}},[r,n]),{isMounted:s,status:u}}function qC(e,t){t===void 0&&(t={});let{initial:r={opacity:0},open:n,close:i,common:o,duration:a=250}=t,u=e.placement,f=u.split("-")[0],s=S.useMemo(()=>({side:f,placement:u}),[f,u]),c=typeof a=="number",l=(c?a:a.open)||0,d=(c?a:a.close)||0,[p,h]=S.useState(()=>({...uo(o,s),...uo(r,s)})),{isMounted:m,status:v}=jy(e,{duration:a}),_=Je(r),w=Je(n),y=Je(i),x=Je(o);return be(()=>{let O=uo(_.current,s),M=uo(y.current,s),E=uo(x.current,s),P=uo(w.current,s)||Object.keys(O).reduce((C,R)=>(C[R]="",C),{});if(v==="initial"&&h(C=>({transitionProperty:C.transitionProperty,...E,...O})),v==="open"&&h({transitionProperty:Object.keys(P).map(py).join(","),transitionDuration:l+"ms",...E,...P}),v==="close"){let C=M||O;h({transitionProperty:Object.keys(C).map(py).join(","),transitionDuration:d+"ms",...E,...C})}},[d,y,_,w,x,l,v,s]),{isMounted:m,styles:p}}function jC(e,t){var r;let{open:n,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:u,onTypingChange:f,enabled:s=!0,findMatch:c=null,resetMs:l=750,ignoreKeys:d=[],selectedIndex:p=null}=t,h=S.useRef(-1),m=S.useRef(""),v=S.useRef((r=p??a)!=null?r:-1),_=S.useRef(null),w=ke(u),y=ke(f),x=Je(c),O=Je(d);be(()=>{n&&(it(h),_.current=null,m.current="")},[n]),be(()=>{if(n&&m.current===""){var R;v.current=(R=p??a)!=null?R:-1}},[n,p,a]);let M=ke(R=>{R?i.current.typing||(i.current.typing=R,y(R)):i.current.typing&&(i.current.typing=R,y(R))}),E=ke(R=>{function L(U,q,T){let F=x.current?x.current(q,T):q.find(W=>W?.toLocaleLowerCase().indexOf(T.toLocaleLowerCase())===0);return F?U.indexOf(F):-1}let z=o.current;if(m.current.length>0&&m.current[0]!==" "&&(L(z,z,m.current)===-1?M(!1):R.key===" "&&rt(R)),z==null||O.current.includes(R.key)||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;n&&R.key!==" "&&(rt(R),M(!0)),z.every(U=>{var q,T;return U?((q=U[0])==null?void 0:q.toLocaleLowerCase())!==((T=U[1])==null?void 0:T.toLocaleLowerCase()):!0})&&m.current===R.key&&(m.current="",v.current=_.current),m.current+=R.key,it(h),h.current=window.setTimeout(()=>{m.current="",v.current=_.current,M(!1)},l);let A=v.current,k=L(z,[...z.slice((A||0)+1),...z.slice(0,(A||0)+1)],m.current);k!==-1?(w(k),_.current=k):R.key!==" "&&(m.current="",M(!1))}),P=S.useMemo(()=>({onKeyDown:E}),[E]),C=S.useMemo(()=>({onKeyDown:E,onKeyUp(R){R.key===" "&&M(!1)}}),[E,M]);return S.useMemo(()=>s?{reference:P,floating:C}:{},[s,P,C])}function hy(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}function LC(e,t){let{open:r,elements:n}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:u}=t,f=ke(u),s=S.useRef(!1),c=S.useRef(null),l=S.useRef(null);S.useEffect(()=>{if(!i)return;function p(m){if(m.ctrlKey||!h||o.current==null)return;let v=m.deltaY,_=o.current.top>=-.5,w=o.current.bottom>=-.5,y=h.scrollHeight-h.clientHeight,x=v<0?-1:1,O=v<0?"max":"min";h.scrollHeight<=h.clientHeight||(!_&&v>0||!w&&v<0?(m.preventDefault(),di.flushSync(()=>{f(M=>M+Math[O](v,y*x))})):/firefox/i.test(Ss())&&(h.scrollTop+=v))}let h=a?.current||n.floating;if(r&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(l.current={...o.current})}),()=>{c.current=null,l.current=null,h.removeEventListener("wheel",p)}},[i,r,n.floating,o,a,f]);let d=S.useMemo(()=>({onKeyDown(){s.current=!0},onWheel(){s.current=!1},onPointerMove(){s.current=!1},onScroll(){let p=a?.current||n.floating;if(!(!o.current||!p||!s.current)){if(c.current!==null){let h=p.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&di.flushSync(()=>f(m=>m+h))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[n.floating,f,o,a]);return S.useMemo(()=>i?{floating:d}:{},[i,d])}function Fy(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,...Fy(e,i.id,r)])}function my(e,t){let[r,n]=e,i=!1,o=t.length;for(let a=0,u=o-1;a<o;u=a++){let[f,s]=t[a]||[0,0],[c,l]=t[u]||[0,0];s>=n!=l>=n&&r<=(c-f)*(n-s)/(l-s)+f&&(i=!i)}return i}function NC(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function DC(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,f=typeof performance<"u"?performance.now():0;function s(l,d){let p=performance.now(),h=p-f;if(a===null||u===null||h===0)return a=l,u=d,f=p,null;let m=l-a,v=d-u,w=Math.sqrt(m*m+v*v)/h;return a=l,u=d,f=p,w}let c=l=>{let{x:d,y:p,placement:h,elements:m,onClose:v,nodeId:_,tree:w}=l;return function(x){function O(){it(i),v()}if(it(i),!m.domReference||!m.floating||h==null||d==null||p==null)return;let{clientX:M,clientY:E}=x,P=[M,E],C=aC(x),R=x.type==="mouseleave",L=Cp(m.floating,C),z=Cp(m.domReference,C),D=m.domReference.getBoundingClientRect(),A=m.floating.getBoundingClientRect(),k=h.split("-")[0],U=d>A.right-A.width/2,q=p>A.bottom-A.height/2,T=NC(P,D),F=A.width>D.width,W=A.height>D.height,we=(F?D:A).left,ee=(F?D:A).right,G=(W?D:A).top,Se=(W?D:A).bottom;if(L&&(o=!0,!R))return;if(z&&(o=!1),z&&!R){o=!0;return}if(R&&Me(x.relatedTarget)&&Cp(m.floating,x.relatedTarget)||w&&Fy(w.nodesRef.current,_).length)return;if(k==="top"&&p>=D.bottom-1||k==="bottom"&&p<=D.top+1||k==="left"&&d>=D.right-1||k==="right"&&d<=D.left+1)return O();let N=[];switch(k){case"top":N=[[we,D.top+1],[we,A.bottom-1],[ee,A.bottom-1],[ee,D.top+1]];break;case"bottom":N=[[we,A.top+1],[we,D.bottom-1],[ee,D.bottom-1],[ee,A.top+1]];break;case"left":N=[[A.right-1,Se],[A.right-1,G],[D.left+1,G],[D.left+1,Se]];break;case"right":N=[[D.right-1,Se],[D.right-1,G],[A.left+1,G],[A.left+1,Se]];break}function te(ue){let[oe,Z]=ue;switch(k){case"top":{let ne=[F?oe+t/2:U?oe+t*4:oe-t*4,Z+t+1],he=[F?oe-t/2:U?oe+t*4:oe-t*4,Z+t+1],J=[[A.left,U||F?A.bottom-t:A.top],[A.right,U?F?A.bottom-t:A.top:A.bottom-t]];return[ne,he,...J]}case"bottom":{let ne=[F?oe+t/2:U?oe+t*4:oe-t*4,Z-t],he=[F?oe-t/2:U?oe+t*4:oe-t*4,Z-t],J=[[A.left,U||F?A.top+t:A.bottom],[A.right,U?F?A.top+t:A.bottom:A.top+t]];return[ne,he,...J]}case"left":{let ne=[oe+t+1,W?Z+t/2:q?Z+t*4:Z-t*4],he=[oe+t+1,W?Z-t/2:q?Z+t*4:Z-t*4];return[...[[q||W?A.right-t:A.left,A.top],[q?W?A.right-t:A.left:A.right-t,A.bottom]],ne,he]}case"right":{let ne=[oe-t,W?Z+t/2:q?Z+t*4:Z-t*4],he=[oe-t,W?Z-t/2:q?Z+t*4:Z-t*4],J=[[q||W?A.left+t:A.right,A.top],[q?W?A.left+t:A.right:A.left+t,A.bottom]];return[ne,he,...J]}}}if(!my([M,E],N)){if(o&&!T)return O();if(!R&&n){let ue=s(x.clientX,x.clientY);if(ue!==null&&ue<.1)return O()}my([M,E],te([d,p]))?!o&&n&&(i.current=window.setTimeout(O,40)):O()}}};return c.__options={blockPointerEvents:r},c}var S,Ce,di,by,HM,$_,Z_,dn,pn,La,fn,wy,xy,Sy,Pp,VM,GM,$M,K_,ZM,Y_,YM,co,XM,Ey,Ay,hi,mi,X_,Fp,Ry,Ty,Py,J_,so,qs,js,Ip,sC,My,cC,Ds,Ns,Cy,ty,ky,dC,ln,mC,Fs,oy,ay,gC,SC,OC,ly,PC,CC,py,FC,Ny=pt(()=>{S=j(Fe());Qg();Ce=j(ss());Pa();up();di=j(Ts());Tp();Tp();eo();by=S.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});HM="data-floating-ui-focusable",$_="active",Z_="selected",dn="ArrowLeft",pn="ArrowRight",La="ArrowUp",fn="ArrowDown";wy=S.createContext({activeIndex:0,onNavigate:()=>{}}),xy=[dn,pn],Sy=[La,fn],Pp=[...xy,...Sy],VM=S.forwardRef(function(t,r){let{render:n,orientation:i="both",loop:o=!0,rtl:a=!1,cols:u=1,disabledIndices:f,activeIndex:s,onNavigate:c,itemSizes:l,dense:d=!1,...p}=t,[h,m]=S.useState(0),v=s??h,_=ke(c??m),w=S.useRef([]),y=n&&typeof n!="function"?n.props:{},x=S.useMemo(()=>({activeIndex:v,onNavigate:_}),[v,_]),O=u>1;function M(P){if(!Pp.includes(P.key))return;let C=v,R=qa(w,f),L=Rs(w,f),z=a?dn:pn,D=a?pn:dn;if(O){let T=l||Array.from({length:w.current.length},()=>({width:1,height:1})),F=vp(T,u,d),W=F.findIndex(G=>G!=null&&!sn(w,G,f)),we=F.reduce((G,Se,N)=>Se!=null&&!sn(w,Se,f)?N:G,-1),ee=F[mp({current:F.map(G=>G?w.current[G]:null)},{event:P,orientation:i,loop:o,rtl:a,cols:u,disabledIndices:gp([...(typeof f!="function"?f:null)||w.current.map((G,Se)=>sn(w,Se,f)?Se:void 0),void 0],F),minIndex:W,maxIndex:we,prevIndex:bp(v>L?R:v,T,F,u,P.key===fn?"bl":P.key===z?"tr":"tl")})];ee!=null&&(C=ee)}let A={horizontal:[z],vertical:[fn],both:[z,fn]}[i],k={horizontal:[D],vertical:[La],both:[D,La]}[i],U=O?Pp:{horizontal:xy,vertical:Sy,both:Pp}[i];if(C===v&&[...A,...k].includes(P.key)&&(o&&C===L&&A.includes(P.key)?C=R:o&&C===R&&k.includes(P.key)?C=L:C=tt(w,{startingIndex:C,decrement:k.includes(P.key),disabledIndices:f})),C!==v&&!ui(w,C)){var q;P.stopPropagation(),U.includes(P.key)&&P.preventDefault(),_(C),(q=w.current[C])==null||q.focus()}}let E={...p,...y,ref:r,"aria-orientation":i==="both"?void 0:i,onKeyDown(P){p.onKeyDown==null||p.onKeyDown(P),y.onKeyDown==null||y.onKeyDown(P),M(P)}};return(0,Ce.jsx)(wy.Provider,{value:x,children:(0,Ce.jsx)(gy,{elementsRef:w,children:yy(n,E)})})}),GM=S.forwardRef(function(t,r){let{render:n,...i}=t,o=n&&typeof n!="function"?n.props:{},{activeIndex:a,onNavigate:u}=S.useContext(wy),{ref:f,index:s}=_y(),c=vy([f,r,o.ref]),l=a===s,d={...i,...o,ref:c,tabIndex:l?0:-1,"data-active":l?"":void 0,onFocus(p){i.onFocus==null||i.onFocus(p),o.onFocus==null||o.onFocus(p),u(s)}};return yy(n,d)}),$M={...S},K_=!1,ZM=0,Y_=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ZM++;YM=$M.useId,co=YM||KM,XM=S.forwardRef(function(t,r){let{context:{placement:n,elements:{floating:i},middlewareData:{arrow:o,shift:a}},width:u=14,height:f=7,tipRadius:s=0,strokeWidth:c=0,staticOffset:l,stroke:d,d:p,style:{transform:h,...m}={},...v}=t,_=co(),[w,y]=S.useState(!1);if(be(()=>{if(!i)return;yt(i).direction==="rtl"&&y(!0)},[i]),!i)return null;let[x,O]=n.split("-"),M=x==="top"||x==="bottom",E=l;(M&&a!=null&&a.x||!M&&a!=null&&a.y)&&(E=null);let P=c*2,C=P/2,R=u/2*(s/-8+1),L=f/2*s/4,z=!!p,D=E&&O==="end"?"bottom":"top",A=E&&O==="end"?"right":"left";E&&w&&(A=O==="end"?"left":"right");let k=o?.x!=null?E||o.x:"",U=o?.y!=null?E||o.y:"",q=p||"M0,0"+(" H"+u)+(" L"+(u-R)+","+(f-L))+(" Q"+u/2+","+f+" "+R+","+(f-L))+" Z",T={top:z?"rotate(180deg)":"",left:z?"rotate(90deg)":"rotate(-90deg)",bottom:z?"":"rotate(180deg)",right:z?"rotate(-90deg)":"rotate(90deg)"}[x];return(0,Ce.jsxs)("svg",{...v,"aria-hidden":!0,ref:r,width:z?u:u+P,height:u,viewBox:"0 0 "+u+" "+(f>u?f:u),style:{position:"absolute",pointerEvents:"none",[A]:k,[D]:U,[x]:M||z?"100%":"calc(100% - "+P/2+"px)",transform:[T,h].filter(F=>!!F).join(" "),...m},children:[P>0&&(0,Ce.jsx)("path",{clipPath:"url(#"+_+")",fill:"none",stroke:d,strokeWidth:P+(p?0:1),d:q}),(0,Ce.jsx)("path",{stroke:P&&!p?v.fill:"none",d:q}),(0,Ce.jsx)("clipPath",{id:_,children:(0,Ce.jsx)("rect",{x:-C,y:C*(z?-1:1),width:u+P,height:u})})]})});Ey=S.createContext(null),Ay=S.createContext(null),hi=()=>{var e;return((e=S.useContext(Ey))==null?void 0:e.id)||null},mi=()=>S.useContext(Ay);X_=pi("safe-polygon");Fp=()=>{},Ry=S.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Fp,setState:Fp,isInstantPhase:!1}),Ty=()=>S.useContext(Ry);Py=S.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeoutIdRef:{current:-1},currentIdRef:{current:null},currentContextRef:{current:null}});J_=0;so={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};qs=new WeakSet,js={},Ip=0,sC=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,My=e=>e&&(e.host||My(e.parentNode)),cC=(e,t)=>t.map(r=>{if(e.contains(r))return r;let n=My(r);return e.contains(n)?n:null}).filter(r=>r!=null);Ds={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},Ns=S.forwardRef(function(t,r){let[n,i]=S.useState();be(()=>{fp()&&i("button")},[]);let o={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[pi("focus-guard")]:"",style:Ds};return(0,Ce.jsx)("span",{...t,...o})}),Cy=S.createContext(null),ty=pi("portal");ky=()=>S.useContext(Cy);dC=20,ln=[];mC=S.forwardRef(function(t,r){return(0,Ce.jsx)("button",{...t,type:"button",ref:r,tabIndex:-1,style:Ds})});Fs=0,oy="--floating-ui-scrollbar-width";ay=()=>{},gC=S.forwardRef(function(t,r){let{lockScroll:n=!1,...i}=t;return be(()=>{if(n)return Fs++,Fs===1&&(ay=bC()),()=>{Fs--,Fs===0&&ay()}},[n]),(0,Ce.jsx)("div",{ref:r,...i,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}})});SC={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},OC={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ly=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}};PC="Escape";CC=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);py=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,r)=>(r?"-":"")+t.toLowerCase());FC=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:f=0,scrollRef:s,...c}=Pt(e,t),{rects:l,elements:{floating:d}}=t,p=r.current[a],h=s?.current||d,m=d.clientTop||h.clientTop,v=d.clientTop!==0,_=h.clientTop!==0,w=d===h;if(!p)return{};let y={...t,...await ks(-p.offsetTop-d.clientTop-l.reference.height/2-p.offsetHeight/2-o).fn(t)},x=await li(hy(y,h.scrollHeight+m+d.clientTop),c),O=await li(y,{...c,elementContext:"reference"}),M=Ve(0,x.top),E=y.y+M,R=(h.scrollHeight>h.clientHeight?L=>L:ai)(Ve(0,h.scrollHeight+(v&&w||_?m*2:0)-M-Ve(0,x.bottom)));if(h.style.maxHeight=R+"px",h.scrollTop=M,i){let L=h.offsetHeight<p.offsetHeight*wt(u,r.current.length)-1||O.top>=-f||O.bottom>=-f;di.flushSync(()=>i(L))}return n&&(n.current=await li(hy({...y,y:E},h.offsetHeight+m+d.clientTop),c)),{y:E}}})});var By=g(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.default=WC;var Dy=ss(),zs=(Ny(),Nb(Ly)),Np=oi(),BC=on();function zC(e){return Math.round(e*1e5)/1e5}var UC=(0,BC.makeStyles)()(e=>({tooltip:{position:"absolute",pointerEvents:"none",backgroundColor:(0,Np.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:`${zC(14/10)}em`,maxWidth:300,wordWrap:"break-word"}}));function WC({clientPoint:e,children:t,placement:r="right"}){var n,i;let a=(n=(0,Np.useTheme)().components)===null||n===void 0?void 0:n.MuiPopper,{classes:u}=UC(),{refs:f,floatingStyles:s,context:c}=(0,zs.useFloating)({placement:r,strategy:"fixed",middleware:[(0,zs.offset)(5)]}),l=(0,zs.useClientPoint)(c,e),{getFloatingProps:d}=(0,zs.useInteractions)([l]);return(0,Dy.jsx)(Np.Portal,{container:(i=a?.defaultProps)===null||i===void 0?void 0:i.container,children:(0,Dy.jsx)("div",{className:u.tooltip,ref:f.setFloating,style:{...s,zIndex:1e5,visibility:s.transform==="translate(0px, 0px)"?"hidden":void 0,pointerEvents:"none"},...d(),children:t})})}});var $y,VC,Wp,Zy=pt(()=>{"use strict";$y=j(Fe()),VC=({x:e,y:t,width:r,height:n,color:i="rgb(255,255,255,0.5)"})=>$y.default.createElement("rect",{x:e,y:t,width:r,height:n,fill:i}),Wp=VC});var Nt,Yy,Ky,GC,Xy,Jy=pt(()=>{"use strict";Nt=j(Fe()),Yy=j(er()),Ky={pointerEvents:"all",cursor:"pointer",strokeWidth:8,stroke:"transparent"},GC=(0,Yy.observer)(function({model:e}){let{rowHeight:t,treeAreaWidth:r,hierarchy:n,showBranchLen:i,nodeDescendantNames:o}=e,a=(0,Nt.useCallback)(()=>{e.setHighlightedRowNames(void 0)},[e]),u=(0,Nt.useMemo)(()=>{let f=new Map;if(n)for(let s of n.descendants())f.set(s,()=>{e.setHighlightedRowNames(o.get(s),{x:s.x,y:s.y})});return f},[e,n,o,r]);return Nt.default.createElement(Nt.default.Fragment,null,n?[...n.links()].map(f=>{let{source:s,target:c}=f,l=s.x,d=c.x,p=i?c.len:c.y,h=i?s.len:s.y;return Nt.default.createElement(Nt.default.Fragment,{key:`${r}-${l}-${d}-${p}-${h}`},Nt.default.createElement("line",{stroke:"black",x1:h,y1:l,x2:h,y2:d}),Nt.default.createElement("line",{stroke:"black",x1:h,y1:d,x2:p,y2:d}),Nt.default.createElement("line",{x1:h,y1:l,x2:h,y2:d,style:Ky,onMouseEnter:u.get(s),onMouseLeave:a}),Nt.default.createElement("line",{x1:h,y1:d,x2:p,y2:d,style:Ky,onMouseEnter:u.get(c),onMouseLeave:a}))}):null)}),Xy=GC});var hn,Qy,$C,e0,t0=pt(()=>{"use strict";hn=j(Fe()),Qy=j(er());Zy();Jy();$C=(0,Qy.observer)(function({model:e}){let{labelWidth:t,canDisplayLabel:r,totalHeight:n,treeWidth:i,sidebarWidth:o,samples:a=[],rowHeight:u,svgFontSize:f}=e,s=Math.min(20,u);return hn.default.createElement(hn.default.Fragment,null,hn.default.createElement(Wp,{y:0,x:0,width:o,height:n}),hn.default.createElement(Xy,{model:e}),hn.default.createElement("g",{transform:`translate(${i+5},0)`},a.map((c,l)=>hn.default.createElement(Wp,{key:`${c.id}-${l}`,y:l*u,x:0,width:t+5,height:s,color:c.color})),r?a.map((c,l)=>hn.default.createElement("text",{key:`${c.id}-${l}`,dominantBaseline:"middle",fontSize:f,x:2,y:l*u+u/2},c.label)):null))}),e0=$C});var Na=g((QY,r0)=>{r0.exports=JBrowseExports.mobx});var Dt,n0,Hp,i0,o0,a0,u0,ZC,KC,s0,c0=pt(()=>{"use strict";Dt=j(Fe()),n0=j(gr()),Hp=j(ht()),i0=j(Na()),o0=j(er()),a0=j(mt()),u0=j(on()),ZC=(0,u0.makeStyles)()({resizeHandle:{position:"absolute",top:0,height:"100%",width:4,zIndex:1001,background:"transparent",cursor:"col-resize","&:hover":{background:"rgba(0,0,0,0.2)"}}}),KC=(0,o0.observer)(function({children:e,model:t,exportSVG:r}){let{classes:n}=ZC(),i=(0,Dt.useRef)(null);if((0,Dt.useEffect)(()=>{let o=i.current?.getContext("2d");return o?(0,i0.autorun)(()=>{if((0,a0.isAlive)(t)){let{totalHeight:a,leafMap:u,rowHeight:f,highlightedRowNames:s,hoveredTreeNode:c}=t,{width:l}=(0,Hp.getContainingView)(t);if(o.resetTransform(),o.clearRect(0,0,l,a),s){o.fillStyle="rgba(255,165,0,0.2)";let d=f/2;for(let p of s){let h=u.get(p);h&&o.fillRect(0,h.x-d,l,f)}c&&(o.fillStyle="rgba(255,165,0,0.8)",o.beginPath(),o.arc(c.y,c.x,4,0,2*Math.PI),o.fill(),o.strokeStyle="rgba(255,140,0,1)",o.lineWidth=1,o.stroke())}}}):void 0},[t]),r)return Dt.default.createElement(Dt.default.Fragment,null,e);{let{totalHeight:o,treeWidth:a,hierarchy:u}=t,{width:f}=(0,Hp.getContainingView)(t);return Dt.default.createElement(Dt.default.Fragment,null,Dt.default.createElement("svg",{style:{position:"absolute",userSelect:"none",top:0,left:0,pointerEvents:"none",height:o,width:f}},e),Dt.default.createElement("canvas",{ref:i,width:f,height:o,style:{position:"absolute",top:0,left:0,width:f,height:o,zIndex:1e3,pointerEvents:"none"}}),u?Dt.default.createElement("div",{onMouseDown:s=>{s.stopPropagation()}},Dt.default.createElement(n0.ResizeHandle,{onDrag:s=>{t.setTreeAreaWidth(Math.max(20,t.treeAreaWidth+s))},className:n.resizeHandle,style:{left:a},vertical:!0})):null)}}),s0=KC});var Vp,l0,YC,Hs,Gp=pt(()=>{"use strict";Vp=j(Fe()),l0=j(er());t0();c0();YC=(0,l0.observer)(function(e){let{model:t}=e;return Vp.default.createElement(s0,{...e},Vp.default.createElement(e0,{model:t}))}),Hs=YC});var M0=g((zX,P0)=>{"use strict";P0.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 q0={};wa(q0,{default:()=>hI});var Bt,C0,$t,I0,k0,dI,pI,hI,j0=pt(()=>{"use strict";Bt=j(Fe()),C0=j(gr()),$t=j(oi()),I0=j(er()),k0=j(on()),dI=(0,k0.makeStyles)()({root:{width:500}}),pI=(0,I0.observer)(function(e){let{model:t,handleClose:r}=e,{classes:n}=dI(),[i,o]=(0,Bt.useState)(`${t.rowHeight}`),[a,u]=(0,Bt.useState)(`${t.rowProportion}`);return Bt.default.createElement(C0.Dialog,{open:!0,onClose:r,title:"Set row height"},Bt.default.createElement("form",{onSubmit:f=>{f.preventDefault(),t.setRowProportion(+a),t.setRowHeight(+i),r()}},Bt.default.createElement($t.DialogContent,{className:n.root},Bt.default.createElement($t.Typography,null,"Set row height and the proportion of the row height to use for drawing each row"),Bt.default.createElement($t.TextField,{value:i,helperText:"Enter row height",autoFocus:!0,onChange:f=>{o(f.target.value)}}),Bt.default.createElement($t.TextField,{value:a,helperText:"Enter row proportion",onChange:f=>{u(f.target.value)}}),Bt.default.createElement($t.DialogActions,null,Bt.default.createElement($t.Button,{variant:"contained",color:"primary",type:"submit"},"Submit"),Bt.default.createElement($t.Button,{variant:"contained",color:"secondary",onClick:()=>{r()}},"Cancel")))))}),hI=pI});var D0={};wa(D0,{default:()=>bI});var xt,F0,Ur,L0,N0,mI,vI,bI,B0=pt(()=>{"use strict";xt=j(Fe()),F0=j(gr()),Ur=j(oi()),L0=j(er()),N0=j(on()),mI=(0,N0.makeStyles)()({dialogContent:{width:"60em"},textAreaInput:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto"}}),vI=(0,L0.observer)(function({onClose:e,model:t,insertionData:r}){let{classes:n}=mI(),[i,o]=(0,xt.useState)(!1),{sequence:a,sampleLabel:u,chr:f,pos:s}=r,{showAsUpperCase:c}=t,l=c?a.toUpperCase():a.toLowerCase();return xt.default.createElement(F0.Dialog,{open:!0,onClose:e,title:`Insertion Sequence (${a.length}bp)`,maxWidth:"lg"},xt.default.createElement(Ur.DialogContent,null,xt.default.createElement("div",{style:{marginBottom:16}},xt.default.createElement("strong",null,"Sample:")," ",u,xt.default.createElement("br",null),xt.default.createElement("strong",null,"Position:")," ",f,":",s.toLocaleString("en-US"),xt.default.createElement("br",null),xt.default.createElement("strong",null,"Length:")," ",a.length,"bp"),xt.default.createElement(Ur.TextField,{variant:"outlined",multiline:!0,minRows:3,maxRows:10,className:n.dialogContent,fullWidth:!0,value:l,slotProps:{input:{readOnly:!0,classes:{input:n.textAreaInput}}}})),xt.default.createElement(Ur.DialogActions,null,xt.default.createElement(Ur.Button,{variant:"contained",color:"primary",onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(l),o(!0),setTimeout(()=>{o(!1)},1e3)}catch(d){console.error(d)}})()}},i?"Copied!":"Copy to Clipboard"),xt.default.createElement(Ur.Button,{color:"secondary",variant:"contained",onClick:e},"Close")))}),bI=vI});var U0={};wa(U0,{renderSvg:()=>gI});async function gI(e,t,r){let{height:n,id:i}=e,{offsetPx:o,width:a}=(0,z0.getContainingView)(e),u=`mafclip-${i}`;return yr.default.createElement(yr.default.Fragment,null,yr.default.createElement("defs",null,yr.default.createElement("clipPath",{id:u},yr.default.createElement("rect",{x:0,y:0,width:a,height:n}))),yr.default.createElement("g",{clipPath:`url(#${u})`},yr.default.createElement("g",{id:"snpcov"},await r(t)),yr.default.createElement("g",{transform:`translate(${Math.max(-o,0)})`},yr.default.createElement(Hs,{model:e,exportSVG:!0}))))}var yr,z0,W0=pt(()=>{"use strict";yr=j(Fe()),z0=j(ht());Gp()});var ww=g(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.TWO_PWR_32_DBL=wr.TWO_PWR_16_DBL=void 0;wr.longFromBytesToUnsigned=II;wr.TWO_PWR_16_DBL=65536;wr.TWO_PWR_32_DBL=wr.TWO_PWR_16_DBL*wr.TWO_PWR_16_DBL;function II(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)*wr.TWO_PWR_32_DBL+(r>>>0)}});var Sw=g(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var uh=ww(),Ks=1;function xw(e,t,r){let n=t[Ks],i=r?r[Ks]:1/0;return n<=e&&i>e?0:n<e?-1:1}var sh=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,uh.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 u=(0,uh.longFromBytesToUnsigned)(o,a*16),f=(0,uh.longFromBytesToUnsigned)(o,a*16+8);n[a+1]=[u,f]}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,f=Math.floor(i.length/2),s=xw(r,i[f],i[f+1]);for(;s!==0;)s>0?u=f-1:s<0&&(a=f+1),f=Math.ceil((u-a)/2)+a,s=xw(r,i[f],i[f+1]);o.push(i[f]);let c=f+1;for(;c<i.length&&(o.push(i[c]),!(i[c][Ks]>=n));c+=1);return o[o.length-1][Ks]<n&&o.push([]),o}};ch.default=sh});var ho=g(Q=>{"use strict";Object.defineProperty(Q,"__esModule",{value:!0});Q.Z_DEFLATED=Q.Z_UNKNOWN=Q.Z_TEXT=Q.Z_BINARY=Q.Z_DEFAULT_STRATEGY=Q.Z_FIXED=Q.Z_RLE=Q.Z_HUFFMAN_ONLY=Q.Z_FILTERED=Q.Z_DEFAULT_COMPRESSION=Q.Z_BEST_COMPRESSION=Q.Z_BEST_SPEED=Q.Z_NO_COMPRESSION=Q.Z_BUF_ERROR=Q.Z_DATA_ERROR=Q.Z_STREAM_ERROR=Q.Z_ERRNO=Q.Z_NEED_DICT=Q.Z_STREAM_END=Q.Z_OK=Q.Z_TREES=Q.Z_BLOCK=Q.Z_FINISH=Q.Z_FULL_FLUSH=Q.Z_SYNC_FLUSH=Q.Z_PARTIAL_FLUSH=Q.Z_NO_FLUSH=void 0;Q.Z_NO_FLUSH=0;Q.Z_PARTIAL_FLUSH=1;Q.Z_SYNC_FLUSH=2;Q.Z_FULL_FLUSH=3;Q.Z_FINISH=4;Q.Z_BLOCK=5;Q.Z_TREES=6;Q.Z_OK=0;Q.Z_STREAM_END=1;Q.Z_NEED_DICT=2;Q.Z_ERRNO=-1;Q.Z_STREAM_ERROR=-2;Q.Z_DATA_ERROR=-3;Q.Z_BUF_ERROR=-5;Q.Z_NO_COMPRESSION=0;Q.Z_BEST_SPEED=1;Q.Z_BEST_COMPRESSION=9;Q.Z_DEFAULT_COMPRESSION=-1;Q.Z_FILTERED=1;Q.Z_HUFFMAN_ONLY=2;Q.Z_RLE=3;Q.Z_FIXED=4;Q.Z_DEFAULT_STRATEGY=0;Q.Z_BINARY=0;Q.Z_TEXT=1;Q.Z_UNKNOWN=2;Q.Z_DEFLATED=8});var vn=g(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.Buf32=Re.Buf16=Re.Buf8=Re.flattenChunks=Re.arraySet=void 0;Re.assign=qI;Re.shrinkBuf=jI;Re.setTyped=zI;function kI(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qI(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)kI(r,n)&&(e[n]=r[n])}}return e}function jI(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}var xr={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},Buf8:function(e){return new Uint8Array(e)},Buf16:function(e){return new Uint16Array(e)},Buf32:function(e){return new Int32Array(e)}},Sr={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)},Buf8:function(e){return new Array(e)},Buf16:function(e){return new Array(e)},Buf32:function(e){return new Array(e)}},mo=()=>{let e=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";return mo=()=>e,e},FI=(e,t,r,n,i)=>(Re.arraySet=mo()?xr.arraySet:Sr.arraySet,(0,Re.arraySet)(e,t,r,n,i));Re.arraySet=FI;var LI=e=>(Re.flattenChunks=mo()?xr.flattenChunks:Sr.flattenChunks,(0,Re.flattenChunks)(e));Re.flattenChunks=LI;var NI=e=>(Re.Buf8=mo()?xr.Buf8:Sr.Buf8,(0,Re.Buf8)(e));Re.Buf8=NI;var DI=e=>(Re.Buf16=mo()?xr.Buf16:Sr.Buf16,(0,Re.Buf16)(e));Re.Buf16=DI;var BI=e=>(Re.Buf32=mo()?xr.Buf32:Sr.Buf32,(0,Re.Buf32)(e));Re.Buf32=BI;function zI(e){Re.arraySet=e?xr.arraySet:Sr.arraySet,Re.flattenChunks=e?xr.flattenChunks:Sr.flattenChunks,Re.Buf8=e?xr.Buf8:Sr.Buf8,Re.Buf16=e?xr.Buf16:Sr.Buf16,Re.Buf32=e?xr.Buf32:Sr.Buf32}});var fh=g(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.string2buf=UI;gi.buf2binstring=WI;gi.binstring2buf=HI;gi.buf2string=VI;gi.utf8border=GI;var Ow=vn(),Ew=function(){let e=!0;try{String.fromCharCode.apply(null,[0])}catch{e=!1}return Ew=()=>e,e},Aw=function(){let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{e=!1}return Aw=()=>e,e},lh=function(e){for(var t=(0,Ow.Buf8)(256),r=0;r<256;r++)t[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;return t[254]=t[254]=1,lh=n=>t[n],t[e]};function UI(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 Uint8Array(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 Rw(e,t){if(t<65534&&(e.subarray&&Aw()||!e.subarray&&Ew()))return String.fromCharCode.apply(null,(0,Ow.shrinkBuf)(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}function WI(e){return Rw(e,e.length)}function HI(e){for(var t=new Uint8Array(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t}function VI(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=lh(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 Rw(u,n)}function GI(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+lh(e[r])>t?r:t}});var Tw=g(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.default=$I;function $I(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}});var hh=g(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.default=ZI;function ZI(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}});var vh=g(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.default=YI;function KI(){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 Pw=function(){let e=KI();return Pw=()=>e,e};function YI(e,t,r,n){var i=Pw(),o=n+r;e^=-1;for(var a=n;a<o;a++)e=e>>>8^i[(e^t[a])&255];return e^-1}});var Mw=g(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.default=JI;var Ys=30,XI=12;function JI(e,t){var r,n,i,o,a,u,f,s,c,l,d,p,h,m,v,_,w,y,x,O,M,E,P,C,R;r=e.state,n=e.next_in,C=e.input,i=n+(e.avail_in-5),o=e.next_out,R=e.output,a=o-(t-e.avail_out),u=o+(e.avail_out-257),f=r.dmax,s=r.wsize,c=r.whave,l=r.wnext,d=r.window,p=r.hold,h=r.bits,m=r.lencode,v=r.distcode,_=(1<<r.lenbits)-1,w=(1<<r.distbits)-1;e:do{h<15&&(p+=C[n++]<<h,h+=8,p+=C[n++]<<h,h+=8),y=m[p&_];t:for(;;){if(x=y>>>24,p>>>=x,h-=x,x=y>>>16&255,x===0)R[o++]=y&65535;else if(x&16){O=y&65535,x&=15,x&&(h<x&&(p+=C[n++]<<h,h+=8),O+=p&(1<<x)-1,p>>>=x,h-=x),h<15&&(p+=C[n++]<<h,h+=8,p+=C[n++]<<h,h+=8),y=v[p&w];r:for(;;){if(x=y>>>24,p>>>=x,h-=x,x=y>>>16&255,x&16){if(M=y&65535,x&=15,h<x&&(p+=C[n++]<<h,h+=8,h<x&&(p+=C[n++]<<h,h+=8)),M+=p&(1<<x)-1,M>f){e.msg="invalid distance too far back",r.mode=Ys;break e}if(p>>>=x,h-=x,x=o-a,M>x){if(x=M-x,x>c&&r.sane){e.msg="invalid distance too far back",r.mode=Ys;break e}if(E=0,P=d,l===0){if(E+=s-x,x<O){O-=x;do R[o++]=d[E++];while(--x);E=o-M,P=R}}else if(l<x){if(E+=s+l-x,x-=l,x<O){O-=x;do R[o++]=d[E++];while(--x);if(E=0,l<O){x=l,O-=x;do R[o++]=d[E++];while(--x);E=o-M,P=R}}}else if(E+=l-x,x<O){O-=x;do R[o++]=d[E++];while(--x);E=o-M,P=R}for(;O>2;)R[o++]=P[E++],R[o++]=P[E++],R[o++]=P[E++],O-=3;O&&(R[o++]=P[E++],O>1&&(R[o++]=P[E++]))}else{E=o-M;do R[o++]=R[E++],R[o++]=R[E++],R[o++]=R[E++],O-=3;while(O>2);O&&(R[o++]=R[E++],O>1&&(R[o++]=R[E++]))}}else if((x&64)===0){y=v[(y&65535)+(p&(1<<x)-1)];continue r}else{e.msg="invalid distance code",r.mode=Ys;break e}break}}else if((x&64)===0){y=m[(y&65535)+(p&(1<<x)-1)];continue t}else if(x&32){r.mode=XI;break e}else{e.msg="invalid literal/length code",r.mode=Ys;break e}break}}while(n<i&&o<u);O=h>>3,n-=O,h-=O<<3,p&=(1<<h)-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?5+(i-n):5-(n-i),e.avail_out=o<u?257+(u-o):257-(o-u),r.hold=p,r.bits=h}});var Fw=g(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.default=nk;var Cw=vn(),vo=15,Iw=852,kw=592,qw=0,gh=1,jw=2,QI=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],ek=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],tk=[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],rk=[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];function nk(e,t,r,n,i,o,a,u){var f=u.bits,s=0,c=0,l=0,d=0,p=0,h=0,m=0,v=0,_=0,w=0,y,x,O,M,E,P=null,C=0,R,L=(0,Cw.Buf16)(vo+1),z=(0,Cw.Buf16)(vo+1),D=null,A=0,k,U,q;for(s=0;s<=vo;s++)L[s]=0;for(c=0;c<n;c++)L[t[r+c]]++;for(p=f,d=vo;d>=1&&L[d]===0;d--);if(p>d&&(p=d),d===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,u.bits=1,0;for(l=1;l<d&&L[l]===0;l++);for(p<l&&(p=l),v=1,s=1;s<=vo;s++)if(v<<=1,v-=L[s],v<0)return-1;if(v>0&&(e===qw||d!==1))return-1;for(z[1]=0,s=1;s<vo;s++)z[s+1]=z[s]+L[s];for(c=0;c<n;c++)t[r+c]!==0&&(a[z[t[r+c]]++]=c);if(e===qw?(P=D=a,R=19):e===gh?(P=QI,C-=257,D=ek,A-=257,R=256):(P=tk,D=rk,R=-1),w=0,c=0,s=l,E=o,h=p,m=0,O=-1,_=1<<p,M=_-1,e===gh&&_>Iw||e===jw&&_>kw)return 1;for(;;){k=s-m,a[c]<R?(U=0,q=a[c]):a[c]>R?(U=D[A+a[c]],q=P[C+a[c]]):(U=96,q=0),y=1<<s-m,x=1<<h,l=x;do x-=y,i[E+(w>>m)+x]=k<<24|U<<16|q|0;while(x!==0);for(y=1<<s-1;w&y;)y>>=1;if(y!==0?(w&=y-1,w+=y):w=0,c++,--L[s]===0){if(s===d)break;s=t[r+a[c]]}if(s>p&&(w&M)!==O){for(m===0&&(m=p),E+=l,h=s-m,v=1<<h;h+m<d&&(v-=L[h+m],!(v<=0));)h++,v<<=1;if(_+=1<<h,e===gh&&_>Iw||e===jw&&_>kw)return 1;O=w&M,i[O]=p<<24|h<<16|E-o|0}}return w!==0&&(i[E+w]=s-m<<24|64<<16|0),u.bits=p,0}});var bx=g(St=>{"use strict";var tc=St&&St.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(St,"__esModule",{value:!0});St.inflateInfo=void 0;St.inflateResetKeep=dx;St.inflateReset=px;St.inflateReset2=hx;St.inflateInit2=mx;St.inflateInit=vk;St.inflate=gk;St.inflateEnd=_k;St.inflateGetHeader=yk;St.inflateSetDictionary=wk;var Eh=tc(hh()),Or=tc(vh()),ik=tc(Mw()),Ha=tc(Fw()),zt=vn(),ok=0,sx=1,cx=2,Lw=4,ak=5,Xs=6,_i=0,uk=1,sk=2,Kt=-2,lx=-3,Ah=-4,ck=-5,Nw=8,fx=1,Dw=2,Bw=3,zw=4,Uw=5,Ww=6,Hw=7,Vw=8,Gw=9,$w=10,ec=11,Vr=12,yh=13,Zw=14,wh=15,Kw=16,Yw=17,Xw=18,Jw=19,Js=20,Qs=21,Qw=22,ex=23,tx=24,rx=25,nx=26,xh=27,ix=28,ox=29,De=30,Rh=31,lk=32,fk=852,dk=592,pk=15,hk=pk;function ax(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function mk(){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=(0,zt.Buf16)(320),this.work=(0,zt.Buf16)(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function dx(e){var t;return!e||!e.state?Kt:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=fx,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=(0,zt.Buf32)(fk),t.distcode=t.distdyn=(0,zt.Buf32)(dk),t.sane=1,t.back=-1,_i)}function px(e){var t;return!e||!e.state?Kt:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,dx(e))}function hx(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))?Kt:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,px(e))}function mx(e,t){var r,n;return e?(n=new mk,e.state=n,n.window=null,r=hx(e,t),r!==_i&&(e.state=null),r):Kt}function vk(e){return mx(e,hk)}var ux=!0,Sh,Oh;function bk(e){if(ux){var t;for(Sh=(0,zt.Buf32)(512),Oh=(0,zt.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((0,Ha.default)(sx,e.lens,0,288,Sh,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;(0,Ha.default)(cx,e.lens,0,32,Oh,0,e.work,{bits:5}),ux=!1}e.lencode=Sh,e.lenbits=9,e.distcode=Oh,e.distbits=5}function vx(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=(0,zt.Buf8)(o.wsize)),n>=o.wsize?((0,zt.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),(0,zt.arraySet)(o.window,t,r-n,i,o.wnext),n-=i,n?((0,zt.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 gk(e,t){var r,n,i,o,a,u,f,s,c,l,d,p,h,m,v=0,_,w,y,x,O,M,E,P,C=(0,zt.Buf8)(4),R,L,z=[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 Kt;r=e.state,r.mode===Vr&&(r.mode=yh),a=e.next_out,i=e.output,f=e.avail_out,o=e.next_in,n=e.input,u=e.avail_in,s=r.hold,c=r.bits,l=u,d=f,P=_i;e:for(;;)switch(r.mode){case fx:if(r.wrap===0){r.mode=yh;break}for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.wrap&2&&s===35615){r.check=0,C[0]=s&255,C[1]=s>>>8&255,r.check=(0,Or.default)(r.check,C,2,0),s=0,c=0,r.mode=Dw;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=De;break}if((s&15)!==Nw){e.msg="unknown compression method",r.mode=De;break}if(s>>>=4,c-=4,E=(s&15)+8,r.wbits===0)r.wbits=E;else if(E>r.wbits){e.msg="invalid window size",r.mode=De;break}r.dmax=1<<E,e.adler=r.check=1,r.mode=s&512?$w:Vr,s=0,c=0;break;case Dw:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(r.flags=s,(r.flags&255)!==Nw){e.msg="unknown compression method",r.mode=De;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=De;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=(0,Or.default)(r.check,C,2,0)),s=0,c=0,r.mode=Bw;case Bw:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.time=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,C[2]=s>>>16&255,C[3]=s>>>24&255,r.check=(0,Or.default)(r.check,C,4,0)),s=0,c=0,r.mode=zw;case zw:for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=(0,Or.default)(r.check,C,2,0)),s=0,c=0,r.mode=Uw;case Uw:if(r.flags&1024){for(;c<16;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=(0,Or.default)(r.check,C,2,0)),s=0,c=0}else r.head&&(r.head.extra=null);r.mode=Ww;case Ww:if(r.flags&1024&&(p=r.length,p>u&&(p=u),p&&(r.head&&(E=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),(0,zt.arraySet)(r.head.extra,n,o,p,E)),r.flags&512&&(r.check=(0,Or.default)(r.check,n,p,o)),u-=p,o+=p,r.length-=p),r.length))break e;r.length=0,r.mode=Hw;case Hw:if(r.flags&2048){if(u===0)break e;p=0;do E=n[o+p++],r.head&&E&&r.length<65536&&(r.head.name+=String.fromCharCode(E));while(E&&p<u);if(r.flags&512&&(r.check=(0,Or.default)(r.check,n,p,o)),u-=p,o+=p,E)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=Vw;case Vw:if(r.flags&4096){if(u===0)break e;p=0;do E=n[o+p++],r.head&&E&&r.length<65536&&(r.head.comment+=String.fromCharCode(E));while(E&&p<u);if(r.flags&512&&(r.check=(0,Or.default)(r.check,n,p,o)),u-=p,o+=p,E)break e}else r.head&&(r.head.comment=null);r.mode=Gw;case Gw: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=De;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 $w:for(;c<32;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}e.adler=r.check=ax(s),s=0,c=0,r.mode=ec;case ec:if(r.havedict===0)return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,sk;e.adler=r.check=1,r.mode=Vr;case Vr:if(t===ak||t===Xs)break e;case yh:if(r.last){s>>>=c&7,c-=c&7,r.mode=xh;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=Zw;break;case 1:if(bk(r),r.mode=Js,t===Xs){s>>>=2,c-=2;break e}break;case 2:r.mode=Yw;break;case 3:e.msg="invalid block type",r.mode=De}s>>>=2,c-=2;break;case Zw: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=De;break}if(r.length=s&65535,s=0,c=0,r.mode=wh,t===Xs)break e;case wh:r.mode=Kw;case Kw:if(p=r.length,p){if(p>u&&(p=u),p>f&&(p=f),p===0)break e;(0,zt.arraySet)(i,n,o,p,a),u-=p,o+=p,f-=p,a+=p,r.length-=p;break}r.mode=Vr;break;case Yw: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=De;break}r.have=0,r.mode=Xw;case Xw:for(;r.have<r.ncode;){for(;c<3;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}r.lens[z[r.have++]]=s&7,s>>>=3,c-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},P=(0,Ha.default)(ok,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,P){e.msg="invalid code lengths set",r.mode=De;break}r.have=0,r.mode=Jw;case Jw:for(;r.have<r.nlen+r.ndist;){for(;v=r.lencode[s&(1<<r.lenbits)-1],_=v>>>24,w=v>>>16&255,y=v&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(y<16)s>>>=_,c-=_,r.lens[r.have++]=y;else{if(y===16){for(L=_+2;c<L;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(s>>>=_,c-=_,r.have===0){e.msg="invalid bit length repeat",r.mode=De;break}E=r.lens[r.have-1],p=3+(s&3),s>>>=2,c-=2}else if(y===17){for(L=_+3;c<L;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,E=0,p=3+(s&7),s>>>=3,c-=3}else{for(L=_+7;c<L;){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=_,c-=_,E=0,p=11+(s&127),s>>>=7,c-=7}if(r.have+p>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=De;break}for(;p--;)r.lens[r.have++]=E}}if(r.mode===De)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=De;break}if(r.lenbits=9,R={bits:r.lenbits},P=(0,Ha.default)(sx,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,P){e.msg="invalid literal/lengths set",r.mode=De;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},P=(0,Ha.default)(cx,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,P){e.msg="invalid distances set",r.mode=De;break}if(r.mode=Js,t===Xs)break e;case Js:r.mode=Qs;case Qs:if(u>=6&&f>=258){e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(0,ik.default)(e,d),a=e.next_out,i=e.output,f=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;v=r.lencode[s&(1<<r.lenbits)-1],_=v>>>24,w=v>>>16&255,y=v&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if(w&&(w&240)===0){for(x=_,O=w,M=y;v=r.lencode[M+((s&(1<<x+O)-1)>>x)],_=v>>>24,w=v>>>16&255,y=v&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,r.length=y,w===0){r.mode=nx;break}if(w&32){r.back=-1,r.mode=Vr;break}if(w&64){e.msg="invalid literal/length code",r.mode=De;break}r.extra=w&15,r.mode=Qw;case Qw:if(r.extra){for(L=r.extra;c<L;){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=ex;case ex:for(;v=r.distcode[s&(1<<r.distbits)-1],_=v>>>24,w=v>>>16&255,y=v&65535,!(_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}if((w&240)===0){for(x=_,O=w,M=y;v=r.distcode[M+((s&(1<<x+O)-1)>>x)],_=v>>>24,w=v>>>16&255,y=v&65535,!(x+_<=c);){if(u===0)break e;u--,s+=n[o++]<<c,c+=8}s>>>=x,c-=x,r.back+=x}if(s>>>=_,c-=_,r.back+=_,w&64){e.msg="invalid distance code",r.mode=De;break}r.offset=y,r.extra=w&15,r.mode=tx;case tx:if(r.extra){for(L=r.extra;c<L;){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=De;break}r.mode=rx;case rx:if(f===0)break e;if(p=d-f,r.offset>p){if(p=r.offset-p,p>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=De;break}p>r.wnext?(p-=r.wnext,h=r.wsize-p):h=r.wnext-p,p>r.length&&(p=r.length),m=r.window}else m=i,h=a-r.offset,p=r.length;p>f&&(p=f),f-=p,r.length-=p;do i[a++]=m[h++];while(--p);r.length===0&&(r.mode=Qs);break;case nx:if(f===0)break e;i[a++]=r.length,f--,r.mode=Qs;break;case xh:if(r.wrap){for(;c<32;){if(u===0)break e;u--,s|=n[o++]<<c,c+=8}if(d-=f,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?(0,Or.default)(r.check,i,d,a-d):(0,Eh.default)(r.check,i,d,a-d)),d=f,(r.flags?s:ax(s))!==r.check){e.msg="incorrect data check",r.mode=De;break}s=0,c=0}r.mode=ix;case ix: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=De;break}s=0,c=0}r.mode=ox;case ox:P=uk;break e;case De:P=lx;break e;case Rh:return Ah;case lk:default:return Kt}return e.next_out=a,e.avail_out=f,e.next_in=o,e.avail_in=u,r.hold=s,r.bits=c,(r.wsize||d!==e.avail_out&&r.mode<De&&(r.mode<xh||t!==Lw))&&vx(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Rh,Ah):(l-=e.avail_in,d-=e.avail_out,e.total_in+=l,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?(0,Or.default)(r.check,i,d,e.next_out-d):(0,Eh.default)(r.check,i,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Vr?128:0)+(r.mode===Js||r.mode===wh?256:0),(l===0&&d===0||t===Lw)&&P===_i&&(P=ck),P)}function _k(e){if(!e||!e.state)return Kt;var t=e.state;return t.window&&(t.window=null),e.state=null,_i}function yk(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Kt:(r.head=t,t.done=!1,_i)}function wk(e,t){var r=t.length,n,i,o;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==ec)?Kt:n.mode===ec&&(i=1,i=(0,Eh.default)(i,t,r,0),i!==n.check)?lx:(o=vx(e,t,r,r),o?(n.mode=Rh,Ah):(n.havedict=1,_i))}St.inflateInfo="pako inflate (from Nodeca project)"});var rc=g(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.default={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 Mh=g(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});Ph.default=xk;function xk(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}});var gx=g(Er=>{"use strict";var kh=Er&&Er.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Er,"__esModule",{value:!0});Er.ungzip=Er.Inflate=void 0;Er.inflate=qh;Er.inflateRaw=Ek;var Va=vn(),Ga=fh(),$e=ho(),Sk=kh(Tw()),bo=bx(),Ih=kh(rc()),Ok=kh(Mh()),Ch=Object.prototype.toString,nc=class e{constructor(t){if(!(this instanceof e))return new e(t);this.options=(0,Va.assign)({chunkSize:16384,windowBits:0,to:""},t||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(t&&t.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)===0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ok.default,this.strm.avail_out=0;var n=(0,bo.inflateInit2)(this.strm,r.windowBits);if(n!==$e.Z_OK)throw new Error(Ih.default[n]);if(this.header=new Sk.default,(0,bo.inflateGetHeader)(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=(0,Ga.string2buf)(r.dictionary):Ch.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(n=(0,bo.inflateSetDictionary)(this.strm,r.dictionary),n!==$e.Z_OK)))throw new Error(Ih.default[n])}push(t,r){var n=this.strm,i=this.options.chunkSize,o=this.options.dictionary,a,u,f,s,c,l,d=!1;if(this.ended)return!1;u=r===~~r?r:r===!0?$e.Z_FINISH:$e.Z_NO_FLUSH,typeof t=="string"?n.input=(0,Ga.binstring2buf)(t):Ch.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=(0,Va.Buf8)(i),n.next_out=0,n.avail_out=i),a=(0,bo.inflate)(n,$e.Z_NO_FLUSH),a===$e.Z_NEED_DICT&&o&&(typeof o=="string"?l=(0,Ga.string2buf)(o):Ch.call(o)==="[object ArrayBuffer]"?l=new Uint8Array(o):l=o,a=(0,bo.inflateSetDictionary)(this.strm,l)),a===$e.Z_BUF_ERROR&&d===!0&&(a=$e.Z_OK,d=!1),a!==$e.Z_STREAM_END&&a!==$e.Z_OK)return this.onEnd(a),this.ended=!0,!1;n.next_out&&(n.avail_out===0||a===$e.Z_STREAM_END||n.avail_in===0&&(u===$e.Z_FINISH||u===$e.Z_SYNC_FLUSH))&&(this.options.to==="string"?(f=(0,Ga.utf8border)(n.output,n.next_out),s=n.next_out-f,c=(0,Ga.buf2string)(n.output,f),n.next_out=s,n.avail_out=i-s,s&&(0,Va.arraySet)(n.output,n.output,f,s,0),this.onData(c)):this.onData((0,Va.shrinkBuf)(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(d=!0)}while((n.avail_in>0||n.avail_out===0)&&a!==$e.Z_STREAM_END);return a===$e.Z_STREAM_END&&(u=$e.Z_FINISH),u===$e.Z_FINISH?(a=(0,bo.inflateEnd)(this.strm),this.onEnd(a),this.ended=!0,a===$e.Z_OK):(u===$e.Z_SYNC_FLUSH&&(this.onEnd($e.Z_OK),n.avail_out=0),!0)}onData(t){this.chunks.push(t)}onEnd(t){t===$e.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=(0,Va.flattenChunks)(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}};Er.Inflate=nc;function qh(e,t){var r=new nc(t);if(r.push(e,!0),r.err)throw r.msg||Ih.default[r.err];return r.result}function Ek(e,t){return t=t||{},t.raw=!0,qh(e,t)}Er.ungzip=qh});var Dx=g(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi._tr_init=zk;wi._tr_stored_block=Nx;wi._tr_align=Uk;wi._tr_flush_block=Wk;wi._tr_tally=Hk;var wo=ho(),Ak=vn();function go(e){for(var t=e.length;--t>=0;)e[t]=0}var Rk=0,Ox=1,Tk=2,Pk=3,Mk=258,Dh=29,Ya=256,Za=Ya+1+Dh,_o=30,Uh=19,Ex=2*Za+1,yi=15,jh=16,Ck=7,Wh=256,Ax=16,Rx=17,Tx=18,Bh=[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],ic=[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],Ik=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Px=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],kk=512,Ar,yo,xo,So,oc,$a;function Fh(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 Mx,Cx,Ix;function Lh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function kx(e){return e<256?xo[e]:xo[256+(e>>>7)]}function Ka(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Ct(e,t,r){e.bi_valid>jh-r?(e.bi_buf|=t<<e.bi_valid&65535,Ka(e,e.bi_buf),e.bi_buf=t>>jh-e.bi_valid,e.bi_valid+=r-jh):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function Rr(e,t,r){Ct(e,r[t*2],r[t*2+1])}function qx(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function qk(e){e.bi_valid===16?(Ka(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 jk(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,f=t.stat_desc.max_length,s,c,l,d,p,h,m=0;for(d=0;d<=yi;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<Ex;s++)c=e.heap[s],d=r[r[c*2+1]*2+1]+1,d>f&&(d=f,m++),r[c*2+1]=d,!(c>n)&&(e.bl_count[d]++,p=0,c>=u&&(p=a[c-u]),h=r[c*2],e.opt_len+=h*(d+p),o&&(e.static_len+=h*(i[c*2+1]+p)));if(m!==0){do{for(d=f-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(d=f;d!==0;d--)for(c=e.bl_count[d];c!==0;)l=e.heap[--s],!(l>n)&&(r[l*2+1]!==d&&(e.opt_len+=(d-r[l*2+1])*r[l*2],r[l*2+1]=d),c--)}}function jx(e,t,r){var n=new Array(yi+1),i=0,o,a;for(o=1;o<=yi;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]=qx(n[u]++,u))}}function Fk(){var e,t,r,n,i,o=new Array(yi+1);for(Ar=new Array((Za+2)*2),go(Ar),yo=new Array(_o*2),go(yo),xo=new Array(kk),go(xo),So=new Array(Mk-Pk+1),go(So),oc=new Array(Dh),go(oc),$a=new Array(_o),go($a),r=0,n=0;n<Dh-1;n++)for(oc[n]=r,e=0;e<1<<Bh[n];e++)So[r++]=n;for(So[r-1]=n,i=0,n=0;n<16;n++)for($a[n]=i,e=0;e<1<<ic[n];e++)xo[i++]=n;for(i>>=7;n<_o;n++)for($a[n]=i<<7,e=0;e<1<<ic[n]-7;e++)xo[256+i++]=n;for(t=0;t<=yi;t++)o[t]=0;for(e=0;e<=143;)Ar[e*2+1]=8,e++,o[8]++;for(;e<=255;)Ar[e*2+1]=9,e++,o[9]++;for(;e<=279;)Ar[e*2+1]=7,e++,o[7]++;for(;e<=287;)Ar[e*2+1]=8,e++,o[8]++;for(jx(Ar,Za+1,o),e=0;e<_o;e++)yo[e*2+1]=5,yo[e*2]=qx(e,5);Mx=new Fh(Ar,Bh,Ya+1,Za,yi),Cx=new Fh(yo,ic,0,_o,yi),Ix=new Fh(new Array(0),Ik,0,Uh,Ck)}function Fx(e){var t;for(t=0;t<Za;t++)e.dyn_ltree[t*2]=0;for(t=0;t<_o;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Uh;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Wh*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Lx(e){e.bi_valid>8?Ka(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 Lk(e,t,r,n){Lx(e),n&&(Ka(e,r),Ka(e,~r)),(0,Ak.arraySet)(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function _x(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 Nh(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&_x(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!_x(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function yx(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?Rr(e,i,t):(a=So[i],Rr(e,a+Ya+1,t),u=Bh[a],u!==0&&(i-=oc[a],Ct(e,i,u)),n--,a=kx(n),Rr(e,a,r),u=ic[a],u!==0&&(n-=$a[a],Ct(e,n,u)));while(o<e.last_lit);Rr(e,Wh,t)}function zh(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,f=-1,s;for(e.heap_len=0,e.heap_max=Ex,a=0;a<o;a++)r[a*2]!==0?(e.heap[++e.heap_len]=f=a,e.depth[a]=0):r[a*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=f<2?++f:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,i&&(e.static_len-=n[s*2+1]);for(t.max_code=f,a=e.heap_len>>1;a>=1;a--)Nh(e,r,a);s=o;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Nh(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++,Nh(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],jk(e,t),jx(r,f,e.bl_count)}function wx(e,t,r){var n,i=-1,o,a=t[1],u=0,f=7,s=4;for(a===0&&(f=138,s=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)o=a,a=t[(n+1)*2+1],!(++u<f&&o===a)&&(u<s?e.bl_tree[o*2]+=u:o!==0?(o!==i&&e.bl_tree[o*2]++,e.bl_tree[Ax*2]++):u<=10?e.bl_tree[Rx*2]++:e.bl_tree[Tx*2]++,u=0,i=o,a===0?(f=138,s=3):o===a?(f=6,s=3):(f=7,s=4))}function xx(e,t,r){var n,i=-1,o,a=t[1],u=0,f=7,s=4;for(a===0&&(f=138,s=3),n=0;n<=r;n++)if(o=a,a=t[(n+1)*2+1],!(++u<f&&o===a)){if(u<s)do Rr(e,o,e.bl_tree);while(--u!==0);else o!==0?(o!==i&&(Rr(e,o,e.bl_tree),u--),Rr(e,Ax,e.bl_tree),Ct(e,u-3,2)):u<=10?(Rr(e,Rx,e.bl_tree),Ct(e,u-3,3)):(Rr(e,Tx,e.bl_tree),Ct(e,u-11,7));u=0,i=o,a===0?(f=138,s=3):o===a?(f=6,s=3):(f=7,s=4)}}function Nk(e){var t;for(wx(e,e.dyn_ltree,e.l_desc.max_code),wx(e,e.dyn_dtree,e.d_desc.max_code),zh(e,e.bl_desc),t=Uh-1;t>=3&&e.bl_tree[Px[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Dk(e,t,r,n){var i;for(Ct(e,t-257,5),Ct(e,r-1,5),Ct(e,n-4,4),i=0;i<n;i++)Ct(e,e.bl_tree[Px[i]*2+1],3);xx(e,e.dyn_ltree,t-1),xx(e,e.dyn_dtree,r-1)}function Bk(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return wo.Z_BINARY;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return wo.Z_TEXT;for(r=32;r<Ya;r++)if(e.dyn_ltree[r*2]!==0)return wo.Z_TEXT;return wo.Z_BINARY}var Sx=!1;function zk(e){Sx||(Fk(),Sx=!0),e.l_desc=new Lh(e.dyn_ltree,Mx),e.d_desc=new Lh(e.dyn_dtree,Cx),e.bl_desc=new Lh(e.bl_tree,Ix),e.bi_buf=0,e.bi_valid=0,Fx(e)}function Nx(e,t,r,n){Ct(e,(Rk<<1)+(n?1:0),3),Lk(e,t,r,!0)}function Uk(e){Ct(e,Ox<<1,3),Rr(e,Wh,Ar),qk(e)}function Wk(e,t,r,n){var i,o,a=0;e.level>0?(e.strm.data_type===wo.Z_UNKNOWN&&(e.strm.data_type=Bk(e)),zh(e,e.l_desc),zh(e,e.d_desc),a=Nk(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?Nx(e,t,r,n):e.strategy===wo.Z_FIXED||o===i?(Ct(e,(Ox<<1)+(n?1:0),3),yx(e,Ar,yo)):(Ct(e,(Tk<<1)+(n?1:0),3),Dk(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),yx(e,e.dyn_ltree,e.dyn_dtree)),Fx(e),n&&Lx(e)}function Hk(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[(So[r]+Ya+1)*2]++,e.dyn_dtree[kx(t)*2]++),e.last_lit===e.lit_bufsize-1}});var Gx=g(It=>{"use strict";var $h=It&&It.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(It,"__esModule",{value:!0});It.deflateInfo=void 0;It.deflateResetKeep=Wx;It.deflateReset=Hx;It.deflateSetHeader=cq;It.deflateInit2=Vx;It.deflateInit=lq;It.deflate=fq;It.deflateEnd=dq;It.deflateSetDictionary=pq;var zx=$h(hh()),Y=ho(),bn=$h(vh()),Vk=$h(rc()),Yt=Dx(),Ot=vn(),Gk=9,$k=15,Zk=8,Kk=29,Yk=256,Vh=Yk+1+Kk,Xk=30,Jk=19,Qk=2*Vh+1,eq=15,xe=3,yn=258,cr=yn+xe+1,tq=32,cc=42,Gh=69,ac=73,uc=91,sc=103,xi=113,Ja=666,Qe=1,Qa=2,Si=3,Eo=4,rq=3;function wn(e,t){return e.msg=Vk.default[t],t}function Bx(e){return(e<<1)-(e>4?9:0)}function _n(e){for(var t=e.length;--t>=0;)e[t]=0}function gn(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&((0,Ot.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){(0,Yt._tr_flush_block)(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,gn(e.strm)}function Oe(e,t){e.pending_buf[e.pending++]=t}function Xa(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function nq(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,(0,Ot.arraySet)(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=(0,zx.default)(e.adler,t,i,r):e.state.wrap===2&&(e.adler=(0,bn.default)(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function Ux(e,t){var r=e.max_chain_length,n=e.strstart,i,o,a=e.prev_length,u=e.nice_match,f=e.strstart>e.w_size-cr?e.strstart-(e.w_size-cr):0,s=e.window,c=e.w_mask,l=e.prev,d=e.strstart+yn,p=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]!==p||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<d);if(o=yn-(d-n),n=d-yn,o>a){if(e.match_start=t,a=o,o>=u)break;p=s[n+a-1],h=s[n+a]}}while((t=l[t&c])>f&&--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-cr)){(0,Ot.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=nq(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=xe)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+xe-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<xe)););}while(e.lookahead<cr&&e.strm.avail_in!==0)}function iq(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===Y.Z_NO_FLUSH)return Qe;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-cr&&(st(e,!1),e.strm.avail_out===0))return Qe}return e.insert=0,t===Y.Z_FINISH?(st(e,!0),e.strm.avail_out===0?Si:Eo):(e.strstart>e.block_start&&(st(e,!1),e.strm.avail_out===0),Qe)}function Hh(e,t){for(var r,n;;){if(e.lookahead<cr){if(Oi(e),e.lookahead<cr&&t===Y.Z_NO_FLUSH)return Qe;if(e.lookahead===0)break}if(r=0,e.lookahead>=xe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-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-cr&&(e.match_length=Ux(e,r)),e.match_length>=xe)if(n=(0,Yt._tr_tally)(e,e.strstart-e.match_start,e.match_length-xe),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=xe){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-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=(0,Yt._tr_tally)(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(st(e,!1),e.strm.avail_out===0))return Qe}return e.insert=e.strstart<xe-1?e.strstart:xe-1,t===Y.Z_FINISH?(st(e,!0),e.strm.avail_out===0?Si:Eo):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Qe:Qa}function Oo(e,t){for(var r,n,i;;){if(e.lookahead<cr){if(Oi(e),e.lookahead<cr&&t===Y.Z_NO_FLUSH)return Qe;if(e.lookahead===0)break}if(r=0,e.lookahead>=xe&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+xe-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=xe-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-cr&&(e.match_length=Ux(e,r),e.match_length<=5&&(e.strategy===Y.Z_FILTERED||e.match_length===xe&&e.strstart-e.match_start>4096)&&(e.match_length=xe-1)),e.prev_length>=xe&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-xe,n=(0,Yt._tr_tally)(e,e.strstart-1-e.prev_match,e.prev_length-xe),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+xe-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=xe-1,e.strstart++,n&&(st(e,!1),e.strm.avail_out===0))return Qe}else if(e.match_available){if(n=(0,Yt._tr_tally)(e,0,e.window[e.strstart-1]),n&&st(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Qe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=(0,Yt._tr_tally)(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<xe-1?e.strstart:xe-1,t===Y.Z_FINISH?(st(e,!0),e.strm.avail_out===0?Si:Eo):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Qe:Qa}function oq(e,t){for(var r,n,i,o,a=e.window;;){if(e.lookahead<=yn){if(Oi(e),e.lookahead<=yn&&t===Y.Z_NO_FLUSH)return Qe;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=xe&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+yn;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=yn-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=xe?(r=(0,Yt._tr_tally)(e,1,e.match_length-xe),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=(0,Yt._tr_tally)(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(st(e,!1),e.strm.avail_out===0))return Qe}return e.insert=0,t===Y.Z_FINISH?(st(e,!0),e.strm.avail_out===0?Si:Eo):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Qe:Qa}function aq(e,t){for(var r;;){if(e.lookahead===0&&(Oi(e),e.lookahead===0)){if(t===Y.Z_NO_FLUSH)return Qe;break}if(e.match_length=0,r=(0,Yt._tr_tally)(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(st(e,!1),e.strm.avail_out===0))return Qe}return e.insert=0,t===Y.Z_FINISH?(st(e,!0),e.strm.avail_out===0?Si:Eo):e.last_lit&&(st(e,!1),e.strm.avail_out===0)?Qe:Qa}function Tr(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 Zh=function(){let e=[new Tr(0,0,0,0,iq),new Tr(4,4,8,4,Hh),new Tr(4,5,16,8,Hh),new Tr(4,6,32,32,Hh),new Tr(4,4,16,16,Oo),new Tr(8,16,32,32,Oo),new Tr(8,16,128,128,Oo),new Tr(8,32,128,256,Oo),new Tr(32,128,258,1024,Oo),new Tr(32,258,258,4096,Oo)];return Zh=()=>e,e};function uq(e){e.window_size=2*e.w_size,_n(e.head);let t=Zh();e.max_lazy_match=t[e.level].max_lazy,e.good_match=t[e.level].good_length,e.nice_match=t[e.level].nice_length,e.max_chain_length=t[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=xe-1,e.match_available=0,e.ins_h=0}function sq(){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=Y.Z_DEFLATED,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=(0,Ot.Buf16)(Qk*2),this.dyn_dtree=(0,Ot.Buf16)((2*Xk+1)*2),this.bl_tree=(0,Ot.Buf16)((2*Jk+1)*2),_n(this.dyn_ltree),_n(this.dyn_dtree),_n(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=(0,Ot.Buf16)(eq+1),this.heap=(0,Ot.Buf16)(2*Vh+1),_n(this.heap),this.heap_len=0,this.heap_max=0,this.depth=(0,Ot.Buf16)(2*Vh+1),_n(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 Wx(e){var t;return!e||!e.state?wn(e,Y.Z_STREAM_ERROR):(e.total_in=e.total_out=0,e.data_type=Y.Z_UNKNOWN,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?cc:xi,e.adler=t.wrap===2?0:1,t.last_flush=Y.Z_NO_FLUSH,(0,Yt._tr_init)(t),Y.Z_OK)}function Hx(e){var t=Wx(e);return t===Y.Z_OK&&uq(e.state),t}function cq(e,t){return!e||!e.state||e.state.wrap!==2?Y.Z_STREAM_ERROR:(e.state.gzhead=t,Y.Z_OK)}function Vx(e,t,r,n,i,o){if(!e)return Y.Z_STREAM_ERROR;var a=1;if(t===Y.Z_DEFAULT_COMPRESSION&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>Gk||r!==Y.Z_DEFLATED||n<8||n>15||t<0||t>9||o<0||o>Y.Z_FIXED)return wn(e,Y.Z_STREAM_ERROR);n===8&&(n=9);var u=new sq;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+xe-1)/xe),u.window=(0,Ot.Buf8)(u.w_size*2),u.head=(0,Ot.Buf16)(u.hash_size),u.prev=(0,Ot.Buf16)(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=(0,Ot.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,Hx(e)}function lq(e,t){return Vx(e,t,Y.Z_DEFLATED,$k,Zk,Y.Z_DEFAULT_STRATEGY)}function fq(e,t){var r,n,i,o;if(!e||!e.state||t>Y.Z_BLOCK||t<0)return e?wn(e,Y.Z_STREAM_ERROR):Y.Z_STREAM_ERROR;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Ja&&t!==Y.Z_FINISH)return wn(e,e.avail_out===0?Y.Z_BUF_ERROR:Y.Z_STREAM_ERROR);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===cc)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>=Y.Z_HUFFMAN_ONLY||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=(0,bn.default)(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Gh):(Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,0),Oe(n,n.level===9?2:n.strategy>=Y.Z_HUFFMAN_ONLY||n.level<2?4:0),Oe(n,rq),n.status=xi);else{var a=Y.Z_DEFLATED+(n.w_bits-8<<4)<<8,u=-1;n.strategy>=Y.Z_HUFFMAN_ONLY||n.level<2?u=0:n.level<6?u=1:n.level===6?u=2:u=3,a|=u<<6,n.strstart!==0&&(a|=tq),a+=31-a%31,n.status=xi,Xa(n,a),n.strstart!==0&&(Xa(n,e.adler>>>16),Xa(n,e.adler&65535)),e.adler=1}if(n.status===Gh)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=(0,bn.default)(e.adler,n.pending_buf,n.pending-i,i)),gn(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=(0,bn.default)(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=ac)}else n.status=ac;if(n.status===ac)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=(0,bn.default)(e.adler,n.pending_buf,n.pending-i,i)),gn(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=(0,bn.default)(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.gzindex=0,n.status=uc)}else n.status=uc;if(n.status===uc)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=(0,bn.default)(e.adler,n.pending_buf,n.pending-i,i)),gn(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=(0,bn.default)(e.adler,n.pending_buf,n.pending-i,i)),o===0&&(n.status=sc)}else n.status=sc;if(n.status===sc&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&gn(e),n.pending+2<=n.pending_buf_size&&(Oe(n,e.adler&255),Oe(n,e.adler>>8&255),e.adler=0,n.status=xi)):n.status=xi),n.pending!==0){if(gn(e),e.avail_out===0)return n.last_flush=-1,Y.Z_OK}else if(e.avail_in===0&&Bx(t)<=Bx(r)&&t!==Y.Z_FINISH)return wn(e,Y.Z_BUF_ERROR);if(n.status===Ja&&e.avail_in!==0)return wn(e,Y.Z_BUF_ERROR);if(e.avail_in!==0||n.lookahead!==0||t!==Y.Z_NO_FLUSH&&n.status!==Ja){var f=n.strategy===Y.Z_HUFFMAN_ONLY?aq(n,t):n.strategy===Y.Z_RLE?oq(n,t):Zh()[n.level].func(n,t);if((f===Si||f===Eo)&&(n.status=Ja),f===Qe||f===Si)return e.avail_out===0&&(n.last_flush=-1),Y.Z_OK;if(f===Qa&&(t===Y.Z_PARTIAL_FLUSH?(0,Yt._tr_align)(n):t!==Y.Z_BLOCK&&((0,Yt._tr_stored_block)(n,0,0,!1),t===Y.Z_FULL_FLUSH&&(_n(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),gn(e),e.avail_out===0))return n.last_flush=-1,Y.Z_OK}return t!==Y.Z_FINISH?Y.Z_OK:n.wrap<=0?Y.Z_STREAM_END:(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)):(Xa(n,e.adler>>>16),Xa(n,e.adler&65535)),gn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Y.Z_OK:Y.Z_STREAM_END)}function dq(e){var t;return!e||!e.state?Y.Z_STREAM_ERROR:(t=e.state.status,t!==cc&&t!==Gh&&t!==ac&&t!==uc&&t!==sc&&t!==xi&&t!==Ja?wn(e,Y.Z_STREAM_ERROR):(e.state=null,t===xi?wn(e,Y.Z_DATA_ERROR):Y.Z_OK))}function pq(e,t){var r=t.length,n,i,o,a,u,f,s,c;if(!e||!e.state||(n=e.state,a=n.wrap,a===2||a===1&&n.status!==cc||n.lookahead))return Y.Z_STREAM_ERROR;for(a===1&&(e.adler=(0,zx.default)(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(a===0&&(_n(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=(0,Ot.Buf8)(n.w_size),(0,Ot.arraySet)(c,t,r-n.w_size,n.w_size,0),t=c,r=n.w_size),u=e.avail_in,f=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,Oi(n);n.lookahead>=xe;){i=n.strstart,o=n.lookahead-(xe-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+xe-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=xe-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=xe-1,n.match_available=0,e.next_in=f,e.input=s,e.avail_in=u,n.wrap=a,Y.Z_OK}It.deflateInfo="pako deflate (from Nodeca project)"});var Kx=g(Gr=>{"use strict";var Zx=Gr&&Gr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.Deflate=void 0;Gr.deflate=Xh;Gr.deflateRaw=mq;Gr.gzip=vq;var eu=vn(),Kh=fh(),ct=ho(),tu=Gx(),Yh=Zx(rc()),hq=Zx(Mh()),$x=Object.prototype.toString,lc=class{constructor(t){this.options=(0,eu.assign)({level:ct.Z_DEFAULT_COMPRESSION,method:ct.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:ct.Z_DEFAULT_STRATEGY,to:""},t||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new hq.default,this.strm.avail_out=0;var n=(0,tu.deflateInit2)(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(n!==ct.Z_OK)throw new Error(Yh.default[n]);if(r.header&&(0,tu.deflateSetHeader)(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=(0,Kh.string2buf)(r.dictionary):$x.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,n=(0,tu.deflateSetDictionary)(this.strm,i),n!==ct.Z_OK)throw new Error(Yh.default[n]);this._dict_set=!0}}push(t,r){var n=this.strm,i=this.options.chunkSize,o,a;if(this.ended)return!1;a=r===~~r?r:r===!0?ct.Z_FINISH:ct.Z_NO_FLUSH,typeof t=="string"?n.input=(0,Kh.string2buf)(t):$x.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=(0,eu.Buf8)(i),n.next_out=0,n.avail_out=i),o=(0,tu.deflate)(n,a),o!==ct.Z_STREAM_END&&o!==ct.Z_OK)return this.onEnd(o),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===ct.Z_FINISH||a===ct.Z_SYNC_FLUSH))&&(this.options.to==="string"?this.onData((0,Kh.buf2binstring)((0,eu.shrinkBuf)(n.output,n.next_out))):this.onData((0,eu.shrinkBuf)(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&o!==ct.Z_STREAM_END);return a===ct.Z_FINISH?(o=(0,tu.deflateEnd)(this.strm),this.onEnd(o),this.ended=!0,o===ct.Z_OK):(a===ct.Z_SYNC_FLUSH&&(this.onEnd(ct.Z_OK),n.avail_out=0),!0)}onData(t){this.chunks.push(t)}onEnd(t){t===ct.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=(0,eu.flattenChunks)(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg}};Gr.Deflate=lc;function Xh(e,t){var r=new lc(t);if(r.push(e,!0),r.err)throw r.msg||Yh.default[r.err];return r.result}function mq(e,t){return t=t||{},t.raw=!0,Xh(e,t)}function vq(e,t){return t=t||{},t.gzip=!0,Xh(e,t)}});var Yx=g($r=>{"use strict";var bq=$r&&$r.__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]})),Jh=$r&&$r.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&bq(t,e,r)};Object.defineProperty($r,"__esModule",{value:!0});Jh(ho(),$r);Jh(gx(),$r);Jh(Kx(),$r)});var em=g(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.concatUint8Array=_q;function gq(e){let t=0;for(let r of e)t+=r.length;return t}function _q(e,t){let r=new Uint8Array(t??gq(e)),n=0;for(let i of e)r.set(i,n),n+=i.length;return r}});var tm=g(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.unzip=yq;dc.unzipChunkSlice=wq;var fc=Yx(),Xx=em();async function yq(e){try{let t,r=0,n,i=[],o=0;do{let a=e.subarray(r);if(n=new fc.Inflate(void 0),{strm:t}=n,n.push(a,fc.Z_SYNC_FLUSH),n.err)throw new Error(n.msg);r+=t.next_in;let u=n.result;i.push(u),o+=u.length}while(t.avail_in);return(0,Xx.concatUint8Array)(i,o)}catch(t){throw/incorrect header check/.exec(`${t}`)?new Error("problem decompressing block: incorrect gzip header check"):t}}async function wq(e,t,r){try{let n,{minv:i,maxv:o}=t,a=i.blockPosition,u=i.dataPosition,f=[],s=[],c=[],l=0,d=!1,p=0;do{let h=e.subarray(a-i.blockPosition),m=a.toString(),v,_,w=r?.get(m);if(w)v=w.buffer,_=w.nextIn,d=!0;else{let O=new fc.Inflate(void 0);if({strm:n}=O,O.push(h,fc.Z_SYNC_FLUSH),O.err)throw new Error(O.msg);v=O.result,_=n.next_in,d=!1,r?.set(m,{buffer:v,nextIn:_})}f.push(v);let y=v.length;s.push(a),c.push(u),f.length===1&&i.dataPosition&&(f[0]=f[0].subarray(i.dataPosition),y=f[0].length);let x=a;if(a+=_,u+=y,x>=o.blockPosition){f[l]=f[l].subarray(0,o.blockPosition===i.blockPosition?o.dataPosition-i.dataPosition+1:o.dataPosition+1),p+=f[l].length,s.push(a),c.push(u);break}p+=y,l++}while(d?a<e.length+i.blockPosition:n.avail_in);return{buffer:(0,Xx.concatUint8Array)(f,p),cpositions:s,dpositions:c}}catch(n){throw/incorrect header check/.exec(`${n}`)?new Error("problem decompressing block: incorrect gzip header check"):n}}});var Jx=g(ru=>{"use strict";var xq=ru&&ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});var Sq=xq(Sw()),Oq=tm(),Eq=em(),rm=class{constructor({filehandle:t,gziFilehandle:r}){this.filehandle=t,this.gzi=new Sq.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,Oq.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],f=u>=r?0:r-u,s=Math.min(r+t,u+a.length)-u;f>=0&&f<a.length&&i.push(a.subarray(f,s))}return(0,Eq.concatUint8Array)(i)}};ru.default=rm});var e1=g(Pr=>{"use strict";var Aq=Pr&&Pr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pr,"__esModule",{value:!0});Pr.unzipChunkSlice=Pr.unzip=Pr.BgzfFilehandle=void 0;var Rq=Jx();Object.defineProperty(Pr,"BgzfFilehandle",{enumerable:!0,get:function(){return Aq(Rq).default}});var Qx=tm();Object.defineProperty(Pr,"unzip",{enumerable:!0,get:function(){return Qx.unzip}});Object.defineProperty(Pr,"unzipChunkSlice",{enumerable:!0,get:function(){return Qx.unzipChunkSlice}})});var t1=g(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.default=Tq;var nm=Fe();function Tq(){let e=(0,nm.useRef)(null),[t,r]=(0,nm.useState)({width:void 0,height:void 0});return(0,nm.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 n1=g((EQ,r1)=>{r1.exports=JBrowseExports["react-dom/client"]});var cm=g(Ei=>{Object.defineProperty(Ei,"__esModule",{value:!0});var Pq={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},Xt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},f1=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},i1=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)}},om=function(e){return{r:ot(e.r),g:ot(e.g),b:ot(e.b),a:ot(e.a,3)}},Mq=/^#([0-9a-f]{3,8})$/i,pc=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},d1=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}},p1=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),f=n*(1-(1-t+o)*r),s=o%6;return{r:255*[n,u,a,a,f,n][s],g:255*[f,n,n,u,a,a][s],b:255*[a,a,f,n,n,u][s],a:i}},o1=function(e){return{h:f1(e.h),s:Xt(e.s,0,100),l:Xt(e.l,0,100),a:Xt(e.a)}},a1=function(e){return{h:ot(e.h),s:ot(e.s),l:ot(e.l),a:ot(e.a,3)}},u1=function(e){return p1((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},nu=function(e){return{h:(t=d1(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},Cq=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Iq=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,kq=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qq=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sm={string:[[function(e){var t=Mq.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=kq.exec(e)||qq.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:i1({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=Cq.exec(e)||Iq.exec(e);if(!t)return null;var r,n,i=o1({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Pq[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return u1(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)?i1({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=o1({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return u1(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(u){return{h:f1(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 p1(a)},"hsv"]]},s1=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]},h1=function(e){return typeof e=="string"?s1(e.trim(),sm.string):typeof e=="object"&&e!==null?s1(e,sm.object):[null,void 0]},am=function(e,t){var r=nu(e);return{h:r.h,s:Xt(r.s+100*t,0,100),l:r.l,a:r.a}},um=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},c1=function(e,t){var r=nu(e);return{h:r.h,s:r.s,l:Xt(r.l+100*t,0,100),a:r.a}},iu=(function(){function e(t){this.parsed=h1(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(um(this.rgba),2)},e.prototype.isDark=function(){return um(this.rgba)<.5},e.prototype.isLight=function(){return um(this.rgba)>=.5},e.prototype.toHex=function(){return t=om(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?pc(ot(255*o)):"","#"+pc(r)+pc(n)+pc(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return om(this.rgba)},e.prototype.toRgbString=function(){return t=om(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 a1(nu(this.rgba))},e.prototype.toHslString=function(){return t=a1(nu(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=d1(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 Mr({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),Mr(am(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Mr(am(this.rgba,-t))},e.prototype.grayscale=function(){return Mr(am(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Mr(c1(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Mr(c1(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"?Mr({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=nu(this.rgba);return typeof t=="number"?Mr({h:t,s:r.s,l:r.l,a:r.a}):ot(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Mr(t).toHex()},e})(),Mr=function(e){return e instanceof iu?e:new iu(e)},l1=[];Ei.Colord=iu,Ei.colord=Mr,Ei.extend=function(e){e.forEach(function(t){l1.indexOf(t)<0&&(t(iu,sm),l1.push(t))})},Ei.getFormat=function(e){return h1(e)[1]},Ei.random=function(){return new iu({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}});var b1=g((RQ,v1)=>{var Cr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},lm=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},fm=function(e){return 255*(e>.0031308?1.055*Math.pow(e,.4166666666666667)-.055:12.92*e)},dm=96.422,pm=100,hm=82.521,jq=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:fm(.032404542*n.x-.015371385*n.y-.004985314*n.z),g:fm(-.00969266*n.x+.018760108*n.y+41556e-8*n.z),b:fm(556434e-9*n.x-.002040259*n.y+.010572252*n.z),a:e.a},{r:Cr(r.r,0,255),g:Cr(r.g,0,255),b:Cr(r.b,0,255),a:Cr(r.a)}},Fq=function(e){var t=lm(e.r),r=lm(e.g),n=lm(e.b);return(function(i){return{x:Cr(i.x,0,dm),y:Cr(i.y,0,pm),z:Cr(i.z,0,hm),a:Cr(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}))},ou=216/24389,Ao=24389/27,m1=function(e){var t=Fq(e),r=t.x/dm,n=t.y/pm,i=t.z/hm;return r=r>ou?Math.cbrt(r):(Ao*r+16)/116,{l:116*(n=n>ou?Math.cbrt(n):(Ao*n+16)/116)-16,a:500*(r-n),b:200*(n-(i=i>ou?Math.cbrt(i):(Ao*i+16)/116)),alpha:t.a}},Lq=function(e,t,r){var n,i=m1(e),o=m1(t);return(function(a){var u=(a.l+16)/116,f=a.a/500+u,s=u-a.b/200;return jq({x:(Math.pow(f,3)>ou?Math.pow(f,3):(116*f-16)/Ao)*dm,y:(a.l>8?Math.pow((a.l+16)/116,3):a.l/Ao)*pm,z:(Math.pow(s,3)>ou?Math.pow(s,3):(116*s-16)/Ao)*hm,a:a.alpha})})({l:Cr((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:Cr(n.alpha)})};v1.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=Lq(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 _1=g((TQ,g1)=>{g1.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,f,s=n[this.toHex()];if(s)return s;if(a?.closest){var c=this.toRgb(),l=1/0,d="black";if(!o.length)for(var p in r)o[p]=new e(r[p]).toRgb();for(var h in r){var m=(u=c,f=o[h],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));m<l&&(l=m,d=h)}return d}},t.string.push([function(a){var u=a.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}});var x1=g(xn=>{"use strict";var y1=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 Nq=cm(),Dq=y1(b1()),Bq=y1(_1());(0,Nq.extend)([Dq.default,Bq.default]);var w1=cm();Object.defineProperty(xn,"Colord",{enumerable:!0,get:function(){return w1.Colord}});Object.defineProperty(xn,"colord",{enumerable:!0,get:function(){return w1.colord}})});var mm=g(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.createStopToken=Uq;au.stopStopToken=Wq;au.checkStopToken=Hq;function zq(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Uq(){var e;return((e=URL.createObjectURL)===null||e===void 0?void 0:e.call(URL,new Blob))||`${Math.random()}`}function Wq(e){var t;(t=URL.revokeObjectURL)===null||t===void 0||t.call(URL,e)}function Hq(e){if(typeof jest>"u"&&e!==void 0&&zq()){let t=new XMLHttpRequest;t.open("GET",e,!1);try{t.send(null)}catch{throw new Error("aborted")}}}});var O1=g(S1=>{"use strict";Object.defineProperty(S1,"__esModule",{value:!0})});var C1=g((IQ,M1)=>{"use strict";var T1=(e,t)=>e>t?1:e<t?-1:0,vm=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),E1="eexxaacctt",Vq=/\p{P}/gu,Gq=["en",{numeric:!0,sensitivity:"base"}],Ro=(e,t,r)=>e.replace("A-Z",t).replace("a-z",r),A1={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=T1)=>{let{idx:i,chars:o,terms:a,interLft2:u,interLft1:f,start:s,intraIns:c,interIns:l,cases:d}=e;return i.map((p,h)=>h).sort((p,h)=>o[h]-o[p]||c[p]-c[h]||a[h]+u[h]+.5*f[h]-(a[p]+u[p]+.5*f[p])||l[p]-l[h]||s[p]-s[h]||d[h]-d[p]||n(t[i[p]],t[i[h]]))}},bm=(e,t)=>t==0?"":t==1?e+"??":t==1/0?e+"*?":e+`{0,${t}}?`,R1="(?:\\b|_)";function hc(e){e=Object.assign({},A1,e);let{unicode:t,interLft:r,interRgt:n,intraMode:i,intraSlice:o,intraIns:a,intraSub:u,intraTrn:f,intraDel:s,intraContr:c,intraSplit:l,interSplit:d,intraBound:p,interBound:h,intraChars:m,toUpper:v,toLower:_,compare:w}=e;a??=i,u??=i,f??=i,s??=i,w??=typeof Intl>"u"?T1:new Intl.Collator(...Gq).compare;let y=e.letters??e.alpha;if(y!=null){let N=v(y),te=_(y);d=Ro(d,N,te),l=Ro(l,N,te),h=Ro(h,N,te),p=Ro(p,N,te),m=Ro(m,N,te),c=Ro(c,N,te)}let x=t?"u":"",O='".+?"',M=new RegExp(O,"gi"+x),E=new RegExp(`(?:\\s+|^)-(?:${m}+|${O})`,"gi"+x),{intraRules:P}=e;P==null&&(P=N=>{let te=A1.intraSlice,ue=0,oe=0,Z=0,ne=0;if(/[^\d]/.test(N)){let he=N.length;he<=4?he>=3&&(Z=Math.min(f,1),he==4&&(ue=Math.min(a,1))):(te=o,ue=a,oe=u,Z=f,ne=s)}return{intraSlice:te,intraIns:ue,intraSub:oe,intraTrn:Z,intraDel:ne}});let C=!!l,R=new RegExp(l,"g"+x),L=new RegExp(d,"g"+x),z=new RegExp("^"+d+"|"+d+"$","g"+x),D=new RegExp(c,"gi"+x),A=(N,te=!1)=>{let ue=[];N=N.replace(M,Z=>(ue.push(Z),E1)),N=N.replace(z,""),te||(N=_(N)),C&&(N=N.replace(R,Z=>Z[0]+" "+Z[1]));let oe=0;return N.split(L).filter(Z=>Z!="").map(Z=>Z===E1?ue[oe++]:Z)},k=/[^\d]+|\d+/g,U=(N,te=0,ue=!1)=>{let oe=A(N);if(oe.length==0)return[];let Z=Array(oe.length).fill("");oe=oe.map((re,pe)=>re.replace(D,ve=>(Z[pe]=ve,"")));let ne;if(i==1)ne=oe.map((re,pe)=>{if(re[0]==='"')return vm(re.slice(1,-1));let ve="";for(let ie of re.matchAll(k)){let K=ie[0],{intraSlice:ae,intraIns:fe,intraSub:se,intraTrn:B,intraDel:$}=P(K);if(fe+se+B+$==0)ve+=K+Z[pe];else{let[H,le]=ae,me=K.slice(0,H),Te=K.slice(le),Le=K.slice(H,le);fe==1&&me.length==1&&me!=Le[0]&&(me+="(?!"+me+")");let Wt=Le.length,Et=[K];if(se)for(let ye=0;ye<Wt;ye++)Et.push(me+Le.slice(0,ye)+m+Le.slice(ye+1)+Te);if(B)for(let ye=0;ye<Wt-1;ye++)Le[ye]!=Le[ye+1]&&Et.push(me+Le.slice(0,ye)+Le[ye+1]+Le[ye]+Le.slice(ye+2)+Te);if($)for(let ye=0;ye<Wt;ye++)Et.push(me+Le.slice(0,ye+1)+"?"+Le.slice(ye+1)+Te);if(fe){let ye=bm(m,1);for(let bt=0;bt<Wt;bt++)Et.push(me+Le.slice(0,bt)+ye+Le.slice(bt)+Te)}ve+="(?:"+Et.join("|")+")"+Z[pe]}}return ve});else{let re=bm(m,a);te==2&&a>0&&(re=")("+re+")("),ne=oe.map((pe,ve)=>pe[0]==='"'?vm(pe.slice(1,-1)):pe.split("").map((ie,K,ae)=>(a==1&&K==0&&ae.length>1&&ie!=ae[K+1]&&(ie+="(?!"+ie+")"),ie)).join(re)+Z[ve])}let he=r==2?R1:"",J=n==2?R1:"",ce=J+bm(e.interChars,e.interIns)+he;return te>0?ue?ne=he+"("+ne.join(")"+J+"|"+he+"(")+")"+J:(ne="("+ne.join(")("+ce+")(")+")",ne="(.??"+he+")"+ne+"("+J+".*)"):(ne=ne.join(ce),ne=he+ne+J),[new RegExp(ne,"i"+x),oe,Z]},q=(N,te,ue)=>{let[oe]=U(te);if(oe==null)return null;let Z=[];if(ue!=null)for(let ne=0;ne<ue.length;ne++){let he=ue[ne];oe.test(N[he])&&Z.push(he)}else for(let ne=0;ne<N.length;ne++)oe.test(N[ne])&&Z.push(ne);return Z},T=!!p,F=new RegExp(h,x),W=new RegExp(p,x),we=(N,te,ue)=>{let[oe,Z,ne]=U(ue,1),he=A(ue,!0),[J]=U(ue,2),ce=Z.length,re=Array(ce),pe=Array(ce);for(let se=0;se<ce;se++){let B=Z[se],$=he[se],H=B[0]=='"'?B.slice(1,-1):B+ne[se],le=$[0]=='"'?$.slice(1,-1):$+ne[se];re[se]=H,pe[se]=le}let ve=N.length,ie=Array(ve).fill(0),K={idx:Array(ve),start:ie.slice(),chars:ie.slice(),cases:ie.slice(),terms:ie.slice(),interIns:ie.slice(),intraIns:ie.slice(),interLft2:ie.slice(),interRgt2:ie.slice(),interLft1:ie.slice(),interRgt1:ie.slice(),ranges:Array(ve)},ae=r==1||n==1,fe=0;for(let se=0;se<N.length;se++){let B=te[N[se]],$=B.match(oe),H=$.index+$[1].length,le=H,me=!1,Te=0,Le=0,Wt=0,Et=0,ye=0,bt=0,Qn=0,ga=0,_a=0,Ht=[];for(let Ae=0,je=2;Ae<ce;Ae++,je+=2){let vr=_($[je]),at=re[Ae],Ui=pe[Ae],At=at.length,Rt=vr.length,gt=vr==at;if($[je]==Ui&&Qn++,!gt&&$[je+1].length>=At){let Ge=_($[je+1]).indexOf(at);Ge>-1&&(Ht.push(le,Rt,Ge,At),le+=ee($,je,Ge,At),vr=at,Rt=At,gt=!0,Ae==0&&(H=le))}if(ae||gt){let Ge=le-1,Br=le+Rt,ei=!1,ya=!1;if(Ge==-1||F.test(B[Ge]))gt&&Te++,ei=!0;else{if(r==2){me=!0;break}if(T&&W.test(B[Ge]+B[Ge+1]))gt&&Le++,ei=!0;else if(r==1){let Qu=$[je+1],Wi=le+Rt;if(Qu.length>=At){let ti=0,Hi=!1,yP=new RegExp(at,"ig"+x),jb;for(;jb=yP.exec(Qu);){ti=jb.index;let Fb=Wi+ti,Dd=Fb-1;if(Dd==-1||F.test(B[Dd])){Te++,Hi=!0;break}else if(W.test(B[Dd]+B[Fb])){Le++,Hi=!0;break}}Hi&&(ei=!0,Ht.push(le,Rt,ti,At),le+=ee($,je,ti,At),vr=at,Rt=At,gt=!0,Ae==0&&(H=le))}if(!ei){me=!0;break}}}if(Br==B.length||F.test(B[Br]))gt&&Wt++,ya=!0;else{if(n==2){me=!0;break}if(T&&W.test(B[Br-1]+B[Br]))gt&&Et++,ya=!0;else if(n==1){me=!0;break}}gt&&(ye+=At,ei&&ya&&bt++)}if(Rt>At&&(_a+=Rt-At),Ae>0&&(ga+=$[je-1].length),!e.intraFilt(at,vr,le)){me=!0;break}Ae<ce-1&&(le+=Rt+$[je+1].length)}if(!me){K.idx[fe]=N[se],K.interLft2[fe]=Te,K.interLft1[fe]=Le,K.interRgt2[fe]=Wt,K.interRgt1[fe]=Et,K.chars[fe]=ye,K.terms[fe]=bt,K.cases[fe]=Qn,K.interIns[fe]=ga,K.intraIns[fe]=_a,K.start[fe]=H;let Ae=B.match(J),je=Ae.index+Ae[1].length,vr=Ht.length,at=vr>0?0:1/0,Ui=vr-4;for(let Ge=2;Ge<Ae.length;){let Br=Ae[Ge].length;if(at<=Ui&&Ht[at]==je){let ei=Ht[at+1],ya=Ht[at+2],Qu=Ht[at+3],Wi=Ge,ti="";for(let Hi=0;Hi<ei;Wi++)ti+=Ae[Wi],Hi+=Ae[Wi].length;Ae.splice(Ge,Wi-Ge,ti),je+=ee(Ae,Ge,ya,Qu),at+=4}else je+=Br,Ge++}je=Ae.index+Ae[1].length;let At=K.ranges[fe]=[],Rt=je,gt=je;for(let Ge=2;Ge<Ae.length;Ge++){let Br=Ae[Ge].length;je+=Br,Ge%2==0?gt=je:Br>0&&(At.push(Rt,gt),Rt=gt=je)}gt>Rt&&At.push(Rt,gt),fe++}}if(fe<N.length)for(let se in K)K[se]=K[se].slice(0,fe);return K},ee=(N,te,ue,oe)=>{let Z=N[te]+N[te+1].slice(0,ue);return N[te-1]+=Z,N[te]=N[te+1].slice(ue,ue+oe),N[te+1]=N[te+1].slice(ue+oe),Z.length},G=5,Se=(N,te,ue,oe=1e3,Z)=>{ue=ue?ue===!0?G:ue:0;let ne=null,he=null,J=[];te=te.replace(E,K=>{let ae=K.trim().slice(1);return ae=ae[0]==='"'?vm(ae.slice(1,-1)):ae.replace(Vq,""),ae!=""&&J.push(ae),""});let ce=A(te),re;if(J.length>0){if(re=new RegExp(J.join("|"),"i"+x),ce.length==0){let K=[];for(let ae=0;ae<N.length;ae++)re.test(N[ae])||K.push(ae);return[K,null,null]}}else if(ce.length==0)return[null,null,null];if(ue>0){let K=A(te);if(K.length>1){let ae=K.slice().sort((se,B)=>B.length-se.length);for(let se=0;se<ae.length;se++){if(Z?.length==0)return[[],null,null];Z=q(N,ae[se],Z)}if(K.length>ue)return[Z,null,null];ne=P1(K).map(se=>se.join(" ")),he=[];let fe=new Set;for(let se=0;se<ne.length;se++)if(fe.size<Z.length){let B=Z.filter(H=>!fe.has(H)),$=q(N,ne[se],B);for(let H=0;H<$.length;H++)fe.add($[H]);he.push($)}else he.push([])}}ne==null&&(ne=[te],he=[Z?.length>0?Z:q(N,te)]);let pe=null,ve=null;if(J.length>0&&(he=he.map(K=>K.filter(ae=>!re.test(N[ae])))),he.reduce((K,ae)=>K+ae.length,0)<=oe){pe={},ve=[];for(let K=0;K<he.length;K++){let ae=he[K];if(ae==null||ae.length==0)continue;let fe=ne[K],se=we(ae,N,fe),B=e.sort(se,N,fe,w);if(K>0)for(let $=0;$<B.length;$++)B[$]+=ve.length;for(let $ in se)pe[$]=(pe[$]??[]).concat(se[$]);ve=ve.concat(B)}}return[[].concat(...he),pe,ve]};return{search:(...N)=>Se(...N),split:A,filter:q,info:we,sort:e.sort}}var $q=(()=>{let e={A:"\xC1\xC0\xC3\xC2\xC4\u0104\u0102\xC5",a:"\xE1\xE0\xE3\xE2\xE4\u0105\u0103\xE5",E:"\xC9\xC8\xCA\xCB\u0116\u011A",e:"\xE9\xE8\xEA\xEB\u0119\u011B",I:"\xCD\xCC\xCE\xCF\u012E\u0130",i:"\xED\xEC\xEE\xEF\u012F\u0131",O:"\xD3\xD2\xD4\xD5\xD6",o:"\xF3\xF2\xF4\xF5\xF6",U:"\xDA\xD9\xDB\xDC\u016A\u0172\u016E\u0170",u:"\xFA\xF9\xFB\xFC\u016B\u0173\u016F\u0171",C:"\xC7\u010C\u0106",c:"\xE7\u010D\u0107",D:"\u010E",d:"\u010F",G:"\u011E",g:"\u011F",L:"\u0141",l:"\u0142",N:"\xD1\u0143\u0147",n:"\xF1\u0144\u0148",S:"\u0160\u015A\u0218\u015E",s:"\u0161\u015B\u0219\u015F",T:"\u0162\u021A\u0164",t:"\u0163\u021B\u0165",Y:"\xDD",y:"\xFD",Z:"\u017B\u0179\u017D",z:"\u017C\u017A\u017E"},t={},r="";for(let o in e)e[o].split("").forEach(a=>{r+=a,t[a]=o});let n=new RegExp(`[${r}]`,"g"),i=o=>t[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 P1(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 Zq=(e,t)=>t?`<mark>${e}</mark>`:e,Kq=(e,t)=>e+t;function Yq(e,t,r=Zq,n="",i=Kq){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}hc.latinize=$q;hc.permute=e=>P1([...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]));hc.highlight=Yq;M1.exports=hc});var Sn=g((kQ,uu)=>{function Xq(e){return e&&e.__esModule?e:{default:e}}uu.exports=Xq,uu.exports.__esModule=!0,uu.exports.default=uu.exports});var _m=g((qQ,Kr)=>{function gm(e){"@babel/helpers - typeof";return Kr.exports=gm=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},Kr.exports.__esModule=!0,Kr.exports.default=Kr.exports,gm(e)}Kr.exports=gm,Kr.exports.__esModule=!0,Kr.exports.default=Kr.exports});var k1=g((jQ,su)=>{var I1=_m().default;function Jq(e,t){if(I1(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(I1(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}su.exports=Jq,su.exports.__esModule=!0,su.exports.default=su.exports});var ym=g((FQ,cu)=>{var Qq=_m().default,ej=k1();function tj(e){var t=ej(e,"string");return Qq(t)=="symbol"?t:t+""}cu.exports=tj,cu.exports.__esModule=!0,cu.exports.default=cu.exports});var q1=g((LQ,lu)=>{var rj=ym();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}lu.exports=nj,lu.exports.__esModule=!0,lu.exports.default=lu.exports});var Ai=g((NQ,fu)=>{function ij(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}fu.exports=ij,fu.exports.__esModule=!0,fu.exports.default=fu.exports});var Ri=g((DQ,du)=>{var oj=ym();function j1(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&&j1(e.prototype,t),r&&j1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}du.exports=aj,du.exports.__esModule=!0,du.exports.default=du.exports});var wm=g((BQ,pu)=>{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}pu.exports=uj,pu.exports.__esModule=!0,pu.exports.default=pu.exports});var F1=g((zQ,hu)=>{var sj=wm();function cj(e){if(Array.isArray(e))return sj(e)}hu.exports=cj,hu.exports.__esModule=!0,hu.exports.default=hu.exports});var L1=g((UQ,mu)=>{function lj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}mu.exports=lj,mu.exports.__esModule=!0,mu.exports.default=mu.exports});var D1=g((WQ,vu)=>{var N1=wm();function fj(e,t){if(e){if(typeof e=="string")return N1(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)?N1(e,t):void 0}}vu.exports=fj,vu.exports.__esModule=!0,vu.exports.default=vu.exports});var B1=g((HQ,bu)=>{function dj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}bu.exports=dj,bu.exports.__esModule=!0,bu.exports.default=bu.exports});var z1=g((VQ,gu)=>{var pj=F1(),hj=L1(),mj=D1(),vj=B1();function bj(e){return pj(e)||hj(e)||mj(e)||vj()}gu.exports=bj,gu.exports.__esModule=!0,gu.exports.default=gu.exports});var U1=g(Ir=>{"use strict";var gj=Sn(),_j=gj(z1()),yj={functions:"Jexl Function",transforms:"Transform"};Ir.ArrayLiteral=function(e){return this.evalArray(e.value)};Ir.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])})};Ir.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)})};Ir.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)})};Ir.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]};Ir.Literal=function(e){return e.value};Ir.ObjectLiteral=function(e){return this.evalMap(e.value)};Ir.FunctionCall=function(e){var t=yj[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,_j.default)(i))})};Ir.UnaryExpression=function(e){var t=this;return this.eval(e.right).then(function(r){return t._grammar.elements[e.operator].eval(r)})}});var V1=g(($Q,H1)=>{"use strict";var W1=Sn(),wj=W1(Ai()),xj=W1(Ri()),Sj=U1(),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(f,s){o[i[s]]=f}),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(f,s){f&&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})();H1.exports=Oj});var K1=g((ZQ,Z1)=>{"use strict";var $1=Sn(),Ej=$1(Ai()),Aj=$1(Ri()),Rj=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/,G1=/^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/,Tj=/\\\\/,Pj=/^\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]+)"],Ij=["binaryOp","unaryOp","openParen","openBracket","question","colon"],kj=(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(Rj))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(G1))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(G1)&&(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?Ij.some(function(n){return n===r[r.length-1].type}):!0}},{key:"_isWhitespace",value:function(r){return!!r.match(Pj)}},{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})();Z1.exports=kj});var xm=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 X1=g(Y1=>{"use strict";var kt=xm();Y1.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 eS=g((XQ,Q1)=>{"use strict";var J1=Sn(),qj=J1(Ai()),jj=J1(Ri()),Fj=xm(),mc=X1().states,Lj=(function(){function e(t,r,n){(0,qj.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=mc[this._state],i=this._exprStr;if(this._exprStr+=r.raw,n.subHandler){this._subParser||this._startSubExpression(i);var o=this._subParser.addToken(r);if(o){if(this._endSubExpression(),this._parentStop)return o;this._state=o}}else if(n.tokenTypes[r.type]){var a=n.tokenTypes[r.type],u=Fj[r.type];a.handler&&(u=a.handler),u&&u.call(this,r),a.toState&&(this._state=a.toState)}else{if(this._stopMap[r.type])return this._stopMap[r.type];throw new Error("Token ".concat(r.raw," (").concat(r.type,") unexpected in expression: ").concat(this._exprStr))}return!1}},{key:"addTokens",value:function(r){r.forEach(this.addToken,this)}},{key:"complete",value:function(){if(this._cursor&&!mc[this._state].completable)throw new Error("Unexpected end of expression: ".concat(this._exprStr));return this._subParser&&this._endSubExpression(),this._state="complete",this._cursor?this._tree:null}},{key:"isRelative",value:function(){return this._relative}},{key:"_endSubExpression",value:function(){mc[this._state].subHandler.call(this,this._subParser.complete()),this._subParser=null}},{key:"_placeAtCursor",value:function(r){this._cursor?(this._cursor.right=r,this._setParent(r,this._cursor)):this._tree=r,this._cursor=r}},{key:"_placeBeforeCursor",value:function(r){this._cursor=this._cursor._parent,this._placeAtCursor(r)}},{key:"_setParent",value:function(r,n){Object.defineProperty(r,"_parent",{value:n,writable:!0})}},{key:"_startSubExpression",value:function(r){var n=mc[this._state].endStates;n||(this._parentStop=!0,n=this._stopMap),this._subParser=new e(this._grammar,r,n)}}]),e})();Q1.exports=Lj});var nS=g((JQ,rS)=>{"use strict";var tS=Sn(),Nj=tS(Ai()),Dj=tS(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)})};rS.exports=On});var aS=g((QQ,oS)=>{"use strict";var iS=Sn(),Bj=iS(Ai()),zj=iS(Ri()),Uj=V1(),Wj=K1(),Hj=eS(),Vj=nS(),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 Hj(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,Vj);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})();oS.exports=Gj});var sS=g(uS=>{"use strict";uS.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 lS=g((tee,Om)=>{"use strict";var Sm=Sn(),$j=Sm(q1()),Zj=Sm(Ai()),Kj=Sm(Ri()),Yj=aS(),Xj=sS(),Jj=Xj.getGrammar,cS=(function(){function e(){(0,Zj.default)(this,e),this.expr=this.expr.bind(this),this._grammar=Jj()}return(0,Kj.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,f,s){var c=s<i.length?i[s]:"";return u+=f+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})();Om.exports=new cS;Om.exports.Jexl=cS});var fS=g(_u=>{"use strict";var Qj=_u&&_u.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_u,"__esModule",{value:!0});_u.default=t2;var e2=Qj(lS());function t2(){let e=new e2.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("join",(t,...r)=>[...r].filter(n=>!!n).join(t)),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 Am=g(yu=>{"use strict";var r2=yu&&yu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yu,"__esModule",{value:!0});yu.stringToJexlExpression=i2;var n2=r2(fS()),Em={};function i2(e,t){let r=`nosig|${e}`;if(!Em[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,n2.default)().compile(i);Em[r]=o}return Em[r]}});var dS=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 o2=e=>crypto.getRandomValues(new Uint8Array(e));qt.random=o2;var a2=(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),f=i;for(;f--;)if(a+=e[u[f]&n]||"",a.length===o)return a}}};qt.customRandom=a2;var u2=(e,t=21)=>(0,qt.customRandom)(e,t,qt.random);qt.customAlphabet=u2;var s2=(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=s2});var Rm=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=mt(),c2=dS();We.ElementId=Ee.types.optional(Ee.types.identifier,()=>(0,c2.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 vS=g(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.default=b2;var Be=mt(),l2=wu(),f2=Am(),d2=Rm();function p2(){return!0}var h2={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,p2),integer:Be.types.integer,number:Be.types.number,string:Be.types.string,text:Be.types.string,fileLocation:d2.FileLocation,frozen:Be.types.frozen()},pS={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},Tm=e=>({views:{get valueJSON(){return e.value}}}),hS=e=>({views:{get valueJSON(){return JSON.stringify(e.value)}}}),mS={fileLocation:hS,number:Tm,integer:Tm,boolean:Tm,frozen:hS,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)}}})},m2=Be.types.refinement("JexlString",Be.types.string,e=>e.startsWith("jexl:"));function v2(e){return e?.toJSON?e.toJSON():`"${e}"`}function b2(e,{description:t="",model:r,type:n,defaultValue:i,contextVariable:o=[]}){if(!n)throw new Error("type name required");if(r||(r=h2[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(m2,r),i)}).volatile(()=>({contextVariable:o})).views(c=>({get isCallback(){return String(c.value).startsWith("jexl:")}})).views(c=>({get expr(){if(c.isCallback){let{pluginManager:l}=(0,l2.getEnv)(c);return!l&&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,f2.stringToJexlExpression)(String(c.value),l?.jexl)}return{evalSync:()=>c.value}},get valueJSON(){if(!c.isCallback)return v2(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(l){c.value=l},reset(){c.value=i},convertToCallback(){c.isCallback||(c.value=`jexl:${c.valueJSON||"''"}`)},convertToValue(){if(c.isCallback){try{let l=c.expr.evalSync();if(l!==void 0){c.value=l;return}}catch{}if(c.value=i,!(n in pS))throw new Error(`no fallbackDefault defined for type ${n}`);c.value=pS[n]}}}));mS[n]&&(u=u.extend(mS[n]));let s=Be.types.optional(u,{name:e,type:n,description:t,value:i});return Object.defineProperty(s,"isJBrowseConfigurationSlot",{value:!0}),s}});var gS=g(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.getSubType=Mm;An.getUnionSubTypes=bS;An.getPropertyType=g2;An.getDefaultValue=_2;An.getEnumerationValues=y2;An.resolveLateType=w2;var En=mt();function Mm(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 bS(e){if(!(0,En.isUnionType)(e))throw new TypeError("not an MST union type");let t=e._types||e.types||Mm(e)._types||Mm(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}function g2(e,t){return e.properties[t]}function _2(e){if(!(0,En.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue}function y2(e){return bS(e).map(r=>r.value)}function w2(e){return!(0,En.isUnionType)(e)&&!(0,En.isArrayType)(e)&&(0,En.isLateType)(e)?e.getSubType():e}});var Cm=g(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.readConfObject=vc;Yr.getConf=x2;Yr.getTypeNamesFromExplicitlyTypedUnion=_S;Yr.isBareConfigurationSchemaType=yS;Yr.isConfigurationSchemaType=To;Yr.isConfigurationModel=wS;Yr.isConfigurationSlotType=S2;var Ze=mt(),Rn=gS();function vc(e,t,r={}){if(t){if(typeof t=="string"){let n=e[t];if(!n&&(0,Ze.isStateTreeNode)(e)&&(0,Ze.isMapType)((0,Ze.getType)(e))&&(n=e.get(t)),n){let i=n.expr?n.expr.evalSync(r):n;return(0,Ze.isStateTreeNode)(i)?JSON.parse(JSON.stringify((0,Ze.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,Ze.isStateTreeNode)(e)&&(0,Ze.isMapType)((0,Ze.getType)(e))&&(o=e.get(n)),o?vc(o,i,r):void 0}return vc(e,n,r)}}else return structuredClone((0,Ze.getSnapshot)(e));throw new TypeError("slotPath must be a string or array")}function x2(e,t,r){let{configuration:n}=e;if(wS(n))return vc(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")}function _S(e){if((0,Ze.isType)(e)&&(e=(0,Rn.resolveLateType)(e),(0,Ze.isUnionType)(e))){let t=[];for(let r of(0,Rn.getUnionSubTypes)(e)){r=(0,Rn.resolveLateType)(r);let n=_S(r);if(n.length||(n=[(0,Rn.getDefaultValue)(r).type]),!n[0])throw new Error(`invalid config schema type ${r}`);t.push(...n)}return t}return[]}function yS(e){return!!((0,Ze.isType)(e)&&((0,Ze.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema"))||(0,Ze.isLateType)(e)))}function To(e){return(0,Ze.isType)(e)?yS(e)?!0:(0,Ze.isUnionType)(e)?(0,Rn.getUnionSubTypes)(e).every(t=>To(t)||t.name==="undefined"):(0,Ze.isOptionalType)(e)&&To((0,Rn.getSubType)(e))||(0,Ze.isArrayType)(e)&&To((0,Rn.getSubType)(e))?!0:!!((0,Ze.isMapType)(e)&&To((0,Rn.getSubType)(e))):!1}function wS(e){return(0,Ze.isStateTreeNode)(e)&&To((0,Ze.getType)(e))}function S2(e){return typeof e=="object"&&e!==null&&"isJBrowseConfigurationSlot"in e}});var OS=g(Po=>{"use strict";var O2=Po&&Po.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Po,"__esModule",{value:!0});Po.ConfigurationSchema=M2;Po.ConfigurationReference=C2;var Jt=mt(),E2=O2(vS()),xS=Cm(),SS=Rm();function A2(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null&&Object.keys(e).length===0}function R2(e){return Array.isArray(e)&&e.length===0}function T2(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,baseConfiguration:void 0}),{schemaDefinition:i,options:o}}function P2(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]=SS.ElementId,i=r.implicitIdentifier):(n.id=SS.ElementId,i="id"));let o={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};for(let[c,l]of Object.entries(t))if((0,Jt.isType)(l)&&(0,Jt.isLateType)(l)||(0,xS.isConfigurationSchemaType)(l))n[c]=l;else if(typeof l=="string"||typeof l=="number")o[c]=l;else if(typeof l=="object"){if(!l.type)throw new Error(`no type set for config slot ${e}.${c}`);try{n[c]=(0,E2.default)(c,l)}catch(d){throw new Error(`invalid config slot definition for ${e}.${c}: ${d}`)}}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(l,d){if(!(0,xS.isConfigurationSchemaType)(n[l]))throw new Error(`${l} is not a subschema, cannot replace`);let p=(0,Jt.isStateTreeNode)(d)?d:n[l].create(d);return c[l]=p,p}}));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"}:{},f=r.explicitlyTyped?{type:e,...u}:u,s=(0,Jt.getSnapshot)(a.create(f));return a=a.postProcessSnapshot(c=>{let l={},d=!0;for(let[p,h]of Object.entries(c))d&&(typeof s[p]=="object"&&typeof h=="object"?JSON.stringify(s[p])!==JSON.stringify(h)&&(d=!1):s[p]!==h&&(d=!1)),h!==void 0&&o[p]===void 0&&!A2(h)&&!R2(h)&&(l[p]=h);return d?{}:l}),r.preProcessSnapshot&&(a=a.preProcessSnapshot(r.preProcessSnapshot)),Jt.types.optional(a,f)}function M2(e,t,r){let{schemaDefinition:n,options:i}=T2(e,t,r),o=P2(e,n,i);return o.isJBrowseConfigurationSchema=!0,o.jbrowseSchemaDefinition=n,o.jbrowseSchemaOptions=i,o}function C2(e){return Jt.types.union(Jt.types.reference(e),e)}});var Im=g(lr=>{"use strict";var I2=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]})),k2=lr&&lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&I2(t,e,r)};Object.defineProperty(lr,"__esModule",{value:!0});lr.ConfigurationSchema=lr.ConfigurationReference=void 0;var ES=OS();Object.defineProperty(lr,"ConfigurationReference",{enumerable:!0,get:function(){return ES.ConfigurationReference}});Object.defineProperty(lr,"ConfigurationSchema",{enumerable:!0,get:function(){return ES.ConfigurationSchema}});k2(Cm(),lr)});var AS=g(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});var km=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()])}};qm.default=km});var TS=g(xu=>{"use strict";var RS=xu&&xu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xu,"__esModule",{value:!0});var q2=RS(C1()),jm=Im(),j2=RS(AS()),Fm=class{constructor(t){this.pluginManager=t,this.adapterCache=new j2.default({maxSize:15})}loadTextSearchAdapters(t){return Promise.all(this.relevantAdapters(t).map(async r=>{let n=(0,jm.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,jm.readConfObject)(n,"assemblyNames"))===null||i===void 0?void 0:i.includes(t)})}getTrackAdaptersWithAssembly(t,r){return r.filter(n=>{var i;return(i=(0,jm.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 q2.default({}),o=t.map(s=>s.getDisplayString()),a=n.queryString,u=i.filter(o,a),f=[];if(u!=null&&u.length>0){let s=i.info(u,o,a),c=i.sort(s,o,a);for(let l of c)f.push(t[s.idx[l]])}return r(f)}};xu.default=Fm});var bc=g(_e=>{"use strict";var F2=_e&&_e.__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]})),L2=_e&&_e.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&F2(t,e,r)},N2=_e&&_e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_e,"__esModule",{value:!0});_e.TextSearchManager=_e.RetryError=_e.AuthNeededError=void 0;_e.isViewContainer=B2;_e.isSessionModel=Tn;_e.isSessionModelWithConfigEditing=z2;_e.isSessionWithAddTracks=U2;_e.isSessionWithShareURL=W2;_e.isSessionModelWithWidgets=H2;_e.isSessionModelWithConnections=V2;_e.isSessionModelWithConnectionEditing=G2;_e.isSessionWithSessionPlugins=$2;_e.isSelectionContainer=Z2;_e.isViewModel=K2;_e.isTrackModel=Y2;_e.isDisplayModel=X2;_e.isTrackViewModel=J2;_e.isAppRootModel=Q2;_e.isRootModelWithInternetAccounts=eF;_e.isAbstractMenuManager=tF;_e.isUriLocation=rF;_e.isLocalPathLocation=nF;_e.isBlobLocation=iF;_e.isAuthNeededException=oF;_e.isRetryException=aF;var D2=mt();L2(O1(),_e);function B2(e){return(0,D2.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 z2(e){return Tn(e)&&"editConfiguration"in e}function U2(e){return Tn(e)&&"addTrackConf"in e&&!e.disableAddTracks}function W2(e){return Tn(e)&&"shareURL"in e&&!!e.shareURL}function H2(e){return Tn(e)&&"widgets"in e}function V2(e){return Tn(e)&&"makeConnection"in e}function G2(e){return Tn(e)&&"addConnectionConf"in e}function $2(e){return Tn(e)&&"sessionPlugins"in e}function Z2(e){return typeof e=="object"&&e!==null&&"selection"in e&&"setSelection"in e}function K2(e){return typeof e=="object"&&e!==null&&"width"in e&&"setWidth"in e}function Y2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.trackId}function X2(e){return typeof e=="object"&&e!==null&&"configuration"in e&&e.configuration.displayId}function J2(e){return typeof e=="object"&&e!==null&&"showTrack"in e&&"hideTrack"in e}function Q2(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 Lm=class e extends Error{constructor(t,r){super(t),this.message=t,this.url=r,this.name="AuthNeededError",Object.setPrototypeOf(this,e.prototype)}};_e.AuthNeededError=Lm;var Nm=class extends Error{constructor(t,r){super(t),this.message=t,this.internetAccountId=r,this.name="RetryError"}};_e.RetryError=Nm;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=TS();Object.defineProperty(_e,"TextSearchManager",{enumerable:!0,get:function(){return N2(uF).default}})});var PS=g(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.when=void 0;var sF=Na();Object.defineProperty(gc,"when",{enumerable:!0,get:function(){return sF.when}})});var MS=g(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.intersection2=cF;Su.doesIntersect2=lF;Su.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 CS=g(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.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 Wm=g((bee,jS)=>{"use strict";var _c={},xc={},Ou={METHOD:"method",PROPERTY:"property"},yc=class{constructor(t,r){this.inst=t,this.args=r}},Bm=class extends yc{constructor(t,r){super(t,r),this.type=Ou.METHOD}execute(t){t[this.inst](...this.args)}},zm=class extends yc{constructor(t,r){super(t,r),this.type=Ou.PROPERTY}execute(t){t[this.inst]=this.args[0]}},pF={[Ou.METHOD]:Bm,[Ou.PROPERTY]:zm},wc=class{constructor(t,r,n){return new pF[t](r,n)}};Object.entries(Ou).forEach(([e,t])=>{Object.defineProperty(wc,e,{value:t,configurable:!1,enumerable:!0,writable:!1})});xc=wc;var kS=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")}),Eu=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 xc(t,r,n))}execute(t){t.save(),this[kr.sequence].forEach(r=>r.execute(t)),t.restore()}toJSON(){return{sequence:this[kr.sequence]}}};kS.METHODS.forEach(e=>{Object.defineProperty(Eu.prototype,e,{value:function(...r){this[kr.push](xc.METHOD,e,r)},writable:!1,enumerable:!0,configurable:!1})});kS.PROPERTIES.forEach(e=>{Object.defineProperty(Eu.prototype,e,{get(){throw`Invalid canvas sequencer interaction, cannot get ${e}.`},set(t){this[kr.push](xc.PROPERTY,e,[t])},enumerable:!0,configurable:!1})});_c=Eu;var qS={},IS=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 Um=class extends _c{build(t={}){let r=new _c;return this[IS.sequence].forEach(({type:n,inst:i,args:o})=>{let a=o.map(u=>typeof u=="string"?hF(u,t):u);r[IS.push](n,i,a)}),r}execute(){throw new TypeError("Cannot execute a blueprint.")}};qS=Um;jS.exports={CanvasSequence:_c,CanvasBlueprint:qS}});var LS=g((gee,FS)=>{FS.exports=!1});var Hm=g(vt=>{"use strict";var mF=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.ImageBitmapType=vt.createImageBitmap=vt.createCanvas=void 0;vt.drawImageOntoCanvasContext=bF;var DS=Wm(),vF=mF(LS());function bF(e,t){e.serializedCommands?new DS.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)}var NS={realOffscreenCanvas:typeof OffscreenCanvas=="function",node:vF.default};NS.realOffscreenCanvas?(vt.createCanvas=(e,t)=>new OffscreenCanvas(e,t),vt.createImageBitmap=window.createImageBitmap||self.createImageBitmap,vt.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):NS.node?(vt.createCanvas=(...e)=>nodeCreateCanvas(...e),vt.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})}):(vt.createCanvas=(e,t)=>{let r=new DS.CanvasSequence;return{width:e,height:t,getContext(){return r}}},vt.createImageBitmap=async e=>{let t=e.getContext("2d");return{height:e.height,width:e.width,serializedCommands:t.toJSON(),containsNoTransferables:!0}},vt.ImageBitmapType=String)});var Gm=g(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.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 BS=g((wee,Sc)=>{(function(){"use strict";var e,t,r,n,i;function o(l,d){var p=Object.keys(d),h;for(h=0;h<p.length;h++)l=l.replace(new RegExp("\\{"+p[h]+"\\}","gi"),d[p[h]]);return l}function a(l){var d,p,h;if(!l)throw new Error("cannot create a random attribute name for an undefined object");d="ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",p="";do for(p="",h=0;h<12;h++)p+=d[Math.floor(Math.random()*d.length)];while(l[p]);return p}function u(l,d){var p,h,m={},v,_;for(l=l.split(","),d=d||10,p=0;p<l.length;p+=2)h="&"+l[p+1]+";",v=parseInt(l[p],d),m[h]="&#"+v+";";return m["\\xa0"]=" ",m}function f(l){var d={left:"start",right:"end",center:"middle",start:"start",end:"end"};return d[l]||d.start}function s(l){var d={alphabetic:"alphabetic",hanging:"hanging",top:"text-before-edge",bottom:"text-after-edge",middle:"central"};return d[l]||d.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(l,d){this.__root=l,this.__ctx=d},r.prototype.addColorStop=function(l,d){var p=this.__ctx.__createElement("stop"),h,m;p.setAttribute("offset",l),d.indexOf("rgba")!==-1?(h=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,m=h.exec(d),p.setAttribute("stop-color",o("rgb({r},{g},{b})",{r:m[1],g:m[2],b:m[3]})),p.setAttribute("stop-opacity",m[4])):p.setAttribute("stop-color",d),this.__root.appendChild(p)},n=function(l,d){this.__root=l,this.__ctx=d},t=function(l){var d={width:500,height:500,enableMirroring:!1},p;if(arguments.length>1?(p=d,p.width=arguments[0],p.height=arguments[1]):l?p=l:p=d,!(this instanceof t))return new t(p);this.width=p.width||d.width,this.height=p.height||d.height,this.enableMirroring=p.enableMirroring!==void 0?p.enableMirroring:d.enableMirroring,this.canvas=this,this.__document=p.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(l,d,p){typeof d>"u"&&(d={});var h=this.__document.createElementNS("http://www.w3.org/2000/svg",l),m=Object.keys(d),v,_;for(p&&(h.setAttribute("fill","none"),h.setAttribute("stroke","none")),v=0;v<m.length;v++)_=m[v],h.setAttribute(_,d[_]);return h},t.prototype.__setDefaultStyles=function(){var l=Object.keys(e),d,p;for(d=0;d<l.length;d++)p=l[d],this[p]=e[p].canvas},t.prototype.__applyStyleState=function(l){var d=Object.keys(l),p,h;for(p=0;p<d.length;p++)h=d[p],this[h]=l[h]},t.prototype.__getStyleState=function(){var l,d={},p=Object.keys(e),h;for(l=0;l<p.length;l++)h=p[l],d[h]=this[h];return d},t.prototype.__applyStyleToCurrentElement=function(l){var d=Object.keys(e),p,h,m,v,_,w;for(p=0;p<d.length;p++)if(h=e[d[p]],m=this[d[p]],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(l)!==-1&&h.svg!==m&&((h.svgAttr==="stroke"||h.svgAttr==="fill")&&m.indexOf("rgba")!==-1?(_=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi,w=_.exec(m),this.__currentElement.setAttribute(h.svgAttr,o("rgb({r},{g},{b})",{r:w[1],g:w[2],b:w[3]})),this.__currentElement.setAttribute(h.svgAttr+"-opacity",w[4])):this.__currentElement.setAttribute(h.svgAttr,m))},t.prototype.__closestGroupOrSvg=function(l){return l=l||this.__currentElement,l.nodeName==="g"||l.nodeName==="svg"?l:this.__closestGroupOrSvg(l.parentNode)},t.prototype.getSerializedSvg=function(l){var d=new XMLSerializer().serializeToString(this.__root),p,h,m,v,_,w;if(w=/xmlns="http:\/\/www\.w3\.org\/2000\/svg".+xmlns="http:\/\/www\.w3\.org\/2000\/svg/gi,w.test(d)&&(d=d.replace('xmlns="http://www.w3.org/2000/svg','xmlns:xlink="http://www.w3.org/1999/xlink')),l)for(p=Object.keys(i),h=0;h<p.length;h++)m=p[h],v=i[m],_=new RegExp(m,"gi"),_.test(d)&&(d=d.replace(_,v));return d},t.prototype.getSvg=function(){return this.__root},t.prototype.save=function(){var l=this.__createElement("g"),d=this.__closestGroupOrSvg();this.__groupStack.push(d),d.appendChild(l),this.__currentElement=l,this.__stack.push(this.__getStyleState())},t.prototype.restore=function(){this.__currentElement=this.__groupStack.pop();var l=this.__stack.pop();this.__applyStyleState(l)},t.prototype.__addTransform=function(l){var d=this.__closestGroupOrSvg();if(d.childNodes.length>0){var p=this.__createElement("g");d.appendChild(p),this.__currentElement=p}var h=this.__currentElement.getAttribute("transform");h?h+=" ":h="",h+=l,this.__currentElement.setAttribute("transform",h)},t.prototype.scale=function(l,d){d===void 0&&(d=l),this.__addTransform(o("scale({x},{y})",{x:l,y:d}))},t.prototype.rotate=function(l){var d=l*180/Math.PI;this.__addTransform(o("rotate({angle},{cx},{cy})",{angle:d,cx:0,cy:0}))},t.prototype.translate=function(l,d){this.__addTransform(o("translate({x},{y})",{x:l,y:d}))},t.prototype.transform=function(l,d,p,h,m,v){this.__addTransform(o("matrix({a},{b},{c},{d},{e},{f})",{a:l,b:d,c:p,d:h,e:m,f:v}))},t.prototype.beginPath=function(){var l,d;this.__currentDefaultPath="",this.__currentPosition={},l=this.__createElement("path",{},!0),d=this.__closestGroupOrSvg(),d.appendChild(l),this.__currentElement=l},t.prototype.__applyCurrentDefaultPath=function(){if(this.__currentElement.nodeName==="path"){var l=this.__currentDefaultPath;this.__currentElement.setAttribute("d",l)}else throw new Error("Attempted to apply path command to node "+this.__currentElement.nodeName)},t.prototype.__addPathCommand=function(l){this.__currentDefaultPath+=" ",this.__currentDefaultPath+=l},t.prototype.moveTo=function(l,d){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.__currentPosition={x:l,y:d},this.__addPathCommand(o("M {x} {y}",{x:l,y:d}))},t.prototype.closePath=function(){this.__addPathCommand("Z")},t.prototype.lineTo=function(l,d){this.__currentPosition={x:l,y:d},this.__currentDefaultPath.indexOf("M")>-1?this.__addPathCommand(o("L {x} {y}",{x:l,y:d})):this.__addPathCommand(o("M {x} {y}",{x:l,y:d}))},t.prototype.bezierCurveTo=function(l,d,p,h,m,v){this.__currentPosition={x:m,y:v},this.__addPathCommand(o("C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}",{cp1x:l,cp1y:d,cp2x:p,cp2y:h,x:m,y:v}))},t.prototype.quadraticCurveTo=function(l,d,p,h){this.__currentPosition={x:p,y:h},this.__addPathCommand(o("Q {cpx} {cpy} {x} {y}",{cpx:l,cpy:d,x:p,y:h}))};var c=function(l){var d=Math.sqrt(l[0]*l[0]+l[1]*l[1]);return[l[0]/d,l[1]/d]};t.prototype.arcTo=function(l,d,p,h,m){var v=this.__currentPosition&&this.__currentPosition.x,_=this.__currentPosition&&this.__currentPosition.y;if(!(typeof v>"u"||typeof _>"u")){if(m<0)throw new Error("IndexSizeError: The radius provided ("+m+") is negative.");if(v===l&&_===d||l===p&&d===h||m===0){this.lineTo(l,d);return}var w=c([v-l,_-d]),y=c([p-l,h-d]);if(w[0]*y[1]===w[1]*y[0]){this.lineTo(l,d);return}var x=w[0]*y[0]+w[1]*y[1],O=Math.acos(Math.abs(x)),M=c([w[0]+y[0],w[1]+y[1]]),E=m/Math.sin(O/2),P=l+E*M[0],C=d+E*M[1],R=[-w[1],w[0]],L=[y[1],-y[0]],z=function(k){var U=k[0],q=k[1];return q>=0?Math.acos(U):-Math.acos(U)},D=z(R),A=z(L);this.lineTo(P+R[0]*m,C+R[1]*m),this.arc(P,C,m,D,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(l,d,p,h){this.__currentElement.nodeName!=="path"&&this.beginPath(),this.moveTo(l,d),this.lineTo(l+p,d),this.lineTo(l+p,d+h),this.lineTo(l,d+h),this.lineTo(l,d),this.closePath()},t.prototype.fillRect=function(l,d,p,h){var m,v;m=this.__createElement("rect",{x:l,y:d,width:p,height:h},!0),v=this.__closestGroupOrSvg(),v.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("fill")},t.prototype.strokeRect=function(l,d,p,h){var m,v;m=this.__createElement("rect",{x:l,y:d,width:p,height:h},!0),v=this.__closestGroupOrSvg(),v.appendChild(m),this.__currentElement=m,this.__applyStyleToCurrentElement("stroke")},t.prototype.clearRect=function(l,d,p,h){var m,v=this.__closestGroupOrSvg();m=this.__createElement("rect",{x:l,y:d,width:p,height:h,fill:"#FFFFFF"},!0),v.appendChild(m)},t.prototype.createLinearGradient=function(l,d,p,h){var m=this.__createElement("linearGradient",{id:a(this.__ids),x1:l+"px",x2:p+"px",y1:d+"px",y2:h+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(m),new r(m,this)},t.prototype.createRadialGradient=function(l,d,p,h,m,v){var _=this.__createElement("radialGradient",{id:a(this.__ids),cx:h+"px",cy:m+"px",r:v+"px",fx:l+"px",fy:d+"px",gradientUnits:"userSpaceOnUse"},!1);return this.__defs.appendChild(_),new r(_,this)},t.prototype.__parseFont=function(){var l=/^\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,d=l.exec(this.font),p={style:d[1]||"normal",size:d[4]||"10px",family:d[6]||"sans-serif",weight:d[3]||"normal",decoration:d[2]||"normal",href:null};return this.__fontUnderline==="underline"&&(p.decoration="underline"),this.__fontHref&&(p.href=this.__fontHref),p},t.prototype.__wrapTextLink=function(l,d){if(l.href){var p=this.__createElement("a");return p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l.href),p.appendChild(d),p}return d},t.prototype.__applyText=function(l,d,p,h){var m=this.__parseFont(),v=this.__closestGroupOrSvg(),_=this.__createElement("text",{"font-family":m.family,"font-size":m.size,"font-style":m.style,"font-weight":m.weight,"text-decoration":m.decoration,x:d,y:p,"text-anchor":f(this.textAlign),"dominant-baseline":s(this.textBaseline)},!0);_.appendChild(this.__document.createTextNode(l)),this.__currentElement=_,this.__applyStyleToCurrentElement(h),v.appendChild(this.__wrapTextLink(m,_))},t.prototype.fillText=function(l,d,p){this.__applyText(l,d,p,"fill")},t.prototype.strokeText=function(l,d,p){this.__applyText(l,d,p,"stroke")},t.prototype.measureText=function(l){return this.__ctx.font=this.font,this.__ctx.measureText(l)},t.prototype.arc=function(l,d,p,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 _=l+p*Math.cos(m),w=d+p*Math.sin(m),y=l+p*Math.cos(h),x=d+p*Math.sin(h),O=v?0:1,M=0,E=m-h;E<0&&(E+=2*Math.PI),v?M=E>Math.PI?0:1:M=E>Math.PI?1:0,this.lineTo(y,x),this.__addPathCommand(o("A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}",{rx:p,ry:p,xAxisRotation:0,largeArcFlag:M,sweepFlag:O,endX:_,endY:w})),this.__currentPosition={x:_,y:w}}},t.prototype.clip=function(){var l=this.__closestGroupOrSvg(),d=this.__createElement("clipPath"),p=a(this.__ids),h=this.__createElement("g");l.removeChild(this.__currentElement),d.setAttribute("id",p),d.appendChild(this.__currentElement),this.__defs.appendChild(d),l.setAttribute("clip-path",o("url(#{id})",{id:p})),l.appendChild(h),this.__currentElement=h},t.prototype.drawImage=function(){var l=Array.prototype.slice.call(arguments),d=l[0],p,h,m,v,_=0,w=0,y,x,O,M,E,P,C,R,L,z,D;if(l.length===3)p=l[1],h=l[2],y=d.width,x=d.height,m=y,v=x;else if(l.length===5)p=l[1],h=l[2],m=l[3],v=l[4],y=d.width,x=d.height;else if(l.length===9)_=l[1],w=l[2],y=l[3],x=l[4],p=l[5],h=l[6],m=l[7],v=l[8];else throw new Error("Inavlid number of arguments passed to drawImage: "+arguments.length);if(O=this.__closestGroupOrSvg(),C=this.__currentElement,d instanceof t){for(M=d.getSvg(),E=M.childNodes[0];E.childNodes.length;)D=E.childNodes[0].getAttribute("id"),this.__ids[D]=D,this.__defs.appendChild(E.childNodes[0]);P=M.childNodes[1],O.appendChild(P),this.__currentElement=P,this.translate(p,h),this.__currentElement=C}else(d.nodeName==="CANVAS"||d.nodeName==="IMG")&&(R=this.__createElement("image"),R.setAttribute("width",m),R.setAttribute("height",v),R.setAttribute("preserveAspectRatio","none"),(_||w||y!==d.width||x!==d.height)&&(L=this.__document.createElement("canvas"),L.width=m,L.height=v,z=L.getContext("2d"),z.drawImage(d,_,w,y,x,0,0,m,v),d=L),R.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d.nodeName==="CANVAS"?d.toDataURL():d.getAttribute("src")),O.appendChild(R),this.__currentElement=R,this.translate(p,h),this.__currentElement=C)},t.prototype.createPattern=function(l,d){var p=this.__document.createElementNS("http://www.w3.org/2000/svg","pattern"),h=a(this.__ids),m;return p.setAttribute("id",h),p.setAttribute("width",l.width),p.setAttribute("height",l.height),l.nodeName==="CANVAS"||l.nodeName==="IMG"?(m=this.__document.createElementNS("http://www.w3.org/2000/svg","image"),m.setAttribute("width",l.width),m.setAttribute("height",l.height),m.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l.nodeName==="CANVAS"?l.toDataURL():l.getAttribute("src")),p.appendChild(m),this.__defs.appendChild(p)):l instanceof t&&(p.appendChild(l.__root.childNodes[1]),this.__defs.appendChild(p)),new n(p,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 Sc=="object"&&typeof Sc.exports=="object"&&(Sc.exports=t)})()});var WS=g(fr=>{"use strict";var _F=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]})),yF=fr&&fr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wF=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"&&_F(r,t,n[i]);return yF(r,t),r}})();Object.defineProperty(fr,"__esModule",{value:!0});fr.renderToAbstractCanvas=OF;fr.getSerializedSvg=EF;fr.ReactRendering=AF;var zS=ss(),xF=Fe(),US=Wm(),SF=Gm(),$m=Hm();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,$m.createCanvas)(Math.ceil(e*a),t*a),f=u.getContext("2d");if(!f)throw new Error("2d canvas rendering not supported on this platform");return f.scale(a,a),{...await n(f),reactElement:(0,zS.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 US.CanvasSequence;return{...await n(a),canvasRecordedData:a.toJSON()}}else{let a=o,u=(0,$m.createCanvas)(Math.ceil(e*a),t*a),f=u.getContext("2d");if(!f)throw new Error("2d canvas rendering not supported on this platform");return f.scale(a,a),{...await n(f),imageData:await(0,$m.createImageBitmap)(u)}}}async function EF(e){let{width:t,height:r,canvasRecordedData:n}=e,i=await Promise.resolve().then(()=>wF(BS())),o=new i.default(t,r);return new US.CanvasSequence(n).execute(o),o.getSvg().innerHTML}function AF({rendering:e}){return(0,xF.isValidElement)(e.reactElement)?e.reactElement:(0,zS.jsx)("g",{dangerouslySetInnerHTML:{__html:e.html||""}})}});var VS=g(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.isFeature=RF;function RF(e){return typeof e=="object"&&e!==null&&typeof e.get=="function"&&typeof e.id=="function"}function HS(e){return"uniqueId"in e&&typeof e.data!="object"}var Zm=class e{constructor(t){var r;HS(t)?this.data=t:(this.data=t.data,this.parentHandle=t.parent);let n=HS(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})}};Oc.default=Zm});var Pe=g(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.isFunction=void 0;function TF(e){return typeof e=="function"}Ec.isFunction=TF});var Pn=g(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.createErrorClass=void 0;function PF(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}Ac.createErrorClass=PF});var Km=g(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.UnsubscriptionError=void 0;var MF=Pn();Rc.UnsubscriptionError=MF.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
3
3
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
4
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}})});var zr=g(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.arrRemove=void 0;function PF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}Ac.arrRemove=PF});var It=g(Pt=>{"use strict";var DS=Pt&&Pt.__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.")},BS=Pt&&Pt.__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},zS=Pt&&Pt.__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(Pt,"__esModule",{value:!0});Pt.isSubscription=Pt.EMPTY_SUBSCRIPTION=Pt.Subscription=void 0;var _u=Ae(),Nm=Lm(),WS=zr(),Dm=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=DS(a),l=u.next();!l.done;l=u.next()){var s=l.value;s.remove(this)}}catch(h){t={error:h}}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(_u.isFunction(c))try{c()}catch(h){o=h instanceof Nm.UnsubscriptionError?h.errors:[h]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=DS(f),p=d.next();!p.done;p=d.next()){var m=p.value;try{US(m)}catch(h){o=o??[],h instanceof Nm.UnsubscriptionError?o=zS(zS([],BS(o)),BS(h.errors)):o.push(h)}}}catch(h){n={error:h}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(o)throw new Nm.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)US(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)&&WS.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&WS.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();Pt.Subscription=Dm;Pt.EMPTY_SUBSCRIPTION=Dm.EMPTY;function MF(e){return e instanceof Dm||e&&"closed"in e&&_u.isFunction(e.remove)&&_u.isFunction(e.add)&&_u.isFunction(e.unsubscribe)}Pt.isSubscription=MF;function US(e){_u.isFunction(e)?e():e.unsubscribe()}});var Eo=g(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.config=void 0;Tc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Bm=g(Er=>{"use strict";var HS=Er&&Er.__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},VS=Er&&Er.__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(Er,"__esModule",{value:!0});Er.timeoutProvider=void 0;Er.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Er.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,VS([e,t],HS(r))):setTimeout.apply(void 0,VS([e,t],HS(r)))},clearTimeout:function(e){var t=Er.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var zm=g(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.reportUnhandledError=void 0;var CF=Eo(),kF=Bm();function qF(e){kF.timeoutProvider.setTimeout(function(){var t=CF.config.onUnhandledError;if(t)t(e);else throw e})}Rc.reportUnhandledError=qF});var at=g(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.noop=void 0;function IF(){}Pc.noop=IF});var GS=g(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.createNotification=Ar.nextNotification=Ar.errorNotification=Ar.COMPLETE_NOTIFICATION=void 0;Ar.COMPLETE_NOTIFICATION=function(){return Mc("C",void 0,void 0)}();function jF(e){return Mc("E",void 0,e)}Ar.errorNotification=jF;function FF(e){return Mc("N",e,void 0)}Ar.nextNotification=FF;function Mc(e,t,r){return{kind:e,value:t,error:r}}Ar.createNotification=Mc});var Cc=g(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.captureError=Ao.errorContext=void 0;var $S=Eo(),wi=null;function LF(e){if($S.config.useDeprecatedSynchronousErrorHandling){var t=!wi;if(t&&(wi={errorThrown:!1,error:null}),e(),t){var r=wi,n=r.errorThrown,i=r.error;if(wi=null,n)throw i}}else e()}Ao.errorContext=LF;function NF(e){$S.config.useDeprecatedSynchronousErrorHandling&&wi&&(wi.errorThrown=!0,wi.error=e)}Ao.captureError=NF});var To=g(nr=>{"use strict";var XS=nr&&nr.__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(nr,"__esModule",{value:!0});nr.EMPTY_OBSERVER=nr.SafeSubscriber=nr.Subscriber=void 0;var DF=Ae(),KS=It(),Vm=Eo(),BF=zm(),YS=at(),Wm=GS(),zF=Bm(),WF=Cc(),ZS=function(e){XS(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,KS.isSubscription(r)&&r.add(n)):n.destination=nr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new JS(r,n,i)},t.prototype.next=function(r){this.isStopped?Hm(Wm.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Hm(Wm.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Hm(Wm.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}(KS.Subscription);nr.Subscriber=ZS;var UF=Function.prototype.bind;function Um(e,t){return UF.call(e,t)}var HF=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){kc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){kc(n)}else kc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){kc(r)}},e}(),JS=function(e){XS(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(DF.isFunction(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&Vm.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Um(r.next,u),error:r.error&&Um(r.error,u),complete:r.complete&&Um(r.complete,u)}):a=r}return o.destination=new HF(a),o}return t}(ZS);nr.SafeSubscriber=JS;function kc(e){Vm.config.useDeprecatedSynchronousErrorHandling?WF.captureError(e):BF.reportUnhandledError(e)}function VF(e){throw e}function Hm(e,t){var r=Vm.config.onStoppedNotification;r&&zF.timeoutProvider.setTimeout(function(){return r(e,t)})}nr.EMPTY_OBSERVER={closed:!0,next:YS.noop,error:VF,complete:YS.noop}});var wu=g(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.observable=void 0;qc.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var ut=g(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.identity=void 0;function GF(e){return e}Ic.identity=GF});var xu=g(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.pipeFromArray=Ro.pipe=void 0;var $F=ut();function KF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return QS(e)}Ro.pipe=KF;function QS(e){return e.length===0?$F.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}Ro.pipeFromArray=QS});var Pe=g(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.Observable=void 0;var $m=To(),YF=It(),XF=wu(),ZF=xu(),JF=Eo(),Gm=Ae(),QF=Cc(),eL=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=rL(t)?t:new $m.SafeSubscriber(t,r,n);return QF.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=eO(r),new r(function(i,o){var a=new $m.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[XF.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ZF.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=eO(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}();jc.Observable=eL;function eO(e){var t;return(t=e??JF.config.Promise)!==null&&t!==void 0?t:Promise}function tL(e){return e&&Gm.isFunction(e.next)&&Gm.isFunction(e.error)&&Gm.isFunction(e.complete)}function rL(e){return e&&e instanceof $m.Subscriber||tL(e)&&YF.isSubscription(e)}});var V=g(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.operate=Po.hasLift=void 0;var nL=Ae();function tO(e){return nL.isFunction(e?.lift)}Po.hasLift=tO;function iL(e){return function(t){if(tO(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")}}Po.operate=iL});var X=g(_n=>{"use strict";var oL=_n&&_n.__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(_n,"__esModule",{value:!0});_n.OperatorSubscriber=_n.createOperatorSubscriber=void 0;var aL=To();function uL(e,t,r,n,i){return new rO(e,t,r,n,i)}_n.createOperatorSubscriber=uL;var rO=function(e){oL(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}(aL.Subscriber);_n.OperatorSubscriber=rO});var Km=g(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.refCount=void 0;var sL=V(),cL=X();function lL(){return sL.operate(function(e,t){var r=null;e._refCount++;var n=cL.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())})}Fc.refCount=lL});var Su=g(Mo=>{"use strict";var fL=Mo&&Mo.__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(Mo,"__esModule",{value:!0});Mo.ConnectableObservable=void 0;var dL=Pe(),nO=It(),pL=Km(),hL=X(),mL=V(),vL=function(e){fL(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,mL.hasLift(r)&&(i.lift=r.lift),i}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new nO.Subscription;var i=this.getSubject();n.add(this.source.subscribe(hL.createOperatorSubscriber(i,void 0,function(){r._teardown(),i.complete()},function(o){r._teardown(),i.error(o)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=nO.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return pL.refCount()(this)},t}(dL.Observable);Mo.ConnectableObservable=vL});var iO=g(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.performanceTimestampProvider=void 0;Ou.performanceTimestampProvider={now:function(){return(Ou.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var Ym=g(ir=>{"use strict";var oO=ir&&ir.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},aO=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.animationFrameProvider=void 0;var bL=It();ir.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=ir.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var i=t(function(o){r=void 0,e(o)});return new bL.Subscription(function(){return r?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ir.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,aO([],oO(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ir.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,aO([],oO(e)))},delegate:void 0}});var cO=g(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.animationFrames=void 0;var gL=Pe(),yL=iO(),uO=Ym();function _L(e){return e?sO(e):wL}Lc.animationFrames=_L;function sO(e){return new gL.Observable(function(t){var r=e||yL.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=uO.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&uO.animationFrameProvider.cancelAnimationFrame(i)}})}var wL=sO()});var Xm=g(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.ObjectUnsubscribedError=void 0;var xL=yn();Nc.ObjectUnsubscribedError=xL.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var st=g(Tr=>{"use strict";var fO=Tr&&Tr.__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)}}(),SL=Tr&&Tr.__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(Tr,"__esModule",{value:!0});Tr.AnonymousSubject=Tr.Subject=void 0;var lO=Pe(),Jm=It(),OL=Xm(),EL=zr(),Zm=Cc(),dO=function(e){fO(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 Qm(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new OL.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;Zm.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=SL(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;Zm.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;Zm.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?Jm.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new Jm.Subscription(function(){n.currentObservers=null,EL.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 lO.Observable;return r.source=this,r},t.create=function(r,n){return new Qm(r,n)},t}(lO.Observable);Tr.Subject=dO;var Qm=function(e){fO(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:Jm.EMPTY_SUBSCRIPTION},t}(dO);Tr.AnonymousSubject=Qm});var ev=g(Co=>{"use strict";var AL=Co&&Co.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Co,"__esModule",{value:!0});Co.BehaviorSubject=void 0;var TL=st(),RL=function(e){AL(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}(TL.Subject);Co.BehaviorSubject=RL});var Dc=g(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.dateTimestampProvider=void 0;Eu.dateTimestampProvider={now:function(){return(Eu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Bc=g(ko=>{"use strict";var PL=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.ReplaySubject=void 0;var ML=st(),CL=Dc(),kL=function(e){PL(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=CL.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}(ML.Subject);ko.ReplaySubject=kL});var zc=g(qo=>{"use strict";var qL=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.AsyncSubject=void 0;var IL=st(),jL=function(e){qL(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}(IL.Subject);qo.AsyncSubject=jL});var pO=g(Io=>{"use strict";var FL=Io&&Io.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Io,"__esModule",{value:!0});Io.Action=void 0;var LL=It(),NL=function(e){FL(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}(LL.Subscription);Io.Action=NL});var vO=g(Rr=>{"use strict";var hO=Rr&&Rr.__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},mO=Rr&&Rr.__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(Rr,"__esModule",{value:!0});Rr.intervalProvider=void 0;Rr.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=Rr.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,mO([e,t],hO(r))):setInterval.apply(void 0,mO([e,t],hO(r)))},clearInterval:function(e){var t=Rr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Fo=g(jo=>{"use strict";var DL=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.AsyncAction=void 0;var BL=pO(),bO=vO(),zL=zr(),WL=function(e){DL(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),bO.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&&bO.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,zL.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(BL.Action);jo.AsyncAction=WL});var yO=g(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.TestTools=Lo.Immediate=void 0;var UL=1,tv,Wc={};function gO(e){return e in Wc?(delete Wc[e],!0):!1}Lo.Immediate={setImmediate:function(e){var t=UL++;return Wc[t]=!0,tv||(tv=Promise.resolve()),tv.then(function(){return gO(t)&&e()}),t},clearImmediate:function(e){gO(e)}};Lo.TestTools={pending:function(){return Object.keys(Wc).length}}});var wO=g(Pr=>{"use strict";var HL=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(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},VL=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.immediateProvider=void 0;var _O=yO(),GL=_O.Immediate.setImmediate,$L=_O.Immediate.clearImmediate;Pr.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pr.immediateProvider.delegate;return(r?.setImmediate||GL).apply(void 0,VL([],HL(e)))},clearImmediate:function(e){var t=Pr.immediateProvider.delegate;return(t?.clearImmediate||$L)(e)},delegate:void 0}});var SO=g(No=>{"use strict";var KL=No&&No.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(No,"__esModule",{value:!0});No.AsapAction=void 0;var YL=Fo(),xO=wO(),XL=function(e){KL(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=xO.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&&(xO.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(YL.AsyncAction);No.AsapAction=XL});var rv=g(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.Scheduler=void 0;var ZL=Dc(),JL=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=ZL.dateTimestampProvider.now,e}();Uc.Scheduler=JL});var Bo=g(Do=>{"use strict";var QL=Do&&Do.__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(Do,"__esModule",{value:!0});Do.AsyncScheduler=void 0;var OO=rv(),eN=function(e){QL(t,e);function t(r,n){n===void 0&&(n=OO.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}(OO.Scheduler);Do.AsyncScheduler=eN});var EO=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.AsapScheduler=void 0;var rN=Bo(),nN=function(e){tN(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}(rN.AsyncScheduler);zo.AsapScheduler=nN});var AO=g(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.asap=xi.asapScheduler=void 0;var iN=SO(),oN=EO();xi.asapScheduler=new oN.AsapScheduler(iN.AsapAction);xi.asap=xi.asapScheduler});var Mt=g(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.async=Si.asyncScheduler=void 0;var aN=Fo(),uN=Bo();Si.asyncScheduler=new uN.AsyncScheduler(aN.AsyncAction);Si.async=Si.asyncScheduler});var TO=g(Wo=>{"use strict";var sN=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.QueueAction=void 0;var cN=Fo(),lN=function(e){sN(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}(cN.AsyncAction);Wo.QueueAction=lN});var RO=g(Uo=>{"use strict";var fN=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.QueueScheduler=void 0;var dN=Bo(),pN=function(e){fN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(dN.AsyncScheduler);Uo.QueueScheduler=pN});var PO=g(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.queue=Oi.queueScheduler=void 0;var hN=TO(),mN=RO();Oi.queueScheduler=new mN.QueueScheduler(hN.QueueAction);Oi.queue=Oi.queueScheduler});var CO=g(Ho=>{"use strict";var vN=Ho&&Ho.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.AnimationFrameAction=void 0;var bN=Fo(),MO=Ym(),gN=function(e){vN(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=MO.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&&(MO.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(bN.AsyncAction);Ho.AnimationFrameAction=gN});var kO=g(Vo=>{"use strict";var yN=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.AnimationFrameScheduler=void 0;var _N=Bo(),wN=function(e){yN(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}(_N.AsyncScheduler);Vo.AnimationFrameScheduler=wN});var qO=g(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.animationFrame=Ei.animationFrameScheduler=void 0;var xN=CO(),SN=kO();Ei.animationFrameScheduler=new SN.AnimationFrameScheduler(xN.AnimationFrameAction);Ei.animationFrame=Ei.animationFrameScheduler});var FO=g(wn=>{"use strict";var IO=wn&&wn.__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(wn,"__esModule",{value:!0});wn.VirtualAction=wn.VirtualTimeScheduler=void 0;var ON=Fo(),EN=It(),AN=Bo(),TN=function(e){IO(t,e);function t(r,n){r===void 0&&(r=jO),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}(AN.AsyncScheduler);wn.VirtualTimeScheduler=TN;var jO=function(e){IO(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 EN.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}(ON.AsyncAction);wn.VirtualAction=jO});var or=g(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.empty=Ai.EMPTY=void 0;var LO=Pe();Ai.EMPTY=new LO.Observable(function(e){return e.complete()});function RN(e){return e?PN(e):Ai.EMPTY}Ai.empty=RN;function PN(e){return new LO.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Au=g(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});Hc.isScheduler=void 0;var MN=Ae();function CN(e){return e&&MN.isFunction(e.schedule)}Hc.isScheduler=CN});var Ct=g(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.popNumber=xn.popScheduler=xn.popResultSelector=void 0;var kN=Ae(),qN=Au();function nv(e){return e[e.length-1]}function IN(e){return kN.isFunction(nv(e))?e.pop():void 0}xn.popResultSelector=IN;function jN(e){return qN.isScheduler(nv(e))?e.pop():void 0}xn.popScheduler=jN;function FN(e,t){return typeof nv(e)=="number"?e.pop():t}xn.popNumber=FN});var Gc=g(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.isArrayLike=void 0;Vc.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var iv=g($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.isPromise=void 0;var LN=Ae();function NN(e){return LN.isFunction(e?.then)}$c.isPromise=NN});var ov=g(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.isInteropObservable=void 0;var DN=wu(),BN=Ae();function zN(e){return BN.isFunction(e[DN.observable])}Kc.isInteropObservable=zN});var av=g(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.isAsyncIterable=void 0;var WN=Ae();function UN(e){return Symbol.asyncIterator&&WN.isFunction(e?.[Symbol.asyncIterator])}Yc.isAsyncIterable=UN});var uv=g(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.createInvalidObservableTypeError=void 0;function HN(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.")}Xc.createInvalidObservableTypeError=HN});var sv=g(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.iterator=Go.getSymbolIterator=void 0;function NO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Go.getSymbolIterator=NO;Go.iterator=NO()});var cv=g(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.isIterable=void 0;var VN=sv(),GN=Ae();function $N(e){return GN.isFunction(e?.[VN.iterator])}Zc.isIterable=$N});var Jc=g(Gt=>{"use strict";var KN=Gt&&Gt.__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}}},$o=Gt&&Gt.__await||function(e){return this instanceof $o?(this.v=e,this):new $o(e)},YN=Gt&&Gt.__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(d){n[d]&&(i[d]=function(p){return new Promise(function(m,h){o.push([d,p,m,h])>1||u(d,p)})})}function u(d,p){try{l(n[d](p))}catch(m){f(o[0][3],m)}}function l(d){d.value instanceof $o?Promise.resolve(d.value.v).then(s,c):f(o[0][2],d)}function s(d){u("next",d)}function c(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.isReadableStreamLike=Gt.readableStreamLikeToAsyncGenerator=void 0;var XN=Ae();function ZN(e){return YN(this,arguments,function(){var r,n,i,o;return KN(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,$o(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,$o(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,$o(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]}})})}Gt.readableStreamLikeToAsyncGenerator=ZN;function JN(e){return XN.isFunction(e?.getReader)}Gt.isReadableStreamLike=JN});var le=g(Ne=>{"use strict";var QN=Ne&&Ne.__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())})},eD=Ne&&Ne.__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}}},tD=Ne&&Ne.__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 lv=="function"?lv(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)}},lv=Ne&&Ne.__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(Ne,"__esModule",{value:!0});Ne.fromReadableStreamLike=Ne.fromAsyncIterable=Ne.fromIterable=Ne.fromPromise=Ne.fromArrayLike=Ne.fromInteropObservable=Ne.innerFrom=void 0;var rD=Gc(),nD=iv(),Ko=Pe(),iD=ov(),oD=av(),aD=uv(),uD=cv(),DO=Jc(),sD=Ae(),cD=zm(),lD=wu();function fD(e){if(e instanceof Ko.Observable)return e;if(e!=null){if(iD.isInteropObservable(e))return BO(e);if(rD.isArrayLike(e))return zO(e);if(nD.isPromise(e))return WO(e);if(oD.isAsyncIterable(e))return fv(e);if(uD.isIterable(e))return UO(e);if(DO.isReadableStreamLike(e))return HO(e)}throw aD.createInvalidObservableTypeError(e)}Ne.innerFrom=fD;function BO(e){return new Ko.Observable(function(t){var r=e[lD.observable]();if(sD.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}Ne.fromInteropObservable=BO;function zO(e){return new Ko.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}Ne.fromArrayLike=zO;function WO(e){return new Ko.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,cD.reportUnhandledError)})}Ne.fromPromise=WO;function UO(e){return new Ko.Observable(function(t){var r,n;try{for(var i=lv(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()})}Ne.fromIterable=UO;function fv(e){return new Ko.Observable(function(t){dD(e,t).catch(function(r){return t.error(r)})})}Ne.fromAsyncIterable=fv;function HO(e){return fv(DO.readableStreamLikeToAsyncGenerator(e))}Ne.fromReadableStreamLike=HO;function dD(e,t){var r,n,i,o;return QN(this,void 0,void 0,function(){var a,u;return eD(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=tD(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 Wr=g(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.executeSchedule=void 0;function pD(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}Qc.executeSchedule=pD});var Tu=g(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.observeOn=void 0;var dv=Wr(),hD=V(),mD=X();function vD(e,t){return t===void 0&&(t=0),hD.operate(function(r,n){r.subscribe(mD.createOperatorSubscriber(n,function(i){return dv.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return dv.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return dv.executeSchedule(n,e,function(){return n.error(i)},t)}))})}el.observeOn=vD});var Ru=g(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.subscribeOn=void 0;var bD=V();function gD(e,t){return t===void 0&&(t=0),bD.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}tl.subscribeOn=gD});var VO=g(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.scheduleObservable=void 0;var yD=le(),_D=Tu(),wD=Ru();function xD(e,t){return yD.innerFrom(e).pipe(wD.subscribeOn(t),_D.observeOn(t))}rl.scheduleObservable=xD});var GO=g(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.schedulePromise=void 0;var SD=le(),OD=Tu(),ED=Ru();function AD(e,t){return SD.innerFrom(e).pipe(ED.subscribeOn(t),OD.observeOn(t))}nl.schedulePromise=AD});var $O=g(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.scheduleArray=void 0;var TD=Pe();function RD(e,t){return new TD.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}il.scheduleArray=RD});var pv=g(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.scheduleIterable=void 0;var PD=Pe(),MD=sv(),CD=Ae(),KO=Wr();function kD(e,t){return new PD.Observable(function(r){var n;return KO.executeSchedule(r,t,function(){n=e[MD.iterator](),KO.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 CD.isFunction(n?.return)&&n.return()}})}ol.scheduleIterable=kD});var hv=g(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.scheduleAsyncIterable=void 0;var qD=Pe(),YO=Wr();function ID(e,t){if(!e)throw new Error("Iterable cannot be null");return new qD.Observable(function(r){YO.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();YO.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}al.scheduleAsyncIterable=ID});var XO=g(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.scheduleReadableStreamLike=void 0;var jD=hv(),FD=Jc();function LD(e,t){return jD.scheduleAsyncIterable(FD.readableStreamLikeToAsyncGenerator(e),t)}ul.scheduleReadableStreamLike=LD});var mv=g(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.scheduled=void 0;var ND=VO(),DD=GO(),BD=$O(),zD=pv(),WD=hv(),UD=ov(),HD=iv(),VD=Gc(),GD=cv(),$D=av(),KD=uv(),YD=Jc(),XD=XO();function ZD(e,t){if(e!=null){if(UD.isInteropObservable(e))return ND.scheduleObservable(e,t);if(VD.isArrayLike(e))return BD.scheduleArray(e,t);if(HD.isPromise(e))return DD.schedulePromise(e,t);if($D.isAsyncIterable(e))return WD.scheduleAsyncIterable(e,t);if(GD.isIterable(e))return zD.scheduleIterable(e,t);if(YD.isReadableStreamLike(e))return XD.scheduleReadableStreamLike(e,t)}throw KD.createInvalidObservableTypeError(e)}sl.scheduled=ZD});var Ur=g(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.from=void 0;var JD=mv(),QD=le();function e5(e,t){return t?JD.scheduled(e,t):QD.innerFrom(e)}cl.from=e5});var fl=g(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.of=void 0;var t5=Ct(),r5=Ur();function n5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=t5.popScheduler(e);return r5.from(e,r)}ll.of=n5});var vv=g(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.throwError=void 0;var i5=Pe(),o5=Ae();function a5(e,t){var r=o5.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new i5.Observable(t?function(i){return t.schedule(n,0,i)}:n)}dl.throwError=a5});var pl=g(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.observeNotification=Hr.Notification=Hr.NotificationKind=void 0;var u5=or(),s5=fl(),c5=vv(),l5=Ae(),f5;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(f5=Hr.NotificationKind||(Hr.NotificationKind={}));var d5=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 ZO(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 l5.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"?s5.of(n):r==="E"?c5.throwError(function(){return i}):r==="C"?u5.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}();Hr.Notification=d5;function ZO(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)}Hr.observeNotification=ZO});var QO=g(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.isObservable=void 0;var p5=Pe(),JO=Ae();function h5(e){return!!e&&(e instanceof p5.Observable||JO.isFunction(e.lift)&&JO.isFunction(e.subscribe))}hl.isObservable=h5});var Sn=g(ml=>{"use strict";Object.defineProperty(ml,"__esModule",{value:!0});ml.EmptyError=void 0;var m5=yn();ml.EmptyError=m5.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var eE=g(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.lastValueFrom=void 0;var v5=Sn();function b5(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 v5.EmptyError)}})})}vl.lastValueFrom=b5});var tE=g(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.firstValueFrom=void 0;var g5=Sn(),y5=To();function _5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new y5.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new g5.EmptyError)}});e.subscribe(o)})}bl.firstValueFrom=_5});var bv=g(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.ArgumentOutOfRangeError=void 0;var w5=yn();gl.ArgumentOutOfRangeError=w5.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var gv=g(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.NotFoundError=void 0;var x5=yn();yl.NotFoundError=x5.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var yv=g(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.SequenceError=void 0;var S5=yn();_l.SequenceError=S5.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var xl=g(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.isValidDate=void 0;function O5(e){return e instanceof Date&&!isNaN(e)}wl.isValidDate=O5});var Sl=g(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.timeout=Ti.TimeoutError=void 0;var E5=Mt(),A5=xl(),T5=V(),R5=le(),P5=yn(),M5=X(),C5=Wr();Ti.TimeoutError=P5.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 k5(e,t){var r=A5.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?q5:o,u=r.scheduler,l=u===void 0?t??E5.asyncScheduler:u,s=r.meta,c=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return T5.operate(function(f,d){var p,m,h=null,v=0,y=function(w){m=C5.executeSchedule(d,l,function(){try{p.unsubscribe(),R5.innerFrom(a({meta:c,lastValue:h,seen:v})).subscribe(d)}catch(_){d.error(_)}},w)};p=f.subscribe(M5.createOperatorSubscriber(d,function(w){m?.unsubscribe(),v++,d.next(h=w),i>0&&y(i)},void 0,void 0,function(){m?.closed||m?.unsubscribe(),h=null})),!v&&y(n!=null?typeof n=="number"?n:+n-l.now():i)})}Ti.timeout=k5;function q5(e){throw new Ti.TimeoutError(e)}});var On=g(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.map=void 0;var I5=V(),j5=X();function F5(e,t){return I5.operate(function(r,n){var i=0;r.subscribe(j5.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}Ol.map=F5});var An=g(En=>{"use strict";var L5=En&&En.__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},N5=En&&En.__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(En,"__esModule",{value:!0});En.mapOneOrManyArgs=void 0;var D5=On(),B5=Array.isArray;function z5(e,t){return B5(t)?e.apply(void 0,N5([],L5(t))):e(t)}function W5(e){return D5.map(function(t){return z5(e,t)})}En.mapOneOrManyArgs=W5});var wv=g(Tn=>{"use strict";var U5=Tn&&Tn.__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},rE=Tn&&Tn.__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(Tn,"__esModule",{value:!0});Tn.bindCallbackInternals=void 0;var H5=Au(),V5=Pe(),G5=Ru(),$5=An(),K5=Tu(),Y5=zc();function _v(e,t,r,n){if(r)if(H5.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return _v(e,t,n).apply(this,i).pipe($5.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return _v(e,t).apply(this,i).pipe(G5.subscribeOn(n),K5.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new Y5.AsyncSubject,l=!0;return new V5.Observable(function(s){var c=u.subscribe(s);if(l){l=!1;var f=!1,d=!1;t.apply(i,rE(rE([],U5(o)),[function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];if(e){var h=p.shift();if(h!=null){u.error(h);return}}u.next(1<p.length?p:p[0]),d=!0,f&&u.complete()}])),d&&u.complete(),f=!0}return c})}}Tn.bindCallbackInternals=_v});var nE=g(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.bindCallback=void 0;var X5=wv();function Z5(e,t,r){return X5.bindCallbackInternals(!1,e,t,r)}El.bindCallback=Z5});var iE=g(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.bindNodeCallback=void 0;var J5=wv();function Q5(e,t,r){return J5.bindCallbackInternals(!0,e,t,r)}Al.bindNodeCallback=Q5});var xv=g(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.argsArgArrayOrObject=void 0;var e8=Array.isArray,t8=Object.getPrototypeOf,r8=Object.prototype,n8=Object.keys;function i8(e){if(e.length===1){var t=e[0];if(e8(t))return{args:t,keys:null};if(o8(t)){var r=n8(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Tl.argsArgArrayOrObject=i8;function o8(e){return e&&typeof e=="object"&&t8(e)===r8}});var Sv=g(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.createObject=void 0;function a8(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Rl.createObject=a8});var Pl=g(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.combineLatestInit=Yo.combineLatest=void 0;var u8=Pe(),s8=xv(),uE=Ur(),sE=ut(),c8=An(),oE=Ct(),l8=Sv(),f8=X(),d8=Wr();function p8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=oE.popScheduler(e),n=oE.popResultSelector(e),i=s8.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return uE.from([],r);var u=new u8.Observable(cE(o,r,a?function(l){return l8.createObject(a,l)}:sE.identity));return n?u.pipe(c8.mapOneOrManyArgs(n)):u}Yo.combineLatest=p8;function cE(e,t,r){return r===void 0&&(r=sE.identity),function(n){aE(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,l=function(c){aE(t,function(){var f=uE.from(e[c],t),d=!1;f.subscribe(f8.createOperatorSubscriber(n,function(p){o[c]=p,d||(d=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)l(s)},n)}}Yo.combineLatestInit=cE;function aE(e,t,r){e?d8.executeSchedule(r,e,t):t()}});var Cl=g(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.mergeInternals=void 0;var h8=le(),m8=Wr(),lE=X();function v8(e,t,r,n,i,o,a,u){var l=[],s=0,c=0,f=!1,d=function(){f&&!l.length&&!s&&t.complete()},p=function(h){return s<n?m(h):l.push(h)},m=function(h){o&&t.next(h),s++;var v=!1;h8.innerFrom(r(h,c++)).subscribe(lE.createOperatorSubscriber(t,function(y){i?.(y),o?p(y):t.next(y)},function(){v=!0},void 0,function(){if(v)try{s--;for(var y=function(){var w=l.shift();a?m8.executeSchedule(t,a,function(){return m(w)}):m(w)};l.length&&s<n;)y();d()}catch(w){t.error(w)}}))};return e.subscribe(lE.createOperatorSubscriber(t,p,function(){f=!0,d()})),function(){u?.()}}Ml.mergeInternals=v8});var Vr=g(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});kl.mergeMap=void 0;var b8=On(),g8=le(),y8=V(),_8=Cl(),w8=Ae();function fE(e,t,r){return r===void 0&&(r=1/0),w8.isFunction(t)?fE(function(n,i){return b8.map(function(o,a){return t(n,o,i,a)})(g8.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),y8.operate(function(n,i){return _8.mergeInternals(n,i,e,r)}))}kl.mergeMap=fE});var Pu=g(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.mergeAll=void 0;var x8=Vr(),S8=ut();function O8(e){return e===void 0&&(e=1/0),x8.mergeMap(S8.identity,e)}ql.mergeAll=O8});var jl=g(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.concatAll=void 0;var E8=Pu();function A8(){return E8.mergeAll(1)}Il.concatAll=A8});var Mu=g(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.concat=void 0;var T8=jl(),R8=Ct(),P8=Ur();function M8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return T8.concatAll()(P8.from(e,R8.popScheduler(e)))}Fl.concat=M8});var Cu=g(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.defer=void 0;var C8=Pe(),k8=le();function q8(e){return new C8.Observable(function(t){k8.innerFrom(e()).subscribe(t)})}Ll.defer=q8});var dE=g(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.connectable=void 0;var I8=st(),j8=Pe(),F8=Cu(),L8={connector:function(){return new I8.Subject},resetOnDisconnect:!0};function N8(e,t){t===void 0&&(t=L8);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new j8.Observable(function(l){return a.subscribe(l)});return u.connect=function(){return(!r||r.closed)&&(r=F8.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}Nl.connectable=N8});var pE=g(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.forkJoin=void 0;var D8=Pe(),B8=xv(),z8=le(),W8=Ct(),U8=X(),H8=An(),V8=Sv();function G8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=W8.popResultSelector(e),n=B8.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new D8.Observable(function(u){var l=i.length;if(!l){u.complete();return}for(var s=new Array(l),c=l,f=l,d=function(m){var h=!1;z8.innerFrom(i[m]).subscribe(U8.createOperatorSubscriber(u,function(v){h||(h=!0,f--),s[m]=v},function(){return c--},void 0,function(){(!c||!h)&&(f||u.next(o?V8.createObject(o,s):s),u.complete())}))},p=0;p<l;p++)d(p)});return r?a.pipe(H8.mapOneOrManyArgs(r)):a}Dl.forkJoin=G8});var mE=g(Xo=>{"use strict";var $8=Xo&&Xo.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};Object.defineProperty(Xo,"__esModule",{value:!0});Xo.fromEvent=void 0;var K8=le(),Y8=Pe(),X8=Vr(),Z8=Gc(),Ri=Ae(),J8=An(),Q8=["addListener","removeListener"],eB=["addEventListener","removeEventListener"],tB=["on","off"];function Ov(e,t,r,n){if(Ri.isFunction(r)&&(n=r,r=void 0),n)return Ov(e,t,r).pipe(J8.mapOneOrManyArgs(n));var i=$8(iB(e)?eB.map(function(u){return function(l){return e[u](t,l,r)}}):rB(e)?Q8.map(hE(e,t)):nB(e)?tB.map(hE(e,t)):[],2),o=i[0],a=i[1];if(!o&&Z8.isArrayLike(e))return X8.mergeMap(function(u){return Ov(u,t,r)})(K8.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new Y8.Observable(function(u){var l=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return u.next(1<s.length?s:s[0])};return o(l),function(){return a(l)}})}Xo.fromEvent=Ov;function hE(e,t){return function(r){return function(n){return e[r](t,n)}}}function rB(e){return Ri.isFunction(e.addListener)&&Ri.isFunction(e.removeListener)}function nB(e){return Ri.isFunction(e.on)&&Ri.isFunction(e.off)}function iB(e){return Ri.isFunction(e.addEventListener)&&Ri.isFunction(e.removeEventListener)}});var bE=g(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.fromEventPattern=void 0;var oB=Pe(),aB=Ae(),uB=An();function vE(e,t,r){return r?vE(e,t).pipe(uB.mapOneOrManyArgs(r)):new oB.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 aB.isFunction(t)?function(){return t(i,o)}:void 0})}Bl.fromEventPattern=vE});var yE=g(Zo=>{"use strict";var sB=Zo&&Zo.__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(Zo,"__esModule",{value:!0});Zo.generate=void 0;var gE=ut(),cB=Au(),lB=Cu(),fB=pv();function dB(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?gE.identity:a,i=o.scheduler):(l=e,!n||cB.isScheduler(n)?(u=gE.identity,i=n):u=n);function s(){var c;return sB(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 lB.defer(i?function(){return fB.scheduleIterable(s(),i)}:s)}Zo.generate=dB});var _E=g(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.iif=void 0;var pB=Cu();function hB(e,t,r){return pB.defer(function(){return e()?t:r})}zl.iif=hB});var Rn=g(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.timer=void 0;var mB=Pe(),vB=Mt(),bB=Au(),gB=xl();function yB(e,t,r){e===void 0&&(e=0),r===void 0&&(r=vB.async);var n=-1;return t!=null&&(bB.isScheduler(t)?r=t:n=t),new mB.Observable(function(i){var o=gB.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)})}Wl.timer=yB});var Ev=g(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.interval=void 0;var _B=Mt(),wB=Rn();function xB(e,t){return e===void 0&&(e=0),t===void 0&&(t=_B.asyncScheduler),e<0&&(e=0),wB.timer(e,e,t)}Ul.interval=xB});var xE=g(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.merge=void 0;var SB=Pu(),OB=le(),EB=or(),wE=Ct(),AB=Ur();function TB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=wE.popScheduler(e),n=wE.popNumber(e,1/0),i=e;return i.length?i.length===1?OB.innerFrom(i[0]):SB.mergeAll(n)(AB.from(i,r)):EB.EMPTY}Hl.merge=TB});var Av=g(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.never=Pi.NEVER=void 0;var RB=Pe(),PB=at();Pi.NEVER=new RB.Observable(PB.noop);function MB(){return Pi.NEVER}Pi.never=MB});var Jo=g(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.argsOrArgArray=void 0;var CB=Array.isArray;function kB(e){return e.length===1&&CB(e[0])?e[0]:e}Vl.argsOrArgArray=kB});var Tv=g(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.onErrorResumeNext=void 0;var qB=Pe(),IB=Jo(),jB=X(),SE=at(),FB=le();function LB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=IB.argsOrArgArray(e);return new qB.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=FB.innerFrom(r[i++])}catch{o();return}var u=new jB.OperatorSubscriber(n,void 0,SE.noop,SE.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}Gl.onErrorResumeNext=LB});var OE=g($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.pairs=void 0;var NB=Ur();function DB(e,t){return NB.from(Object.entries(e),t)}$l.pairs=DB});var EE=g(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.not=void 0;function BB(e,t){return function(r,n){return!e.call(t,r,n)}}Kl.not=BB});var Mi=g(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.filter=void 0;var zB=V(),WB=X();function UB(e,t){return zB.operate(function(r,n){var i=0;r.subscribe(WB.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}Yl.filter=UB});var RE=g(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.partition=void 0;var HB=EE(),AE=Mi(),TE=le();function VB(e,t,r){return[AE.filter(t,r)(TE.innerFrom(e)),AE.filter(HB.not(t,r))(TE.innerFrom(e))]}Xl.partition=VB});var Rv=g(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.raceInit=Qo.race=void 0;var GB=Pe(),PE=le(),$B=Jo(),KB=X();function YB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=$B.argsOrArgArray(e),e.length===1?PE.innerFrom(e[0]):new GB.Observable(ME(e))}Qo.race=YB;function ME(e){return function(t){for(var r=[],n=function(o){r.push(PE.innerFrom(e[o]).subscribe(KB.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)}}Qo.raceInit=ME});var CE=g(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.range=void 0;var XB=Pe(),ZB=or();function JB(e,t,r){if(t==null&&(t=e,e=0),t<=0)return ZB.EMPTY;var n=t+e;return new XB.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()})}Zl.range=JB});var kE=g(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.using=void 0;var QB=Pe(),e6=le(),t6=or();function r6(e,t){return new QB.Observable(function(r){var n=e(),i=t(n),o=i?e6.innerFrom(i):t6.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}Jl.using=r6});var Ql=g(Pn=>{"use strict";var n6=Pn&&Pn.__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},i6=Pn&&Pn.__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(Pn,"__esModule",{value:!0});Pn.zip=void 0;var o6=Pe(),a6=le(),u6=Jo(),s6=or(),c6=X(),l6=Ct();function f6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l6.popResultSelector(e),n=u6.argsOrArgArray(e);return n.length?new o6.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){a6.innerFrom(n[s]).subscribe(c6.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(d){return d.length})){var f=o.map(function(d){return d.shift()});i.next(r?r.apply(void 0,i6([],n6(f))):f),o.some(function(d,p){return!d.length&&a[p]})&&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}}):s6.EMPTY}Pn.zip=f6});var IE=g(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0})});var Pv=g(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.audit=void 0;var d6=V(),p6=le(),jE=X();function h6(e){return d6.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(jE.createOperatorSubscriber(r,function(s){n=!0,i=s,o||p6.innerFrom(e(s)).subscribe(o=jE.createOperatorSubscriber(r,u,l))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}ef.audit=h6});var FE=g(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.auditTime=void 0;var m6=Mt(),v6=Pv(),b6=Rn();function g6(e,t){return t===void 0&&(t=m6.asyncScheduler),v6.audit(function(){return b6.timer(e,t)})}tf.auditTime=g6});var NE=g(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.buffer=void 0;var y6=V(),_6=at(),LE=X(),w6=le();function x6(e){return y6.operate(function(t,r){var n=[];return t.subscribe(LE.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),w6.innerFrom(e).subscribe(LE.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},_6.noop)),function(){n=null}})}rf.buffer=x6});var DE=g(ea=>{"use strict";var Mv=ea&&ea.__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(ea,"__esModule",{value:!0});ea.bufferCount=void 0;var S6=V(),O6=X(),E6=zr();function A6(e,t){return t===void 0&&(t=null),t=t??e,S6.operate(function(r,n){var i=[],o=0;r.subscribe(O6.createOperatorSubscriber(n,function(a){var u,l,s,c,f=null;o++%t===0&&i.push([]);try{for(var d=Mv(i),p=d.next();!p.done;p=d.next()){var m=p.value;m.push(a),e<=m.length&&(f=f??[],f.push(m))}}catch(y){u={error:y}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}if(f)try{for(var h=Mv(f),v=h.next();!v.done;v=h.next()){var m=v.value;E6.arrRemove(i,m),n.next(m)}}catch(y){s={error:y}}finally{try{v&&!v.done&&(c=h.return)&&c.call(h)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var l=Mv(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}))})}ea.bufferCount=A6});var zE=g(ta=>{"use strict";var T6=ta&&ta.__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(ta,"__esModule",{value:!0});ta.bufferTime=void 0;var R6=It(),P6=V(),M6=X(),C6=zr(),k6=Mt(),q6=Ct(),BE=Wr();function I6(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=q6.popScheduler(n))!==null&&t!==void 0?t:k6.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return P6.operate(function(l,s){var c=[],f=!1,d=function(h){var v=h.buffer,y=h.subs;y.unsubscribe(),C6.arrRemove(c,h),s.next(v),f&&p()},p=function(){if(c){var h=new R6.Subscription;s.add(h);var v=[],y={buffer:v,subs:h};c.push(y),BE.executeSchedule(h,o,function(){return d(y)},e)}};a!==null&&a>=0?BE.executeSchedule(s,o,p,a,!0):f=!0,p();var m=M6.createOperatorSubscriber(s,function(h){var v,y,w=c.slice();try{for(var _=T6(w),x=_.next();!x.done;x=_.next()){var S=x.value,E=S.buffer;E.push(h),u<=E.length&&d(S)}}catch(R){v={error:R}}finally{try{x&&!x.done&&(y=_.return)&&y.call(_)}finally{if(v)throw v.error}}},function(){for(;c?.length;)s.next(c.shift().buffer);m?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return c=null});l.subscribe(m)})}ta.bufferTime=I6});var HE=g(ra=>{"use strict";var j6=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.bufferToggle=void 0;var F6=It(),L6=V(),WE=le(),Cv=X(),UE=at(),N6=zr();function D6(e,t){return L6.operate(function(r,n){var i=[];WE.innerFrom(e).subscribe(Cv.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new F6.Subscription,l=function(){N6.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(WE.innerFrom(t(o)).subscribe(Cv.createOperatorSubscriber(n,l,UE.noop)))},UE.noop)),r.subscribe(Cv.createOperatorSubscriber(n,function(o){var a,u;try{for(var l=j6(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()}))})}ra.bufferToggle=D6});var GE=g(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.bufferWhen=void 0;var B6=V(),z6=at(),VE=X(),W6=le();function U6(e){return B6.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),W6.innerFrom(e()).subscribe(i=VE.createOperatorSubscriber(r,o,z6.noop))};o(),t.subscribe(VE.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}nf.bufferWhen=U6});var KE=g(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.catchError=void 0;var H6=le(),V6=X(),G6=V();function $E(e){return G6.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe(V6.createOperatorSubscriber(r,void 0,void 0,function(a){o=H6.innerFrom(e(a,$E(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}of.catchError=$E});var kv=g(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.scanInternals=void 0;var $6=X();function K6(e,t,r,n,i){return function(o,a){var u=r,l=t,s=0;o.subscribe($6.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()}))}}af.scanInternals=K6});var na=g(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.reduce=void 0;var Y6=kv(),X6=V();function Z6(e,t){return X6.operate(Y6.scanInternals(e,t,arguments.length>=2,!1,!0))}uf.reduce=Z6});var qv=g(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.toArray=void 0;var J6=na(),Q6=V(),e3=function(e,t){return e.push(t),e};function t3(){return Q6.operate(function(e,t){J6.reduce(e3,[])(e).subscribe(t)})}sf.toArray=t3});var Iv=g(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.joinAllInternals=void 0;var r3=ut(),n3=An(),i3=xu(),o3=Vr(),a3=qv();function u3(e,t){return i3.pipe(a3.toArray(),o3.mergeMap(function(r){return e(r)}),t?n3.mapOneOrManyArgs(t):r3.identity)}cf.joinAllInternals=u3});var jv=g(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.combineLatestAll=void 0;var s3=Pl(),c3=Iv();function l3(e){return c3.joinAllInternals(s3.combineLatest,e)}lf.combineLatestAll=l3});var YE=g(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.combineAll=void 0;var f3=jv();ff.combineAll=f3.combineLatestAll});var QE=g(Mn=>{"use strict";var XE=Mn&&Mn.__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},ZE=Mn&&Mn.__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(Mn,"__esModule",{value:!0});Mn.combineLatest=void 0;var d3=Pl(),p3=V(),h3=Jo(),m3=An(),v3=xu(),b3=Ct();function JE(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=b3.popResultSelector(e);return r?v3.pipe(JE.apply(void 0,ZE([],XE(e))),m3.mapOneOrManyArgs(r)):p3.operate(function(n,i){d3.combineLatestInit(ZE([n],XE(h3.argsOrArgArray(e))))(i)})}Mn.combineLatest=JE});var eA=g(Cn=>{"use strict";var g3=Cn&&Cn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},y3=Cn&&Cn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.combineLatestWith=void 0;var _3=QE();function w3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _3.combineLatest.apply(void 0,y3([],g3(e)))}Cn.combineLatestWith=w3});var Fv=g(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.concatMap=void 0;var tA=Vr(),x3=Ae();function S3(e,t){return x3.isFunction(t)?tA.mergeMap(e,t,1):tA.mergeMap(e,1)}df.concatMap=S3});var nA=g(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.concatMapTo=void 0;var rA=Fv(),O3=Ae();function E3(e,t){return O3.isFunction(t)?rA.concatMap(function(){return e},t):rA.concatMap(function(){return e})}pf.concatMapTo=E3});var iA=g(kn=>{"use strict";var A3=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},T3=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.concat=void 0;var R3=V(),P3=jl(),M3=Ct(),C3=Ur();function k3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=M3.popScheduler(e);return R3.operate(function(n,i){P3.concatAll()(C3.from(T3([n],A3(e)),r)).subscribe(i)})}kn.concat=k3});var oA=g(qn=>{"use strict";var q3=qn&&qn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},I3=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.concatWith=void 0;var j3=iA();function F3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j3.concat.apply(void 0,I3([],q3(e)))}qn.concatWith=F3});var aA=g(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.fromSubscribable=void 0;var L3=Pe();function N3(e){return new L3.Observable(function(t){return e.subscribe(t)})}hf.fromSubscribable=N3});var vf=g(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.connect=void 0;var D3=st(),B3=le(),z3=V(),W3=aA(),U3={connector:function(){return new D3.Subject}};function H3(e,t){t===void 0&&(t=U3);var r=t.connector;return z3.operate(function(n,i){var o=r();B3.innerFrom(e(W3.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}mf.connect=H3});var uA=g(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.count=void 0;var V3=na();function G3(e){return V3.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}bf.count=G3});var cA=g(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.debounce=void 0;var $3=V(),K3=at(),sA=X(),Y3=le();function X3(e){return $3.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(sA.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=sA.createOperatorSubscriber(r,a,K3.noop),Y3.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}gf.debounce=X3});var lA=g(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.debounceTime=void 0;var Z3=Mt(),J3=V(),Q3=X();function ez(e,t){return t===void 0&&(t=Z3.asyncScheduler),J3.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(Q3.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}))})}yf.debounceTime=ez});var ku=g(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.defaultIfEmpty=void 0;var tz=V(),rz=X();function nz(e){return tz.operate(function(t,r){var n=!1;t.subscribe(rz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}_f.defaultIfEmpty=nz});var qu=g(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.take=void 0;var iz=or(),oz=V(),az=X();function uz(e){return e<=0?function(){return iz.EMPTY}:oz.operate(function(t,r){var n=0;t.subscribe(az.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}wf.take=uz});var Lv=g(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.ignoreElements=void 0;var sz=V(),cz=X(),lz=at();function fz(){return sz.operate(function(e,t){e.subscribe(cz.createOperatorSubscriber(t,lz.noop))})}xf.ignoreElements=fz});var Nv=g(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.mapTo=void 0;var dz=On();function pz(e){return dz.map(function(){return e})}Sf.mapTo=pz});var Dv=g(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.delayWhen=void 0;var hz=Mu(),fA=qu(),mz=Lv(),vz=Nv(),bz=Vr(),gz=le();function dA(e,t){return t?function(r){return hz.concat(t.pipe(fA.take(1),mz.ignoreElements()),r.pipe(dA(e)))}:bz.mergeMap(function(r,n){return gz.innerFrom(e(r,n)).pipe(fA.take(1),vz.mapTo(r))})}Of.delayWhen=dA});var pA=g(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.delay=void 0;var yz=Mt(),_z=Dv(),wz=Rn();function xz(e,t){t===void 0&&(t=yz.asyncScheduler);var r=wz.timer(e,t);return _z.delayWhen(function(){return r})}Ef.delay=xz});var hA=g(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.dematerialize=void 0;var Sz=pl(),Oz=V(),Ez=X();function Az(){return Oz.operate(function(e,t){e.subscribe(Ez.createOperatorSubscriber(t,function(r){return Sz.observeNotification(r,t)}))})}Af.dematerialize=Az});var vA=g(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.distinct=void 0;var Tz=V(),mA=X(),Rz=at(),Pz=le();function Mz(e,t){return Tz.operate(function(r,n){var i=new Set;r.subscribe(mA.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&Pz.innerFrom(t).subscribe(mA.createOperatorSubscriber(n,function(){return i.clear()},Rz.noop))})}Tf.distinct=Mz});var Bv=g(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.distinctUntilChanged=void 0;var Cz=ut(),kz=V(),qz=X();function Iz(e,t){return t===void 0&&(t=Cz.identity),e=e??jz,kz.operate(function(r,n){var i,o=!0;r.subscribe(qz.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}Rf.distinctUntilChanged=Iz;function jz(e,t){return e===t}});var bA=g(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.distinctUntilKeyChanged=void 0;var Fz=Bv();function Lz(e,t){return Fz.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Pf.distinctUntilKeyChanged=Lz});var Iu=g(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.throwIfEmpty=void 0;var Nz=Sn(),Dz=V(),Bz=X();function zz(e){return e===void 0&&(e=Wz),Dz.operate(function(t,r){var n=!1;t.subscribe(Bz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}Mf.throwIfEmpty=zz;function Wz(){return new Nz.EmptyError}});var yA=g(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.elementAt=void 0;var gA=bv(),Uz=Mi(),Hz=Iu(),Vz=ku(),Gz=qu();function $z(e,t){if(e<0)throw new gA.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(Uz.filter(function(i,o){return o===e}),Gz.take(1),r?Vz.defaultIfEmpty(t):Hz.throwIfEmpty(function(){return new gA.ArgumentOutOfRangeError}))}}Cf.elementAt=$z});var _A=g(In=>{"use strict";var Kz=In&&In.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},Yz=In&&In.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(In,"__esModule",{value:!0});In.endWith=void 0;var Xz=Mu(),Zz=fl();function Jz(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return Xz.concat(r,Zz.of.apply(void 0,Yz([],Kz(e))))}}In.endWith=Jz});var wA=g(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.every=void 0;var Qz=V(),eW=X();function tW(e,t){return Qz.operate(function(r,n){var i=0;r.subscribe(eW.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}kf.every=tW});var zv=g(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.exhaustMap=void 0;var rW=On(),xA=le(),nW=V(),SA=X();function OA(e,t){return t?function(r){return r.pipe(OA(function(n,i){return xA.innerFrom(e(n,i)).pipe(rW.map(function(o,a){return t(n,o,i,a)}))}))}:nW.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(SA.createOperatorSubscriber(n,function(u){o||(o=SA.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),xA.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}qf.exhaustMap=OA});var Wv=g(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.exhaustAll=void 0;var iW=zv(),oW=ut();function aW(){return iW.exhaustMap(oW.identity)}If.exhaustAll=aW});var EA=g(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.exhaust=void 0;var uW=Wv();jf.exhaust=uW.exhaustAll});var AA=g(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.expand=void 0;var sW=V(),cW=Cl();function lW(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,sW.operate(function(n,i){return cW.mergeInternals(n,i,e,t,void 0,!0,r)})}Ff.expand=lW});var TA=g(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.finalize=void 0;var fW=V();function dW(e){return fW.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Lf.finalize=dW});var Uv=g(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.createFind=ia.find=void 0;var pW=V(),hW=X();function mW(e,t){return pW.operate(RA(e,t,"value"))}ia.find=mW;function RA(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(hW.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()}))}}ia.createFind=RA});var PA=g(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.findIndex=void 0;var vW=V(),bW=Uv();function gW(e,t){return vW.operate(bW.createFind(e,t,"index"))}Nf.findIndex=gW});var MA=g(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.first=void 0;var yW=Sn(),_W=Mi(),wW=qu(),xW=ku(),SW=Iu(),OW=ut();function EW(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?_W.filter(function(i,o){return e(i,o,n)}):OW.identity,wW.take(1),r?xW.defaultIfEmpty(t):SW.throwIfEmpty(function(){return new yW.EmptyError}))}}Df.first=EW});var kA=g(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.groupBy=void 0;var AW=Pe(),TW=le(),RW=st(),PW=V(),CA=X();function MW(e,t,r,n){return PW.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(m){u.forEach(m),m(o)},s=function(m){return l(function(h){return h.error(m)})},c=0,f=!1,d=new CA.OperatorSubscriber(o,function(m){try{var h=e(m),v=u.get(h);if(!v){u.set(h,v=n?n():new RW.Subject);var y=p(h,v);if(o.next(y),r){var w=CA.createOperatorSubscriber(v,function(){v.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(h)});d.add(TW.innerFrom(r(y)).subscribe(w))}}v.next(a?a(m):m)}catch(_){s(_)}},function(){return l(function(m){return m.complete()})},s,function(){return u.clear()},function(){return f=!0,c===0});i.subscribe(d);function p(m,h){var v=new AW.Observable(function(y){c++;var w=h.subscribe(y);return function(){w.unsubscribe(),--c===0&&f&&d.unsubscribe()}});return v.key=m,v}})}Bf.groupBy=MW});var qA=g(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.isEmpty=void 0;var CW=V(),kW=X();function qW(){return CW.operate(function(e,t){e.subscribe(kW.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}zf.isEmpty=qW});var Hv=g(oa=>{"use strict";var IW=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 jW=or(),FW=V(),LW=X();function NW(e){return e<=0?function(){return jW.EMPTY}:FW.operate(function(t,r){var n=[];t.subscribe(LW.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=IW(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}))})}oa.takeLast=NW});var IA=g(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.last=void 0;var DW=Sn(),BW=Mi(),zW=Hv(),WW=Iu(),UW=ku(),HW=ut();function VW(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?BW.filter(function(i,o){return e(i,o,n)}):HW.identity,zW.takeLast(1),r?UW.defaultIfEmpty(t):WW.throwIfEmpty(function(){return new DW.EmptyError}))}}Wf.last=VW});var jA=g(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.materialize=void 0;var Vv=pl(),GW=V(),$W=X();function KW(){return GW.operate(function(e,t){e.subscribe($W.createOperatorSubscriber(t,function(r){t.next(Vv.Notification.createNext(r))},function(){t.next(Vv.Notification.createComplete()),t.complete()},function(r){t.next(Vv.Notification.createError(r)),t.complete()}))})}Uf.materialize=KW});var FA=g(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.max=void 0;var YW=na(),XW=Ae();function ZW(e){return YW.reduce(XW.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Hf.max=ZW});var LA=g(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.flatMap=void 0;var JW=Vr();Vf.flatMap=JW.mergeMap});var DA=g(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.mergeMapTo=void 0;var NA=Vr(),QW=Ae();function eU(e,t,r){return r===void 0&&(r=1/0),QW.isFunction(t)?NA.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),NA.mergeMap(function(){return e},r))}Gf.mergeMapTo=eU});var BA=g($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.mergeScan=void 0;var tU=V(),rU=Cl();function nU(e,t,r){return r===void 0&&(r=1/0),tU.operate(function(n,i){var o=t;return rU.mergeInternals(n,i,function(a,u){return e(o,a,u)},r,function(a){o=a},!1,void 0,function(){return o=null})})}$f.mergeScan=nU});var WA=g(jn=>{"use strict";var iU=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},oU=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.merge=void 0;var aU=V(),uU=Pu(),zA=Ct(),sU=Ur();function cU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zA.popScheduler(e),n=zA.popNumber(e,1/0);return aU.operate(function(i,o){uU.mergeAll(n)(sU.from(oU([i],iU(e)),r)).subscribe(o)})}jn.merge=cU});var UA=g(Fn=>{"use strict";var lU=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},fU=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.mergeWith=void 0;var dU=WA();function pU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return dU.merge.apply(void 0,fU([],lU(e)))}Fn.mergeWith=pU});var HA=g(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.min=void 0;var hU=na(),mU=Ae();function vU(e){return hU.reduce(mU.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}Kf.min=vU});var Xf=g(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.multicast=void 0;var bU=Su(),VA=Ae(),gU=vf();function yU(e,t){var r=VA.isFunction(e)?e:function(){return e};return VA.isFunction(t)?gU.connect(t,{connector:r}):function(n){return new bU.ConnectableObservable(n,r)}}Yf.multicast=yU});var $A=g(Mr=>{"use strict";var _U=Mr&&Mr.__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},wU=Mr&&Mr.__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(Mr,"__esModule",{value:!0});Mr.onErrorResumeNext=Mr.onErrorResumeNextWith=void 0;var xU=Jo(),SU=Tv();function GA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xU.argsOrArgArray(e);return function(n){return SU.onErrorResumeNext.apply(void 0,wU([n],_U(r)))}}Mr.onErrorResumeNextWith=GA;Mr.onErrorResumeNext=GA});var KA=g(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.pairwise=void 0;var OU=V(),EU=X();function AU(){return OU.operate(function(e,t){var r,n=!1;e.subscribe(EU.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}Zf.pairwise=AU});var YA=g(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});Jf.pluck=void 0;var TU=On();function RU(){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 TU.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})}Jf.pluck=RU});var XA=g(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.publish=void 0;var PU=st(),MU=Xf(),CU=vf();function kU(e){return e?function(t){return CU.connect(e)(t)}:function(t){return MU.multicast(new PU.Subject)(t)}}Qf.publish=kU});var ZA=g(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.publishBehavior=void 0;var qU=ev(),IU=Su();function jU(e){return function(t){var r=new qU.BehaviorSubject(e);return new IU.ConnectableObservable(t,function(){return r})}}ed.publishBehavior=jU});var JA=g(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.publishLast=void 0;var FU=zc(),LU=Su();function NU(){return function(e){var t=new FU.AsyncSubject;return new LU.ConnectableObservable(e,function(){return t})}}td.publishLast=NU});var eT=g(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.publishReplay=void 0;var DU=Bc(),BU=Xf(),QA=Ae();function zU(e,t,r,n){r&&!QA.isFunction(r)&&(n=r);var i=QA.isFunction(r)?r:void 0;return function(o){return BU.multicast(new DU.ReplaySubject(e,t,n),i)(o)}}rd.publishReplay=zU});var tT=g(Ln=>{"use strict";var WU=Ln&&Ln.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},UU=Ln&&Ln.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.raceWith=void 0;var HU=Rv(),VU=V(),GU=ut();function $U(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?VU.operate(function(r,n){HU.raceInit(UU([r],WU(e)))(n)}):GU.identity}Ln.raceWith=$U});var nT=g(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.repeat=void 0;var KU=or(),YU=V(),rT=X(),XU=le(),ZU=Rn();function JU(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 KU.EMPTY}:YU.operate(function(i,o){var a=0,u,l=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?ZU.timer(n):XU.innerFrom(n(a)),f=rT.createOperatorSubscriber(o,function(){f.unsubscribe(),s()});c.subscribe(f)}else s()},s=function(){var c=!1;u=i.subscribe(rT.createOperatorSubscriber(o,void 0,function(){++a<r?u?l():c=!0:o.complete()})),c&&l()};s()})}nd.repeat=JU});var oT=g(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.repeatWhen=void 0;var QU=le(),e4=st(),t4=V(),iT=X();function r4(e){return t4.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 e4.Subject,QU.innerFrom(e(o)).subscribe(iT.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,l()}))),o},c=function(){u=!1,n=t.subscribe(iT.createOperatorSubscriber(r,void 0,function(){u=!0,!l()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}id.repeatWhen=r4});var uT=g(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.retry=void 0;var n4=V(),aT=X(),i4=ut(),o4=Rn(),a4=le();function u4(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?i4.identity:n4.operate(function(u,l){var s=0,c,f=function(){var d=!1;c=u.subscribe(aT.createOperatorSubscriber(l,function(p){a&&(s=0),l.next(p)},void 0,function(p){if(s++<n){var m=function(){c?(c.unsubscribe(),c=null,f()):d=!0};if(i!=null){var h=typeof i=="number"?o4.timer(i):a4.innerFrom(i(p,s)),v=aT.createOperatorSubscriber(l,function(){v.unsubscribe(),m()},function(){l.complete()});h.subscribe(v)}else m()}else l.error(p)})),d&&(c.unsubscribe(),c=null,f())};f()})}od.retry=u4});var cT=g(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.retryWhen=void 0;var s4=le(),c4=st(),l4=V(),sT=X();function f4(e){return l4.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(sT.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new c4.Subject,s4.innerFrom(e(o)).subscribe(sT.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}ad.retryWhen=f4});var Gv=g(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.sample=void 0;var d4=le(),p4=V(),h4=at(),lT=X();function m4(e){return p4.operate(function(t,r){var n=!1,i=null;t.subscribe(lT.createOperatorSubscriber(r,function(o){n=!0,i=o})),d4.innerFrom(e).subscribe(lT.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},h4.noop))})}ud.sample=m4});var fT=g(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.sampleTime=void 0;var v4=Mt(),b4=Gv(),g4=Ev();function y4(e,t){return t===void 0&&(t=v4.asyncScheduler),b4.sample(g4.interval(e,t))}sd.sampleTime=y4});var dT=g(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.scan=void 0;var _4=V(),w4=kv();function x4(e,t){return _4.operate(w4.scanInternals(e,t,arguments.length>=2,!0))}cd.scan=x4});var hT=g(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.sequenceEqual=void 0;var S4=V(),O4=X(),E4=le();function A4(e,t){return t===void 0&&(t=function(r,n){return r===n}),S4.operate(function(r,n){var i=pT(),o=pT(),a=function(l){n.next(l),n.complete()},u=function(l,s){var c=O4.createOperatorSubscriber(n,function(f){var d=s.buffer,p=s.complete;d.length===0?p?a(!1):l.buffer.push(f):!t(f,d.shift())&&a(!1)},function(){l.complete=!0;var f=s.complete,d=s.buffer;f&&a(d.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),E4.innerFrom(e).subscribe(u(o,i))})}ld.sequenceEqual=A4;function pT(){return{buffer:[],complete:!1}}});var Kv=g(Nn=>{"use strict";var T4=Nn&&Nn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},R4=Nn&&Nn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.share=void 0;var mT=le(),P4=st(),vT=To(),M4=V();function C4(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new P4.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,d,p=0,m=!1,h=!1,v=function(){f?.unsubscribe(),f=void 0},y=function(){v(),c=d=void 0,m=h=!1},w=function(){var _=c;y(),_?.unsubscribe()};return M4.operate(function(_,x){p++,!h&&!m&&v();var S=d=d??r();x.add(function(){p--,p===0&&!h&&!m&&(f=$v(w,l))}),S.subscribe(x),!c&&p>0&&(c=new vT.SafeSubscriber({next:function(E){return S.next(E)},error:function(E){h=!0,v(),f=$v(y,i,E),S.error(E)},complete:function(){m=!0,v(),f=$v(y,a),S.complete()}}),mT.innerFrom(_).subscribe(c))})(s)}}Nn.share=C4;function $v(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 vT.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return mT.innerFrom(t.apply(void 0,R4([],T4(r)))).subscribe(i)}}});var bT=g(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.shareReplay=void 0;var k4=Bc(),q4=Kv();function I4(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,q4.share({connector:function(){return new k4.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}fd.shareReplay=I4});var gT=g(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.single=void 0;var j4=Sn(),F4=yv(),L4=gv(),N4=V(),D4=X();function B4(e){return N4.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(D4.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new F4.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new L4.NotFoundError("No matching values"):new j4.EmptyError)}))})}dd.single=B4});var yT=g(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.skip=void 0;var z4=Mi();function W4(e){return z4.filter(function(t,r){return e<=r})}pd.skip=W4});var _T=g(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.skipLast=void 0;var U4=ut(),H4=V(),V4=X();function G4(e){return e<=0?U4.identity:H4.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe(V4.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}})}hd.skipLast=G4});var xT=g(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.skipUntil=void 0;var $4=V(),wT=X(),K4=le(),Y4=at();function X4(e){return $4.operate(function(t,r){var n=!1,i=wT.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},Y4.noop);K4.innerFrom(e).subscribe(i),t.subscribe(wT.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}md.skipUntil=X4});var ST=g(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.skipWhile=void 0;var Z4=V(),J4=X();function Q4(e){return Z4.operate(function(t,r){var n=!1,i=0;t.subscribe(J4.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}vd.skipWhile=Q4});var ET=g(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.startWith=void 0;var OT=Mu(),eH=Ct(),tH=V();function rH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=eH.popScheduler(e);return tH.operate(function(n,i){(r?OT.concat(e,n,r):OT.concat(e,n)).subscribe(i)})}bd.startWith=rH});var ju=g(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.switchMap=void 0;var nH=le(),iH=V(),AT=X();function oH(e,t){return iH.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(AT.createOperatorSubscriber(n,function(l){i?.unsubscribe();var s=0,c=o++;nH.innerFrom(e(l,c)).subscribe(i=AT.createOperatorSubscriber(n,function(f){return n.next(t?t(l,f,c,s++):f)},function(){i=null,u()}))},function(){a=!0,u()}))})}gd.switchMap=oH});var TT=g(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.switchAll=void 0;var aH=ju(),uH=ut();function sH(){return aH.switchMap(uH.identity)}yd.switchAll=sH});var PT=g(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.switchMapTo=void 0;var RT=ju(),cH=Ae();function lH(e,t){return cH.isFunction(t)?RT.switchMap(function(){return e},t):RT.switchMap(function(){return e})}_d.switchMapTo=lH});var MT=g(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.switchScan=void 0;var fH=ju(),dH=V();function pH(e,t){return dH.operate(function(r,n){var i=t;return fH.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}wd.switchScan=pH});var CT=g(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.takeUntil=void 0;var hH=V(),mH=X(),vH=le(),bH=at();function gH(e){return hH.operate(function(t,r){vH.innerFrom(e).subscribe(mH.createOperatorSubscriber(r,function(){return r.complete()},bH.noop)),!r.closed&&t.subscribe(r)})}xd.takeUntil=gH});var kT=g(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.takeWhile=void 0;var yH=V(),_H=X();function wH(e,t){return t===void 0&&(t=!1),yH.operate(function(r,n){var i=0;r.subscribe(_H.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Sd.takeWhile=wH});var qT=g(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.tap=void 0;var xH=Ae(),SH=V(),OH=X(),EH=ut();function AH(e,t,r){var n=xH.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?SH.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(OH.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)}))}):EH.identity}Od.tap=AH});var Yv=g(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.throttle=void 0;var TH=V(),IT=X(),RH=le();function PH(e,t){return TH.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,d=!1,p=function(){f?.unsubscribe(),f=null,l&&(v(),d&&n.complete())},m=function(){f=null,d&&n.complete()},h=function(y){return f=RH.innerFrom(e(y)).subscribe(IT.createOperatorSubscriber(n,p,m))},v=function(){if(s){s=!1;var y=c;c=null,n.next(y),!d&&h(y)}};r.subscribe(IT.createOperatorSubscriber(n,function(y){s=!0,c=y,!(f&&!f.closed)&&(a?v():h(y))},function(){d=!0,!(l&&s&&f&&!f.closed)&&n.complete()}))})}Ed.throttle=PH});var jT=g(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.throttleTime=void 0;var MH=Mt(),CH=Yv(),kH=Rn();function qH(e,t,r){t===void 0&&(t=MH.asyncScheduler);var n=kH.timer(e,t);return CH.throttle(function(){return n},r)}Ad.throttleTime=qH});var LT=g(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.TimeInterval=aa.timeInterval=void 0;var IH=Mt(),jH=V(),FH=X();function LH(e){return e===void 0&&(e=IH.asyncScheduler),jH.operate(function(t,r){var n=e.now();t.subscribe(FH.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new FT(i,a))}))})}aa.timeInterval=LH;var FT=function(){function e(t,r){this.value=t,this.interval=r}return e}();aa.TimeInterval=FT});var NT=g(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.timeoutWith=void 0;var NH=Mt(),DH=xl(),BH=Sl();function zH(e,t,r){var n,i,o;if(r=r??NH.async,DH.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 BH.timeout({first:n,each:i,scheduler:r,with:o})}Td.timeoutWith=zH});var DT=g(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.timestamp=void 0;var WH=Dc(),UH=On();function HH(e){return e===void 0&&(e=WH.dateTimestampProvider),UH.map(function(t){return{value:t,timestamp:e.now()}})}Rd.timestamp=HH});var WT=g(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.window=void 0;var BT=st(),VH=V(),zT=X(),GH=at(),$H=le();function KH(e){return VH.operate(function(t,r){var n=new BT.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(zT.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),$H.innerFrom(e).subscribe(zT.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new BT.Subject)},GH.noop,i)),function(){n?.unsubscribe(),n=null}})}Pd.window=KH});var HT=g(ua=>{"use strict";var YH=ua&&ua.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ua,"__esModule",{value:!0});ua.windowCount=void 0;var UT=st(),XH=V(),ZH=X();function JH(e,t){t===void 0&&(t=0);var r=t>0?t:e;return XH.operate(function(n,i){var o=[new UT.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(ZH.createOperatorSubscriber(i,function(l){var s,c;try{for(var f=YH(o),d=f.next();!d.done;d=f.next()){var p=d.value;p.next(l)}}catch(v){s={error:v}}finally{try{d&&!d.done&&(c=f.return)&&c.call(f)}finally{if(s)throw s.error}}var m=u-e+1;if(m>=0&&m%r===0&&o.shift().complete(),++u%r===0){var h=new UT.Subject;o.push(h),i.next(h.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}))})}ua.windowCount=JH});var GT=g(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.windowTime=void 0;var QH=st(),e7=Mt(),t7=It(),r7=V(),n7=X(),i7=zr(),o7=Ct(),VT=Wr();function a7(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=o7.popScheduler(n))!==null&&t!==void 0?t:e7.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return r7.operate(function(l,s){var c=[],f=!1,d=function(v){var y=v.window,w=v.subs;y.complete(),w.unsubscribe(),i7.arrRemove(c,v),f&&p()},p=function(){if(c){var v=new t7.Subscription;s.add(v);var y=new QH.Subject,w={window:y,subs:v,seen:0};c.push(w),s.next(y.asObservable()),VT.executeSchedule(v,o,function(){return d(w)},e)}};a!==null&&a>=0?VT.executeSchedule(s,o,p,a,!0):f=!0,p();var m=function(v){return c.slice().forEach(v)},h=function(v){m(function(y){var w=y.window;return v(w)}),v(s),s.unsubscribe()};return l.subscribe(n7.createOperatorSubscriber(s,function(v){m(function(y){y.window.next(v),u<=++y.seen&&d(y)})},function(){return h(function(v){return v.complete()})},function(v){return h(function(y){return y.error(v)})})),function(){c=null}})}Md.windowTime=a7});var YT=g(sa=>{"use strict";var u7=sa&&sa.__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(sa,"__esModule",{value:!0});sa.windowToggle=void 0;var s7=st(),c7=It(),l7=V(),$T=le(),Xv=X(),KT=at(),f7=zr();function d7(e,t){return l7.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};$T.innerFrom(e).subscribe(Xv.createOperatorSubscriber(n,function(a){var u=new s7.Subject;i.push(u);var l=new c7.Subscription,s=function(){f7.arrRemove(i,u),u.complete(),l.unsubscribe()},c;try{c=$T.innerFrom(t(a))}catch(f){o(f);return}n.next(u.asObservable()),l.add(c.subscribe(Xv.createOperatorSubscriber(n,s,KT.noop,o)))},KT.noop)),r.subscribe(Xv.createOperatorSubscriber(n,function(a){var u,l,s=i.slice();try{for(var c=u7(s),f=c.next();!f.done;f=c.next()){var d=f.value;d.next(a)}}catch(p){u={error:p}}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()}))})}sa.windowToggle=d7});var ZT=g(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.windowWhen=void 0;var p7=st(),h7=V(),XT=X(),m7=le();function v7(e){return h7.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new p7.Subject,r.next(n.asObservable());var u;try{u=m7.innerFrom(e())}catch(l){o(l);return}u.subscribe(i=XT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(XT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}Cd.windowWhen=v7});var tR=g(Dn=>{"use strict";var JT=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},QT=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.withLatestFrom=void 0;var b7=V(),eR=X(),g7=le(),y7=ut(),_7=at(),w7=Ct();function x7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=w7.popResultSelector(e);return b7.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),l=!1,s=function(f){g7.innerFrom(e[f]).subscribe(eR.createOperatorSubscriber(i,function(d){a[f]=d,!l&&!u[f]&&(u[f]=!0,(l=u.every(y7.identity))&&(u=null))},_7.noop))},c=0;c<o;c++)s(c);n.subscribe(eR.createOperatorSubscriber(i,function(f){if(l){var d=QT([f],JT(a));i.next(r?r.apply(void 0,QT([],JT(d))):d)}}))})}Dn.withLatestFrom=x7});var rR=g(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.zipAll=void 0;var S7=Ql(),O7=Iv();function E7(e){return O7.joinAllInternals(S7.zip,e)}kd.zipAll=E7});var nR=g(Bn=>{"use strict";var A7=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},T7=Bn&&Bn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.zip=void 0;var R7=Ql(),P7=V();function M7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return P7.operate(function(r,n){R7.zip.apply(void 0,T7([r],A7(e))).subscribe(n)})}Bn.zip=M7});var iR=g(zn=>{"use strict";var C7=zn&&zn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},k7=zn&&zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(zn,"__esModule",{value:!0});zn.zipWith=void 0;var q7=nR();function I7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q7.zip.apply(void 0,k7([],C7(e)))}zn.zipWith=I7});var fR=g(b=>{"use strict";var j7=b&&b.__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]}),F7=b&&b.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&j7(t,e,r)};Object.defineProperty(b,"__esModule",{value:!0});b.interval=b.iif=b.generate=b.fromEventPattern=b.fromEvent=b.from=b.forkJoin=b.empty=b.defer=b.connectable=b.concat=b.combineLatest=b.bindNodeCallback=b.bindCallback=b.UnsubscriptionError=b.TimeoutError=b.SequenceError=b.ObjectUnsubscribedError=b.NotFoundError=b.EmptyError=b.ArgumentOutOfRangeError=b.firstValueFrom=b.lastValueFrom=b.isObservable=b.identity=b.noop=b.pipe=b.NotificationKind=b.Notification=b.Subscriber=b.Subscription=b.Scheduler=b.VirtualAction=b.VirtualTimeScheduler=b.animationFrameScheduler=b.animationFrame=b.queueScheduler=b.queue=b.asyncScheduler=b.async=b.asapScheduler=b.asap=b.AsyncSubject=b.ReplaySubject=b.BehaviorSubject=b.Subject=b.animationFrames=b.observable=b.ConnectableObservable=b.Observable=void 0;b.filter=b.expand=b.exhaustMap=b.exhaustAll=b.exhaust=b.every=b.endWith=b.elementAt=b.distinctUntilKeyChanged=b.distinctUntilChanged=b.distinct=b.dematerialize=b.delayWhen=b.delay=b.defaultIfEmpty=b.debounceTime=b.debounce=b.count=b.connect=b.concatWith=b.concatMapTo=b.concatMap=b.concatAll=b.combineLatestWith=b.combineLatestAll=b.combineAll=b.catchError=b.bufferWhen=b.bufferToggle=b.bufferTime=b.bufferCount=b.buffer=b.auditTime=b.audit=b.config=b.NEVER=b.EMPTY=b.scheduled=b.zip=b.using=b.timer=b.throwError=b.range=b.race=b.partition=b.pairs=b.onErrorResumeNext=b.of=b.never=b.merge=void 0;b.switchMap=b.switchAll=b.subscribeOn=b.startWith=b.skipWhile=b.skipUntil=b.skipLast=b.skip=b.single=b.shareReplay=b.share=b.sequenceEqual=b.scan=b.sampleTime=b.sample=b.refCount=b.retryWhen=b.retry=b.repeatWhen=b.repeat=b.reduce=b.raceWith=b.publishReplay=b.publishLast=b.publishBehavior=b.publish=b.pluck=b.pairwise=b.onErrorResumeNextWith=b.observeOn=b.multicast=b.min=b.mergeWith=b.mergeScan=b.mergeMapTo=b.mergeMap=b.flatMap=b.mergeAll=b.max=b.materialize=b.mapTo=b.map=b.last=b.isEmpty=b.ignoreElements=b.groupBy=b.first=b.findIndex=b.find=b.finalize=void 0;b.zipWith=b.zipAll=b.withLatestFrom=b.windowWhen=b.windowToggle=b.windowTime=b.windowCount=b.window=b.toArray=b.timestamp=b.timeoutWith=b.timeout=b.timeInterval=b.throwIfEmpty=b.throttleTime=b.throttle=b.tap=b.takeWhile=b.takeUntil=b.takeLast=b.take=b.switchScan=b.switchMapTo=void 0;var L7=Pe();Object.defineProperty(b,"Observable",{enumerable:!0,get:function(){return L7.Observable}});var N7=Su();Object.defineProperty(b,"ConnectableObservable",{enumerable:!0,get:function(){return N7.ConnectableObservable}});var D7=wu();Object.defineProperty(b,"observable",{enumerable:!0,get:function(){return D7.observable}});var B7=cO();Object.defineProperty(b,"animationFrames",{enumerable:!0,get:function(){return B7.animationFrames}});var z7=st();Object.defineProperty(b,"Subject",{enumerable:!0,get:function(){return z7.Subject}});var W7=ev();Object.defineProperty(b,"BehaviorSubject",{enumerable:!0,get:function(){return W7.BehaviorSubject}});var U7=Bc();Object.defineProperty(b,"ReplaySubject",{enumerable:!0,get:function(){return U7.ReplaySubject}});var H7=zc();Object.defineProperty(b,"AsyncSubject",{enumerable:!0,get:function(){return H7.AsyncSubject}});var oR=AO();Object.defineProperty(b,"asap",{enumerable:!0,get:function(){return oR.asap}});Object.defineProperty(b,"asapScheduler",{enumerable:!0,get:function(){return oR.asapScheduler}});var aR=Mt();Object.defineProperty(b,"async",{enumerable:!0,get:function(){return aR.async}});Object.defineProperty(b,"asyncScheduler",{enumerable:!0,get:function(){return aR.asyncScheduler}});var uR=PO();Object.defineProperty(b,"queue",{enumerable:!0,get:function(){return uR.queue}});Object.defineProperty(b,"queueScheduler",{enumerable:!0,get:function(){return uR.queueScheduler}});var sR=qO();Object.defineProperty(b,"animationFrame",{enumerable:!0,get:function(){return sR.animationFrame}});Object.defineProperty(b,"animationFrameScheduler",{enumerable:!0,get:function(){return sR.animationFrameScheduler}});var cR=FO();Object.defineProperty(b,"VirtualTimeScheduler",{enumerable:!0,get:function(){return cR.VirtualTimeScheduler}});Object.defineProperty(b,"VirtualAction",{enumerable:!0,get:function(){return cR.VirtualAction}});var V7=rv();Object.defineProperty(b,"Scheduler",{enumerable:!0,get:function(){return V7.Scheduler}});var G7=It();Object.defineProperty(b,"Subscription",{enumerable:!0,get:function(){return G7.Subscription}});var $7=To();Object.defineProperty(b,"Subscriber",{enumerable:!0,get:function(){return $7.Subscriber}});var lR=pl();Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return lR.Notification}});Object.defineProperty(b,"NotificationKind",{enumerable:!0,get:function(){return lR.NotificationKind}});var K7=xu();Object.defineProperty(b,"pipe",{enumerable:!0,get:function(){return K7.pipe}});var Y7=at();Object.defineProperty(b,"noop",{enumerable:!0,get:function(){return Y7.noop}});var X7=ut();Object.defineProperty(b,"identity",{enumerable:!0,get:function(){return X7.identity}});var Z7=QO();Object.defineProperty(b,"isObservable",{enumerable:!0,get:function(){return Z7.isObservable}});var J7=eE();Object.defineProperty(b,"lastValueFrom",{enumerable:!0,get:function(){return J7.lastValueFrom}});var Q7=tE();Object.defineProperty(b,"firstValueFrom",{enumerable:!0,get:function(){return Q7.firstValueFrom}});var eV=bv();Object.defineProperty(b,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return eV.ArgumentOutOfRangeError}});var tV=Sn();Object.defineProperty(b,"EmptyError",{enumerable:!0,get:function(){return tV.EmptyError}});var rV=gv();Object.defineProperty(b,"NotFoundError",{enumerable:!0,get:function(){return rV.NotFoundError}});var nV=Xm();Object.defineProperty(b,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return nV.ObjectUnsubscribedError}});var iV=yv();Object.defineProperty(b,"SequenceError",{enumerable:!0,get:function(){return iV.SequenceError}});var oV=Sl();Object.defineProperty(b,"TimeoutError",{enumerable:!0,get:function(){return oV.TimeoutError}});var aV=Lm();Object.defineProperty(b,"UnsubscriptionError",{enumerable:!0,get:function(){return aV.UnsubscriptionError}});var uV=nE();Object.defineProperty(b,"bindCallback",{enumerable:!0,get:function(){return uV.bindCallback}});var sV=iE();Object.defineProperty(b,"bindNodeCallback",{enumerable:!0,get:function(){return sV.bindNodeCallback}});var cV=Pl();Object.defineProperty(b,"combineLatest",{enumerable:!0,get:function(){return cV.combineLatest}});var lV=Mu();Object.defineProperty(b,"concat",{enumerable:!0,get:function(){return lV.concat}});var fV=dE();Object.defineProperty(b,"connectable",{enumerable:!0,get:function(){return fV.connectable}});var dV=Cu();Object.defineProperty(b,"defer",{enumerable:!0,get:function(){return dV.defer}});var pV=or();Object.defineProperty(b,"empty",{enumerable:!0,get:function(){return pV.empty}});var hV=pE();Object.defineProperty(b,"forkJoin",{enumerable:!0,get:function(){return hV.forkJoin}});var mV=Ur();Object.defineProperty(b,"from",{enumerable:!0,get:function(){return mV.from}});var vV=mE();Object.defineProperty(b,"fromEvent",{enumerable:!0,get:function(){return vV.fromEvent}});var bV=bE();Object.defineProperty(b,"fromEventPattern",{enumerable:!0,get:function(){return bV.fromEventPattern}});var gV=yE();Object.defineProperty(b,"generate",{enumerable:!0,get:function(){return gV.generate}});var yV=_E();Object.defineProperty(b,"iif",{enumerable:!0,get:function(){return yV.iif}});var _V=Ev();Object.defineProperty(b,"interval",{enumerable:!0,get:function(){return _V.interval}});var wV=xE();Object.defineProperty(b,"merge",{enumerable:!0,get:function(){return wV.merge}});var xV=Av();Object.defineProperty(b,"never",{enumerable:!0,get:function(){return xV.never}});var SV=fl();Object.defineProperty(b,"of",{enumerable:!0,get:function(){return SV.of}});var OV=Tv();Object.defineProperty(b,"onErrorResumeNext",{enumerable:!0,get:function(){return OV.onErrorResumeNext}});var EV=OE();Object.defineProperty(b,"pairs",{enumerable:!0,get:function(){return EV.pairs}});var AV=RE();Object.defineProperty(b,"partition",{enumerable:!0,get:function(){return AV.partition}});var TV=Rv();Object.defineProperty(b,"race",{enumerable:!0,get:function(){return TV.race}});var RV=CE();Object.defineProperty(b,"range",{enumerable:!0,get:function(){return RV.range}});var PV=vv();Object.defineProperty(b,"throwError",{enumerable:!0,get:function(){return PV.throwError}});var MV=Rn();Object.defineProperty(b,"timer",{enumerable:!0,get:function(){return MV.timer}});var CV=kE();Object.defineProperty(b,"using",{enumerable:!0,get:function(){return CV.using}});var kV=Ql();Object.defineProperty(b,"zip",{enumerable:!0,get:function(){return kV.zip}});var qV=mv();Object.defineProperty(b,"scheduled",{enumerable:!0,get:function(){return qV.scheduled}});var IV=or();Object.defineProperty(b,"EMPTY",{enumerable:!0,get:function(){return IV.EMPTY}});var jV=Av();Object.defineProperty(b,"NEVER",{enumerable:!0,get:function(){return jV.NEVER}});F7(IE(),b);var FV=Eo();Object.defineProperty(b,"config",{enumerable:!0,get:function(){return FV.config}});var LV=Pv();Object.defineProperty(b,"audit",{enumerable:!0,get:function(){return LV.audit}});var NV=FE();Object.defineProperty(b,"auditTime",{enumerable:!0,get:function(){return NV.auditTime}});var DV=NE();Object.defineProperty(b,"buffer",{enumerable:!0,get:function(){return DV.buffer}});var BV=DE();Object.defineProperty(b,"bufferCount",{enumerable:!0,get:function(){return BV.bufferCount}});var zV=zE();Object.defineProperty(b,"bufferTime",{enumerable:!0,get:function(){return zV.bufferTime}});var WV=HE();Object.defineProperty(b,"bufferToggle",{enumerable:!0,get:function(){return WV.bufferToggle}});var UV=GE();Object.defineProperty(b,"bufferWhen",{enumerable:!0,get:function(){return UV.bufferWhen}});var HV=KE();Object.defineProperty(b,"catchError",{enumerable:!0,get:function(){return HV.catchError}});var VV=YE();Object.defineProperty(b,"combineAll",{enumerable:!0,get:function(){return VV.combineAll}});var GV=jv();Object.defineProperty(b,"combineLatestAll",{enumerable:!0,get:function(){return GV.combineLatestAll}});var $V=eA();Object.defineProperty(b,"combineLatestWith",{enumerable:!0,get:function(){return $V.combineLatestWith}});var KV=jl();Object.defineProperty(b,"concatAll",{enumerable:!0,get:function(){return KV.concatAll}});var YV=Fv();Object.defineProperty(b,"concatMap",{enumerable:!0,get:function(){return YV.concatMap}});var XV=nA();Object.defineProperty(b,"concatMapTo",{enumerable:!0,get:function(){return XV.concatMapTo}});var ZV=oA();Object.defineProperty(b,"concatWith",{enumerable:!0,get:function(){return ZV.concatWith}});var JV=vf();Object.defineProperty(b,"connect",{enumerable:!0,get:function(){return JV.connect}});var QV=uA();Object.defineProperty(b,"count",{enumerable:!0,get:function(){return QV.count}});var eG=cA();Object.defineProperty(b,"debounce",{enumerable:!0,get:function(){return eG.debounce}});var tG=lA();Object.defineProperty(b,"debounceTime",{enumerable:!0,get:function(){return tG.debounceTime}});var rG=ku();Object.defineProperty(b,"defaultIfEmpty",{enumerable:!0,get:function(){return rG.defaultIfEmpty}});var nG=pA();Object.defineProperty(b,"delay",{enumerable:!0,get:function(){return nG.delay}});var iG=Dv();Object.defineProperty(b,"delayWhen",{enumerable:!0,get:function(){return iG.delayWhen}});var oG=hA();Object.defineProperty(b,"dematerialize",{enumerable:!0,get:function(){return oG.dematerialize}});var aG=vA();Object.defineProperty(b,"distinct",{enumerable:!0,get:function(){return aG.distinct}});var uG=Bv();Object.defineProperty(b,"distinctUntilChanged",{enumerable:!0,get:function(){return uG.distinctUntilChanged}});var sG=bA();Object.defineProperty(b,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return sG.distinctUntilKeyChanged}});var cG=yA();Object.defineProperty(b,"elementAt",{enumerable:!0,get:function(){return cG.elementAt}});var lG=_A();Object.defineProperty(b,"endWith",{enumerable:!0,get:function(){return lG.endWith}});var fG=wA();Object.defineProperty(b,"every",{enumerable:!0,get:function(){return fG.every}});var dG=EA();Object.defineProperty(b,"exhaust",{enumerable:!0,get:function(){return dG.exhaust}});var pG=Wv();Object.defineProperty(b,"exhaustAll",{enumerable:!0,get:function(){return pG.exhaustAll}});var hG=zv();Object.defineProperty(b,"exhaustMap",{enumerable:!0,get:function(){return hG.exhaustMap}});var mG=AA();Object.defineProperty(b,"expand",{enumerable:!0,get:function(){return mG.expand}});var vG=Mi();Object.defineProperty(b,"filter",{enumerable:!0,get:function(){return vG.filter}});var bG=TA();Object.defineProperty(b,"finalize",{enumerable:!0,get:function(){return bG.finalize}});var gG=Uv();Object.defineProperty(b,"find",{enumerable:!0,get:function(){return gG.find}});var yG=PA();Object.defineProperty(b,"findIndex",{enumerable:!0,get:function(){return yG.findIndex}});var _G=MA();Object.defineProperty(b,"first",{enumerable:!0,get:function(){return _G.first}});var wG=kA();Object.defineProperty(b,"groupBy",{enumerable:!0,get:function(){return wG.groupBy}});var xG=Lv();Object.defineProperty(b,"ignoreElements",{enumerable:!0,get:function(){return xG.ignoreElements}});var SG=qA();Object.defineProperty(b,"isEmpty",{enumerable:!0,get:function(){return SG.isEmpty}});var OG=IA();Object.defineProperty(b,"last",{enumerable:!0,get:function(){return OG.last}});var EG=On();Object.defineProperty(b,"map",{enumerable:!0,get:function(){return EG.map}});var AG=Nv();Object.defineProperty(b,"mapTo",{enumerable:!0,get:function(){return AG.mapTo}});var TG=jA();Object.defineProperty(b,"materialize",{enumerable:!0,get:function(){return TG.materialize}});var RG=FA();Object.defineProperty(b,"max",{enumerable:!0,get:function(){return RG.max}});var PG=Pu();Object.defineProperty(b,"mergeAll",{enumerable:!0,get:function(){return PG.mergeAll}});var MG=LA();Object.defineProperty(b,"flatMap",{enumerable:!0,get:function(){return MG.flatMap}});var CG=Vr();Object.defineProperty(b,"mergeMap",{enumerable:!0,get:function(){return CG.mergeMap}});var kG=DA();Object.defineProperty(b,"mergeMapTo",{enumerable:!0,get:function(){return kG.mergeMapTo}});var qG=BA();Object.defineProperty(b,"mergeScan",{enumerable:!0,get:function(){return qG.mergeScan}});var IG=UA();Object.defineProperty(b,"mergeWith",{enumerable:!0,get:function(){return IG.mergeWith}});var jG=HA();Object.defineProperty(b,"min",{enumerable:!0,get:function(){return jG.min}});var FG=Xf();Object.defineProperty(b,"multicast",{enumerable:!0,get:function(){return FG.multicast}});var LG=Tu();Object.defineProperty(b,"observeOn",{enumerable:!0,get:function(){return LG.observeOn}});var NG=$A();Object.defineProperty(b,"onErrorResumeNextWith",{enumerable:!0,get:function(){return NG.onErrorResumeNextWith}});var DG=KA();Object.defineProperty(b,"pairwise",{enumerable:!0,get:function(){return DG.pairwise}});var BG=YA();Object.defineProperty(b,"pluck",{enumerable:!0,get:function(){return BG.pluck}});var zG=XA();Object.defineProperty(b,"publish",{enumerable:!0,get:function(){return zG.publish}});var WG=ZA();Object.defineProperty(b,"publishBehavior",{enumerable:!0,get:function(){return WG.publishBehavior}});var UG=JA();Object.defineProperty(b,"publishLast",{enumerable:!0,get:function(){return UG.publishLast}});var HG=eT();Object.defineProperty(b,"publishReplay",{enumerable:!0,get:function(){return HG.publishReplay}});var VG=tT();Object.defineProperty(b,"raceWith",{enumerable:!0,get:function(){return VG.raceWith}});var GG=na();Object.defineProperty(b,"reduce",{enumerable:!0,get:function(){return GG.reduce}});var $G=nT();Object.defineProperty(b,"repeat",{enumerable:!0,get:function(){return $G.repeat}});var KG=oT();Object.defineProperty(b,"repeatWhen",{enumerable:!0,get:function(){return KG.repeatWhen}});var YG=uT();Object.defineProperty(b,"retry",{enumerable:!0,get:function(){return YG.retry}});var XG=cT();Object.defineProperty(b,"retryWhen",{enumerable:!0,get:function(){return XG.retryWhen}});var ZG=Km();Object.defineProperty(b,"refCount",{enumerable:!0,get:function(){return ZG.refCount}});var JG=Gv();Object.defineProperty(b,"sample",{enumerable:!0,get:function(){return JG.sample}});var QG=fT();Object.defineProperty(b,"sampleTime",{enumerable:!0,get:function(){return QG.sampleTime}});var e$=dT();Object.defineProperty(b,"scan",{enumerable:!0,get:function(){return e$.scan}});var t$=hT();Object.defineProperty(b,"sequenceEqual",{enumerable:!0,get:function(){return t$.sequenceEqual}});var r$=Kv();Object.defineProperty(b,"share",{enumerable:!0,get:function(){return r$.share}});var n$=bT();Object.defineProperty(b,"shareReplay",{enumerable:!0,get:function(){return n$.shareReplay}});var i$=gT();Object.defineProperty(b,"single",{enumerable:!0,get:function(){return i$.single}});var o$=yT();Object.defineProperty(b,"skip",{enumerable:!0,get:function(){return o$.skip}});var a$=_T();Object.defineProperty(b,"skipLast",{enumerable:!0,get:function(){return a$.skipLast}});var u$=xT();Object.defineProperty(b,"skipUntil",{enumerable:!0,get:function(){return u$.skipUntil}});var s$=ST();Object.defineProperty(b,"skipWhile",{enumerable:!0,get:function(){return s$.skipWhile}});var c$=ET();Object.defineProperty(b,"startWith",{enumerable:!0,get:function(){return c$.startWith}});var l$=Ru();Object.defineProperty(b,"subscribeOn",{enumerable:!0,get:function(){return l$.subscribeOn}});var f$=TT();Object.defineProperty(b,"switchAll",{enumerable:!0,get:function(){return f$.switchAll}});var d$=ju();Object.defineProperty(b,"switchMap",{enumerable:!0,get:function(){return d$.switchMap}});var p$=PT();Object.defineProperty(b,"switchMapTo",{enumerable:!0,get:function(){return p$.switchMapTo}});var h$=MT();Object.defineProperty(b,"switchScan",{enumerable:!0,get:function(){return h$.switchScan}});var m$=qu();Object.defineProperty(b,"take",{enumerable:!0,get:function(){return m$.take}});var v$=Hv();Object.defineProperty(b,"takeLast",{enumerable:!0,get:function(){return v$.takeLast}});var b$=CT();Object.defineProperty(b,"takeUntil",{enumerable:!0,get:function(){return b$.takeUntil}});var g$=kT();Object.defineProperty(b,"takeWhile",{enumerable:!0,get:function(){return g$.takeWhile}});var y$=qT();Object.defineProperty(b,"tap",{enumerable:!0,get:function(){return y$.tap}});var _$=Yv();Object.defineProperty(b,"throttle",{enumerable:!0,get:function(){return _$.throttle}});var w$=jT();Object.defineProperty(b,"throttleTime",{enumerable:!0,get:function(){return w$.throttleTime}});var x$=Iu();Object.defineProperty(b,"throwIfEmpty",{enumerable:!0,get:function(){return x$.throwIfEmpty}});var S$=LT();Object.defineProperty(b,"timeInterval",{enumerable:!0,get:function(){return S$.timeInterval}});var O$=Sl();Object.defineProperty(b,"timeout",{enumerable:!0,get:function(){return O$.timeout}});var E$=NT();Object.defineProperty(b,"timeoutWith",{enumerable:!0,get:function(){return E$.timeoutWith}});var A$=DT();Object.defineProperty(b,"timestamp",{enumerable:!0,get:function(){return A$.timestamp}});var T$=qv();Object.defineProperty(b,"toArray",{enumerable:!0,get:function(){return T$.toArray}});var R$=WT();Object.defineProperty(b,"window",{enumerable:!0,get:function(){return R$.window}});var P$=HT();Object.defineProperty(b,"windowCount",{enumerable:!0,get:function(){return P$.windowCount}});var M$=GT();Object.defineProperty(b,"windowTime",{enumerable:!0,get:function(){return M$.windowTime}});var C$=YT();Object.defineProperty(b,"windowToggle",{enumerable:!0,get:function(){return C$.windowToggle}});var k$=ZT();Object.defineProperty(b,"windowWhen",{enumerable:!0,get:function(){return k$.windowWhen}});var q$=tR();Object.defineProperty(b,"withLatestFrom",{enumerable:!0,get:function(){return q$.withLatestFrom}});var I$=rR();Object.defineProperty(b,"zipAll",{enumerable:!0,get:function(){return I$.zipAll}});var j$=iR();Object.defineProperty(b,"zipWith",{enumerable:!0,get:function(){return j$.zipWith}})});var Jv=g(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.checkAbortSignal=pR;Ci.abortBreakPoint=L$;Ci.makeAbortError=hR;Ci.observeAbortSignal=N$;Ci.isAbortException=D$;var dR=fR(),Zv=class extends Error{};function pR(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw hR()}}function F$(e){return new Promise(t=>setTimeout(t,e))}async function L$(e){await F$(1),pR(e)}function hR(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new Zv("aborted");return e.code="ERR_ABORTED",e}function N$(e){return e?(0,dR.fromEvent)(e,"abort"):new dR.Observable}function D$(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||!!/\b(aborted|aborterror)\b/i.test(e.message))}});var mR=g(eb=>{"use strict";Object.defineProperty(eb,"__esModule",{value:!0});eb.makeAbortableReaction=W$;var B$=zs(),Fu=ht(),z$=Jv(),Qv=nm();function W$(e,t,r,n,i,o,a){let u;function l(s){(0,z$.isAbortException)(s)||(console.error(s),(0,Fu.isAlive)(e)&&a(s))}(0,Fu.addDisposer)(e,(0,B$.reaction)(()=>{try{return t(e)}catch(s){l(s);return}},async(s,c)=>{if(u&&(0,Qv.stopStopToken)(u),!!(0,Fu.isAlive)(e)){u=(0,Qv.createStopToken)(),i(u);try{let f=await r(s,u,e,c);(0,Fu.isAlive)(e)&&o(f)}catch(f){l(f)}}},n)),(0,Fu.addDisposer)(e,()=>{u&&(0,Qv.stopStopToken)(u)})}});var mu=g(k=>{"use strict";var U$=k&&k.__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]}),qi=k&&k.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&U$(t,e,r)},vR=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.makeAbortableReaction=k.blobToDataURL=k.isFeature=k.SimpleFeature=k.defaultCodonTable=k.defaultStops=k.defaultStarts=k.rIC=k.complementTable=k.isElectron=void 0;k.useDebounce=K$;k.useWidthSetter=Y$;k.useDebouncedCallback=X$;k.findParentThat=gR;k.springAnimate=Z$;k.findParentThatIs=Nu;k.getSession=J$;k.getContainingView=yR;k.getContainingTrack=Q$;k.getContainingDisplay=e9;k.assembleLocString=t9;k.assembleLocStringFast=_R;k.parseLocStringOneBased=wR;k.parseLocString=tb;k.compareLocs=xR;k.compareLocStrings=r9;k.clamp=n9;k.bpToPx=rb;k.radToDeg=u9;k.degToRad=s9;k.polarToCartesian=c9;k.cartesianToPolar=l9;k.featureSpanPx=f9;k.bpSpanPx=SR;k.iterMap=d9;k.findLastIndex=p9;k.findLast=h9;k.renameRegionIfNeeded=OR;k.renameRegionsIfNeeded=m9;k.minmax=v9;k.shorten=ER;k.shorten2=b9;k.stringify=g9;k.revcom=y9;k.reverse=_9;k.complement=w9;k.measureText=AR;k.getFrame=S9;k.generateCodonTable=O9;k.updateStatus=nb;k.updateStatus2=E9;k.hashCode=TR;k.objectHash=A9;k.bytesForRegions=T9;k.isSupportedIndexingAdapter=R9;k.getBpDisplayStr=P9;k.getProgressDisplayStr=M9;k.toLocale=ca;k.getTickDisplayStr=C9;k.getViewParams=k9;k.getLayoutId=q9;k.useLocalStorage=I9;k.getUriLink=RR;k.getStr=PR;k.coarseStripHTML=MR;k.linkify=j9;k.measureGridWidth=F9;k.getEnv=L9;k.localStorageGetItem=ob;k.localStorageSetItem=CR;k.max=kR;k.min=N9;k.sum=qR;k.avg=D9;k.groupBy=B9;k.notEmpty=z9;k.mergeIntervals=IR;k.gatherOverlaps=W9;k.stripAlpha=U9;k.getStrokeProps=H9;k.getFillProps=V9;k.renderToStaticMarkup=G9;k.isGzip=jR;k.fetchAndMaybeUnzip=FR;k.fetchAndMaybeUnzipText=$9;k.isObject=LR;k.localStorageGetNumber=K9;k.localStorageGetBoolean=Y9;k.localStorageSetBoolean=X9;k.forEachWithStopTokenCheck=Z9;k.testAdapter=J9;var ki=qe(),H$=$x(),V$=vR(Kx()),ar=ht(),G$=Ss(),$$=Xx(),ib=m1(),bR=nm(),Lu=mc();qi(mc(),k);qi(xS(),k);qi(SS(),k);qi(OS(),k);qi(km(),k);qi(FS(),k);function K$(e,t){let[r,n]=(0,ki.useState)(e);return(0,ki.useEffect)(()=>{let i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r}function Y$(e,t){let[r,{width:n}]=(0,V$.default)();return(0,ki.useEffect)(()=>{n&&(0,ar.isAlive)(e)&&requestAnimationFrame(()=>{e.setWidth(n-Number.parseInt(t,10)*2)})},[t,e,n]),r}function X$(e,t=400){let r=(0,ki.useRef)(null),n=(0,ki.useRef)(null);return(0,ki.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 gR(e,t){if(!(0,ar.hasParent)(e))throw new Error("node does not have parent");let r=(0,ar.getParent)(e);for(;r&&(0,ar.isAlive)(r);){if(t(r))return r;if((0,ar.hasParent)(r))r=(0,ar.getParent)(r);else break}throw new Error("no matching node found")}function Z$(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 d=Date.now(),p=f.lastPosition,m=f.lastTime||d,h=f.lastVelocity||0;d>m+64&&(m=d);let v=Math.floor(d-m);for(let S=0;S<v;++S){let E=-o*(p-t),R=-a*h,T=(E+R)/1;h+=T*1/1e3,p+=h*1/1e3}let y=Math.abs(h)<=i,w=o!==0?Math.abs(t-p)<=i:!0;(u&&o!==0?e<t?p>t:p<t:!1)||y&&w?(r(t),n()):(r(p),s=requestAnimationFrame(()=>{c({lastPosition:p,lastTime:d,lastVelocity:h})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Nu(e,t){return gR(e,t)}function J$(e){try{return Nu(e,Lu.isSessionModel)}catch{throw new Error("no session model found!")}}function yR(e){try{return Nu(e,Lu.isViewModel)}catch{throw new Error("no containing view found")}}function Q$(e){try{return Nu(e,Lu.isTrackModel)}catch{throw new Error("no containing track found")}}function e9(e){try{return Nu(e,Lu.isDisplayModel)}catch{throw new Error("no containing display found")}}function t9(e){return _R(e,ca)}function _R(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 wR(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),d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(f){let[,p,,,,m]=f;if(p!==void 0&&m!==void 0)return{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+m.replaceAll(",",""),reversed:r}}else if(d){let[,p,,,m]=d;if(p!==void 0)return m?{assemblyName:a,refName:s,start:+p.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+p.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 tb(e,t){let r=wR(e,t);return typeof r.start=="number"&&(r.start-=1),r}function xR(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 r9(e,t,r){let n=tb(e,r),i=tb(t,r);return xR(n,i)}function n9(e,t,r){return e<t?t:e>r?r:e}function i9(e){return Math.round(e*10)/10}function rb(e,{reversed:t,end:r=0,start:n=0},i){return i9((t?r-e:e-n)/i)}var o9=180/Math.PI,a9=Math.PI/180;function u9(e){return e*o9%360}function s9(e){return e*a9%(2*Math.PI)}function c9(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function l9(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function f9(e,t,r){return SR(e.get("start"),e.get("end"),t,r)}function SR(e,t,r,n){let i=rb(e,r,n),o=rb(t,r,n);return r.reversed?[o,i]:[i,o]}function d9(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 p9(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function h9(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function OR(e,t){if((0,ar.isStateTreeNode)(t)&&!(0,ar.isAlive)(t))return t;if(e?.[t.refName]){t=(0,ar.isStateTreeNode)(t)?{...(0,ar.getSnapshot)(t)}:{...t};let r=e[t.refName];if(r)return{...t,refName:r,originalRefName:t.refName}}return t}async function m9(e,t){let{regions:r=[],adapterConfig:n}=t;if(!t.sessionId)throw new Error("sessionId is required");let i=r.map(a=>a.assemblyName),o=Object.fromEntries(await Promise.all([...new Set(i)].map(async a=>[a,await e.getRefNameMapForAdapter(n,a,t)])));return{...t,regions:r.map((a,u)=>OR(o[i[u]],a))}}function v9(e,t){return[Math.min(e,t),Math.max(e,t)]}function ER(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function b9(e,t=70){return e.length>t?`${e.slice(0,t)}...`:e}function g9({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${ER(e)}:${ca(t)}${n?" (out of bounds)":""}`:""].join("")}k.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");k.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 y9(e){var t;let r="";for(let n=e.length-1;n>=0;n--)r+=(t=k.complementTable[e[n]])!==null&&t!==void 0?t:e[n];return r}function _9(e){let t="";for(let r=e.length-1;r>=0;r--)t+=e[r];return t}function w9(e){var t;let r="";for(let n of e)r+=(t=k.complementTable[n])!==null&&t!==void 0?t:n;return r}k.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var x9=[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 AR(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=x9[u])!==null&&r!==void 0?r:n}return o*t}function S9(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}k.defaultStarts=["ATG"];k.defaultStops=["TAA","TAG","TGA"];k.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 O9(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 nb(e,t,r){t(e);let n=await r();return t(""),n}async function E9(e,t,r,n){t(e);let i=await n();return(0,bR.checkStopToken)(r),t(""),i}function TR(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 A9(e){return`${TR(JSON.stringify(e))}`}async function T9(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 R9(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function P9(e){return Math.floor(e/1e6)>0?`${Wn(e/1e6)}Mbp`:Math.floor(e/1e3)>0?`${Wn(e/1e3)}Kbp`:`${Math.floor(e)}bp`}function Wn(e){return ca(Number.parseFloat(e.toPrecision(3)))}function M9(e,t){return Math.floor(t/1e6)>0?`${Wn(e/1e6)}/${Wn(t/1e6)}Mb`:Math.floor(t/1e3)>0?`${Wn(e/1e3)}/${Wn(t/1e3)}Kb`:`${Wn(e)}/${Wn(t)}}bytes`}function ca(e){return e.toLocaleString("en-US")}function C9(e,t){return Math.floor(t/1e3)>0?`${ca(Number.parseFloat((e/1e6).toFixed(2)))}M`:ca(Math.floor(e))}function k9(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=yR(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 q9({sessionId:e,layoutId:t}){return`${e}-${t}`}function I9(e,t){let[r,n]=(0,ki.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 RR(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function PR(e){return LR(e)?(0,Lu.isUriLocation)(e)?RR(e):JSON.stringify(e):String(e)}function MR(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function j9(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 F9(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return kR(e.map(u=>PR(u)).map(u=>a?MR(u):u).map(u=>AR(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function L9(e){return(0,ar.getEnv)(e)}function ob(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function CR(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function kR(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function N9(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function qR(e){let t=0;for(let r of e)t+=r;return t}function D9(e){return qR(e)/e.length}function B9(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function z9(e){return e!=null}function IR(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 W9(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=>IR(n.sort((i,o)=>i.start-o.start),t))}function U9(e){return(0,ib.colord)(e).alpha(1).toHex()}function H9(e){if(e){let t=(0,ib.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}else return{}}function V9(e){if(e){let t=(0,ib.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}else return{}}function G9(e){let t=document.createElement("div");return(0,G$.flushSync)(()=>{(0,$$.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function jR(e){return e[0]===31&&e[1]===139&&e[2]===8}async function FR(e,t={}){let{statusCallback:r=()=>{}}=t,n=await nb("Downloading file",r,()=>e.readFile(t));return jR(n)?await nb("Unzipping",r,()=>(0,H$.unzip)(n)):n}async function $9(e,t){let r=await FR(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function LR(e){return typeof e=="object"&&e!==null}function K9(e,t){var r;return+((r=ob(e))!==null&&r!==void 0?r:t)}function Y9(e,t){return!!JSON.parse(ob(e)||JSON.stringify(t))}function X9(e,t){CR(e,JSON.stringify(t))}function Z9(e,t,r,n=400){let i=performance.now(),o=0;for(let a of e)performance.now()-i>n&&((0,bR.checkStopToken)(t),i=performance.now()),r(a,o++)}function J9(e,t,r,n){return t.test(e)&&!r||r===n}var NR=NS();Object.defineProperty(k,"SimpleFeature",{enumerable:!0,get:function(){return vR(NR).default}});Object.defineProperty(k,"isFeature",{enumerable:!0,get:function(){return NR.isFeature}});var Q9=Im();Object.defineProperty(k,"blobToDataURL",{enumerable:!0,get:function(){return Q9.blobToDataURL}});var eK=mR();Object.defineProperty(k,"makeAbortableReaction",{enumerable:!0,get:function(){return eK.makeAbortableReaction}});qi(Jv(),k)});var BR=g(ab=>{"use strict";Object.defineProperty(ab,"__esModule",{value:!0});ab.default=tK;var DR=mu();function tK(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,DR.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return`adp-${(0,DR.hashCode)(t)}`}});var zR=g(Du=>{"use strict";var rK=Du&&Du.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Du,"__esModule",{value:!0});Du.adapterConfigCacheKey=iK;var nK=rK(BR());function iK(e={}){return`${(0,nK.default)(e)}`}});var ub=g(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.getAdapter=WR;Bu.freeAdapterResources=uK;Bu.clearAdapterCache=sK;var oK=zR(),Ii={};async function aK(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=WR.bind(null,e,t),u=await i.getAdapterClass();return{dataAdapter:new u(o,a,e),sessionIds:new Set([t])}}async function WR(e,t,r){var n;let i=(0,oK.adapterConfigCacheKey)(r);(n=Ii[i])!==null&&n!==void 0||(Ii[i]=aK(e,t,r));let o=await Ii[i];return o.sessionIds.add(t),o}async function uK(e){let t=Object.keys(e);if(t.length===1&&t[0]==="sessionId"){let{sessionId:r}=e;for(let[n,i]of Object.entries(Ii)){let o=await i;o.sessionIds.delete(r),o.sessionIds.size===0&&delete Ii[n]}}else for(let r of Object.values(Ii)){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 sK(){Ii={}}});var UR=g(cb=>{"use strict";Object.defineProperty(cb,"__esModule",{value:!0});var sb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};cb.default=sb});var VR=g(fb=>{"use strict";Object.defineProperty(fb,"__esModule",{value:!0});fb.default=lb;var HR=e=>typeof e=="object"&&e!==null,cK=e=>HR(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function lb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{for(let o of i)t(o),HR(o)&&lb(o,t,r)};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),cK(i)&&(Array.isArray(i)?n(i):lb(i,t,r))}});var $R=g(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.UNSUPPORTED=ze.UNKNOWN=void 0;ze.getTrackAssemblyNames=lK;ze.getConfAssemblyNames=GR;ze.getRpcSessionId=fK;ze.getParentRenderProps=dK;ze.getBlob=pK;ze.getBlobMap=hK;ze.setBlobMap=mK;ze.storeBlobLocation=bK;ze.makeIndex=gK;ze.makeIndexType=yK;ze.getFileName=_K;ze.guessAdapter=wK;ze.guessTrackType=xK;ze.generateUnsupportedTrackConf=SK;ze.generateUnknownTrackConf=OK;ze.getTrackName=EK;var fa=ht(),zu=mu(),la=_m();function lK(e){return GR(e.configuration)}function GR(e){let t=(0,la.readConfObject)(e,"assemblyNames");if(!t){let r=(0,fa.getParent)(e);if("sequence"in r)return[(0,la.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function fK(e){let t;for(let r=e;!(0,fa.isRoot)(r);r=(0,fa.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 dK(e){for(let t=(0,fa.getParent)(e);!(0,fa.isRoot)(t);t=(0,fa.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}ze.UNKNOWN="UNKNOWN";ze.UNSUPPORTED="UNSUPPORTED";var qd={};function pK(e){return qd[e]}function hK(){return qd}function mK(e){qd=e}var vK=0;function bK(e){if("blob"in e){let t=`b${+Date.now()}-${vK++}`;return qd[t]=e.blob,{name:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e}function gK(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e}function yK(e,t,r){return e?.toUpperCase().endsWith(t)?t:r}function _K(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 wK(e,t,r,n){if(n){let{pluginManager:i}=(0,zu.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,l,s)=>{})(e,t,r);if(a)return a}return{type:ze.UNKNOWN}}function xK(e,t){if(t){let r=(0,zu.getSession)(t),i=(0,zu.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",o=>{})(e);if(i)return i}return"FeatureTrack"}function SK(e,t,r){let n={type:"FeatureTrack",name:`${e} (Unsupported)`,description:`Support not yet implemented for "${t}"`,category:r,trackId:""};return n.trackId=(0,zu.objectHash)(n),n}function OK(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,zu.objectHash)(n),n}function EK(e,t){let r=(0,la.readConfObject)(e,"name");if(!r&&(0,la.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,la.readConfObject)(n,"displayName")||(0,la.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var XR=g(Wu=>{"use strict";var YR=Wu&&Wu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wu,"__esModule",{value:!0});var AK=YR(UR()),TK=YR(VR()),KR=$R(),Id=mc(),db=class extends AK.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,KR.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Id.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,KR.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,Id.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 Id.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,TK.default)(t,i=>{(0,Id.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Wu.default=db});var ZR=g(hb=>{"use strict";Object.defineProperty(hb,"__esModule",{value:!0});var RK=hm(),pb=class e{constructor({filters:t=[]}){this.filterChain=t.map(r=>r.trim()).filter(r=>!!r).map(r=>{if(typeof r=="string")return{expr:(0,RK.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)}};hb.default=pb});var vb=g(Uu=>{"use strict";var JR=Uu&&Uu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uu,"__esModule",{value:!0});var PK=JR(XR()),MK=mu(),CK=JR(ZR()),mb=class extends PK.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new CK.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,MK.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(l,r)}};Uu.default=mb});var qK={};Yu(qK,{default:()=>Fd});var dP=L(Rb());var Pb="1.4.2";var eg=L(Gr());var $b=L(Nd()),ga=L(ct()),Kb=L(Dd()),Yb=L(Bd()),Xb=L(ht());var zd=function(e,t){return zd=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])},zd(e,t)};function va(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zd(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Wd(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 Ni(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Di(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 sr(e){return typeof e=="function"}function Xu(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 Zu=Xu(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
4
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}})});var Xr=g(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.arrRemove=void 0;function CF(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}Tc.arrRemove=CF});var Ut=g(jt=>{"use strict";var GS=jt&&jt.__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.")},$S=jt&&jt.__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},ZS=jt&&jt.__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(jt,"__esModule",{value:!0});jt.isSubscription=jt.EMPTY_SUBSCRIPTION=jt.Subscription=void 0;var Au=Pe(),Ym=Km(),KS=Xr(),Xm=(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=GS(a),f=u.next();!f.done;f=u.next()){var s=f.value;s.remove(this)}}catch(m){t={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Au.isFunction(c))try{c()}catch(m){o=m instanceof Ym.UnsubscriptionError?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=GS(l),p=d.next();!p.done;p=d.next()){var h=p.value;try{YS(h)}catch(m){o=o??[],m instanceof Ym.UnsubscriptionError?o=ZS(ZS([],$S(o)),$S(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(o)throw new Ym.UnsubscriptionError(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)YS(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)&&KS.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&KS.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})();jt.Subscription=Xm;jt.EMPTY_SUBSCRIPTION=Xm.EMPTY;function IF(e){return e instanceof Xm||e&&"closed"in e&&Au.isFunction(e.remove)&&Au.isFunction(e.add)&&Au.isFunction(e.unsubscribe)}jt.isSubscription=IF;function YS(e){Au.isFunction(e)?e():e.unsubscribe()}});var Mo=g(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.config=void 0;Pc.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var Jm=g(qr=>{"use strict";var XS=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},JS=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,JS([e,t],XS(r))):setTimeout.apply(void 0,JS([e,t],XS(r)))},clearTimeout:function(e){var t=qr.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var Qm=g(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.reportUnhandledError=void 0;var kF=Mo(),qF=Jm();function jF(e){qF.timeoutProvider.setTimeout(function(){var t=kF.config.onUnhandledError;if(t)t(e);else throw e})}Mc.reportUnhandledError=jF});var lt=g(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.noop=void 0;function FF(){}Cc.noop=FF});var QS=g(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.createNotification=jr.nextNotification=jr.errorNotification=jr.COMPLETE_NOTIFICATION=void 0;jr.COMPLETE_NOTIFICATION=(function(){return Ic("C",void 0,void 0)})();function LF(e){return Ic("E",void 0,e)}jr.errorNotification=LF;function NF(e){return Ic("N",e,void 0)}jr.nextNotification=NF;function Ic(e,t,r){return{kind:e,value:t,error:r}}jr.createNotification=Ic});var kc=g(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.captureError=Co.errorContext=void 0;var eO=Mo(),Ti=null;function DF(e){if(eO.config.useDeprecatedSynchronousErrorHandling){var t=!Ti;if(t&&(Ti={errorThrown:!1,error:null}),e(),t){var r=Ti,n=r.errorThrown,i=r.error;if(Ti=null,n)throw i}}else e()}Co.errorContext=DF;function BF(e){eO.config.useDeprecatedSynchronousErrorHandling&&Ti&&(Ti.errorThrown=!0,Ti.error=e)}Co.captureError=BF});var Io=g(dr=>{"use strict";var nO=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 zF=Pe(),tO=Ut(),nv=Mo(),UF=Qm(),rO=lt(),ev=QS(),WF=Jm(),HF=kc(),iO=(function(e){nO(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,tO.isSubscription(r)&&r.add(n)):n.destination=dr.EMPTY_OBSERVER,n}return t.create=function(r,n,i){return new oO(r,n,i)},t.prototype.next=function(r){this.isStopped?rv(ev.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?rv(ev.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?rv(ev.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})(tO.Subscription);dr.Subscriber=iO;var VF=Function.prototype.bind;function tv(e,t){return VF.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){qc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){qc(n)}else qc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){qc(r)}},e})(),oO=(function(e){nO(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&&nv.config.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&tv(r.next,u),error:r.error&&tv(r.error,u),complete:r.complete&&tv(r.complete,u)}):a=r}return o.destination=new GF(a),o}return t})(iO);dr.SafeSubscriber=oO;function qc(e){nv.config.useDeprecatedSynchronousErrorHandling?HF.captureError(e):UF.reportUnhandledError(e)}function $F(e){throw e}function rv(e,t){var r=nv.config.onStoppedNotification;r&&WF.timeoutProvider.setTimeout(function(){return r(e,t)})}dr.EMPTY_OBSERVER={closed:!0,next:rO.noop,error:$F,complete:rO.noop}});var Ru=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 ft=g(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.identity=void 0;function ZF(e){return e}Fc.identity=ZF});var Tu=g(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.pipeFromArray=ko.pipe=void 0;var KF=ft();function YF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return aO(e)}ko.pipe=YF;function aO(e){return e.length===0?KF.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}ko.pipeFromArray=aO});var Ie=g(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.Observable=void 0;var ov=Io(),XF=Ut(),JF=Ru(),QF=Tu(),eL=Mo(),iv=Pe(),tL=kc(),rL=(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=iL(t)?t:new ov.SafeSubscriber(t,r,n);return tL.errorContext(function(){var a=i,u=a.operator,f=a.source;o.add(u?u.call(o,f):f?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=uO(r),new r(function(i,o){var a=new ov.SafeSubscriber({next:function(u){try{t(u)}catch(f){o(f),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=uO(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})();Lc.Observable=rL;function uO(e){var t;return(t=e??eL.config.Promise)!==null&&t!==void 0?t:Promise}function nL(e){return e&&iv.isFunction(e.next)&&iv.isFunction(e.error)&&iv.isFunction(e.complete)}function iL(e){return e&&e instanceof ov.Subscriber||nL(e)&&XF.isSubscription(e)}});var V=g(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.operate=qo.hasLift=void 0;var oL=Pe();function sO(e){return oL.isFunction(e?.lift)}qo.hasLift=sO;function aL(e){return function(t){if(sO(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")}}qo.operate=aL});var X=g(Mn=>{"use strict";var uL=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 sL=Io();function cL(e,t,r,n,i){return new cO(e,t,r,n,i)}Mn.createOperatorSubscriber=cL;var cO=(function(e){uL(t,e);function t(r,n,i,o,a,u){var f=e.call(this,r)||this;return f.onFinalize=a,f.shouldUnsubscribe=u,f._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,f._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,f._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,f}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})(sL.Subscriber);Mn.OperatorSubscriber=cO});var av=g(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.refCount=void 0;var lL=V(),fL=X();function dL(){return lL.operate(function(e,t){var r=null;e._refCount++;var n=fL.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())})}Nc.refCount=dL});var Pu=g(jo=>{"use strict";var pL=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.ConnectableObservable=void 0;var hL=Ie(),lO=Ut(),mL=av(),vL=X(),bL=V(),gL=(function(e){pL(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,bL.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 lO.Subscription;var i=this.getSubject();n.add(this.source.subscribe(vL.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=lO.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return mL.refCount()(this)},t})(hL.Observable);jo.ConnectableObservable=gL});var fO=g(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.performanceTimestampProvider=void 0;Mu.performanceTimestampProvider={now:function(){return(Mu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var uv=g(pr=>{"use strict";var dO=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(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},pO=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 _L=Ut();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 _L.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,pO([],dO(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,pO([],dO(e)))},delegate:void 0}});var vO=g(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.animationFrames=void 0;var yL=Ie(),wL=fO(),hO=uv();function xL(e){return e?mO(e):SL}Dc.animationFrames=xL;function mO(e){return new yL.Observable(function(t){var r=e||wL.performanceTimestampProvider,n=r.now(),i=0,o=function(){t.closed||(i=hO.animationFrameProvider.requestAnimationFrame(function(a){i=0;var u=r.now();t.next({timestamp:e?u:a,elapsed:u-n}),o()}))};return o(),function(){i&&hO.animationFrameProvider.cancelAnimationFrame(i)}})}var SL=mO()});var sv=g(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.ObjectUnsubscribedError=void 0;var OL=Pn();Bc.ObjectUnsubscribedError=OL.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var dt=g(Fr=>{"use strict";var gO=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)}})(),EL=Fr&&Fr.__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(Fr,"__esModule",{value:!0});Fr.AnonymousSubject=Fr.Subject=void 0;var bO=Ie(),lv=Ut(),AL=sv(),RL=Xr(),cv=kc(),_O=(function(e){gO(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 fv(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new AL.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;cv.errorContext(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=EL(n.currentObservers),u=a.next();!u.done;u=a.next()){var f=u.value;f.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;cv.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;cv.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?lv.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(r),new lv.Subscription(function(){n.currentObservers=null,RL.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 bO.Observable;return r.source=this,r},t.create=function(r,n){return new fv(r,n)},t})(bO.Observable);Fr.Subject=_O;var fv=(function(e){gO(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:lv.EMPTY_SUBSCRIPTION},t})(_O);Fr.AnonymousSubject=fv});var dv=g(Fo=>{"use strict";var TL=Fo&&Fo.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.BehaviorSubject=void 0;var PL=dt(),ML=(function(e){TL(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})(PL.Subject);Fo.BehaviorSubject=ML});var zc=g(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.dateTimestampProvider=void 0;Cu.dateTimestampProvider={now:function(){return(Cu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Uc=g(Lo=>{"use strict";var CL=Lo&&Lo.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.ReplaySubject=void 0;var IL=dt(),kL=zc(),qL=(function(e){CL(t,e);function t(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=kL.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,f=n._windowTime;i||(o.push(r),!a&&o.push(u.now()+f)),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(),f=0;f<u.length&&!r.closed;f+=o?1:2)r.next(u[f]);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 f=i.now(),s=0,c=1;c<o.length&&o[c]<=f;c+=2)s=c;s&&o.splice(0,s+1)}},t})(IL.Subject);Lo.ReplaySubject=qL});var Wc=g(No=>{"use strict";var jL=No&&No.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(No,"__esModule",{value:!0});No.AsyncSubject=void 0;var FL=dt(),LL=(function(e){jL(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,f=n.isStopped,s=n._isComplete;i?r.error(u):(f||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})(FL.Subject);No.AsyncSubject=LL});var yO=g(Do=>{"use strict";var NL=Do&&Do.__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(Do,"__esModule",{value:!0});Do.Action=void 0;var DL=Ut(),BL=(function(e){NL(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})(DL.Subscription);Do.Action=BL});var SO=g(Lr=>{"use strict";var wO=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},xO=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,xO([e,t],wO(r))):setInterval.apply(void 0,xO([e,t],wO(r)))},clearInterval:function(e){var t=Lr.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var zo=g(Bo=>{"use strict";var zL=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.AsyncAction=void 0;var UL=yO(),OO=SO(),WL=Xr(),HL=(function(e){zL(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),OO.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&&OO.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,WL.arrRemove(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(UL.Action);Bo.AsyncAction=HL});var AO=g(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.TestTools=Uo.Immediate=void 0;var VL=1,pv,Hc={};function EO(e){return e in Hc?(delete Hc[e],!0):!1}Uo.Immediate={setImmediate:function(e){var t=VL++;return Hc[t]=!0,pv||(pv=Promise.resolve()),pv.then(function(){return EO(t)&&e()}),t},clearImmediate:function(e){EO(e)}};Uo.TestTools={pending:function(){return Object.keys(Hc).length}}});var TO=g(Nr=>{"use strict";var GL=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},$L=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.immediateProvider=void 0;var RO=AO(),ZL=RO.Immediate.setImmediate,KL=RO.Immediate.clearImmediate;Nr.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Nr.immediateProvider.delegate;return(r?.setImmediate||ZL).apply(void 0,$L([],GL(e)))},clearImmediate:function(e){var t=Nr.immediateProvider.delegate;return(t?.clearImmediate||KL)(e)},delegate:void 0}});var MO=g(Wo=>{"use strict";var YL=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.AsapAction=void 0;var XL=zo(),PO=TO(),JL=(function(e){YL(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=PO.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&&(PO.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t})(XL.AsyncAction);Wo.AsapAction=JL});var hv=g(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.Scheduler=void 0;var QL=zc(),eN=(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=QL.dateTimestampProvider.now,e})();Vc.Scheduler=eN});var Vo=g(Ho=>{"use strict";var tN=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.AsyncScheduler=void 0;var CO=hv(),rN=(function(e){tN(t,e);function t(r,n){n===void 0&&(n=CO.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})(CO.Scheduler);Ho.AsyncScheduler=rN});var IO=g(Go=>{"use strict";var nN=Go&&Go.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(Go,"__esModule",{value:!0});Go.AsapScheduler=void 0;var iN=Vo(),oN=(function(e){nN(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})(iN.AsyncScheduler);Go.AsapScheduler=oN});var kO=g(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.asap=Pi.asapScheduler=void 0;var aN=MO(),uN=IO();Pi.asapScheduler=new uN.AsapScheduler(aN.AsapAction);Pi.asap=Pi.asapScheduler});var Ft=g(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.async=Mi.asyncScheduler=void 0;var sN=zo(),cN=Vo();Mi.asyncScheduler=new cN.AsyncScheduler(sN.AsyncAction);Mi.async=Mi.asyncScheduler});var qO=g($o=>{"use strict";var lN=$o&&$o.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty($o,"__esModule",{value:!0});$o.QueueAction=void 0;var fN=zo(),dN=(function(e){lN(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})(fN.AsyncAction);$o.QueueAction=dN});var jO=g(Zo=>{"use strict";var pN=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.QueueScheduler=void 0;var hN=Vo(),mN=(function(e){pN(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(hN.AsyncScheduler);Zo.QueueScheduler=mN});var FO=g(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.queue=Ci.queueScheduler=void 0;var vN=qO(),bN=jO();Ci.queueScheduler=new bN.QueueScheduler(vN.QueueAction);Ci.queue=Ci.queueScheduler});var NO=g(Ko=>{"use strict";var gN=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.AnimationFrameAction=void 0;var _N=zo(),LO=uv(),yN=(function(e){gN(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=LO.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&&(LO.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t})(_N.AsyncAction);Ko.AnimationFrameAction=yN});var DO=g(Yo=>{"use strict";var wN=Yo&&Yo.__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(Yo,"__esModule",{value:!0});Yo.AnimationFrameScheduler=void 0;var xN=Vo(),SN=(function(e){wN(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})(xN.AsyncScheduler);Yo.AnimationFrameScheduler=SN});var BO=g(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.animationFrame=Ii.animationFrameScheduler=void 0;var ON=NO(),EN=DO();Ii.animationFrameScheduler=new EN.AnimationFrameScheduler(ON.AnimationFrameAction);Ii.animationFrame=Ii.animationFrameScheduler});var WO=g(Cn=>{"use strict";var zO=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 AN=zo(),RN=Ut(),TN=Vo(),PN=(function(e){zO(t,e);function t(r,n){r===void 0&&(r=UO),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})(TN.AsyncScheduler);Cn.VirtualTimeScheduler=PN;var UO=(function(e){zO(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 RN.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})(AN.AsyncAction);Cn.VirtualAction=UO});var hr=g(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.empty=ki.EMPTY=void 0;var HO=Ie();ki.EMPTY=new HO.Observable(function(e){return e.complete()});function MN(e){return e?CN(e):ki.EMPTY}ki.empty=MN;function CN(e){return new HO.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var Iu=g(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.isScheduler=void 0;var IN=Pe();function kN(e){return e&&IN.isFunction(e.schedule)}Gc.isScheduler=kN});var Lt=g(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.popNumber=In.popScheduler=In.popResultSelector=void 0;var qN=Pe(),jN=Iu();function mv(e){return e[e.length-1]}function FN(e){return qN.isFunction(mv(e))?e.pop():void 0}In.popResultSelector=FN;function LN(e){return jN.isScheduler(mv(e))?e.pop():void 0}In.popScheduler=LN;function NN(e,t){return typeof mv(e)=="number"?e.pop():t}In.popNumber=NN});var Zc=g($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.isArrayLike=void 0;$c.isArrayLike=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"})});var vv=g(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.isPromise=void 0;var DN=Pe();function BN(e){return DN.isFunction(e?.then)}Kc.isPromise=BN});var bv=g(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.isInteropObservable=void 0;var zN=Ru(),UN=Pe();function WN(e){return UN.isFunction(e[zN.observable])}Yc.isInteropObservable=WN});var gv=g(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.isAsyncIterable=void 0;var HN=Pe();function VN(e){return Symbol.asyncIterator&&HN.isFunction(e?.[Symbol.asyncIterator])}Xc.isAsyncIterable=VN});var _v=g(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.createInvalidObservableTypeError=void 0;function GN(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.")}Jc.createInvalidObservableTypeError=GN});var yv=g(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.iterator=Xo.getSymbolIterator=void 0;function VO(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}Xo.getSymbolIterator=VO;Xo.iterator=VO()});var wv=g(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.isIterable=void 0;var $N=yv(),ZN=Pe();function KN(e){return ZN.isFunction(e?.[$N.iterator])}Qc.isIterable=KN});var el=g(Qt=>{"use strict";var YN=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 f([s,c])}}function f(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}}},Jo=Qt&&Qt.__await||function(e){return this instanceof Jo?(this.v=e,this):new Jo(e)},XN=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(d){n[d]&&(i[d]=function(p){return new Promise(function(h,m){o.push([d,p,h,m])>1||u(d,p)})})}function u(d,p){try{f(n[d](p))}catch(h){l(o[0][3],h)}}function f(d){d.value instanceof Jo?Promise.resolve(d.value.v).then(s,c):l(o[0][2],d)}function s(d){u("next",d)}function c(d){u("throw",d)}function l(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.isReadableStreamLike=Qt.readableStreamLikeToAsyncGenerator=void 0;var JN=Pe();function QN(e){return XN(this,arguments,function(){var r,n,i,o;return YN(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,Jo(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,Jo(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Jo(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=QN;function eD(e){return JN.isFunction(e?.getReader)}Qt.isReadableStreamLike=eD});var de=g(ze=>{"use strict";var tD=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(l){a(l)}}function f(c){try{s(n.throw(c))}catch(l){a(l)}}function s(c){c.done?o(c.value):i(c.value).then(u,f)}s((n=n.apply(e,t||[])).next())})},rD=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 f([s,c])}}function f(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}}},nD=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 xv=="function"?xv(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,f){a=e[o](a),i(u,f,a.done,a.value)})}}function i(o,a,u,f){Promise.resolve(f).then(function(s){o({value:s,done:u})},a)}},xv=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 iD=Zc(),oD=vv(),Qo=Ie(),aD=bv(),uD=gv(),sD=_v(),cD=wv(),GO=el(),lD=Pe(),fD=Qm(),dD=Ru();function pD(e){if(e instanceof Qo.Observable)return e;if(e!=null){if(aD.isInteropObservable(e))return $O(e);if(iD.isArrayLike(e))return ZO(e);if(oD.isPromise(e))return KO(e);if(uD.isAsyncIterable(e))return Sv(e);if(cD.isIterable(e))return YO(e);if(GO.isReadableStreamLike(e))return XO(e)}throw sD.createInvalidObservableTypeError(e)}ze.innerFrom=pD;function $O(e){return new Qo.Observable(function(t){var r=e[dD.observable]();if(lD.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}ze.fromInteropObservable=$O;function ZO(e){return new Qo.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}ze.fromArrayLike=ZO;function KO(e){return new Qo.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,fD.reportUnhandledError)})}ze.fromPromise=KO;function YO(e){return new Qo.Observable(function(t){var r,n;try{for(var i=xv(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=YO;function Sv(e){return new Qo.Observable(function(t){hD(e,t).catch(function(r){return t.error(r)})})}ze.fromAsyncIterable=Sv;function XO(e){return Sv(GO.readableStreamLikeToAsyncGenerator(e))}ze.fromReadableStreamLike=XO;function hD(e,t){var r,n,i,o;return tD(this,void 0,void 0,function(){var a,u;return rD(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),r=nD(e),f.label=1;case 1:return[4,r.next()];case 2:if(n=f.sent(),!!n.done)return[3,4];if(a=n.value,t.next(a),t.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=f.sent(),i={error:u},[3,11];case 6:return f.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:f.sent(),f.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(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.executeSchedule=void 0;function mD(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}tl.executeSchedule=mD});var ku=g(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.observeOn=void 0;var Ov=Jr(),vD=V(),bD=X();function gD(e,t){return t===void 0&&(t=0),vD.operate(function(r,n){r.subscribe(bD.createOperatorSubscriber(n,function(i){return Ov.executeSchedule(n,e,function(){return n.next(i)},t)},function(){return Ov.executeSchedule(n,e,function(){return n.complete()},t)},function(i){return Ov.executeSchedule(n,e,function(){return n.error(i)},t)}))})}rl.observeOn=gD});var qu=g(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.subscribeOn=void 0;var _D=V();function yD(e,t){return t===void 0&&(t=0),_D.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}nl.subscribeOn=yD});var JO=g(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.scheduleObservable=void 0;var wD=de(),xD=ku(),SD=qu();function OD(e,t){return wD.innerFrom(e).pipe(SD.subscribeOn(t),xD.observeOn(t))}il.scheduleObservable=OD});var QO=g(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.schedulePromise=void 0;var ED=de(),AD=ku(),RD=qu();function TD(e,t){return ED.innerFrom(e).pipe(RD.subscribeOn(t),AD.observeOn(t))}ol.schedulePromise=TD});var eE=g(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.scheduleArray=void 0;var PD=Ie();function MD(e,t){return new PD.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}al.scheduleArray=MD});var Ev=g(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.scheduleIterable=void 0;var CD=Ie(),ID=yv(),kD=Pe(),tE=Jr();function qD(e,t){return new CD.Observable(function(r){var n;return tE.executeSchedule(r,t,function(){n=e[ID.iterator](),tE.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 kD.isFunction(n?.return)&&n.return()}})}ul.scheduleIterable=qD});var Av=g(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.scheduleAsyncIterable=void 0;var jD=Ie(),rE=Jr();function FD(e,t){if(!e)throw new Error("Iterable cannot be null");return new jD.Observable(function(r){rE.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();rE.executeSchedule(r,t,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}sl.scheduleAsyncIterable=FD});var nE=g(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.scheduleReadableStreamLike=void 0;var LD=Av(),ND=el();function DD(e,t){return LD.scheduleAsyncIterable(ND.readableStreamLikeToAsyncGenerator(e),t)}cl.scheduleReadableStreamLike=DD});var Rv=g(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.scheduled=void 0;var BD=JO(),zD=QO(),UD=eE(),WD=Ev(),HD=Av(),VD=bv(),GD=vv(),$D=Zc(),ZD=wv(),KD=gv(),YD=_v(),XD=el(),JD=nE();function QD(e,t){if(e!=null){if(VD.isInteropObservable(e))return BD.scheduleObservable(e,t);if($D.isArrayLike(e))return UD.scheduleArray(e,t);if(GD.isPromise(e))return zD.schedulePromise(e,t);if(KD.isAsyncIterable(e))return HD.scheduleAsyncIterable(e,t);if(ZD.isIterable(e))return WD.scheduleIterable(e,t);if(XD.isReadableStreamLike(e))return JD.scheduleReadableStreamLike(e,t)}throw YD.createInvalidObservableTypeError(e)}ll.scheduled=QD});var Qr=g(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.from=void 0;var e5=Rv(),t5=de();function r5(e,t){return t?e5.scheduled(e,t):t5.innerFrom(e)}fl.from=r5});var pl=g(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.of=void 0;var n5=Lt(),i5=Qr();function o5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n5.popScheduler(e);return i5.from(e,r)}dl.of=o5});var Tv=g(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.throwError=void 0;var a5=Ie(),u5=Pe();function s5(e,t){var r=u5.isFunction(e)?e:function(){return e},n=function(i){return i.error(r())};return new a5.Observable(t?function(i){return t.schedule(n,0,i)}:n)}hl.throwError=s5});var ml=g(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.observeNotification=en.Notification=en.NotificationKind=void 0;var c5=hr(),l5=pl(),f5=Tv(),d5=Pe(),p5;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(p5=en.NotificationKind||(en.NotificationKind={}));var h5=(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 iE(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 d5.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"?l5.of(n):r==="E"?f5.throwError(function(){return i}):r==="C"?c5.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=h5;function iE(e,t){var r,n,i,o=e,a=o.kind,u=o.value,f=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,f):(i=t.complete)===null||i===void 0||i.call(t)}en.observeNotification=iE});var aE=g(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});vl.isObservable=void 0;var m5=Ie(),oE=Pe();function v5(e){return!!e&&(e instanceof m5.Observable||oE.isFunction(e.lift)&&oE.isFunction(e.subscribe))}vl.isObservable=v5});var kn=g(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.EmptyError=void 0;var b5=Pn();bl.EmptyError=b5.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var uE=g(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});gl.lastValueFrom=void 0;var g5=kn();function _5(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 g5.EmptyError)}})})}gl.lastValueFrom=_5});var sE=g(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.firstValueFrom=void 0;var y5=kn(),w5=Io();function x5(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new w5.SafeSubscriber({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new y5.EmptyError)}});e.subscribe(o)})}_l.firstValueFrom=x5});var Pv=g(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.ArgumentOutOfRangeError=void 0;var S5=Pn();yl.ArgumentOutOfRangeError=S5.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var Mv=g(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.NotFoundError=void 0;var O5=Pn();wl.NotFoundError=O5.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var Cv=g(xl=>{"use strict";Object.defineProperty(xl,"__esModule",{value:!0});xl.SequenceError=void 0;var E5=Pn();xl.SequenceError=E5.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var Ol=g(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.isValidDate=void 0;function A5(e){return e instanceof Date&&!isNaN(e)}Sl.isValidDate=A5});var El=g(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.timeout=qi.TimeoutError=void 0;var R5=Ft(),T5=Ol(),P5=V(),M5=de(),C5=Pn(),I5=X(),k5=Jr();qi.TimeoutError=C5.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 q5(e,t){var r=T5.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,i=r.each,o=r.with,a=o===void 0?j5:o,u=r.scheduler,f=u===void 0?t??R5.asyncScheduler:u,s=r.meta,c=s===void 0?null:s;if(n==null&&i==null)throw new TypeError("No timeout provided.");return P5.operate(function(l,d){var p,h,m=null,v=0,_=function(w){h=k5.executeSchedule(d,f,function(){try{p.unsubscribe(),M5.innerFrom(a({meta:c,lastValue:m,seen:v})).subscribe(d)}catch(y){d.error(y)}},w)};p=l.subscribe(I5.createOperatorSubscriber(d,function(w){h?.unsubscribe(),v++,d.next(m=w),i>0&&_(i)},void 0,void 0,function(){h?.closed||h?.unsubscribe(),m=null})),!v&&_(n!=null?typeof n=="number"?n:+n-f.now():i)})}qi.timeout=q5;function j5(e){throw new qi.TimeoutError(e)}});var qn=g(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.map=void 0;var F5=V(),L5=X();function N5(e,t){return F5.operate(function(r,n){var i=0;r.subscribe(L5.createOperatorSubscriber(n,function(o){n.next(e.call(t,o,i++))}))})}Al.map=N5});var Fn=g(jn=>{"use strict";var D5=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},B5=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 z5=qn(),U5=Array.isArray;function W5(e,t){return U5(t)?e.apply(void 0,B5([],D5(t))):e(t)}function H5(e){return z5.map(function(t){return W5(e,t)})}jn.mapOneOrManyArgs=H5});var kv=g(Ln=>{"use strict";var V5=Ln&&Ln.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o},cE=Ln&&Ln.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.bindCallbackInternals=void 0;var G5=Iu(),$5=Ie(),Z5=qu(),K5=Fn(),Y5=ku(),X5=Wc();function Iv(e,t,r,n){if(r)if(G5.isScheduler(r))n=r;else return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Iv(e,t,n).apply(this,i).pipe(K5.mapOneOrManyArgs(r))};return n?function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return Iv(e,t).apply(this,i).pipe(Z5.subscribeOn(n),Y5.observeOn(n))}:function(){for(var i=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new X5.AsyncSubject,f=!0;return new $5.Observable(function(s){var c=u.subscribe(s);if(f){f=!1;var l=!1,d=!1;t.apply(i,cE(cE([],V5(o)),[function(){for(var p=[],h=0;h<arguments.length;h++)p[h]=arguments[h];if(e){var m=p.shift();if(m!=null){u.error(m);return}}u.next(1<p.length?p:p[0]),d=!0,l&&u.complete()}])),d&&u.complete(),l=!0}return c})}}Ln.bindCallbackInternals=Iv});var lE=g(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.bindCallback=void 0;var J5=kv();function Q5(e,t,r){return J5.bindCallbackInternals(!1,e,t,r)}Rl.bindCallback=Q5});var fE=g(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.bindNodeCallback=void 0;var e8=kv();function t8(e,t,r){return e8.bindCallbackInternals(!0,e,t,r)}Tl.bindNodeCallback=t8});var qv=g(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.argsArgArrayOrObject=void 0;var r8=Array.isArray,n8=Object.getPrototypeOf,i8=Object.prototype,o8=Object.keys;function a8(e){if(e.length===1){var t=e[0];if(r8(t))return{args:t,keys:null};if(u8(t)){var r=o8(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}Pl.argsArgArrayOrObject=a8;function u8(e){return e&&typeof e=="object"&&n8(e)===i8}});var jv=g(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.createObject=void 0;function s8(e,t){return e.reduce(function(r,n,i){return r[n]=t[i],r},{})}Ml.createObject=s8});var Cl=g(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.combineLatestInit=ea.combineLatest=void 0;var c8=Ie(),l8=qv(),hE=Qr(),mE=ft(),f8=Fn(),dE=Lt(),d8=jv(),p8=X(),h8=Jr();function m8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=dE.popScheduler(e),n=dE.popResultSelector(e),i=l8.argsArgArrayOrObject(e),o=i.args,a=i.keys;if(o.length===0)return hE.from([],r);var u=new c8.Observable(vE(o,r,a?function(f){return d8.createObject(a,f)}:mE.identity));return n?u.pipe(f8.mapOneOrManyArgs(n)):u}ea.combineLatest=m8;function vE(e,t,r){return r===void 0&&(r=mE.identity),function(n){pE(t,function(){for(var i=e.length,o=new Array(i),a=i,u=i,f=function(c){pE(t,function(){var l=hE.from(e[c],t),d=!1;l.subscribe(p8.createOperatorSubscriber(n,function(p){o[c]=p,d||(d=!0,u--),u||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},s=0;s<i;s++)f(s)},n)}}ea.combineLatestInit=vE;function pE(e,t,r){e?h8.executeSchedule(r,e,t):t()}});var kl=g(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.mergeInternals=void 0;var v8=de(),b8=Jr(),bE=X();function g8(e,t,r,n,i,o,a,u){var f=[],s=0,c=0,l=!1,d=function(){l&&!f.length&&!s&&t.complete()},p=function(m){return s<n?h(m):f.push(m)},h=function(m){o&&t.next(m),s++;var v=!1;v8.innerFrom(r(m,c++)).subscribe(bE.createOperatorSubscriber(t,function(_){i?.(_),o?p(_):t.next(_)},function(){v=!0},void 0,function(){if(v)try{s--;for(var _=function(){var w=f.shift();a?b8.executeSchedule(t,a,function(){return h(w)}):h(w)};f.length&&s<n;)_();d()}catch(w){t.error(w)}}))};return e.subscribe(bE.createOperatorSubscriber(t,p,function(){l=!0,d()})),function(){u?.()}}Il.mergeInternals=g8});var tn=g(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.mergeMap=void 0;var _8=qn(),y8=de(),w8=V(),x8=kl(),S8=Pe();function gE(e,t,r){return r===void 0&&(r=1/0),S8.isFunction(t)?gE(function(n,i){return _8.map(function(o,a){return t(n,o,i,a)})(y8.innerFrom(e(n,i)))},r):(typeof t=="number"&&(r=t),w8.operate(function(n,i){return x8.mergeInternals(n,i,e,r)}))}ql.mergeMap=gE});var ju=g(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.mergeAll=void 0;var O8=tn(),E8=ft();function A8(e){return e===void 0&&(e=1/0),O8.mergeMap(E8.identity,e)}jl.mergeAll=A8});var Ll=g(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.concatAll=void 0;var R8=ju();function T8(){return R8.mergeAll(1)}Fl.concatAll=T8});var Fu=g(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.concat=void 0;var P8=Ll(),M8=Lt(),C8=Qr();function I8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return P8.concatAll()(C8.from(e,M8.popScheduler(e)))}Nl.concat=I8});var Lu=g(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.defer=void 0;var k8=Ie(),q8=de();function j8(e){return new k8.Observable(function(t){q8.innerFrom(e()).subscribe(t)})}Dl.defer=j8});var _E=g(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.connectable=void 0;var F8=dt(),L8=Ie(),N8=Lu(),D8={connector:function(){return new F8.Subject},resetOnDisconnect:!0};function B8(e,t){t===void 0&&(t=D8);var r=null,n=t.connector,i=t.resetOnDisconnect,o=i===void 0?!0:i,a=n(),u=new L8.Observable(function(f){return a.subscribe(f)});return u.connect=function(){return(!r||r.closed)&&(r=N8.defer(function(){return e}).subscribe(a),o&&r.add(function(){return a=n()})),r},u}Bl.connectable=B8});var yE=g(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.forkJoin=void 0;var z8=Ie(),U8=qv(),W8=de(),H8=Lt(),V8=X(),G8=Fn(),$8=jv();function Z8(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=H8.popResultSelector(e),n=U8.argsArgArrayOrObject(e),i=n.args,o=n.keys,a=new z8.Observable(function(u){var f=i.length;if(!f){u.complete();return}for(var s=new Array(f),c=f,l=f,d=function(h){var m=!1;W8.innerFrom(i[h]).subscribe(V8.createOperatorSubscriber(u,function(v){m||(m=!0,l--),s[h]=v},function(){return c--},void 0,function(){(!c||!m)&&(l||u.next(o?$8.createObject(o,s):s),u.complete())}))},p=0;p<f;p++)d(p)});return r?a.pipe(G8.mapOneOrManyArgs(r)):a}zl.forkJoin=Z8});var xE=g(ta=>{"use strict";var K8=ta&&ta.__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(ta,"__esModule",{value:!0});ta.fromEvent=void 0;var Y8=de(),X8=Ie(),J8=tn(),Q8=Zc(),ji=Pe(),eB=Fn(),tB=["addListener","removeListener"],rB=["addEventListener","removeEventListener"],nB=["on","off"];function Fv(e,t,r,n){if(ji.isFunction(r)&&(n=r,r=void 0),n)return Fv(e,t,r).pipe(eB.mapOneOrManyArgs(n));var i=K8(aB(e)?rB.map(function(u){return function(f){return e[u](t,f,r)}}):iB(e)?tB.map(wE(e,t)):oB(e)?nB.map(wE(e,t)):[],2),o=i[0],a=i[1];if(!o&&Q8.isArrayLike(e))return J8.mergeMap(function(u){return Fv(u,t,r)})(Y8.innerFrom(e));if(!o)throw new TypeError("Invalid event target");return new X8.Observable(function(u){var f=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(f),function(){return a(f)}})}ta.fromEvent=Fv;function wE(e,t){return function(r){return function(n){return e[r](t,n)}}}function iB(e){return ji.isFunction(e.addListener)&&ji.isFunction(e.removeListener)}function oB(e){return ji.isFunction(e.on)&&ji.isFunction(e.off)}function aB(e){return ji.isFunction(e.addEventListener)&&ji.isFunction(e.removeEventListener)}});var OE=g(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.fromEventPattern=void 0;var uB=Ie(),sB=Pe(),cB=Fn();function SE(e,t,r){return r?SE(e,t).pipe(cB.mapOneOrManyArgs(r)):new uB.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 sB.isFunction(t)?function(){return t(i,o)}:void 0})}Ul.fromEventPattern=SE});var AE=g(ra=>{"use strict";var lB=ra&&ra.__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 f([s,c])}}function f(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(ra,"__esModule",{value:!0});ra.generate=void 0;var EE=ft(),fB=Iu(),dB=Lu(),pB=Ev();function hB(e,t,r,n,i){var o,a,u,f;arguments.length===1?(o=e,f=o.initialState,t=o.condition,r=o.iterate,a=o.resultSelector,u=a===void 0?EE.identity:a,i=o.scheduler):(f=e,!n||fB.isScheduler(n)?(u=EE.identity,i=n):u=n);function s(){var c;return lB(this,function(l){switch(l.label){case 0:c=f,l.label=1;case 1:return!t||t(c)?[4,u(c)]:[3,4];case 2:l.sent(),l.label=3;case 3:return c=r(c),[3,1];case 4:return[2]}})}return dB.defer(i?function(){return pB.scheduleIterable(s(),i)}:s)}ra.generate=hB});var RE=g(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.iif=void 0;var mB=Lu();function vB(e,t,r){return mB.defer(function(){return e()?t:r})}Wl.iif=vB});var Nn=g(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});Hl.timer=void 0;var bB=Ie(),gB=Ft(),_B=Iu(),yB=Ol();function wB(e,t,r){e===void 0&&(e=0),r===void 0&&(r=gB.async);var n=-1;return t!=null&&(_B.isScheduler(t)?r=t:n=t),new bB.Observable(function(i){var o=yB.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)})}Hl.timer=wB});var Lv=g(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.interval=void 0;var xB=Ft(),SB=Nn();function OB(e,t){return e===void 0&&(e=0),t===void 0&&(t=xB.asyncScheduler),e<0&&(e=0),SB.timer(e,e,t)}Vl.interval=OB});var PE=g(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.merge=void 0;var EB=ju(),AB=de(),RB=hr(),TE=Lt(),TB=Qr();function PB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=TE.popScheduler(e),n=TE.popNumber(e,1/0),i=e;return i.length?i.length===1?AB.innerFrom(i[0]):EB.mergeAll(n)(TB.from(i,r)):RB.EMPTY}Gl.merge=PB});var Nv=g(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.never=Fi.NEVER=void 0;var MB=Ie(),CB=lt();Fi.NEVER=new MB.Observable(CB.noop);function IB(){return Fi.NEVER}Fi.never=IB});var na=g($l=>{"use strict";Object.defineProperty($l,"__esModule",{value:!0});$l.argsOrArgArray=void 0;var kB=Array.isArray;function qB(e){return e.length===1&&kB(e[0])?e[0]:e}$l.argsOrArgArray=qB});var Dv=g(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.onErrorResumeNext=void 0;var jB=Ie(),FB=na(),LB=X(),ME=lt(),NB=de();function DB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=FB.argsOrArgArray(e);return new jB.Observable(function(n){var i=0,o=function(){if(i<r.length){var a=void 0;try{a=NB.innerFrom(r[i++])}catch{o();return}var u=new LB.OperatorSubscriber(n,void 0,ME.noop,ME.noop);a.subscribe(u),u.add(o)}else n.complete()};o()})}Zl.onErrorResumeNext=DB});var CE=g(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});Kl.pairs=void 0;var BB=Qr();function zB(e,t){return BB.from(Object.entries(e),t)}Kl.pairs=zB});var IE=g(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});Yl.not=void 0;function UB(e,t){return function(r,n){return!e.call(t,r,n)}}Yl.not=UB});var Li=g(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.filter=void 0;var WB=V(),HB=X();function VB(e,t){return WB.operate(function(r,n){var i=0;r.subscribe(HB.createOperatorSubscriber(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}Xl.filter=VB});var jE=g(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.partition=void 0;var GB=IE(),kE=Li(),qE=de();function $B(e,t,r){return[kE.filter(t,r)(qE.innerFrom(e)),kE.filter(GB.not(t,r))(qE.innerFrom(e))]}Jl.partition=$B});var Bv=g(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.raceInit=ia.race=void 0;var ZB=Ie(),FE=de(),KB=na(),YB=X();function XB(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=KB.argsOrArgArray(e),e.length===1?FE.innerFrom(e[0]):new ZB.Observable(LE(e))}ia.race=XB;function LE(e){return function(t){for(var r=[],n=function(o){r.push(FE.innerFrom(e[o]).subscribe(YB.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)}}ia.raceInit=LE});var NE=g(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.range=void 0;var JB=Ie(),QB=hr();function e6(e,t,r){if(t==null&&(t=e,e=0),t<=0)return QB.EMPTY;var n=t+e;return new JB.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()})}Ql.range=e6});var DE=g(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.using=void 0;var t6=Ie(),r6=de(),n6=hr();function i6(e,t){return new t6.Observable(function(r){var n=e(),i=t(n),o=i?r6.innerFrom(i):n6.EMPTY;return o.subscribe(r),function(){n&&n.unsubscribe()}})}ef.using=i6});var tf=g(Dn=>{"use strict";var o6=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},a6=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 u6=Ie(),s6=de(),c6=na(),l6=hr(),f6=X(),d6=Lt();function p6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=d6.popResultSelector(e),n=c6.argsOrArgArray(e);return n.length?new u6.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){s6.innerFrom(n[s]).subscribe(f6.createOperatorSubscriber(i,function(c){if(o[s].push(c),o.every(function(d){return d.length})){var l=o.map(function(d){return d.shift()});i.next(r?r.apply(void 0,a6([],o6(l))):l),o.some(function(d,p){return!d.length&&a[p]})&&i.complete()}},function(){a[s]=!0,!o[s].length&&i.complete()}))},f=0;!i.closed&&f<n.length;f++)u(f);return function(){o=a=null}}):l6.EMPTY}Dn.zip=p6});var zE=g(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0})});var zv=g(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.audit=void 0;var h6=V(),m6=de(),UE=X();function v6(e){return h6.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()},f=function(){o=null,a&&r.complete()};t.subscribe(UE.createOperatorSubscriber(r,function(s){n=!0,i=s,o||m6.innerFrom(e(s)).subscribe(o=UE.createOperatorSubscriber(r,u,f))},function(){a=!0,(!n||!o||o.closed)&&r.complete()}))})}rf.audit=v6});var WE=g(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.auditTime=void 0;var b6=Ft(),g6=zv(),_6=Nn();function y6(e,t){return t===void 0&&(t=b6.asyncScheduler),g6.audit(function(){return _6.timer(e,t)})}nf.auditTime=y6});var VE=g(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.buffer=void 0;var w6=V(),x6=lt(),HE=X(),S6=de();function O6(e){return w6.operate(function(t,r){var n=[];return t.subscribe(HE.createOperatorSubscriber(r,function(i){return n.push(i)},function(){r.next(n),r.complete()})),S6.innerFrom(e).subscribe(HE.createOperatorSubscriber(r,function(){var i=n;n=[],r.next(i)},x6.noop)),function(){n=null}})}of.buffer=O6});var GE=g(oa=>{"use strict";var Uv=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.bufferCount=void 0;var E6=V(),A6=X(),R6=Xr();function T6(e,t){return t===void 0&&(t=null),t=t??e,E6.operate(function(r,n){var i=[],o=0;r.subscribe(A6.createOperatorSubscriber(n,function(a){var u,f,s,c,l=null;o++%t===0&&i.push([]);try{for(var d=Uv(i),p=d.next();!p.done;p=d.next()){var h=p.value;h.push(a),e<=h.length&&(l=l??[],l.push(h))}}catch(_){u={error:_}}finally{try{p&&!p.done&&(f=d.return)&&f.call(d)}finally{if(u)throw u.error}}if(l)try{for(var m=Uv(l),v=m.next();!v.done;v=m.next()){var h=v.value;R6.arrRemove(i,h),n.next(h)}}catch(_){s={error:_}}finally{try{v&&!v.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},function(){var a,u;try{for(var f=Uv(i),s=f.next();!s.done;s=f.next()){var c=s.value;n.next(c)}}catch(l){a={error:l}}finally{try{s&&!s.done&&(u=f.return)&&u.call(f)}finally{if(a)throw a.error}}n.complete()},void 0,function(){i=null}))})}oa.bufferCount=T6});var ZE=g(aa=>{"use strict";var P6=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.bufferTime=void 0;var M6=Ut(),C6=V(),I6=X(),k6=Xr(),q6=Ft(),j6=Lt(),$E=Jr();function F6(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=j6.popScheduler(n))!==null&&t!==void 0?t:q6.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return C6.operate(function(f,s){var c=[],l=!1,d=function(m){var v=m.buffer,_=m.subs;_.unsubscribe(),k6.arrRemove(c,m),s.next(v),l&&p()},p=function(){if(c){var m=new M6.Subscription;s.add(m);var v=[],_={buffer:v,subs:m};c.push(_),$E.executeSchedule(m,o,function(){return d(_)},e)}};a!==null&&a>=0?$E.executeSchedule(s,o,p,a,!0):l=!0,p();var h=I6.createOperatorSubscriber(s,function(m){var v,_,w=c.slice();try{for(var y=P6(w),x=y.next();!x.done;x=y.next()){var O=x.value,M=O.buffer;M.push(m),u<=M.length&&d(O)}}catch(E){v={error:E}}finally{try{x&&!x.done&&(_=y.return)&&_.call(y)}finally{if(v)throw v.error}}},function(){for(;c?.length;)s.next(c.shift().buffer);h?.unsubscribe(),s.complete(),s.unsubscribe()},void 0,function(){return c=null});f.subscribe(h)})}aa.bufferTime=F6});var XE=g(ua=>{"use strict";var L6=ua&&ua.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ua,"__esModule",{value:!0});ua.bufferToggle=void 0;var N6=Ut(),D6=V(),KE=de(),Wv=X(),YE=lt(),B6=Xr();function z6(e,t){return D6.operate(function(r,n){var i=[];KE.innerFrom(e).subscribe(Wv.createOperatorSubscriber(n,function(o){var a=[];i.push(a);var u=new N6.Subscription,f=function(){B6.arrRemove(i,a),n.next(a),u.unsubscribe()};u.add(KE.innerFrom(t(o)).subscribe(Wv.createOperatorSubscriber(n,f,YE.noop)))},YE.noop)),r.subscribe(Wv.createOperatorSubscriber(n,function(o){var a,u;try{for(var f=L6(i),s=f.next();!s.done;s=f.next()){var c=s.value;c.push(o)}}catch(l){a={error:l}}finally{try{s&&!s.done&&(u=f.return)&&u.call(f)}finally{if(a)throw a.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}ua.bufferToggle=z6});var QE=g(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.bufferWhen=void 0;var U6=V(),W6=lt(),JE=X(),H6=de();function V6(e){return U6.operate(function(t,r){var n=null,i=null,o=function(){i?.unsubscribe();var a=n;n=[],a&&r.next(a),H6.innerFrom(e()).subscribe(i=JE.createOperatorSubscriber(r,o,W6.noop))};o(),t.subscribe(JE.createOperatorSubscriber(r,function(a){return n?.push(a)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=i=null}))})}af.bufferWhen=V6});var tA=g(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.catchError=void 0;var G6=de(),$6=X(),Z6=V();function eA(e){return Z6.operate(function(t,r){var n=null,i=!1,o;n=t.subscribe($6.createOperatorSubscriber(r,void 0,void 0,function(a){o=G6.innerFrom(e(a,eA(e)(t))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}uf.catchError=eA});var Hv=g(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.scanInternals=void 0;var K6=X();function Y6(e,t,r,n,i){return function(o,a){var u=r,f=t,s=0;o.subscribe(K6.createOperatorSubscriber(a,function(c){var l=s++;f=u?e(f,c,l):(u=!0,c),n&&a.next(f)},i&&(function(){u&&a.next(f),a.complete()})))}}sf.scanInternals=Y6});var sa=g(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.reduce=void 0;var X6=Hv(),J6=V();function Q6(e,t){return J6.operate(X6.scanInternals(e,t,arguments.length>=2,!1,!0))}cf.reduce=Q6});var Vv=g(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.toArray=void 0;var e3=sa(),t3=V(),r3=function(e,t){return e.push(t),e};function n3(){return t3.operate(function(e,t){e3.reduce(r3,[])(e).subscribe(t)})}lf.toArray=n3});var Gv=g(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.joinAllInternals=void 0;var i3=ft(),o3=Fn(),a3=Tu(),u3=tn(),s3=Vv();function c3(e,t){return a3.pipe(s3.toArray(),u3.mergeMap(function(r){return e(r)}),t?o3.mapOneOrManyArgs(t):i3.identity)}ff.joinAllInternals=c3});var $v=g(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.combineLatestAll=void 0;var l3=Cl(),f3=Gv();function d3(e){return f3.joinAllInternals(l3.combineLatest,e)}df.combineLatestAll=d3});var rA=g(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.combineAll=void 0;var p3=$v();pf.combineAll=p3.combineLatestAll});var aA=g(Bn=>{"use strict";var nA=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},iA=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 h3=Cl(),m3=V(),v3=na(),b3=Fn(),g3=Tu(),_3=Lt();function oA(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=_3.popResultSelector(e);return r?g3.pipe(oA.apply(void 0,iA([],nA(e))),b3.mapOneOrManyArgs(r)):m3.operate(function(n,i){h3.combineLatestInit(iA([n],nA(v3.argsOrArgArray(e))))(i)})}Bn.combineLatest=oA});var uA=g(zn=>{"use strict";var y3=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},w3=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 x3=aA();function S3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x3.combineLatest.apply(void 0,w3([],y3(e)))}zn.combineLatestWith=S3});var Zv=g(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.concatMap=void 0;var sA=tn(),O3=Pe();function E3(e,t){return O3.isFunction(t)?sA.mergeMap(e,t,1):sA.mergeMap(e,1)}hf.concatMap=E3});var lA=g(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.concatMapTo=void 0;var cA=Zv(),A3=Pe();function R3(e,t){return A3.isFunction(t)?cA.concatMap(function(){return e},t):cA.concatMap(function(){return e})}mf.concatMapTo=R3});var fA=g(Un=>{"use strict";var T3=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},P3=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 M3=V(),C3=Ll(),I3=Lt(),k3=Qr();function q3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=I3.popScheduler(e);return M3.operate(function(n,i){C3.concatAll()(k3.from(P3([n],T3(e)),r)).subscribe(i)})}Un.concat=q3});var dA=g(Wn=>{"use strict";var j3=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},F3=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 L3=fA();function N3(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return L3.concat.apply(void 0,F3([],j3(e)))}Wn.concatWith=N3});var pA=g(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.fromSubscribable=void 0;var D3=Ie();function B3(e){return new D3.Observable(function(t){return e.subscribe(t)})}vf.fromSubscribable=B3});var gf=g(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.connect=void 0;var z3=dt(),U3=de(),W3=V(),H3=pA(),V3={connector:function(){return new z3.Subject}};function G3(e,t){t===void 0&&(t=V3);var r=t.connector;return W3.operate(function(n,i){var o=r();U3.innerFrom(e(H3.fromSubscribable(o))).subscribe(i),i.add(n.subscribe(o))})}bf.connect=G3});var hA=g(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.count=void 0;var $3=sa();function Z3(e){return $3.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}_f.count=Z3});var vA=g(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.debounce=void 0;var K3=V(),Y3=lt(),mA=X(),X3=de();function J3(e){return K3.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(mA.createOperatorSubscriber(r,function(u){o?.unsubscribe(),n=!0,i=u,o=mA.createOperatorSubscriber(r,a,Y3.noop),X3.innerFrom(e(u)).subscribe(o)},function(){a(),r.complete()},void 0,function(){i=o=null}))})}yf.debounce=J3});var bA=g(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.debounceTime=void 0;var Q3=Ft(),ez=V(),tz=X();function rz(e,t){return t===void 0&&(t=Q3.asyncScheduler),ez.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 f(){var s=a+e,c=t.now();if(c<s){i=this.schedule(void 0,s-c),n.add(i);return}u()}r.subscribe(tz.createOperatorSubscriber(n,function(s){o=s,a=t.now(),i||(i=t.schedule(f,e),n.add(i))},function(){u(),n.complete()},void 0,function(){o=i=null}))})}wf.debounceTime=rz});var Nu=g(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.defaultIfEmpty=void 0;var nz=V(),iz=X();function oz(e){return nz.operate(function(t,r){var n=!1;t.subscribe(iz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){n||r.next(e),r.complete()}))})}xf.defaultIfEmpty=oz});var Du=g(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.take=void 0;var az=hr(),uz=V(),sz=X();function cz(e){return e<=0?function(){return az.EMPTY}:uz.operate(function(t,r){var n=0;t.subscribe(sz.createOperatorSubscriber(r,function(i){++n<=e&&(r.next(i),e<=n&&r.complete())}))})}Sf.take=cz});var Kv=g(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.ignoreElements=void 0;var lz=V(),fz=X(),dz=lt();function pz(){return lz.operate(function(e,t){e.subscribe(fz.createOperatorSubscriber(t,dz.noop))})}Of.ignoreElements=pz});var Yv=g(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.mapTo=void 0;var hz=qn();function mz(e){return hz.map(function(){return e})}Ef.mapTo=mz});var Xv=g(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.delayWhen=void 0;var vz=Fu(),gA=Du(),bz=Kv(),gz=Yv(),_z=tn(),yz=de();function _A(e,t){return t?function(r){return vz.concat(t.pipe(gA.take(1),bz.ignoreElements()),r.pipe(_A(e)))}:_z.mergeMap(function(r,n){return yz.innerFrom(e(r,n)).pipe(gA.take(1),gz.mapTo(r))})}Af.delayWhen=_A});var yA=g(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.delay=void 0;var wz=Ft(),xz=Xv(),Sz=Nn();function Oz(e,t){t===void 0&&(t=wz.asyncScheduler);var r=Sz.timer(e,t);return xz.delayWhen(function(){return r})}Rf.delay=Oz});var wA=g(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.dematerialize=void 0;var Ez=ml(),Az=V(),Rz=X();function Tz(){return Az.operate(function(e,t){e.subscribe(Rz.createOperatorSubscriber(t,function(r){return Ez.observeNotification(r,t)}))})}Tf.dematerialize=Tz});var SA=g(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.distinct=void 0;var Pz=V(),xA=X(),Mz=lt(),Cz=de();function Iz(e,t){return Pz.operate(function(r,n){var i=new Set;r.subscribe(xA.createOperatorSubscriber(n,function(o){var a=e?e(o):o;i.has(a)||(i.add(a),n.next(o))})),t&&Cz.innerFrom(t).subscribe(xA.createOperatorSubscriber(n,function(){return i.clear()},Mz.noop))})}Pf.distinct=Iz});var Jv=g(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.distinctUntilChanged=void 0;var kz=ft(),qz=V(),jz=X();function Fz(e,t){return t===void 0&&(t=kz.identity),e=e??Lz,qz.operate(function(r,n){var i,o=!0;r.subscribe(jz.createOperatorSubscriber(n,function(a){var u=t(a);(o||!e(i,u))&&(o=!1,i=u,n.next(a))}))})}Mf.distinctUntilChanged=Fz;function Lz(e,t){return e===t}});var OA=g(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.distinctUntilKeyChanged=void 0;var Nz=Jv();function Dz(e,t){return Nz.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}Cf.distinctUntilKeyChanged=Dz});var Bu=g(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.throwIfEmpty=void 0;var Bz=kn(),zz=V(),Uz=X();function Wz(e){return e===void 0&&(e=Hz),zz.operate(function(t,r){var n=!1;t.subscribe(Uz.createOperatorSubscriber(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(e())}))})}If.throwIfEmpty=Wz;function Hz(){return new Bz.EmptyError}});var AA=g(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.elementAt=void 0;var EA=Pv(),Vz=Li(),Gz=Bu(),$z=Nu(),Zz=Du();function Kz(e,t){if(e<0)throw new EA.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(Vz.filter(function(i,o){return o===e}),Zz.take(1),r?$z.defaultIfEmpty(t):Gz.throwIfEmpty(function(){return new EA.ArgumentOutOfRangeError}))}}kf.elementAt=Kz});var RA=g(Hn=>{"use strict";var Yz=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},Xz=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.endWith=void 0;var Jz=Fu(),Qz=pl();function eU(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return Jz.concat(r,Qz.of.apply(void 0,Xz([],Yz(e))))}}Hn.endWith=eU});var TA=g(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.every=void 0;var tU=V(),rU=X();function nU(e,t){return tU.operate(function(r,n){var i=0;r.subscribe(rU.createOperatorSubscriber(n,function(o){e.call(t,o,i++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}qf.every=nU});var Qv=g(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.exhaustMap=void 0;var iU=qn(),PA=de(),oU=V(),MA=X();function CA(e,t){return t?function(r){return r.pipe(CA(function(n,i){return PA.innerFrom(e(n,i)).pipe(iU.map(function(o,a){return t(n,o,i,a)}))}))}:oU.operate(function(r,n){var i=0,o=null,a=!1;r.subscribe(MA.createOperatorSubscriber(n,function(u){o||(o=MA.createOperatorSubscriber(n,void 0,function(){o=null,a&&n.complete()}),PA.innerFrom(e(u,i++)).subscribe(o))},function(){a=!0,!o&&n.complete()}))})}jf.exhaustMap=CA});var eb=g(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.exhaustAll=void 0;var aU=Qv(),uU=ft();function sU(){return aU.exhaustMap(uU.identity)}Ff.exhaustAll=sU});var IA=g(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.exhaust=void 0;var cU=eb();Lf.exhaust=cU.exhaustAll});var kA=g(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.expand=void 0;var lU=V(),fU=kl();function dU(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,lU.operate(function(n,i){return fU.mergeInternals(n,i,e,t,void 0,!0,r)})}Nf.expand=dU});var qA=g(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.finalize=void 0;var pU=V();function hU(e){return pU.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}Df.finalize=hU});var tb=g(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.createFind=ca.find=void 0;var mU=V(),vU=X();function bU(e,t){return mU.operate(jA(e,t,"value"))}ca.find=bU;function jA(e,t,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(vU.createOperatorSubscriber(o,function(u){var f=a++;e.call(t,u,f,i)&&(o.next(n?f:u),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}ca.createFind=jA});var FA=g(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.findIndex=void 0;var gU=V(),_U=tb();function yU(e,t){return gU.operate(_U.createFind(e,t,"index"))}Bf.findIndex=yU});var LA=g(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});zf.first=void 0;var wU=kn(),xU=Li(),SU=Du(),OU=Nu(),EU=Bu(),AU=ft();function RU(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?xU.filter(function(i,o){return e(i,o,n)}):AU.identity,SU.take(1),r?OU.defaultIfEmpty(t):EU.throwIfEmpty(function(){return new wU.EmptyError}))}}zf.first=RU});var DA=g(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.groupBy=void 0;var TU=Ie(),PU=de(),MU=dt(),CU=V(),NA=X();function IU(e,t,r,n){return CU.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,f=function(h){u.forEach(h),h(o)},s=function(h){return f(function(m){return m.error(h)})},c=0,l=!1,d=new NA.OperatorSubscriber(o,function(h){try{var m=e(h),v=u.get(m);if(!v){u.set(m,v=n?n():new MU.Subject);var _=p(m,v);if(o.next(_),r){var w=NA.createOperatorSubscriber(v,function(){v.complete(),w?.unsubscribe()},void 0,void 0,function(){return u.delete(m)});d.add(PU.innerFrom(r(_)).subscribe(w))}}v.next(a?a(h):h)}catch(y){s(y)}},function(){return f(function(h){return h.complete()})},s,function(){return u.clear()},function(){return l=!0,c===0});i.subscribe(d);function p(h,m){var v=new TU.Observable(function(_){c++;var w=m.subscribe(_);return function(){w.unsubscribe(),--c===0&&l&&d.unsubscribe()}});return v.key=h,v}})}Uf.groupBy=IU});var BA=g(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});Wf.isEmpty=void 0;var kU=V(),qU=X();function jU(){return kU.operate(function(e,t){e.subscribe(qU.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}Wf.isEmpty=jU});var rb=g(la=>{"use strict";var FU=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.takeLast=void 0;var LU=hr(),NU=V(),DU=X();function BU(e){return e<=0?function(){return LU.EMPTY}:NU.operate(function(t,r){var n=[];t.subscribe(DU.createOperatorSubscriber(r,function(i){n.push(i),e<n.length&&n.shift()},function(){var i,o;try{for(var a=FU(n),u=a.next();!u.done;u=a.next()){var f=u.value;r.next(f)}}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}))})}la.takeLast=BU});var zA=g(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.last=void 0;var zU=kn(),UU=Li(),WU=rb(),HU=Bu(),VU=Nu(),GU=ft();function $U(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?UU.filter(function(i,o){return e(i,o,n)}):GU.identity,WU.takeLast(1),r?VU.defaultIfEmpty(t):HU.throwIfEmpty(function(){return new zU.EmptyError}))}}Hf.last=$U});var UA=g(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.materialize=void 0;var nb=ml(),ZU=V(),KU=X();function YU(){return ZU.operate(function(e,t){e.subscribe(KU.createOperatorSubscriber(t,function(r){t.next(nb.Notification.createNext(r))},function(){t.next(nb.Notification.createComplete()),t.complete()},function(r){t.next(nb.Notification.createError(r)),t.complete()}))})}Vf.materialize=YU});var WA=g(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.max=void 0;var XU=sa(),JU=Pe();function QU(e){return XU.reduce(JU.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}Gf.max=QU});var HA=g($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.flatMap=void 0;var eW=tn();$f.flatMap=eW.mergeMap});var GA=g(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.mergeMapTo=void 0;var VA=tn(),tW=Pe();function rW(e,t,r){return r===void 0&&(r=1/0),tW.isFunction(t)?VA.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),VA.mergeMap(function(){return e},r))}Zf.mergeMapTo=rW});var $A=g(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});Kf.mergeScan=void 0;var nW=V(),iW=kl();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})})}Kf.mergeScan=oW});var KA=g(Vn=>{"use strict";var aW=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},uW=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.merge=void 0;var sW=V(),cW=ju(),ZA=Lt(),lW=Qr();function fW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ZA.popScheduler(e),n=ZA.popNumber(e,1/0);return sW.operate(function(i,o){cW.mergeAll(n)(lW.from(uW([i],aW(e)),r)).subscribe(o)})}Vn.merge=fW});var YA=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=KA();function mW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return hW.merge.apply(void 0,pW([],dW(e)))}Gn.mergeWith=mW});var XA=g(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});Yf.min=void 0;var vW=sa(),bW=Pe();function gW(e){return vW.reduce(bW.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}Yf.min=gW});var Jf=g(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.multicast=void 0;var _W=Pu(),JA=Pe(),yW=gf();function wW(e,t){var r=JA.isFunction(e)?e:function(){return e};return JA.isFunction(t)?yW.connect(t,{connector:r}):function(n){return new _W.ConnectableObservable(n,r)}}Xf.multicast=wW});var eR=g(Dr=>{"use strict";var xW=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},SW=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.onErrorResumeNext=Dr.onErrorResumeNextWith=void 0;var OW=na(),EW=Dv();function QA(){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)))}}Dr.onErrorResumeNextWith=QA;Dr.onErrorResumeNext=QA});var tR=g(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.pairwise=void 0;var AW=V(),RW=X();function TW(){return AW.operate(function(e,t){var r,n=!1;e.subscribe(RW.createOperatorSubscriber(t,function(i){var o=r;r=i,n&&t.next([o,i]),n=!0}))})}Qf.pairwise=TW});var rR=g(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.pluck=void 0;var PW=qn();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 PW.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})}ed.pluck=MW});var nR=g(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});td.publish=void 0;var CW=dt(),IW=Jf(),kW=gf();function qW(e){return e?function(t){return kW.connect(e)(t)}:function(t){return IW.multicast(new CW.Subject)(t)}}td.publish=qW});var iR=g(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.publishBehavior=void 0;var jW=dv(),FW=Pu();function LW(e){return function(t){var r=new jW.BehaviorSubject(e);return new FW.ConnectableObservable(t,function(){return r})}}rd.publishBehavior=LW});var oR=g(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});nd.publishLast=void 0;var NW=Wc(),DW=Pu();function BW(){return function(e){var t=new NW.AsyncSubject;return new DW.ConnectableObservable(e,function(){return t})}}nd.publishLast=BW});var uR=g(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.publishReplay=void 0;var zW=Uc(),UW=Jf(),aR=Pe();function WW(e,t,r,n){r&&!aR.isFunction(r)&&(n=r);var i=aR.isFunction(r)?r:void 0;return function(o){return UW.multicast(new zW.ReplaySubject(e,t,n),i)(o)}}id.publishReplay=WW});var sR=g($n=>{"use strict";var HW=$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},VW=$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=Bv(),$W=V(),ZW=ft();function KW(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?$W.operate(function(r,n){GW.raceInit(VW([r],HW(e)))(n)}):ZW.identity}$n.raceWith=KW});var lR=g(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.repeat=void 0;var YW=hr(),XW=V(),cR=X(),JW=de(),QW=Nn();function e4(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,f=function(){if(u?.unsubscribe(),u=null,n!=null){var c=typeof n=="number"?QW.timer(n):JW.innerFrom(n(a)),l=cR.createOperatorSubscriber(o,function(){l.unsubscribe(),s()});c.subscribe(l)}else s()},s=function(){var c=!1;u=i.subscribe(cR.createOperatorSubscriber(o,void 0,function(){++a<r?u?f():c=!0:o.complete()})),c&&f()};s()})}od.repeat=e4});var dR=g(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.repeatWhen=void 0;var t4=de(),r4=dt(),n4=V(),fR=X();function i4(e){return n4.operate(function(t,r){var n,i=!1,o,a=!1,u=!1,f=function(){return u&&a&&(r.complete(),!0)},s=function(){return o||(o=new r4.Subject,t4.innerFrom(e(o)).subscribe(fR.createOperatorSubscriber(r,function(){n?c():i=!0},function(){a=!0,f()}))),o},c=function(){u=!1,n=t.subscribe(fR.createOperatorSubscriber(r,void 0,function(){u=!0,!f()&&s().next()})),i&&(n.unsubscribe(),n=null,i=!1,c())};c()})}ad.repeatWhen=i4});var hR=g(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});ud.retry=void 0;var o4=V(),pR=X(),a4=ft(),u4=Nn(),s4=de();function c4(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?a4.identity:o4.operate(function(u,f){var s=0,c,l=function(){var d=!1;c=u.subscribe(pR.createOperatorSubscriber(f,function(p){a&&(s=0),f.next(p)},void 0,function(p){if(s++<n){var h=function(){c?(c.unsubscribe(),c=null,l()):d=!0};if(i!=null){var m=typeof i=="number"?u4.timer(i):s4.innerFrom(i(p,s)),v=pR.createOperatorSubscriber(f,function(){v.unsubscribe(),h()},function(){f.complete()});m.subscribe(v)}else h()}else f.error(p)})),d&&(c.unsubscribe(),c=null,l())};l()})}ud.retry=c4});var vR=g(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.retryWhen=void 0;var l4=de(),f4=dt(),d4=V(),mR=X();function p4(e){return d4.operate(function(t,r){var n,i=!1,o,a=function(){n=t.subscribe(mR.createOperatorSubscriber(r,void 0,void 0,function(u){o||(o=new f4.Subject,l4.innerFrom(e(o)).subscribe(mR.createOperatorSubscriber(r,function(){return n?a():i=!0}))),o&&o.next(u)})),i&&(n.unsubscribe(),n=null,i=!1,a())};a()})}sd.retryWhen=p4});var ib=g(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.sample=void 0;var h4=de(),m4=V(),v4=lt(),bR=X();function b4(e){return m4.operate(function(t,r){var n=!1,i=null;t.subscribe(bR.createOperatorSubscriber(r,function(o){n=!0,i=o})),h4.innerFrom(e).subscribe(bR.createOperatorSubscriber(r,function(){if(n){n=!1;var o=i;i=null,r.next(o)}},v4.noop))})}cd.sample=b4});var gR=g(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.sampleTime=void 0;var g4=Ft(),_4=ib(),y4=Lv();function w4(e,t){return t===void 0&&(t=g4.asyncScheduler),_4.sample(y4.interval(e,t))}ld.sampleTime=w4});var _R=g(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.scan=void 0;var x4=V(),S4=Hv();function O4(e,t){return x4.operate(S4.scanInternals(e,t,arguments.length>=2,!0))}fd.scan=O4});var wR=g(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.sequenceEqual=void 0;var E4=V(),A4=X(),R4=de();function T4(e,t){return t===void 0&&(t=function(r,n){return r===n}),E4.operate(function(r,n){var i=yR(),o=yR(),a=function(f){n.next(f),n.complete()},u=function(f,s){var c=A4.createOperatorSubscriber(n,function(l){var d=s.buffer,p=s.complete;d.length===0?p?a(!1):f.buffer.push(l):!t(l,d.shift())&&a(!1)},function(){f.complete=!0;var l=s.complete,d=s.buffer;l&&a(d.length===0),c?.unsubscribe()});return c};r.subscribe(u(i,o)),R4.innerFrom(e).subscribe(u(o,i))})}dd.sequenceEqual=T4;function yR(){return{buffer:[],complete:!1}}});var ab=g(Zn=>{"use strict";var P4=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},M4=Zn&&Zn.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.share=void 0;var xR=de(),C4=dt(),SR=Io(),I4=V();function k4(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new C4.Subject}:t,n=e.resetOnError,i=n===void 0?!0:n,o=e.resetOnComplete,a=o===void 0?!0:o,u=e.resetOnRefCountZero,f=u===void 0?!0:u;return function(s){var c,l,d,p=0,h=!1,m=!1,v=function(){l?.unsubscribe(),l=void 0},_=function(){v(),c=d=void 0,h=m=!1},w=function(){var y=c;_(),y?.unsubscribe()};return I4.operate(function(y,x){p++,!m&&!h&&v();var O=d=d??r();x.add(function(){p--,p===0&&!m&&!h&&(l=ob(w,f))}),O.subscribe(x),!c&&p>0&&(c=new SR.SafeSubscriber({next:function(M){return O.next(M)},error:function(M){m=!0,v(),l=ob(_,i,M),O.error(M)},complete:function(){h=!0,v(),l=ob(_,a),O.complete()}}),xR.innerFrom(y).subscribe(c))})(s)}}Zn.share=k4;function ob(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 SR.SafeSubscriber({next:function(){i.unsubscribe(),e()}});return xR.innerFrom(t.apply(void 0,M4([],P4(r)))).subscribe(i)}}});var OR=g(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.shareReplay=void 0;var q4=Uc(),j4=ab();function F4(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,j4.share({connector:function(){return new q4.ReplaySubject(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}pd.shareReplay=F4});var ER=g(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});hd.single=void 0;var L4=kn(),N4=Cv(),D4=Mv(),B4=V(),z4=X();function U4(e){return B4.operate(function(t,r){var n=!1,i,o=!1,a=0;t.subscribe(z4.createOperatorSubscriber(r,function(u){o=!0,(!e||e(u,a++,t))&&(n&&r.error(new N4.SequenceError("Too many matching values")),n=!0,i=u)},function(){n?(r.next(i),r.complete()):r.error(o?new D4.NotFoundError("No matching values"):new L4.EmptyError)}))})}hd.single=U4});var AR=g(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.skip=void 0;var W4=Li();function H4(e){return W4.filter(function(t,r){return e<=r})}md.skip=H4});var RR=g(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.skipLast=void 0;var V4=ft(),G4=V(),$4=X();function Z4(e){return e<=0?V4.identity:G4.operate(function(t,r){var n=new Array(e),i=0;return t.subscribe($4.createOperatorSubscriber(r,function(o){var a=i++;if(a<e)n[a]=o;else{var u=a%e,f=n[u];n[u]=o,r.next(f)}})),function(){n=null}})}vd.skipLast=Z4});var PR=g(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.skipUntil=void 0;var K4=V(),TR=X(),Y4=de(),X4=lt();function J4(e){return K4.operate(function(t,r){var n=!1,i=TR.createOperatorSubscriber(r,function(){i?.unsubscribe(),n=!0},X4.noop);Y4.innerFrom(e).subscribe(i),t.subscribe(TR.createOperatorSubscriber(r,function(o){return n&&r.next(o)}))})}bd.skipUntil=J4});var MR=g(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});gd.skipWhile=void 0;var Q4=V(),eH=X();function tH(e){return Q4.operate(function(t,r){var n=!1,i=0;t.subscribe(eH.createOperatorSubscriber(r,function(o){return(n||(n=!e(o,i++)))&&r.next(o)}))})}gd.skipWhile=tH});var IR=g(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.startWith=void 0;var CR=Fu(),rH=Lt(),nH=V();function iH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=rH.popScheduler(e);return nH.operate(function(n,i){(r?CR.concat(e,n,r):CR.concat(e,n)).subscribe(i)})}_d.startWith=iH});var zu=g(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.switchMap=void 0;var oH=de(),aH=V(),kR=X();function uH(e,t){return aH.operate(function(r,n){var i=null,o=0,a=!1,u=function(){return a&&!i&&n.complete()};r.subscribe(kR.createOperatorSubscriber(n,function(f){i?.unsubscribe();var s=0,c=o++;oH.innerFrom(e(f,c)).subscribe(i=kR.createOperatorSubscriber(n,function(l){return n.next(t?t(f,l,c,s++):l)},function(){i=null,u()}))},function(){a=!0,u()}))})}yd.switchMap=uH});var qR=g(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});wd.switchAll=void 0;var sH=zu(),cH=ft();function lH(){return sH.switchMap(cH.identity)}wd.switchAll=lH});var FR=g(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.switchMapTo=void 0;var jR=zu(),fH=Pe();function dH(e,t){return fH.isFunction(t)?jR.switchMap(function(){return e},t):jR.switchMap(function(){return e})}xd.switchMapTo=dH});var LR=g(Sd=>{"use strict";Object.defineProperty(Sd,"__esModule",{value:!0});Sd.switchScan=void 0;var pH=zu(),hH=V();function mH(e,t){return hH.operate(function(r,n){var i=t;return pH.switchMap(function(o,a){return e(i,o,a)},function(o,a){return i=a,a})(r).subscribe(n),function(){i=null}})}Sd.switchScan=mH});var NR=g(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.takeUntil=void 0;var vH=V(),bH=X(),gH=de(),_H=lt();function yH(e){return vH.operate(function(t,r){gH.innerFrom(e).subscribe(bH.createOperatorSubscriber(r,function(){return r.complete()},_H.noop)),!r.closed&&t.subscribe(r)})}Od.takeUntil=yH});var DR=g(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.takeWhile=void 0;var wH=V(),xH=X();function SH(e,t){return t===void 0&&(t=!1),wH.operate(function(r,n){var i=0;r.subscribe(xH.createOperatorSubscriber(n,function(o){var a=e(o,i++);(a||t)&&n.next(o),!a&&n.complete()}))})}Ed.takeWhile=SH});var BR=g(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.tap=void 0;var OH=Pe(),EH=V(),AH=X(),RH=ft();function TH(e,t,r){var n=OH.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?EH.operate(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var u=!0;i.subscribe(AH.createOperatorSubscriber(o,function(f){var s;(s=n.next)===null||s===void 0||s.call(n,f),o.next(f)},function(){var f;u=!1,(f=n.complete)===null||f===void 0||f.call(n),o.complete()},function(f){var s;u=!1,(s=n.error)===null||s===void 0||s.call(n,f),o.error(f)},function(){var f,s;u&&((f=n.unsubscribe)===null||f===void 0||f.call(n)),(s=n.finalize)===null||s===void 0||s.call(n)}))}):RH.identity}Ad.tap=TH});var ub=g(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.throttle=void 0;var PH=V(),zR=X(),MH=de();function CH(e,t){return PH.operate(function(r,n){var i=t??{},o=i.leading,a=o===void 0?!0:o,u=i.trailing,f=u===void 0?!1:u,s=!1,c=null,l=null,d=!1,p=function(){l?.unsubscribe(),l=null,f&&(v(),d&&n.complete())},h=function(){l=null,d&&n.complete()},m=function(_){return l=MH.innerFrom(e(_)).subscribe(zR.createOperatorSubscriber(n,p,h))},v=function(){if(s){s=!1;var _=c;c=null,n.next(_),!d&&m(_)}};r.subscribe(zR.createOperatorSubscriber(n,function(_){s=!0,c=_,!(l&&!l.closed)&&(a?v():m(_))},function(){d=!0,!(f&&s&&l&&!l.closed)&&n.complete()}))})}Rd.throttle=CH});var UR=g(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.throttleTime=void 0;var IH=Ft(),kH=ub(),qH=Nn();function jH(e,t,r){t===void 0&&(t=IH.asyncScheduler);var n=qH.timer(e,t);return kH.throttle(function(){return n},r)}Td.throttleTime=jH});var HR=g(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.TimeInterval=fa.timeInterval=void 0;var FH=Ft(),LH=V(),NH=X();function DH(e){return e===void 0&&(e=FH.asyncScheduler),LH.operate(function(t,r){var n=e.now();t.subscribe(NH.createOperatorSubscriber(r,function(i){var o=e.now(),a=o-n;n=o,r.next(new WR(i,a))}))})}fa.timeInterval=DH;var WR=(function(){function e(t,r){this.value=t,this.interval=r}return e})();fa.TimeInterval=WR});var VR=g(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.timeoutWith=void 0;var BH=Ft(),zH=Ol(),UH=El();function WH(e,t,r){var n,i,o;if(r=r??BH.async,zH.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 UH.timeout({first:n,each:i,scheduler:r,with:o})}Pd.timeoutWith=WH});var GR=g(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.timestamp=void 0;var HH=zc(),VH=qn();function GH(e){return e===void 0&&(e=HH.dateTimestampProvider),VH.map(function(t){return{value:t,timestamp:e.now()}})}Md.timestamp=GH});var KR=g(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.window=void 0;var $R=dt(),$H=V(),ZR=X(),ZH=lt(),KH=de();function YH(e){return $H.operate(function(t,r){var n=new $R.Subject;r.next(n.asObservable());var i=function(o){n.error(o),r.error(o)};return t.subscribe(ZR.createOperatorSubscriber(r,function(o){return n?.next(o)},function(){n.complete(),r.complete()},i)),KH.innerFrom(e).subscribe(ZR.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new $R.Subject)},ZH.noop,i)),function(){n?.unsubscribe(),n=null}})}Cd.window=YH});var XR=g(da=>{"use strict";var XH=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.windowCount=void 0;var YR=dt(),JH=V(),QH=X();function e7(e,t){t===void 0&&(t=0);var r=t>0?t:e;return JH.operate(function(n,i){var o=[new YR.Subject],a=[],u=0;i.next(o[0].asObservable()),n.subscribe(QH.createOperatorSubscriber(i,function(f){var s,c;try{for(var l=XH(o),d=l.next();!d.done;d=l.next()){var p=d.value;p.next(f)}}catch(v){s={error:v}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var h=u-e+1;if(h>=0&&h%r===0&&o.shift().complete(),++u%r===0){var m=new YR.Subject;o.push(m),i.next(m.asObservable())}},function(){for(;o.length>0;)o.shift().complete();i.complete()},function(f){for(;o.length>0;)o.shift().error(f);i.error(f)},function(){a=null,o=null}))})}da.windowCount=e7});var QR=g(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.windowTime=void 0;var t7=dt(),r7=Ft(),n7=Ut(),i7=V(),o7=X(),a7=Xr(),u7=Lt(),JR=Jr();function s7(e){for(var t,r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=(t=u7.popScheduler(n))!==null&&t!==void 0?t:r7.asyncScheduler,a=(r=n[0])!==null&&r!==void 0?r:null,u=n[1]||1/0;return i7.operate(function(f,s){var c=[],l=!1,d=function(v){var _=v.window,w=v.subs;_.complete(),w.unsubscribe(),a7.arrRemove(c,v),l&&p()},p=function(){if(c){var v=new n7.Subscription;s.add(v);var _=new t7.Subject,w={window:_,subs:v,seen:0};c.push(w),s.next(_.asObservable()),JR.executeSchedule(v,o,function(){return d(w)},e)}};a!==null&&a>=0?JR.executeSchedule(s,o,p,a,!0):l=!0,p();var h=function(v){return c.slice().forEach(v)},m=function(v){h(function(_){var w=_.window;return v(w)}),v(s),s.unsubscribe()};return f.subscribe(o7.createOperatorSubscriber(s,function(v){h(function(_){_.window.next(v),u<=++_.seen&&d(_)})},function(){return m(function(v){return v.complete()})},function(v){return m(function(_){return _.error(v)})})),function(){c=null}})}Id.windowTime=s7});var rT=g(pa=>{"use strict";var c7=pa&&pa.__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(pa,"__esModule",{value:!0});pa.windowToggle=void 0;var l7=dt(),f7=Ut(),d7=V(),eT=de(),sb=X(),tT=lt(),p7=Xr();function h7(e,t){return d7.operate(function(r,n){var i=[],o=function(a){for(;0<i.length;)i.shift().error(a);n.error(a)};eT.innerFrom(e).subscribe(sb.createOperatorSubscriber(n,function(a){var u=new l7.Subject;i.push(u);var f=new f7.Subscription,s=function(){p7.arrRemove(i,u),u.complete(),f.unsubscribe()},c;try{c=eT.innerFrom(t(a))}catch(l){o(l);return}n.next(u.asObservable()),f.add(c.subscribe(sb.createOperatorSubscriber(n,s,tT.noop,o)))},tT.noop)),r.subscribe(sb.createOperatorSubscriber(n,function(a){var u,f,s=i.slice();try{for(var c=c7(s),l=c.next();!l.done;l=c.next()){var d=l.value;d.next(a)}}catch(p){u={error:p}}finally{try{l&&!l.done&&(f=c.return)&&f.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()}))})}pa.windowToggle=h7});var iT=g(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.windowWhen=void 0;var m7=dt(),v7=V(),nT=X(),b7=de();function g7(e){return v7.operate(function(t,r){var n,i,o=function(u){n.error(u),r.error(u)},a=function(){i?.unsubscribe(),n?.complete(),n=new m7.Subject,r.next(n.asObservable());var u;try{u=b7.innerFrom(e())}catch(f){o(f);return}u.subscribe(i=nT.createOperatorSubscriber(r,a,a,o))};a(),t.subscribe(nT.createOperatorSubscriber(r,function(u){return n.next(u)},function(){n.complete(),r.complete()},o,function(){i?.unsubscribe(),n=null}))})}kd.windowWhen=g7});var sT=g(Kn=>{"use strict";var oT=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},aT=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.withLatestFrom=void 0;var _7=V(),uT=X(),y7=de(),w7=ft(),x7=lt(),S7=Lt();function O7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=S7.popResultSelector(e);return _7.operate(function(n,i){for(var o=e.length,a=new Array(o),u=e.map(function(){return!1}),f=!1,s=function(l){y7.innerFrom(e[l]).subscribe(uT.createOperatorSubscriber(i,function(d){a[l]=d,!f&&!u[l]&&(u[l]=!0,(f=u.every(w7.identity))&&(u=null))},x7.noop))},c=0;c<o;c++)s(c);n.subscribe(uT.createOperatorSubscriber(i,function(l){if(f){var d=aT([l],oT(a));i.next(r?r.apply(void 0,aT([],oT(d))):d)}}))})}Kn.withLatestFrom=O7});var cT=g(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.zipAll=void 0;var E7=tf(),A7=Gv();function R7(e){return A7.joinAllInternals(E7.zip,e)}qd.zipAll=R7});var lT=g(Yn=>{"use strict";var T7=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},P7=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 M7=tf(),C7=V();function I7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C7.operate(function(r,n){M7.zip.apply(void 0,P7([r],T7(e))).subscribe(n)})}Yn.zip=I7});var fT=g(Xn=>{"use strict";var k7=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},q7=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 j7=lT();function F7(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j7.zip.apply(void 0,q7([],k7(e)))}Xn.zipWith=F7});var gT=g(b=>{"use strict";var L7=b&&b.__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]})),N7=b&&b.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&L7(t,e,r)};Object.defineProperty(b,"__esModule",{value:!0});b.interval=b.iif=b.generate=b.fromEventPattern=b.fromEvent=b.from=b.forkJoin=b.empty=b.defer=b.connectable=b.concat=b.combineLatest=b.bindNodeCallback=b.bindCallback=b.UnsubscriptionError=b.TimeoutError=b.SequenceError=b.ObjectUnsubscribedError=b.NotFoundError=b.EmptyError=b.ArgumentOutOfRangeError=b.firstValueFrom=b.lastValueFrom=b.isObservable=b.identity=b.noop=b.pipe=b.NotificationKind=b.Notification=b.Subscriber=b.Subscription=b.Scheduler=b.VirtualAction=b.VirtualTimeScheduler=b.animationFrameScheduler=b.animationFrame=b.queueScheduler=b.queue=b.asyncScheduler=b.async=b.asapScheduler=b.asap=b.AsyncSubject=b.ReplaySubject=b.BehaviorSubject=b.Subject=b.animationFrames=b.observable=b.ConnectableObservable=b.Observable=void 0;b.filter=b.expand=b.exhaustMap=b.exhaustAll=b.exhaust=b.every=b.endWith=b.elementAt=b.distinctUntilKeyChanged=b.distinctUntilChanged=b.distinct=b.dematerialize=b.delayWhen=b.delay=b.defaultIfEmpty=b.debounceTime=b.debounce=b.count=b.connect=b.concatWith=b.concatMapTo=b.concatMap=b.concatAll=b.combineLatestWith=b.combineLatestAll=b.combineAll=b.catchError=b.bufferWhen=b.bufferToggle=b.bufferTime=b.bufferCount=b.buffer=b.auditTime=b.audit=b.config=b.NEVER=b.EMPTY=b.scheduled=b.zip=b.using=b.timer=b.throwError=b.range=b.race=b.partition=b.pairs=b.onErrorResumeNext=b.of=b.never=b.merge=void 0;b.switchMap=b.switchAll=b.subscribeOn=b.startWith=b.skipWhile=b.skipUntil=b.skipLast=b.skip=b.single=b.shareReplay=b.share=b.sequenceEqual=b.scan=b.sampleTime=b.sample=b.refCount=b.retryWhen=b.retry=b.repeatWhen=b.repeat=b.reduce=b.raceWith=b.publishReplay=b.publishLast=b.publishBehavior=b.publish=b.pluck=b.pairwise=b.onErrorResumeNextWith=b.observeOn=b.multicast=b.min=b.mergeWith=b.mergeScan=b.mergeMapTo=b.mergeMap=b.flatMap=b.mergeAll=b.max=b.materialize=b.mapTo=b.map=b.last=b.isEmpty=b.ignoreElements=b.groupBy=b.first=b.findIndex=b.find=b.finalize=void 0;b.zipWith=b.zipAll=b.withLatestFrom=b.windowWhen=b.windowToggle=b.windowTime=b.windowCount=b.window=b.toArray=b.timestamp=b.timeoutWith=b.timeout=b.timeInterval=b.throwIfEmpty=b.throttleTime=b.throttle=b.tap=b.takeWhile=b.takeUntil=b.takeLast=b.take=b.switchScan=b.switchMapTo=void 0;var D7=Ie();Object.defineProperty(b,"Observable",{enumerable:!0,get:function(){return D7.Observable}});var B7=Pu();Object.defineProperty(b,"ConnectableObservable",{enumerable:!0,get:function(){return B7.ConnectableObservable}});var z7=Ru();Object.defineProperty(b,"observable",{enumerable:!0,get:function(){return z7.observable}});var U7=vO();Object.defineProperty(b,"animationFrames",{enumerable:!0,get:function(){return U7.animationFrames}});var W7=dt();Object.defineProperty(b,"Subject",{enumerable:!0,get:function(){return W7.Subject}});var H7=dv();Object.defineProperty(b,"BehaviorSubject",{enumerable:!0,get:function(){return H7.BehaviorSubject}});var V7=Uc();Object.defineProperty(b,"ReplaySubject",{enumerable:!0,get:function(){return V7.ReplaySubject}});var G7=Wc();Object.defineProperty(b,"AsyncSubject",{enumerable:!0,get:function(){return G7.AsyncSubject}});var dT=kO();Object.defineProperty(b,"asap",{enumerable:!0,get:function(){return dT.asap}});Object.defineProperty(b,"asapScheduler",{enumerable:!0,get:function(){return dT.asapScheduler}});var pT=Ft();Object.defineProperty(b,"async",{enumerable:!0,get:function(){return pT.async}});Object.defineProperty(b,"asyncScheduler",{enumerable:!0,get:function(){return pT.asyncScheduler}});var hT=FO();Object.defineProperty(b,"queue",{enumerable:!0,get:function(){return hT.queue}});Object.defineProperty(b,"queueScheduler",{enumerable:!0,get:function(){return hT.queueScheduler}});var mT=BO();Object.defineProperty(b,"animationFrame",{enumerable:!0,get:function(){return mT.animationFrame}});Object.defineProperty(b,"animationFrameScheduler",{enumerable:!0,get:function(){return mT.animationFrameScheduler}});var vT=WO();Object.defineProperty(b,"VirtualTimeScheduler",{enumerable:!0,get:function(){return vT.VirtualTimeScheduler}});Object.defineProperty(b,"VirtualAction",{enumerable:!0,get:function(){return vT.VirtualAction}});var $7=hv();Object.defineProperty(b,"Scheduler",{enumerable:!0,get:function(){return $7.Scheduler}});var Z7=Ut();Object.defineProperty(b,"Subscription",{enumerable:!0,get:function(){return Z7.Subscription}});var K7=Io();Object.defineProperty(b,"Subscriber",{enumerable:!0,get:function(){return K7.Subscriber}});var bT=ml();Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return bT.Notification}});Object.defineProperty(b,"NotificationKind",{enumerable:!0,get:function(){return bT.NotificationKind}});var Y7=Tu();Object.defineProperty(b,"pipe",{enumerable:!0,get:function(){return Y7.pipe}});var X7=lt();Object.defineProperty(b,"noop",{enumerable:!0,get:function(){return X7.noop}});var J7=ft();Object.defineProperty(b,"identity",{enumerable:!0,get:function(){return J7.identity}});var Q7=aE();Object.defineProperty(b,"isObservable",{enumerable:!0,get:function(){return Q7.isObservable}});var eV=uE();Object.defineProperty(b,"lastValueFrom",{enumerable:!0,get:function(){return eV.lastValueFrom}});var tV=sE();Object.defineProperty(b,"firstValueFrom",{enumerable:!0,get:function(){return tV.firstValueFrom}});var rV=Pv();Object.defineProperty(b,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rV.ArgumentOutOfRangeError}});var nV=kn();Object.defineProperty(b,"EmptyError",{enumerable:!0,get:function(){return nV.EmptyError}});var iV=Mv();Object.defineProperty(b,"NotFoundError",{enumerable:!0,get:function(){return iV.NotFoundError}});var oV=sv();Object.defineProperty(b,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return oV.ObjectUnsubscribedError}});var aV=Cv();Object.defineProperty(b,"SequenceError",{enumerable:!0,get:function(){return aV.SequenceError}});var uV=El();Object.defineProperty(b,"TimeoutError",{enumerable:!0,get:function(){return uV.TimeoutError}});var sV=Km();Object.defineProperty(b,"UnsubscriptionError",{enumerable:!0,get:function(){return sV.UnsubscriptionError}});var cV=lE();Object.defineProperty(b,"bindCallback",{enumerable:!0,get:function(){return cV.bindCallback}});var lV=fE();Object.defineProperty(b,"bindNodeCallback",{enumerable:!0,get:function(){return lV.bindNodeCallback}});var fV=Cl();Object.defineProperty(b,"combineLatest",{enumerable:!0,get:function(){return fV.combineLatest}});var dV=Fu();Object.defineProperty(b,"concat",{enumerable:!0,get:function(){return dV.concat}});var pV=_E();Object.defineProperty(b,"connectable",{enumerable:!0,get:function(){return pV.connectable}});var hV=Lu();Object.defineProperty(b,"defer",{enumerable:!0,get:function(){return hV.defer}});var mV=hr();Object.defineProperty(b,"empty",{enumerable:!0,get:function(){return mV.empty}});var vV=yE();Object.defineProperty(b,"forkJoin",{enumerable:!0,get:function(){return vV.forkJoin}});var bV=Qr();Object.defineProperty(b,"from",{enumerable:!0,get:function(){return bV.from}});var gV=xE();Object.defineProperty(b,"fromEvent",{enumerable:!0,get:function(){return gV.fromEvent}});var _V=OE();Object.defineProperty(b,"fromEventPattern",{enumerable:!0,get:function(){return _V.fromEventPattern}});var yV=AE();Object.defineProperty(b,"generate",{enumerable:!0,get:function(){return yV.generate}});var wV=RE();Object.defineProperty(b,"iif",{enumerable:!0,get:function(){return wV.iif}});var xV=Lv();Object.defineProperty(b,"interval",{enumerable:!0,get:function(){return xV.interval}});var SV=PE();Object.defineProperty(b,"merge",{enumerable:!0,get:function(){return SV.merge}});var OV=Nv();Object.defineProperty(b,"never",{enumerable:!0,get:function(){return OV.never}});var EV=pl();Object.defineProperty(b,"of",{enumerable:!0,get:function(){return EV.of}});var AV=Dv();Object.defineProperty(b,"onErrorResumeNext",{enumerable:!0,get:function(){return AV.onErrorResumeNext}});var RV=CE();Object.defineProperty(b,"pairs",{enumerable:!0,get:function(){return RV.pairs}});var TV=jE();Object.defineProperty(b,"partition",{enumerable:!0,get:function(){return TV.partition}});var PV=Bv();Object.defineProperty(b,"race",{enumerable:!0,get:function(){return PV.race}});var MV=NE();Object.defineProperty(b,"range",{enumerable:!0,get:function(){return MV.range}});var CV=Tv();Object.defineProperty(b,"throwError",{enumerable:!0,get:function(){return CV.throwError}});var IV=Nn();Object.defineProperty(b,"timer",{enumerable:!0,get:function(){return IV.timer}});var kV=DE();Object.defineProperty(b,"using",{enumerable:!0,get:function(){return kV.using}});var qV=tf();Object.defineProperty(b,"zip",{enumerable:!0,get:function(){return qV.zip}});var jV=Rv();Object.defineProperty(b,"scheduled",{enumerable:!0,get:function(){return jV.scheduled}});var FV=hr();Object.defineProperty(b,"EMPTY",{enumerable:!0,get:function(){return FV.EMPTY}});var LV=Nv();Object.defineProperty(b,"NEVER",{enumerable:!0,get:function(){return LV.NEVER}});N7(zE(),b);var NV=Mo();Object.defineProperty(b,"config",{enumerable:!0,get:function(){return NV.config}});var DV=zv();Object.defineProperty(b,"audit",{enumerable:!0,get:function(){return DV.audit}});var BV=WE();Object.defineProperty(b,"auditTime",{enumerable:!0,get:function(){return BV.auditTime}});var zV=VE();Object.defineProperty(b,"buffer",{enumerable:!0,get:function(){return zV.buffer}});var UV=GE();Object.defineProperty(b,"bufferCount",{enumerable:!0,get:function(){return UV.bufferCount}});var WV=ZE();Object.defineProperty(b,"bufferTime",{enumerable:!0,get:function(){return WV.bufferTime}});var HV=XE();Object.defineProperty(b,"bufferToggle",{enumerable:!0,get:function(){return HV.bufferToggle}});var VV=QE();Object.defineProperty(b,"bufferWhen",{enumerable:!0,get:function(){return VV.bufferWhen}});var GV=tA();Object.defineProperty(b,"catchError",{enumerable:!0,get:function(){return GV.catchError}});var $V=rA();Object.defineProperty(b,"combineAll",{enumerable:!0,get:function(){return $V.combineAll}});var ZV=$v();Object.defineProperty(b,"combineLatestAll",{enumerable:!0,get:function(){return ZV.combineLatestAll}});var KV=uA();Object.defineProperty(b,"combineLatestWith",{enumerable:!0,get:function(){return KV.combineLatestWith}});var YV=Ll();Object.defineProperty(b,"concatAll",{enumerable:!0,get:function(){return YV.concatAll}});var XV=Zv();Object.defineProperty(b,"concatMap",{enumerable:!0,get:function(){return XV.concatMap}});var JV=lA();Object.defineProperty(b,"concatMapTo",{enumerable:!0,get:function(){return JV.concatMapTo}});var QV=dA();Object.defineProperty(b,"concatWith",{enumerable:!0,get:function(){return QV.concatWith}});var eG=gf();Object.defineProperty(b,"connect",{enumerable:!0,get:function(){return eG.connect}});var tG=hA();Object.defineProperty(b,"count",{enumerable:!0,get:function(){return tG.count}});var rG=vA();Object.defineProperty(b,"debounce",{enumerable:!0,get:function(){return rG.debounce}});var nG=bA();Object.defineProperty(b,"debounceTime",{enumerable:!0,get:function(){return nG.debounceTime}});var iG=Nu();Object.defineProperty(b,"defaultIfEmpty",{enumerable:!0,get:function(){return iG.defaultIfEmpty}});var oG=yA();Object.defineProperty(b,"delay",{enumerable:!0,get:function(){return oG.delay}});var aG=Xv();Object.defineProperty(b,"delayWhen",{enumerable:!0,get:function(){return aG.delayWhen}});var uG=wA();Object.defineProperty(b,"dematerialize",{enumerable:!0,get:function(){return uG.dematerialize}});var sG=SA();Object.defineProperty(b,"distinct",{enumerable:!0,get:function(){return sG.distinct}});var cG=Jv();Object.defineProperty(b,"distinctUntilChanged",{enumerable:!0,get:function(){return cG.distinctUntilChanged}});var lG=OA();Object.defineProperty(b,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lG.distinctUntilKeyChanged}});var fG=AA();Object.defineProperty(b,"elementAt",{enumerable:!0,get:function(){return fG.elementAt}});var dG=RA();Object.defineProperty(b,"endWith",{enumerable:!0,get:function(){return dG.endWith}});var pG=TA();Object.defineProperty(b,"every",{enumerable:!0,get:function(){return pG.every}});var hG=IA();Object.defineProperty(b,"exhaust",{enumerable:!0,get:function(){return hG.exhaust}});var mG=eb();Object.defineProperty(b,"exhaustAll",{enumerable:!0,get:function(){return mG.exhaustAll}});var vG=Qv();Object.defineProperty(b,"exhaustMap",{enumerable:!0,get:function(){return vG.exhaustMap}});var bG=kA();Object.defineProperty(b,"expand",{enumerable:!0,get:function(){return bG.expand}});var gG=Li();Object.defineProperty(b,"filter",{enumerable:!0,get:function(){return gG.filter}});var _G=qA();Object.defineProperty(b,"finalize",{enumerable:!0,get:function(){return _G.finalize}});var yG=tb();Object.defineProperty(b,"find",{enumerable:!0,get:function(){return yG.find}});var wG=FA();Object.defineProperty(b,"findIndex",{enumerable:!0,get:function(){return wG.findIndex}});var xG=LA();Object.defineProperty(b,"first",{enumerable:!0,get:function(){return xG.first}});var SG=DA();Object.defineProperty(b,"groupBy",{enumerable:!0,get:function(){return SG.groupBy}});var OG=Kv();Object.defineProperty(b,"ignoreElements",{enumerable:!0,get:function(){return OG.ignoreElements}});var EG=BA();Object.defineProperty(b,"isEmpty",{enumerable:!0,get:function(){return EG.isEmpty}});var AG=zA();Object.defineProperty(b,"last",{enumerable:!0,get:function(){return AG.last}});var RG=qn();Object.defineProperty(b,"map",{enumerable:!0,get:function(){return RG.map}});var TG=Yv();Object.defineProperty(b,"mapTo",{enumerable:!0,get:function(){return TG.mapTo}});var PG=UA();Object.defineProperty(b,"materialize",{enumerable:!0,get:function(){return PG.materialize}});var MG=WA();Object.defineProperty(b,"max",{enumerable:!0,get:function(){return MG.max}});var CG=ju();Object.defineProperty(b,"mergeAll",{enumerable:!0,get:function(){return CG.mergeAll}});var IG=HA();Object.defineProperty(b,"flatMap",{enumerable:!0,get:function(){return IG.flatMap}});var kG=tn();Object.defineProperty(b,"mergeMap",{enumerable:!0,get:function(){return kG.mergeMap}});var qG=GA();Object.defineProperty(b,"mergeMapTo",{enumerable:!0,get:function(){return qG.mergeMapTo}});var jG=$A();Object.defineProperty(b,"mergeScan",{enumerable:!0,get:function(){return jG.mergeScan}});var FG=YA();Object.defineProperty(b,"mergeWith",{enumerable:!0,get:function(){return FG.mergeWith}});var LG=XA();Object.defineProperty(b,"min",{enumerable:!0,get:function(){return LG.min}});var NG=Jf();Object.defineProperty(b,"multicast",{enumerable:!0,get:function(){return NG.multicast}});var DG=ku();Object.defineProperty(b,"observeOn",{enumerable:!0,get:function(){return DG.observeOn}});var BG=eR();Object.defineProperty(b,"onErrorResumeNextWith",{enumerable:!0,get:function(){return BG.onErrorResumeNextWith}});var zG=tR();Object.defineProperty(b,"pairwise",{enumerable:!0,get:function(){return zG.pairwise}});var UG=rR();Object.defineProperty(b,"pluck",{enumerable:!0,get:function(){return UG.pluck}});var WG=nR();Object.defineProperty(b,"publish",{enumerable:!0,get:function(){return WG.publish}});var HG=iR();Object.defineProperty(b,"publishBehavior",{enumerable:!0,get:function(){return HG.publishBehavior}});var VG=oR();Object.defineProperty(b,"publishLast",{enumerable:!0,get:function(){return VG.publishLast}});var GG=uR();Object.defineProperty(b,"publishReplay",{enumerable:!0,get:function(){return GG.publishReplay}});var $G=sR();Object.defineProperty(b,"raceWith",{enumerable:!0,get:function(){return $G.raceWith}});var ZG=sa();Object.defineProperty(b,"reduce",{enumerable:!0,get:function(){return ZG.reduce}});var KG=lR();Object.defineProperty(b,"repeat",{enumerable:!0,get:function(){return KG.repeat}});var YG=dR();Object.defineProperty(b,"repeatWhen",{enumerable:!0,get:function(){return YG.repeatWhen}});var XG=hR();Object.defineProperty(b,"retry",{enumerable:!0,get:function(){return XG.retry}});var JG=vR();Object.defineProperty(b,"retryWhen",{enumerable:!0,get:function(){return JG.retryWhen}});var QG=av();Object.defineProperty(b,"refCount",{enumerable:!0,get:function(){return QG.refCount}});var e$=ib();Object.defineProperty(b,"sample",{enumerable:!0,get:function(){return e$.sample}});var t$=gR();Object.defineProperty(b,"sampleTime",{enumerable:!0,get:function(){return t$.sampleTime}});var r$=_R();Object.defineProperty(b,"scan",{enumerable:!0,get:function(){return r$.scan}});var n$=wR();Object.defineProperty(b,"sequenceEqual",{enumerable:!0,get:function(){return n$.sequenceEqual}});var i$=ab();Object.defineProperty(b,"share",{enumerable:!0,get:function(){return i$.share}});var o$=OR();Object.defineProperty(b,"shareReplay",{enumerable:!0,get:function(){return o$.shareReplay}});var a$=ER();Object.defineProperty(b,"single",{enumerable:!0,get:function(){return a$.single}});var u$=AR();Object.defineProperty(b,"skip",{enumerable:!0,get:function(){return u$.skip}});var s$=RR();Object.defineProperty(b,"skipLast",{enumerable:!0,get:function(){return s$.skipLast}});var c$=PR();Object.defineProperty(b,"skipUntil",{enumerable:!0,get:function(){return c$.skipUntil}});var l$=MR();Object.defineProperty(b,"skipWhile",{enumerable:!0,get:function(){return l$.skipWhile}});var f$=IR();Object.defineProperty(b,"startWith",{enumerable:!0,get:function(){return f$.startWith}});var d$=qu();Object.defineProperty(b,"subscribeOn",{enumerable:!0,get:function(){return d$.subscribeOn}});var p$=qR();Object.defineProperty(b,"switchAll",{enumerable:!0,get:function(){return p$.switchAll}});var h$=zu();Object.defineProperty(b,"switchMap",{enumerable:!0,get:function(){return h$.switchMap}});var m$=FR();Object.defineProperty(b,"switchMapTo",{enumerable:!0,get:function(){return m$.switchMapTo}});var v$=LR();Object.defineProperty(b,"switchScan",{enumerable:!0,get:function(){return v$.switchScan}});var b$=Du();Object.defineProperty(b,"take",{enumerable:!0,get:function(){return b$.take}});var g$=rb();Object.defineProperty(b,"takeLast",{enumerable:!0,get:function(){return g$.takeLast}});var _$=NR();Object.defineProperty(b,"takeUntil",{enumerable:!0,get:function(){return _$.takeUntil}});var y$=DR();Object.defineProperty(b,"takeWhile",{enumerable:!0,get:function(){return y$.takeWhile}});var w$=BR();Object.defineProperty(b,"tap",{enumerable:!0,get:function(){return w$.tap}});var x$=ub();Object.defineProperty(b,"throttle",{enumerable:!0,get:function(){return x$.throttle}});var S$=UR();Object.defineProperty(b,"throttleTime",{enumerable:!0,get:function(){return S$.throttleTime}});var O$=Bu();Object.defineProperty(b,"throwIfEmpty",{enumerable:!0,get:function(){return O$.throwIfEmpty}});var E$=HR();Object.defineProperty(b,"timeInterval",{enumerable:!0,get:function(){return E$.timeInterval}});var A$=El();Object.defineProperty(b,"timeout",{enumerable:!0,get:function(){return A$.timeout}});var R$=VR();Object.defineProperty(b,"timeoutWith",{enumerable:!0,get:function(){return R$.timeoutWith}});var T$=GR();Object.defineProperty(b,"timestamp",{enumerable:!0,get:function(){return T$.timestamp}});var P$=Vv();Object.defineProperty(b,"toArray",{enumerable:!0,get:function(){return P$.toArray}});var M$=KR();Object.defineProperty(b,"window",{enumerable:!0,get:function(){return M$.window}});var C$=XR();Object.defineProperty(b,"windowCount",{enumerable:!0,get:function(){return C$.windowCount}});var I$=QR();Object.defineProperty(b,"windowTime",{enumerable:!0,get:function(){return I$.windowTime}});var k$=rT();Object.defineProperty(b,"windowToggle",{enumerable:!0,get:function(){return k$.windowToggle}});var q$=iT();Object.defineProperty(b,"windowWhen",{enumerable:!0,get:function(){return q$.windowWhen}});var j$=sT();Object.defineProperty(b,"withLatestFrom",{enumerable:!0,get:function(){return j$.withLatestFrom}});var F$=cT();Object.defineProperty(b,"zipAll",{enumerable:!0,get:function(){return F$.zipAll}});var L$=fT();Object.defineProperty(b,"zipWith",{enumerable:!0,get:function(){return L$.zipWith}})});var lb=g(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.checkAbortSignal=yT;Ni.abortBreakPoint=D$;Ni.makeAbortError=wT;Ni.observeAbortSignal=B$;Ni.isAbortException=z$;var _T=gT(),cb=class extends Error{};function yT(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw wT()}}function N$(e){return new Promise(t=>setTimeout(t,e))}async function D$(e){await N$(1),yT(e)}function wT(){if(typeof DOMException<"u")return new DOMException("aborted","AbortError");let e=new cb("aborted");return e.code="ERR_ABORTED",e}function B$(e){return e?(0,_T.fromEvent)(e,"abort"):new _T.Observable}function z$(e){return e instanceof Error&&(e.name==="AbortError"||e.code==="ERR_ABORTED"||/\b(aborted|aborterror)\b/i.test(e.message))}});var xT=g(db=>{"use strict";Object.defineProperty(db,"__esModule",{value:!0});db.makeAbortableReaction=H$;var U$=Na(),Uu=mt(),W$=lb(),fb=mm();function H$(e,t,r,n,i,o,a){let u;function f(s){(0,W$.isAbortException)(s)||(console.error(s),(0,Uu.isAlive)(e)&&a(s))}(0,Uu.addDisposer)(e,(0,U$.reaction)(()=>{try{return t(e)}catch(s){f(s);return}},async(s,c)=>{if(u&&(0,fb.stopStopToken)(u),!!(0,Uu.isAlive)(e)){u=(0,fb.createStopToken)(),i(u);try{let l=await r(s,u,e,c);(0,Uu.isAlive)(e)&&o(l)}catch(l){f(l)}}},n)),(0,Uu.addDisposer)(e,()=>{u&&(0,fb.stopStopToken)(u)})}});var wu=g(I=>{"use strict";var V$=I&&I.__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]})),Bi=I&&I.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&V$(t,e,r)},ST=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.makeAbortableReaction=I.blobToDataURL=I.isFeature=I.SimpleFeature=I.defaultCodonTable=I.defaultStops=I.defaultStarts=I.rIC=I.complementTable=I.isElectron=void 0;I.useDebounce=Y$;I.useWidthSetter=X$;I.useDebouncedCallback=J$;I.findParentThat=ET;I.springAnimate=Q$;I.findParentThatIs=Hu;I.getSession=e9;I.getContainingView=AT;I.getContainingTrack=t9;I.getContainingDisplay=r9;I.assembleLocString=n9;I.assembleLocStringFast=RT;I.parseLocStringOneBased=TT;I.parseLocString=pb;I.compareLocs=PT;I.compareLocStrings=i9;I.clamp=o9;I.bpToPx=hb;I.radToDeg=c9;I.degToRad=l9;I.polarToCartesian=f9;I.cartesianToPolar=d9;I.featureSpanPx=p9;I.bpSpanPx=MT;I.iterMap=h9;I.findLastIndex=m9;I.findLast=v9;I.renameRegionIfNeeded=CT;I.renameRegionsIfNeeded=b9;I.minmax=g9;I.shorten=IT;I.shorten2=_9;I.stringify=y9;I.revcom=w9;I.reverse=x9;I.complement=S9;I.measureText=kT;I.getFrame=E9;I.generateCodonTable=A9;I.updateStatus=mb;I.updateStatus2=R9;I.hashCode=qT;I.objectHash=T9;I.bytesForRegions=P9;I.isSupportedIndexingAdapter=M9;I.getBpDisplayStr=C9;I.getProgressDisplayStr=I9;I.toLocale=ha;I.getTickDisplayStr=k9;I.getViewParams=q9;I.getLayoutId=j9;I.useLocalStorage=F9;I.getUriLink=jT;I.getStr=FT;I.coarseStripHTML=LT;I.linkify=L9;I.measureGridWidth=N9;I.getEnv=D9;I.localStorageGetItem=bb;I.localStorageSetItem=NT;I.max=DT;I.min=B9;I.sum=BT;I.avg=z9;I.groupBy=U9;I.notEmpty=W9;I.mergeIntervals=zT;I.gatherOverlaps=H9;I.stripAlpha=V9;I.getStrokeProps=G9;I.getFillProps=$9;I.renderToStaticMarkup=Z9;I.isGzip=UT;I.fetchAndMaybeUnzip=WT;I.fetchAndMaybeUnzipText=K9;I.isObject=HT;I.localStorageGetNumber=Y9;I.localStorageGetBoolean=X9;I.localStorageSetBoolean=J9;I.forEachWithStopTokenCheck=Q9;I.testAdapter=eZ;var Di=Fe(),G$=e1(),$$=ST(t1()),mr=mt(),Z$=Ts(),K$=n1(),vb=x1(),OT=mm(),Wu=bc();Bi(bc(),I);Bi(PS(),I);Bi(MS(),I);Bi(CS(),I);Bi(Hm(),I);Bi(WS(),I);function Y$(e,t){let[r,n]=(0,Di.useState)(e);return(0,Di.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,Di.useEffect)(()=>{let i;return n&&(0,mr.isAlive)(e)&&(i=requestAnimationFrame(()=>{e.setWidth(n)})),()=>{i&&cancelAnimationFrame(i)}},[t,e,n]),r}function J$(e,t=400){let r=(0,Di.useRef)(null),n=(0,Di.useRef)(null);return(0,Di.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 ET(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 Q$(e,t,r,n=()=>{},i=0,o=400,a=20,u=!0){i||(i=Math.abs(t-e)/1e3);let s;function c(l){let d=Date.now(),p=l.lastPosition,h=l.lastTime||d,m=l.lastVelocity||0;d>h+64&&(h=d);let v=Math.floor(d-h);for(let O=0;O<v;++O){let M=-o*(p-t),E=-a*m,P=(M+E)/1;m+=P*1/1e3,p+=m*1/1e3}let _=Math.abs(m)<=i,w=o!==0?Math.abs(t-p)<=i:!0;(u&&o!==0?e<t?p>t:p<t:!1)||_&&w?(r(t),n()):(r(p),s=requestAnimationFrame(()=>{c({lastPosition:p,lastTime:d,lastVelocity:m})}))}return[()=>{c({lastPosition:e})},()=>{cancelAnimationFrame(s)}]}function Hu(e,t){return ET(e,t)}function e9(e){try{return Hu(e,Wu.isSessionModel)}catch{throw new Error("no session model found!")}}function AT(e){try{return Hu(e,Wu.isViewModel)}catch{throw new Error("no containing view found")}}function t9(e){try{return Hu(e,Wu.isTrackModel)}catch{throw new Error("no containing track found")}}function r9(e){try{return Hu(e,Wu.isDisplayModel)}catch{throw new Error("no containing display found")}}function n9(e){return RT(e,ha)}function RT(e,t=r=>r){let{assemblyName:r,refName:n,start:i,end:o,reversed:a}=e,u=r?`{${r}}`:"",f;i!==void 0?f=`:${t(i+1)}`:o!==void 0?f=":1":f="";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}${f}${s}${c}`}function TT(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 f=u.lastIndexOf(":");if(f===-1){if(t(u,a))return{assemblyName:a,refName:u,reversed:r};throw new Error(`Unknown reference sequence "${u}"`)}let s=u.slice(0,f),c=u.slice(f+1);if(t(s,a)&&t(u,a))throw new Error(`ambiguous location string: "${e}"`);if(t(s,a))if(c){let l=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/.exec(c),d=/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/.exec(c);if(l){let[,p,,,,h]=l;if(p!==void 0&&h!==void 0)return{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+h.replaceAll(",",""),reversed:r}}else if(d){let[,p,,,h]=d;if(p!==void 0)return h?{assemblyName:a,refName:s,start:+p.replaceAll(",",""),reversed:r}:{assemblyName:a,refName:s,start:+p.replaceAll(",",""),end:+p.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 pb(e,t){let r=TT(e,t);return typeof r.start=="number"&&(r.start-=1),r}function PT(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 i9(e,t,r){let n=pb(e,r),i=pb(t,r);return PT(n,i)}function o9(e,t,r){return e<t?t:e>r?r:e}function a9(e){return Math.round(e*10)/10}function hb(e,{reversed:t,end:r=0,start:n=0},i){return a9((t?r-e:e-n)/i)}var u9=180/Math.PI,s9=Math.PI/180;function c9(e){return e*u9%360}function l9(e){return e*s9%(2*Math.PI)}function f9(e,t){return[e*Math.cos(t),e*Math.sin(t)]}function d9(e,t){let r=Math.sqrt(e*e+t*t),n=Math.atan(t/e);return[r,n]}function p9(e,t,r){return MT(e.get("start"),e.get("end"),t,r)}function MT(e,t,r,n){let i=hb(e,r,n),o=hb(t,r,n);return r.reversed?[o,i]:[i,o]}function h9(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 m9(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return r;return-1}function v9(e,t){let r=e.length;for(;r--;)if(t(e[r],r,e))return e[r]}function CT(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 b9(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)=>CT(o[i[u]],a))}}function g9(e,t){return[Math.min(e,t),Math.max(e,t)]}function IT(e,t=70,r=30){return e.length>t?`${e.slice(0,r)}...${e.slice(-r)}`:e}function _9(e,t=70){return e.length>t?`${e.slice(0,t)}...`:e}function y9({refName:e,coord:t,assemblyName:r,oob:n},i){return[r&&i?`{${r}}`:"",e?`${IT(e)}:${ha(t)}${n?" (out of bounds)":""}`:""].join("")}I.isElectron=/electron/i.test(typeof navigator<"u"?navigator.userAgent:"");I.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 w9(e){var t;let r=[];for(let n=e.length-1;n>=0;n--)r.push((t=I.complementTable[e[n]])!==null&&t!==void 0?t:e[n]);return r.join("")}function x9(e){let t=[];for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t.join("")}function S9(e){var t;let r=[];for(let n=0,i=e.length;n<i;n++)r.push((t=I.complementTable[e[n]])!==null&&t!==void 0?t:e[n]);return r.join("")}I.rIC=typeof jest>"u"?typeof window<"u"&&window.requestIdleCallback?window.requestIdleCallback:e=>setTimeout(()=>{e()},1):e=>{e()};var O9=[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 kT(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=O9[u])!==null&&r!==void 0?r:n}return o*t}function E9(e,t,r,n){return r===1?(e+n)%3+1:-1*((t-n)%3)-1}I.defaultStarts=["ATG"];I.defaultStops=["TAA","TAG","TGA"];I.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 A9(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 f=i[1][u];for(let s=0;s<2;s++){let c=i[2][s],l=a+f+c;t[l]=n}}}}return t}async function mb(e,t,r){t(e);let n=await r();return t(""),n}async function R9(e,t,r,n){t(e);let i=await n();return(0,OT.checkStopToken)(r),t(""),i}function qT(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 T9(e){return`${qT(JSON.stringify(e))}`}async function P9(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 M9(e=""){return["Gff3TabixAdapter","VcfTabixAdapter","Gff3Adapter","VcfAdapter"].includes(e)}function C9(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 ha(Number.parseFloat(e.toPrecision(3)))}function I9(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 ha(e){return e.toLocaleString("en-US")}function k9(e,t){return Math.floor(t/1e3)>0?`${ha(Number.parseFloat((e/1e6).toFixed(2)))}M`:ha(Math.floor(e))}function q9(e,t){let{dynamicBlocks:r,staticBlocks:n,offsetPx:i}=AT(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 j9({sessionId:e,layoutId:t}){return`${e}-${t}`}function F9(e,t){let[r,n]=(0,Di.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 jT(e){let{uri:t,baseUri:r=""}=e,n;try{n=new URL(t,r).href}catch{n=t}return n}function FT(e){return HT(e)?(0,Wu.isUriLocation)(e)?jT(e):JSON.stringify(e):String(e)}function LT(e){return e.replaceAll(/(<([^>]+)>)/gi,"")}function L9(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 N9(e,t){let{padding:r=30,minWidth:n=80,fontSize:i=12,maxWidth:o=1e3,stripHTML:a=!1}=t||{};return DT(e.map(u=>FT(u)).map(u=>a?LT(u):u).map(u=>kT(u,i)).map(u=>Math.min(Math.max(u+r,n),o)))}function D9(e){return(0,mr.getEnv)(e)}function bb(e){return typeof localStorage<"u"?localStorage.getItem(e):void 0}function NT(e,t){typeof localStorage<"u"&&localStorage.setItem(e,t)}function DT(e,t=Number.NEGATIVE_INFINITY){let r=t;for(let n of e)r=Math.max(n,r);return r}function B9(e,t=Number.POSITIVE_INFINITY){let r=t;for(let n of e)r=Math.min(n,r);return r}function BT(e){let t=0;for(let r of e)t+=r;return t}function z9(e){return BT(e)/e.length}function U9(e,t){let r={};for(let n of e){let i=t(n);r[i]||(r[i]=[]),r[i].push(n)}return r}function W9(e){return e!=null}function zT(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 H9(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=>zT(n.sort((i,o)=>i.start-o.start),t))}function V9(e){return(0,vb.colord)(e).alpha(1).toHex()}function G9(e){if(e){let t=(0,vb.colord)(e);return{strokeOpacity:t.alpha(),stroke:t.alpha(1).toHex()}}else return{}}function $9(e){if(e){let t=(0,vb.colord)(e);return{fillOpacity:t.alpha(),fill:t.alpha(1).toHex()}}else return{}}function Z9(e){let t=document.createElement("div");return(0,Z$.flushSync)(()=>{(0,K$.createRoot)(t).render(e)}),t.innerHTML.replaceAll(/\brgba\((.+?),[^,]+?\)/g,"rgb($1)")}function UT(e){return e[0]===31&&e[1]===139&&e[2]===8}async function WT(e,t={}){let{statusCallback:r=()=>{}}=t,n=await mb("Downloading file",r,()=>e.readFile(t));return UT(n)?await mb("Unzipping",r,()=>(0,G$.unzip)(n)):n}async function K9(e,t){let r=await WT(e,t);if(r.length>536870888)throw new Error("Data exceeds maximum string length (512MB)");return new TextDecoder("utf8",{fatal:!0}).decode(r)}function HT(e){return typeof e=="object"&&e!==null}function Y9(e,t){var r;return+((r=bb(e))!==null&&r!==void 0?r:t)}function X9(e,t){return!!JSON.parse(bb(e)||JSON.stringify(t))}function J9(e,t){NT(e,JSON.stringify(t))}function Q9(e,t,r,n=400){let i=performance.now(),o=0;for(let a of e)performance.now()-i>n&&((0,OT.checkStopToken)(t),i=performance.now()),r(a,o++)}function eZ(e,t,r,n){return t.test(e)&&!r||r===n}var VT=VS();Object.defineProperty(I,"SimpleFeature",{enumerable:!0,get:function(){return ST(VT).default}});Object.defineProperty(I,"isFeature",{enumerable:!0,get:function(){return VT.isFeature}});var tZ=Gm();Object.defineProperty(I,"blobToDataURL",{enumerable:!0,get:function(){return tZ.blobToDataURL}});var rZ=xT();Object.defineProperty(I,"makeAbortableReaction",{enumerable:!0,get:function(){return rZ.makeAbortableReaction}});Bi(lb(),I)});var $T=g(gb=>{"use strict";Object.defineProperty(gb,"__esModule",{value:!0});gb.default=nZ;var GT=wu();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,GT.hashCode)(t);typeof a=="object"&&a!==null?n.push(a):t+=`${o}-${a}`}}return`adp-${(0,GT.hashCode)(t)}`}});var ZT=g(Vu=>{"use strict";var iZ=Vu&&Vu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.adapterConfigCacheKey=aZ;var oZ=iZ($T());function aZ(e={}){return`${(0,oZ.default)(e)}`}});var _b=g(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.getAdapter=KT;Gu.freeAdapterResources=cZ;Gu.clearAdapterCache=lZ;var uZ=ZT(),zi={};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=KT.bind(null,e,t),u=await i.getAdapterClass();return{dataAdapter:new u(o,a,e),sessionIds:new Set([t])}}async function KT(e,t,r){var n;let i=(0,uZ.adapterConfigCacheKey)(r);(n=zi[i])!==null&&n!==void 0||(zi[i]=sZ(e,t,r));let o=await zi[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(zi)){let o=await i;o.sessionIds.delete(r),o.sessionIds.size===0&&delete zi[n]}}else for(let r of Object.values(zi)){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(){zi={}}});var YT=g(wb=>{"use strict";Object.defineProperty(wb,"__esModule",{value:!0});var yb=class{constructor(t){this.name=t?.name||"UNKNOWN",this.maybeDisplayName=t?.displayName}get displayName(){return this.maybeDisplayName||this.name}};wb.default=yb});var JT=g(Sb=>{"use strict";Object.defineProperty(Sb,"__esModule",{value:!0});Sb.default=xb;var XT=e=>typeof e=="object"&&e!==null,fZ=e=>XT(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob);function xb(e,t,r=new WeakSet){if(r.has(e))return;r.add(e);let n=i=>{for(let o of i)t(o),XT(o)&&xb(o,t,r)};Array.isArray(e)&&n(e);for(let i of Object.values(e))t(i),fZ(i)&&(Array.isArray(i)?n(i):xb(i,t,r))}});var eP=g(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.UNSUPPORTED=He.UNKNOWN=void 0;He.getTrackAssemblyNames=dZ;He.getConfAssemblyNames=QT;He.getRpcSessionId=pZ;He.getParentRenderProps=hZ;He.getBlob=mZ;He.getBlobMap=vZ;He.setBlobMap=bZ;He.storeBlobLocation=_Z;He.makeIndex=yZ;He.makeIndexType=wZ;He.getFileName=xZ;He.guessAdapter=SZ;He.guessTrackType=OZ;He.generateUnsupportedTrackConf=EZ;He.generateUnknownTrackConf=AZ;He.getTrackName=RZ;var va=mt(),$u=wu(),ma=Im();function dZ(e){return QT(e.configuration)}function QT(e){let t=(0,ma.readConfObject)(e,"assemblyNames");if(!t){let r=(0,va.getParent)(e);if("sequence"in r)return[(0,ma.readConfObject)(r,"name")];throw new Error("unknown assembly names")}return t}function pZ(e){let t;for(let r=e;!(0,va.isRoot)(r);r=(0,va.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t}function hZ(e){for(let t=(0,va.getParent)(e);!(0,va.isRoot)(t);t=(0,va.getParent)(t))if("renderProps"in t)return t.renderProps();return{}}He.UNKNOWN="UNKNOWN";He.UNSUPPORTED="UNSUPPORTED";var jd={};function mZ(e){return jd[e]}function vZ(){return jd}function bZ(e){jd=e}var gZ=0;function _Z(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 yZ(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,$u.getEnv)(n),a=i.evaluateExtensionPoint("Core-guessAdapterForLocation",(u,f,s)=>{})(e,t,r);if(a)return a}return{type:He.UNKNOWN}}function OZ(e,t){if(t){let r=(0,$u.getSession)(t),i=(0,$u.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,$u.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,$u.objectHash)(n),n}function RZ(e,t){let r=(0,ma.readConfObject)(e,"name");if(!r&&(0,ma.readConfObject)(e,"type")==="ReferenceSequenceTrack"){let n=t.assemblies.find(i=>i.sequence===e);return n?`Reference sequence (${(0,ma.readConfObject)(n,"displayName")||(0,ma.readConfObject)(n,"name")})`:"Reference sequence"}return r}});var nP=g(Zu=>{"use strict";var rP=Zu&&Zu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zu,"__esModule",{value:!0});var TZ=rP(YT()),PZ=rP(JT()),tP=eP(),Fd=bc(),Ob=class extends TZ.default{constructor(t){super(),this.pluginManager=t}async serializeArguments(t,r){let n=(0,tP.getBlobMap)();return await this.augmentLocationObjects(t,r),{...t,blobMap:n}}async serializeNewAuthArguments(t,r){let n=this.pluginManager.rootModel;if(!(0,Fd.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,tP.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,Fd.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 Fd.RetryError("Retrying with created internet account",u.internetAccountId)}throw a}return o}async augmentLocationObjects(t,r){let n=[];(0,PZ.default)(t,i=>{(0,Fd.isUriLocation)(i)&&n.push(i)});for(let i of n)await this.serializeNewAuthArguments(i,r);return t}};Zu.default=Ob});var iP=g(Ab=>{"use strict";Object.defineProperty(Ab,"__esModule",{value:!0});var MZ=Am(),Eb=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)}};Ab.default=Eb});var Tb=g(Ku=>{"use strict";var oP=Ku&&Ku.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ku,"__esModule",{value:!0});var CZ=oP(nP()),IZ=wu(),kZ=oP(iP()),Rb=class extends CZ.default{async deserializeArguments(t,r){return{...await super.deserializeArguments(t,r),filters:t.filters?new kZ.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 f=await(0,IZ.renameRegionsIfNeeded)(u,{...t,filters:(o=t.filters)===null||o===void 0?void 0:o.toJSON().filters});return super.serializeArguments(f,r)}};Ku.default=Rb});var jZ={};wa(jZ,{default:()=>Nd});var _P=j(Bb());var zb="1.4.4";var dg=j(rn());var og=j(Bd()),Oa=j(ht()),ag=j(zd()),ug=j(Ud()),sg=j(mt());var Wd=function(e,t){return Wd=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])},Wd(e,t)};function xa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wd(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Hd(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 Vi(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Gi(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 br(e){return typeof e=="function"}function ts(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 rs=ts(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
5
5
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
6
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function
|
|
7
|
-
${
|
|
8
|
-
`);i(S)}catch(s){console.error(s),l(s)}finally{a(!1)}})()},[e,t,r]),{sequence:n,loading:o,error:u}}var CP=(0,dg.makeStyles)()({dialogContent:{width:"80em"},textAreaInput:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto"},ml:{marginLeft:10}}),kP=(0,fg.observer)(function({onClose:e,model:t,selectionCoords:r}){let[n,i]=(0,$e.useState)(!0),{classes:o}=CP(),{sequence:a,loading:u,error:l}=lg({model:t,selectionCoords:r,showAllLetters:n}),s=a?a.length>1e6:!1;return $e.default.createElement(Vi.Dialog,{open:!0,onClose:e,title:"Subsequence Data",maxWidth:"xl"},$e.default.createElement(mt.DialogContent,null,$e.default.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"}},$e.default.createElement(mt.ToggleButtonGroup,{value:n,exclusive:!0,size:"small",onChange:(c,f)=>{f!==null&&i(f)}},$e.default.createElement(mt.ToggleButton,{value:!0},"Show All Letters"),$e.default.createElement(mt.ToggleButton,{value:!1},"Show Only Differences")),$e.default.createElement("div",{style:{flexGrow:1}}),$e.default.createElement(mt.Button,{variant:"contained",color:"primary",disabled:u||!a,onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(a),(0,_a.getSession)(t).notify("Sequence copied to clipboard","info")}catch(c){console.error(c),(0,_a.getSession)(t).notifyError(`${c}`,c)}})()}},"Copy to Clipboard"),$e.default.createElement(mt.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,_a.getSession)(t).notify("Sequence downloaded","info")}catch(c){console.error(c),(0,_a.getSession)(t).notifyError(`${c}`,c)}}},"Download")),l?$e.default.createElement(Vi.ErrorMessage,{error:l}):$e.default.createElement($e.default.Fragment,null,u?$e.default.createElement(Vi.LoadingEllipses,null):null,$e.default.createElement(mt.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}}}}))),$e.default.createElement(mt.DialogActions,null,$e.default.createElement(mt.Button,{color:"primary",variant:"outlined",onClick:e},"Close")))}),pg=kP;var zp=L(qe()),P_=L(Kr()),M_=L(T_()),C_=L(ct()),k_=L(cr());var oo=L(ct());function Fs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ls(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 R_(e,t,r){let n=[];if(t)n.push(`Start: ${t.refName}:${(0,oo.toLocale)(t.coord)}`,`End: ${r.refName}:${(0,oo.toLocale)(r.coord)}`,`Length: ${(0,oo.getBpDisplayStr)(Math.abs(t.coord-r.coord))}`);else if(n.push(`Ref: ${r.refName}:${(0,oo.toLocale)(r.coord)}`),e){let{base:i,sampleId:o,pos:a,chr:u}=e,l=20,s=i.length,c=s>1?` ${s}bp`:"",f=i.length>l?i.slice(0,l)+"...":i;n.push(`Alt ${o}: ${u}:${a.toLocaleString("en-US")} (${f}${c})`)}return n.filter(i=>!!i).join("<br/>")}function Dp(e){return(e.data.length||0)+(e.children&&Ls(e.children,Dp)||0)}function Bp(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{Bp(n,t,r)})}var NC=(0,k_.observer)(function({model:e,mouseX:t,origMouseX:r}){let{hoveredInfo:n}=e,i=(0,C_.getContainingView)(e),o=r?i.pxToBp(r):void 0,a=i.pxToBp(t);return n?zp.default.createElement(M_.default,null,zp.default.createElement(P_.SanitizedHTML,{html:R_(n,o,a)})):null}),q_=NC;Hp();var HC=(0,Y_.observer)(function(e){let{model:t}=e,{pluginManager:r}=(0,Bs.getEnv)(t),{rowHeight:n,height:i,scrollTop:o,samples:a}=t,u=(0,je.useRef)(null),l=(0,K_.useTheme)(),s=r.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[f,d]=(0,je.useState)(),[p,m]=(0,je.useState)(),[h,v]=(0,je.useState)(!1),[y,w]=(0,je.useState)(),[_,x]=(0,je.useState)(),[S,E]=(0,je.useState)(!1),[R,T]=(0,je.useState)(),[C,M]=(0,je.useState)(!1),[q,z]=(0,je.useState)(),{width:D}=(0,Bs.getContainingView)(t),A=P=>{let U=u.current?.getBoundingClientRect()?.left||0,ye=P.clientX-U;E(!1),v(!0),w(ye),x(ye),P.stopPropagation()},I=P=>{let F=u.current?.getBoundingClientRect(),U=F?.top||0,ye=F?.left||0,J=P.clientX-ye,G=P.clientY-U;d(G),m(J),h&&x(J)},W=P=>{h&&y!==void 0&&_!==void 0&&(Math.abs(_-y)>=2?(T({coord:[P.clientX,P.clientY],dragEndX:P.clientX,dragStartX:y}),E(!0)):j()),v(!1)},j=()=>{E(!1),w(void 0),x(void 0)};return(0,je.useEffect)(()=>{let P=U=>{U.key==="Escape"&&S&&j()},F=U=>{u.current&&!u.current.contains(U.target)&&S&&j()};return document.addEventListener("keydown",P),document.addEventListener("click",F),()=>{document.removeEventListener("keydown",P),document.removeEventListener("click",F)}},[S,j]),je.default.createElement("div",{ref:u,onMouseDown:A,onMouseMove:I,onMouseUp:W,onDoubleClick:()=>{S&&j()},onMouseLeave:()=>{d(void 0),m(void 0),v(!1)}},je.default.createElement(c,{...e}),je.default.createElement(Ds,{model:t}),f&&p&&a&&!R&&!C?je.default.createElement("div",{style:{position:"relative"}},je.default.createElement(ug,{width:D,height:i,scrollTop:o,mouseX:p,mouseY:f}),je.default.createElement(q_,{model:t,mouseX:p,mouseY:f,origMouseX:y,rowHeight:n,sources:a})):null,(h||S)&&y!==void 0&&_!==void 0?je.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,je.default.createElement($_.Menu,{open:!!R,onMenuItemClick:(P,F)=>{F(),T(void 0)},onClose:()=>{T(void 0)},slotProps:{transition:{onExit:()=>{T(void 0)}}},anchorReference:"anchorPosition",anchorPosition:R?{top:R.coord[1],left:R.coord[0]}:void 0,style:{zIndex:l.zIndex.tooltip},menuItems:[{label:"View subsequence",onClick:()=>{R&&(z({dragStartX:R.dragStartX,dragEndX:R.dragEndX}),M(!0),T(void 0))}}]}),C?je.default.createElement(pg,{model:t,selectionCoords:q,onClose:()=>{M(!1),z(void 0)}}):null)}),X_=HC;var Z_=L(Kn());function Vp(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,Z_.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var x0=L(qe()),Ws=L(Kn()),dr=L(ct()),S0=L(Jd());function VC(e,t){return e.parent===t.parent?1:2}function GC(e){return e.reduce($C,0)/e.length}function $C(e,t){return e+t.x}function KC(e){return 1+e.reduce(YC,0)}function YC(e,t){return Math.max(e,t.y)}function XC(e){for(var t;t=e.children;)e=t[0];return e}function ZC(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Gp(){var e=VC,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(d){var p=d.children;p?(d.x=GC(p),d.y=KC(p)):(d.x=a?u+=e(d,a):0,d.y=0,a=d)});var l=XC(o),s=ZC(o),c=l.x-e(l,s)/2,f=s.x+e(s,l)/2;return o.eachAfter(n?function(d){d.x=(d.x-o.x)*t,d.y=(o.y-d.y)*r}:function(d){d.x=(d.x-c)/(f-c)*t,d.y=(1-(o.y?d.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 JC(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 J_(){return this.eachAfter(JC)}function Q_(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function e0(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 t0(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 r0(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function n0(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 i0(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function o0(e){for(var t=this,r=QC(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 QC(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 a0(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function u0(){return Array.from(this)}function s0(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function c0(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*l0(){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 ao(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=rk)):t===void 0&&(t=tk);for(var r=new Ca(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 Ca(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(ik)}function ek(){return ao(this).eachBefore(nk)}function tk(e){return e.children}function rk(e){return Array.isArray(e)?e[1]:null}function nk(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function ik(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ca(e){this.data=e,this.depth=this.height=0,this.parent=null}Ca.prototype=ao.prototype={constructor:Ca,count:J_,each:Q_,eachAfter:t0,eachBefore:e0,find:r0,sum:n0,sort:i0,path:o0,ancestors:a0,descendants:u0,leaves:s0,links:c0,copy:ek,[Symbol.iterator]:l0};var $p=L(d0()),O0=L(zs()),on=L(ht());var ck=(0,x0.lazy)(()=>Promise.resolve().then(()=>(g0(),b0)));function Kp(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return on.types.compose("LinearMafDisplay",n,on.types.model({type:on.types.literal("LinearMafDisplay"),configuration:(0,Ws.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,$p.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,$p.default)(a,i.volatileTree)||(i.volatileTree=a)},setShowAsUpperCase(o){i.showAsUpperCase=o}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,Ws.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,dr.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?ao(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Fs(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 Gp().size([this.totalHeight,a]).separation(()=>1)(o),Bp(o,o.data.length=0,a/Dp(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 zi(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:d,showAsUpperCase:p}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:l,samples:s,rowHeight:c,rowProportion:f,showAllLetters:u,mismatchRendering:d,showAsUpperCase:p}},trackMenuItems(){return[...o(),{label:"Set feature height",type:"subMenu",subMenu:[{label:"Normal",onClick:()=>{i.setRowHeight(15),i.setRowProportion(.8)}},{label:"Compact",onClick:()=>{i.setRowHeight(8),i.setRowProportion(.9)}},{label:"Manually set height",onClick:()=>{(0,dr.getSession)(i).queueDialog(u=>[ck,{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,dr.max)(i.samples?.map(a=>(0,dr.measureText)(a.label,this.svgFontSize)).map(a=>this.canDisplayLabel?a:20)||[],0)}})).actions(i=>({afterCreate(){(0,on.addDisposer)(i,(0,O0.autorun)(async()=>{try{let{rpcManager:o}=(0,dr.getSession)(i),a=(0,S0.getRpcSessionId)(i);i.setSamples(await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:u=>{(0,on.isAlive)(i)&&i.setMessage(u)}}))}catch(o){console.error(o),(0,dr.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(w0(),_0));return u(i,a,o)}}})}function Yp(e){e.addDisplayType(()=>{let t=Vp(e),r=Kp(t,e);return new E0.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:X_,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var z0=L(Gr()),Gs=L(ct());var D0=L(Kr());var ka=class{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,r){let n=this.length++;for(;n>0;){let i=n-1>>1,o=this.values[i];if(r>=o)break;this.ids[n]=this.ids[i],this.values[n]=o,n=i}this.ids[n]=t,this.values[n]=r}pop(){if(this.length===0)return;let t=this.ids,r=this.values,n=t[0],i=--this.length;if(i>0){let o=t[i],a=r[i],u=0,l=i>>1;for(;u<l;){let s=(u<<1)+1,c=s+1,f=s+(+(c<i)&+(r[c]<r[s]));if(r[f]>=a)break;t[u]=t[f],r[u]=r[f],u=f}t[u]=o,r[u]=a}return n}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}};var A0=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Xp=3,ai=class e{static from(t,r=0){if(r%8!==0)throw new Error("byteOffset must be 8-byte aligned.");if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[n,i]=new Uint8Array(t,r+0,2);if(n!==251)throw new Error("Data does not appear to be in a Flatbush format.");let o=i>>4;if(o!==Xp)throw new Error(`Got v${o} data when expected v${Xp}.`);let a=A0[i&15];if(!a)throw new Error("Unrecognized array type.");let[u]=new Uint16Array(t,r+2,1),[l]=new Uint32Array(t,r+4,1);return new e(l,u,a,void 0,t,r)}constructor(t,r=16,n=Float64Array,i=ArrayBuffer,o,a=0){if(t===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(t)||t<=0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.byteOffset=a;let u=t,l=u;this._levelBounds=[u*4];do u=Math.ceil(u/this.nodeSize),l+=u,this._levelBounds.push(l*4);while(u!==1);this.ArrayType=n,this.IndexArrayType=l<16384?Uint16Array:Uint32Array;let s=A0.indexOf(n),c=l*4*n.BYTES_PER_ELEMENT;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);if(o)this.data=o,this._boxes=new n(o,a+8,l*4),this._indices=new this.IndexArrayType(o,a+8+c,l),this._pos=l*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{let f=this.data=new i(8+c+l*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new n(f,8,l*4),this._indices=new this.IndexArrayType(f,8+c,l),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(f,0,2).set([251,(Xp<<4)+s]),new Uint16Array(f,2,1)[0]=r,new Uint32Array(f,4,1)[0]=t}this._queue=new ka}add(t,r,n=t,i=r){let o=this._pos>>2,a=this._boxes;return this._indices[o]=o,a[this._pos++]=t,a[this._pos++]=r,a[this._pos++]=n,a[this._pos++]=i,t<this.minX&&(this.minX=t),r<this.minY&&(this.minY=r),n>this.maxX&&(this.maxX=n),i>this.maxY&&(this.maxY=i),o}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);let t=this._boxes;if(this.numItems<=this.nodeSize){t[this._pos++]=this.minX,t[this._pos++]=this.minY,t[this._pos++]=this.maxX,t[this._pos++]=this.maxY;return}let r=this.maxX-this.minX||1,n=this.maxY-this.minY||1,i=new Uint32Array(this.numItems),o=65535;for(let a=0,u=0;a<this.numItems;a++){let l=t[u++],s=t[u++],c=t[u++],f=t[u++],d=Math.floor(o*((l+c)/2-this.minX)/r),p=Math.floor(o*((s+f)/2-this.minY)/n);i[a]=fk(d,p)}Zp(i,t,this._indices,0,this.numItems-1,this.nodeSize);for(let a=0,u=0;a<this._levelBounds.length-1;a++){let l=this._levelBounds[a];for(;u<l;){let s=u,c=t[u++],f=t[u++],d=t[u++],p=t[u++];for(let m=1;m<this.nodeSize&&u<l;m++)c=Math.min(c,t[u++]),f=Math.min(f,t[u++]),d=Math.max(d,t[u++]),p=Math.max(p,t[u++]);this._indices[this._pos>>2]=s,t[this._pos++]=c,t[this._pos++]=f,t[this._pos++]=d,t[this._pos++]=p}}}search(t,r,n,i,o){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4,u=[],l=[];for(;a!==void 0;){let s=Math.min(a+this.nodeSize*4,T0(a,this._levelBounds));for(let c=a;c<s;c+=4){let f=this._boxes[c];if(n<f)continue;let d=this._boxes[c+1];if(i<d)continue;let p=this._boxes[c+2];if(t>p)continue;let m=this._boxes[c+3];if(r>m)continue;let h=this._indices[c>>2]|0;a>=this.numItems*4?u.push(h):(o===void 0||o(h,f,d,p,m))&&l.push(h)}a=u.pop()}return l}neighbors(t,r,n=1/0,i=1/0,o){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4,u=this._queue,l=[],s=i*i;e:for(;a!==void 0;){let c=Math.min(a+this.nodeSize*4,T0(a,this._levelBounds));for(let f=a;f<c;f+=4){let d=this._indices[f>>2]|0,p=this._boxes[f],m=this._boxes[f+1],h=this._boxes[f+2],v=this._boxes[f+3],y=t<p?p-t:t>h?t-h:0,w=r<m?m-r:r>v?r-v:0,_=y*y+w*w;_>s||(a>=this.numItems*4?u.push(d<<1,_):(o===void 0||o(d))&&u.push((d<<1)+1,_))}for(;u.length&&u.peek()&1;)if(u.peekValue()>s||(l.push(u.pop()>>1),l.length===n))break e;a=u.length?u.pop()>>1:void 0}return u.clear(),l}};function T0(e,t){let r=0,n=t.length-1;for(;r<n;){let i=r+n>>1;t[i]>e?n=i:r=i+1}return t[r]}function Zp(e,t,r,n,i,o){if(Math.floor(n/o)>=Math.floor(i/o))return;let a=e[n],u=e[n+i>>1],l=e[i],s=l,c=Math.max(a,u);l>c?s=c:c===a?s=Math.max(u,l):c===u&&(s=Math.max(a,l));let f=n-1,d=i+1;for(;;){do f++;while(e[f]<s);do d--;while(e[d]>s);if(f>=d)break;lk(e,t,r,f,d)}Zp(e,t,r,n,d,o),Zp(e,t,r,d+1,i,o)}function lk(e,t,r,n,i){let o=e[n];e[n]=e[i],e[i]=o;let a=4*n,u=4*i,l=t[a],s=t[a+1],c=t[a+2],f=t[a+3];t[a]=t[u],t[a+1]=t[u+1],t[a+2]=t[u+2],t[a+3]=t[u+3],t[u]=l,t[u+1]=s,t[u+2]=c,t[u+3]=f;let d=r[n];r[n]=r[i],r[i]=d}function fk(e,t){let r=e^t,n=65535^r,i=65535^(e|t),o=e&(t^65535),a=r|n>>1,u=r>>1^r,l=i>>1^n&o>>1^i,s=r&i>>1^o>>1^o;r=a,n=u,i=l,o=s,a=r&r>>2^n&n>>2,u=r&n>>2^n&(r^n)>>2,l^=r&i>>2^n&o>>2,s^=n&i>>2^(r^n)&o>>2,r=a,n=u,i=l,o=s,a=r&r>>4^n&n>>4,u=r&n>>4^n&(r^n)>>4,l^=r&i>>4^n&o>>4,s^=n&i>>4^(r^n)&o>>4,r=a,n=u,i=l,o=s,l^=r&i>>8^n&o>>8,s^=n&i>>8^(r^n)&o>>8,r=l^l>>1,n=s^s>>1;let c=e^t,f=n|65535^(c|r);return c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,(f<<1|c)>>>0}var R0="bold 10px Courier New,monospace";function ui(e,t,r=!1){return r||Math.abs(e-t.lastInsertedX)>.5}function si(e,t,r,n,i,o){e.spatialIndex.push(o),e.spatialIndexCoords.push(t,r,n,i),e.lastInsertedX=t}function P0(e,t,r,n,i){let{ctx:o,scale:a}=e,u=e.rowHeight/2;o.beginPath(),o.fillStyle="black";for(let l=0,s=0,c=t.length;l<c;l++)if(r[l]!=="-"){if(t[l]==="-"){let f=n+a*s;o.moveTo(f,i+u),o.lineTo(f+a+.4,i+u)}s++}o.stroke()}var Jp=L(ct());function M0(e){return Object.fromEntries(Object.entries(Qp(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function Qp(e){let{bases:t}=e.palette;return{a:t.A.main,c:t.C.main,g:t.G.main,t:t.T.main}}function Bt(e,t,r,n,i,o,a){t+n<0||t>o||(a&&(e.fillStyle=a),e.fillRect(t,r,n,i))}function Us(){let e=(0,Jp.measureText)("A"),t=(0,Jp.measureText)("M")-2;return{charWidth:e,charHeight:t}}function C0(e,t,r,n,i,o,a,u){if(e.showAllLetters)return;let{ctx:l,scale:s,h:c,canvasWidth:f}=e;l.fillStyle="lightgrey";for(let d=0,p=0,m=t.length;d<m;d++)if(r[d]!=="-"){let h=t[d],v=n+s*p;r[d]===h&&h!=="-"&&h!==" "&&(Bt(l,v,i,s+.4,c,f),ui(v,e)&&si(e,v,i,v+e.scale+.4,i+e.h,{pos:p+a,chr:u,base:h||"",sampleId:o})),p++}}function k0(e,t,r,n,i,o,a,u){let{ctx:l,scale:s,h:c,canvasWidth:f,showAllLetters:d,mismatchRendering:p,colorForBase:m}=e;for(let h=0,v=0,y=t.length;h<y;h++){let w=t[h];if(r[h]!=="-"){if(w!=="-"){let _=n+s*v;r[h]!==w&&w!==" "?(Bt(l,_,i,s+.4,c,f,p?m[w]??"black":"orange"),ui(_,e)&&si(e,_,i,_+e.scale+.4,i+e.h,{pos:v+a,chr:u,base:w,sampleId:o})):d&&(Bt(l,_,i,s+.4,c,f,p?m[w]??"black":"lightblue"),ui(_,e)&&si(e,_,i,_+e.scale+.4,i+e.h,{pos:v+a,chr:u,base:w,sampleId:o}))}v++}}}function hk(e,t){return t?e.toUpperCase():e}function q0(e,t,r,n,i,o){let{ctx:a,scale:u,hp2:l,rowHeight:s,showAllLetters:c,mismatchRendering:f,contrastForBase:d,showAsUpperCase:p}=e,{charHeight:m}=Us();if(u>=10){for(let h=0,v=0,y=t.length;h<y;h++)if(n[h]!=="-"){let w=i+u*v,_=(u-10)/2+1,x=t[h];(c||n[h]!==x)&&x!=="-"&&(a.fillStyle=f?d[x]??"white":"black",s>m&&a.fillText(hk(r[h]||"",p),w+_,l+o+3)),v++}}}var j0=L(ct());function F0(e,t,r,n,i,o,a,u,l){let{ctx:s,scale:c,h:f,canvasWidth:d,rowHeight:p}=e,{charHeight:m}=Us();for(let h=0,v=0,y=t.length;h<y;h++){let w="";for(;r[h]==="-";)t[h]!=="-"&&t[h]!==" "&&(w+=t[h]),h++;if(w.length>0){let _=n+c*v-1,x,S;if(w.length>10){let E=`${w.length}`;if(o>10)x=_-1,S=2,Bt(s,x,i,S,f,d,"purple");else if(f>m){let R=(0,j0.measureText)(E,10),T=2;x=_-R/2-T,S=R+2*T,Bt(s,x,i,S,f,d,"purple"),s.fillStyle="white",s.fillText(E,_-R/2,i+f*7/8)}else{let R=2;x=_-R,S=2*R,Bt(s,x,i,S,f,d,"purple")}}else x=_,S=1,Bt(s,x,i,S,f,d,"purple"),o<.2&&p>5&&(x=_-2,S=5,Bt(s,_-2,i,5,1,d),Bt(s,_-2,i+f-1,5,1,d));ui(x,e,!0)&&si(e,x,i,x+S,i+e.h,{pos:v+u,chr:l,base:w,sampleId:a,isInsertion:!0})}v++}}var th=L(ct());function L0(e,t,r,n,i){let[o]=(0,th.featureSpanPx)(e,t,r),a=e.get("alignments"),u=e.get("seq").toLowerCase();for(let[l,s]of Object.entries(a)){let c=n.get(l);if(c===void 0)continue;let f=s.seq,d=f.toLowerCase(),p=i.offset+i.rowHeight*c;P0(i,d,u,o,p),C0(i,d,u,o,p,c,s.start,s.chr),k0(i,d,u,o,p,c,s.start,s.chr),q0(i,d,f,u,o,p)}}function N0(e,t,r,n,i){let[o]=(0,th.featureSpanPx)(e,t,r),a=e.get("alignments"),u=e.get("seq").toLowerCase();for(let[l,s]of Object.entries(a)){let c=n.get(l);if(c===void 0)continue;let f=s.seq.toLowerCase(),d=i.offset+i.rowHeight*c;F0(i,f,u,o,d,r,c,s.start,s.chr)}}function B0({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,d=r[0],p=(d.end-d.start)/n,m=i*s,h=(0,D0.createJBrowseTheme)(a),v=Qp(h),y=M0(h),w=new Map(l.map((T,C)=>[T.id,C])),_=1/n,x=m/2,S=(i-m)/2;e.font=R0;let E={ctx:e,scale:_,canvasWidth:p,rowHeight:i,h:m,hp2:x,offset:S,colorForBase:v,contrastForBase:y,showAllLetters:o,mismatchRendering:u,showAsUpperCase:f,spatialIndex:[],spatialIndexCoords:[],lastInsertedX:-1/0};for(let T of c.values())L0(T,d,n,w,E);for(let T of c.values())N0(T,d,n,w,E);let R=new ai(E.spatialIndex.length||1);if(E.spatialIndex.length===0)R.add(0,0,1,1);else for(let T=0,C=E.spatialIndexCoords.length;T<C;T+=4)R.add(E.spatialIndexCoords[T],E.spatialIndexCoords[T+1],E.spatialIndexCoords[T+2],E.spatialIndexCoords[T+3]);return R.finish(),{flatbush:R.data,items:E.spatialIndex,samples:l}}var qa=class extends z0.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,Gs.updateStatus)("Rendering alignment",r,()=>(0,Gs.renderToAbstractCanvas)(s,l,t,p=>B0({ctx:p,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 ci=L(qe()),W0=L(Kr());var U0=L(cr()),yk=(0,U0.observer)(function(e){let{items:t,displayModel:r,height:n,samples:i,flatbush:o}=e,a=(0,ci.useRef)(null),u=(0,ci.useMemo)(()=>ai.from(o),[o]);function l(s,c){let f=0,d=0;if(a.current){let m=a.current.getBoundingClientRect();f=s-m.left,d=c-m.top}let p=u.search(f,d,f+1,d+1);if(p.length){let m=p.find(y=>t[y]?.isInsertion),h=m!==void 0?t[m]:t[p[0]],v=i[h.sampleId];return{...h,sampleId:v?.label||v?.id||"unknown"}}else return}return ci.default.createElement("div",{ref:a,onMouseMove:s=>r.setHoveredInfo?.(l(s.clientX,s.clientY)),onMouseLeave:()=>{r.setHoveredInfo?.(void 0)},onMouseOut:()=>{r.setHoveredInfo?.(void 0)},style:{overflow:"visible",position:"relative",height:n}},ci.default.createElement(W0.PrerenderedCanvas,{...e,style:{position:"absolute",left:0}}))}),H0=yk;var V0=L(Kn());var _k=(0,V0.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),G0=_k;function rh(e){e.addRendererType(()=>new qa({name:"LinearMafRenderer",ReactComponent:H0,configSchema:G0,pluginManager:e}))}var Y0=L(Gr()),X0=L(ht());var ve=L(qe()),qr=L(Kr()),so=L(ct()),De=L(Wi()),$0=L(ht()),K0=L(Ui()),wk=(0,K0.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function nh({model:e}){let{classes:t}=wk(),[r,n]=(0,ve.useState)(""),[i,o]=(0,ve.useState)(),[a,u]=(0,ve.useState)(),[l,s]=(0,ve.useState)(),[c,f]=(0,ve.useState)(),[d,p]=(0,ve.useState)("MAF track"),[m,h]=(0,ve.useState)("BigMafAdapter"),[v,y]=(0,ve.useState)("TBI"),w=(0,$0.getRoot)(e);return ve.default.createElement(De.Paper,{className:t.paper},ve.default.createElement(De.Paper,null,c?ve.default.createElement(qr.ErrorMessage,{error:c}):null,ve.default.createElement(De.FormControl,null,ve.default.createElement(De.FormLabel,null,"File type"),ve.default.createElement(De.RadioGroup,{value:m,onChange:_=>{h(_.target.value)}},["BigMafAdapter","MafTabixAdapter"].map(_=>ve.default.createElement(De.FormControlLabel,{key:_,value:_,control:ve.default.createElement(De.Radio,null),checked:m===_,label:_})))),m==="BigMafAdapter"?ve.default.createElement(qr.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:_=>{o(_)}}):m==="MafTabixAdapter"?ve.default.createElement(ve.default.Fragment,null,ve.default.createElement(De.FormControl,null,ve.default.createElement(De.FormLabel,null,"Index type"),ve.default.createElement(De.RadioGroup,{value:m,onChange:_=>{y(_.target.value)}},["TBI","CSI"].map(_=>ve.default.createElement(De.FormControlLabel,{key:_,value:_,control:ve.default.createElement(De.Radio,null),checked:v===_,label:_})))),ve.default.createElement(qr.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:_=>{o(_)}}),ve.default.createElement(qr.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:_=>{u(_)}})):ve.default.createElement(ve.default.Fragment,null,ve.default.createElement(qr.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:_=>{o(_)}}),ve.default.createElement(qr.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:_=>{u(_)}}))),ve.default.createElement("div",null,ve.default.createElement(qr.FileSelector,{location:l,name:"Path to newick tree (.nh)",rootModel:w,setLocation:_=>{s(_)}}),ve.default.createElement(De.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})),ve.default.createElement(De.TextField,{value:d,helperText:"Track name",onChange:_=>{p(_.target.value)}}),ve.default.createElement(De.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let _=(0,so.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let S=[`${d.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,_.adminMode?"":"-sessionTrack"].join("");(0,so.isSessionWithAddTracks)(_)&&(_.addTrackConf({trackId:S,type:"MafTrack",name:d,assemblyNames:[e.assembly],adapter:m==="BigMafAdapter"?{type:m,bigBedLocation:i,samples:x,nhLocation:l}:m==="MafTabixAdapter"?{type:m,bedGzLocation:i,nhLocation:l,index:{indexType:v,location:a},samples:x}:{type:m,tafGzLocation:i,taiLocation:a,nhLocation:l,samples:x}}),e.view?.showTrack(S)),e.clearData(),(0,so.isSessionModelWithWidgets)(_)&&_.hideWidget(e)}catch(_){f(_)}}},"Submit"))}function ih(e){e.addAddTrackWorkflowType(()=>new Y0.AddTrackWorkflowType({name:"MAF track",ReactComponent:nh,stateModel:X0.types.model({})}))}var QR=L(ub()),eP=L(vb()),Hu=class extends eP.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,QR.getAdapter)(n,u,a);return l.getSamples(o,i)}};function bb(e){e.addRpcMethod(()=>new Hu(e))}var rP=L(ub()),nP=L(vb());function tP({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[d,p]of Object.entries(c)){let h=p.seq,v=o.get(d);if(v!==void 0){for(let y=0,w=0,_=h.length;y<_;y++)if(f[y]!=="-"){if(h[y]==="-"){let x=s+w-i.start;x>=0&&x<a&&(u[v]=u[v].slice(0,x)+"-"+u[v].slice(x+1))}w++}if(!t){for(let y=0,w=0,_=h.length;y<_;y++)if(f[y]!=="-"){let x=h[y],S=s+w-i.start;S>=0&&S<a&&f[y]===x&&x!=="-"&&x!==" "&&(u[v]=u[v].slice(0,S)+"."+u[v].slice(S+1)),w++}}for(let y=0,w=0,_=h.length;y<_;y++){let x=h[y];if(f[y]!=="-"){if(x!=="-"){let S=s+w-i.start;S>=0&&S<a&&(f[y]!==x&&x!==" "||t)&&(u[v]=u[v].slice(0,S)+x+u[v].slice(S+1))}w++}}}}}return u}var Vu=class extends nP.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,rP.getAdapter)(this.pluginManager,u,a)).dataAdapter,c=await Gn(s.getFeatures(o[0],n).pipe($n()));return tP({features:new Map(c.map(f=>[f.id(),f])),samples:i,regions:o,showAllLetters:l})}};function gb(e){e.addRpcMethod(()=>new Vu(e))}var cP=L(Gr());var iP=L(Nd()),da=L(ct()),oP=L(Dd()),aP=L(Bd()),uP=L(ht());var Gu=class extends iP.BaseFeatureDataAdapter{setupP;async setupPre(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,uP.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,da.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,aP.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,da.updateStatus)("Downloading alignments",n,()=>Gn(o.getFeatures(t).pipe($n())));await(0,da.updateStatus)("Processing alignments",n,()=>{let u="",l=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),f={},d=c.length;for(let p=0;p<d;p++){let h=c[p].split(":"),[v,y,w,_,x,S]=h;if(!v||!S)continue;let E,R,T=v.indexOf(".");if(T===-1)E=v,R="";else{let C=v.indexOf(".",T+1);if(C===-1)E=v.slice(0,Math.max(0,T)),R=v.slice(Math.max(0,T+1));else{let M=v.slice(T+1,C);M.length>0&&!Number.isNaN(+M)?(E=v.slice(0,Math.max(0,C)),R=v.slice(Math.max(0,C+1))):(E=v.slice(0,Math.max(0,T)),R=v.slice(Math.max(0,T+1)))}}E&&(u||(u=E),f[E]={chr:R,start:+y,srcSize:+w,strand:_==="-"?-1:1,unknown:+x,seq:S})}i.next(new da.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,oP.openLocation)(r).readFile("utf8");return{samples:zi(this.getConf("samples")),tree:n?ba(n):void 0}}freeResources(){}};var yb=L(Kn());var kK=(0,yb.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,yb.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}),sP=kK;function _b(e){return e.addAdapterType(()=>new cP.AdapterType({name:"MafTabixAdapter",AdapterClass:Gu,configSchema:sP}))}var jd=L(Gr());var lP=L(Kn()),fP=L(Gr());function wb(e){return(0,lP.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,fP.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function xb(e){return e.addTrackType(()=>{let t=wb(e);return new jd.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,jd.createBaseTrackModel)(e,"MafTrack",t)})})}var Fd=class extends dP.default{name="MafViewerPlugin";version=Pb;install(t){Zd(t),xb(t),Yp(t),rh(t),_b(t),ih(t),gb(t),bb(t)}configure(t){}};return Ab(qK);})();
|
|
6
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function Vd(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ns=(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=Hd(a),f=u.next();!f.done;f=u.next()){var s=f.value;s.remove(this)}}catch(m){t={error:m}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(br(c))try{c()}catch(m){o=m instanceof rs?m.errors:[m]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var d=Hd(l),p=d.next();!p.done;p=d.next()){var h=p.value;try{Zb(h)}catch(m){o=o??[],m instanceof rs?o=Gi(Gi([],Vi(o)),Vi(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(o)throw new rs(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Zb(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)&&Vd(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Vd(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})();var tK=ns.EMPTY;function Kb(e){return e instanceof ns||e&&"closed"in e&&br(e.remove)&&br(e.add)&&br(e.unsubscribe)}function Zb(e){br(e)?e():e.unsubscribe()}var nn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var $i={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=$i.delegate;return i?.setTimeout?i.setTimeout.apply(i,Gi([e,t],Vi(r))):setTimeout.apply(void 0,Gi([e,t],Vi(r)))},clearTimeout:function(e){var t=$i.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Yb(e){$i.setTimeout(function(){var t=nn.onUnhandledError;if(t)t(e);else throw e})}function Gd(){}var Xb=(function(){return $d("C",void 0,void 0)})();function Jb(e){return $d("E",void 0,e)}function Qb(e){return $d("N",e,void 0)}function $d(e,t,r){return{kind:e,value:t,error:r}}var Zd=null;function eg(e){nn.useDeprecatedSynchronousErrorHandling&&Zd&&(Zd.errorThrown=!0,Zd.error=e)}var Xd=(function(e){xa(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Kb(r)&&r.add(n)):n.destination=MP,n}return t.create=function(r,n,i){return new Jd(r,n,i)},t.prototype.next=function(r){this.isStopped?Yd(Qb(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Yd(Jb(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Yd(Xb,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})(ns);var RP=Function.prototype.bind;function Kd(e,t){return RP.call(e,t)}var TP=(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){is(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){is(n)}else is(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){is(r)}},e})(),Jd=(function(e){xa(t,e);function t(r,n,i){var o=e.call(this)||this,a;if(br(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var u;o&&nn.useDeprecatedNextContext?(u=Object.create(r),u.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&Kd(r.next,u),error:r.error&&Kd(r.error,u),complete:r.complete&&Kd(r.complete,u)}):a=r}return o.destination=new TP(a),o}return t})(Xd);function is(e){nn.useDeprecatedSynchronousErrorHandling?eg(e):Yb(e)}function PP(e){throw e}function Yd(e,t){var r=nn.onStoppedNotification;r&&$i.setTimeout(function(){return r(e,t)})}var MP={closed:!0,next:Gd,error:PP,complete:Gd};function CP(e){return br(e?.lift)}function os(e){return function(t){if(CP(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 tg(e,t,r,n,i){return new IP(e,t,r,n,i)}var IP=(function(e){xa(t,e);function t(r,n,i,o,a,u){var f=e.call(this,r)||this;return f.onFinalize=a,f.shouldUnsubscribe=u,f._next=n?function(s){try{n(s)}catch(c){r.error(c)}}:e.prototype._next,f._error=o?function(s){try{o(s)}catch(c){r.error(c)}finally{this.unsubscribe()}}:e.prototype._error,f._complete=i?function(){try{i()}catch(s){r.error(s)}finally{this.unsubscribe()}}:e.prototype._complete,f}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})(Xd);var rg=ts(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function ri(e,t){var r=typeof t=="object";return new Promise(function(n,i){var o=new Jd({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new rg)}});e.subscribe(o)})}function ng(e,t,r,n,i){return function(o,a){var u=r,f=t,s=0;o.subscribe(tg(a,function(c){var l=s++;f=u?e(f,c,l):(u=!0,c),n&&a.next(f)},i&&(function(){u&&a.next(f),a.complete()})))}}function ig(e,t){return os(ng(e,t,arguments.length>=2,!1,!0))}var kP=function(e,t){return e.push(t),e};function ni(){return os(function(e,t){ig(kP,[])(e).subscribe(t)})}function Sa(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 qP(e){return typeof e[0]=="string"}function Zi(e){return qP(e)?e.map(t=>({id:t,label:t,color:void 0})):e}var Ea=class extends og.BaseFeatureDataAdapter{setupP;async setup(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,sg.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,ug.ObservableCreate)(async o=>{let{adapter:a}=await this.setup(),u=await(0,Oa.updateStatus)("Downloading alignments",n,()=>ri(a.getFeatures(t).pipe(ni())));await(0,Oa.updateStatus)("Processing alignments",n,()=>{for(let f of u){let c=f.get("mafBlock").split(";"),l=0;for(let v of c)v.startsWith("s")&&l++;let d=new Array(l),p={},h=0,m;for(let v of c)if(v.startsWith("s")){let _=v.split(i),w=_[6],y=_[1];d[h]=w,m===void 0&&(m=w);let x=y.indexOf("."),O=y.slice(0,Math.max(0,x)),M=y.slice(Math.max(0,x+1));p[O]={chr:M,start:+_[2],srcSize:+_[3],strand:_[4]==="+"?1:-1,unknown:+_[5],seq:w},h++}o.next(new Oa.SimpleFeature({id:f.id(),data:{start:f.get("start"),end:f.get("end"),refName:f.get("refName"),seq:m,alignments:p}}))}}),o.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,ag.openLocation)(r).readFile("utf8");return{samples:Zi(this.getConf("samples")),tree:n?Sa(n):void 0}}freeResources(){}};var lg=j(ii());var jP=(0,lg.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}),fg=jP;function Qd(e){return e.addAdapterType(()=>new dg.AdapterType({name:"BigMafAdapter",AdapterClass:Ea,configSchema:fg}))}var G0=j(rn());var qe=j(Fe()),f0=j(gr()),Vs=j(ht()),d0=j(oi()),p0=j(er());var as=j(Fe()),gg=j(on()),FP=(0,gg.makeStyles)()({cursor:{pointerEvents:"none"}}),LP=({width:e,height:t,scrollTop:r,mouseX:n,mouseY:i})=>{let{classes:o}=FP();return as.default.createElement("svg",{className:o.cursor,width:e,height:t,style:{position:"absolute",top:r}},as.default.createElement("line",{x1:0,x2:e,y1:i,y2:i,stroke:"black"}),as.default.createElement("line",{x1:n,x2:n,y1:0,y2:t,stroke:"black"}))},_g=LP;var Ye=j(Fe()),Yi=j(gr()),Aa=j(ht()),_t=j(oi()),Sg=j(er()),Og=j(on());var Ki=j(Fe()),us=j(ht()),wg=j(ep());function xg({model:e,selectionCoords:t,showAllLetters:r}){let[n,i]=(0,Ki.useState)(""),[o,a]=(0,Ki.useState)(!0),[u,f]=(0,Ki.useState)();return(0,Ki.useEffect)(()=>{t&&(async()=>{try{a(!0),f(void 0);let{samples:s,adapterConfig:c}=e,{rpcManager:l}=(0,us.getSession)(e),d=(0,wg.getRpcSessionId)(e),p=(0,us.getContainingView)(e),{refName:h,assemblyName:m}=p.displayedRegions[0],{dragStartX:v,dragEndX:_}=t,[w,y]=[Math.min(v,_),Math.max(v,_)],O=(await l.call(d,"MafGetSequences",{sessionId:d,adapterConfig:c,samples:s,showAllLetters:r,regions:[{refName:h,start:p.pxToBp(w).coord-1,end:p.pxToBp(y).coord,assemblyName:m}]})).map((M,E)=>`>${s[E].label}
|
|
7
|
+
${M}`).join(`
|
|
8
|
+
`);i(O)}catch(s){console.error(s),f(s)}finally{a(!1)}})()},[e,t,r]),{sequence:n,loading:o,error:u}}var NP=(0,Og.makeStyles)()({dialogContent:{width:"80em"},textAreaInput:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto"},ml:{marginLeft:10}}),DP=(0,Sg.observer)(function({onClose:e,model:t,selectionCoords:r}){let[n,i]=(0,Ye.useState)(!0),{classes:o}=NP(),{sequence:a,loading:u,error:f}=xg({model:t,selectionCoords:r,showAllLetters:n}),s=a?a.length>1e6:!1;return Ye.default.createElement(Yi.Dialog,{open:!0,onClose:e,title:"Subsequence Data",maxWidth:"xl"},Ye.default.createElement(_t.DialogContent,null,Ye.default.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"16px"}},Ye.default.createElement(_t.ToggleButtonGroup,{value:n,exclusive:!0,size:"small",onChange:(c,l)=>{l!==null&&i(l)}},Ye.default.createElement(_t.ToggleButton,{value:!0},"Show All Letters"),Ye.default.createElement(_t.ToggleButton,{value:!1},"Show Only Differences")),Ye.default.createElement("div",{style:{flexGrow:1}}),Ye.default.createElement(_t.Button,{variant:"contained",color:"primary",disabled:u||!a,onClick:()=>{(async()=>{try{await navigator.clipboard.writeText(a),(0,Aa.getSession)(t).notify("Sequence copied to clipboard","info")}catch(c){console.error(c),(0,Aa.getSession)(t).notifyError(`${c}`,c)}})()}},"Copy to Clipboard"),Ye.default.createElement(_t.Button,{variant:"contained",color:"secondary",disabled:u||!a,onClick:()=>{try{let c=URL.createObjectURL(new Blob([a],{type:"text/plain"})),l=document.createElement("a");l.href=c,l.download="sequence.fasta",document.body.append(l),l.click(),l.remove(),URL.revokeObjectURL(c),(0,Aa.getSession)(t).notify("Sequence downloaded","info")}catch(c){console.error(c),(0,Aa.getSession)(t).notifyError(`${c}`,c)}}},"Download")),f?Ye.default.createElement(Yi.ErrorMessage,{error:f}):Ye.default.createElement(Ye.default.Fragment,null,u?Ye.default.createElement(Yi.LoadingEllipses,null):null,Ye.default.createElement(_t.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}}}}))),Ye.default.createElement(_t.DialogActions,null,Ye.default.createElement(_t.Button,{color:"primary",variant:"outlined",onClick:e},"Close")))}),Eg=DP;var Up=j(Fe()),Uy=j(gr()),Wy=j(By()),Hy=j(ht()),Vy=j(er());var lo=j(ht());function Us(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ws(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 zy(e,t,r){let n=[];if(t)n.push(`Start: ${t.refName}:${(0,lo.toLocale)(t.coord)}`,`End: ${r.refName}:${(0,lo.toLocale)(r.coord)}`,`Length: ${(0,lo.getBpDisplayStr)(Math.abs(t.coord-r.coord))}`);else if(n.push(`Ref: ${r.refName}:${(0,lo.toLocale)(r.coord)}`),e){let{base:i,sampleLabel:o,pos:a,chr:u,isInsertion:f}=e,s=20,c=i.length,l=c>1?` ${c}bp`:"",d=i.length>s?i.slice(0,s)+"...":i,p=f?" Insertion":"";n.push(`Alt ${o}: ${u}:${a.toLocaleString("en-US")} (${d}${l}${p})`)}return n.filter(i=>!!i).join("<br/>")}function Bp(e){return(e.data.length||0)+(e.children&&Ws(e.children,Bp)||0)}function zp(e,t,r){e.len=(t+=Math.max(e.data.length||0,0))*r,e.children&&e.children.forEach(n=>{zp(n,t,r)})}var HC=(0,Vy.observer)(function({model:e,mouseX:t,origMouseX:r}){let{hoveredInfo:n}=e,i=(0,Hy.getContainingView)(e),o=r?i.pxToBp(r):void 0,a=i.pxToBp(t);return n?Up.default.createElement(Wy.default,null,Up.default.createElement(Uy.SanitizedHTML,{html:zy(n,o,a)})):null}),Gy=HC;Gp();var XC=(0,p0.observer)(function(e){let{model:t}=e,{pluginManager:r}=(0,Vs.getEnv)(t),{rowHeight:n,height:i,scrollTop:o,samples:a}=t,u=(0,qe.useRef)(null),f=(0,d0.useTheme)(),s=r.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplayComponent:c}=s.exports,[l,d]=(0,qe.useState)(),[p,h]=(0,qe.useState)(),[m,v]=(0,qe.useState)(!1),[_,w]=(0,qe.useState)(),[y,x]=(0,qe.useState)(),[O,M]=(0,qe.useState)(!1),[E,P]=(0,qe.useState)(),[C,R]=(0,qe.useState)(!1),[L,z]=(0,qe.useState)(),{width:D}=(0,Vs.getContainingView)(t),A=T=>{let W=u.current?.getBoundingClientRect()?.left||0,we=T.clientX-W;M(!1),v(!0),w(we),x(we),T.stopPropagation()},k=T=>{let F=u.current?.getBoundingClientRect(),W=F?.top||0,we=F?.left||0,ee=T.clientX-we,G=T.clientY-W;d(G),h(ee),m&&x(ee)},U=T=>{m&&_!==void 0&&y!==void 0&&(Math.abs(y-_)>=2?(P({coord:[T.clientX,T.clientY],dragEndX:T.clientX,dragStartX:_}),M(!0)):q()),v(!1)},q=(0,qe.useCallback)(()=>{M(!1),w(void 0),x(void 0)},[]);return(0,qe.useEffect)(()=>{let T=W=>{W.key==="Escape"&&O&&q()},F=W=>{u.current&&!u.current.contains(W.target)&&O&&q()};return document.addEventListener("keydown",T),document.addEventListener("click",F),()=>{document.removeEventListener("keydown",T),document.removeEventListener("click",F)}},[O,q]),qe.default.createElement("div",{ref:u,onMouseDown:A,onMouseMove:k,onMouseUp:U,onDoubleClick:()=>{O&&q()},onMouseLeave:()=>{d(void 0),h(void 0),v(!1)}},qe.default.createElement(c,{...e}),t.showSidebar?qe.default.createElement(Hs,{model:t}):null,l&&p&&a&&!E&&!C?qe.default.createElement("div",{style:{position:"relative"}},qe.default.createElement(_g,{width:D,height:i,scrollTop:o,mouseX:p,mouseY:l}),qe.default.createElement(Gy,{model:t,mouseX:p,mouseY:l,origMouseX:_,rowHeight:n,sources:a})):null,(m||O)&&_!==void 0&&y!==void 0?qe.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,qe.default.createElement(f0.Menu,{open:!!E,onMenuItemClick:(T,F)=>{F(),P(void 0)},onClose:()=>{P(void 0)},slotProps:{transition:{onExit:()=>{P(void 0)}}},anchorReference:"anchorPosition",anchorPosition:E?{top:E.coord[1],left:E.coord[0]}:void 0,style:{zIndex:f.zIndex.tooltip},menuItems:[{label:"View subsequence",onClick:()=>{E&&(z({dragStartX:E.dragStartX,dragEndX:E.dragEndX}),R(!0),P(void 0))}}]}),C?qe.default.createElement(Eg,{model:t,selectionCoords:L,onClose:()=>{R(!1),z(void 0)}}):null)}),h0=XC;var m0=j(ii());function $p(e){let t=e.getPlugin("LinearGenomeViewPlugin"),{baseLinearDisplayConfigSchema:r}=t.exports;return(0,m0.ConfigurationSchema)("LinearMafDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:r,explicitlyTyped:!0})}var Yp=j(Fe()),Gs=j(ii()),ur=j(ht()),H0=j(ep());function JC(e,t){return e.parent===t.parent?1:2}function QC(e){return e.reduce(eI,0)/e.length}function eI(e,t){return e+t.x}function tI(e){return 1+e.reduce(rI,0)}function rI(e,t){return Math.max(e,t.y)}function nI(e){for(var t;t=e.children;)e=t[0];return e}function iI(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Zp(){var e=JC,t=1,r=1,n=!1;function i(o){var a,u=0;o.eachAfter(function(d){var p=d.children;p?(d.x=QC(p),d.y=tI(p)):(d.x=a?u+=e(d,a):0,d.y=0,a=d)});var f=nI(o),s=iI(o),c=f.x-e(f,s)/2,l=s.x+e(s,f)/2;return o.eachAfter(n?function(d){d.x=(d.x-o.x)*t,d.y=(o.y-d.y)*r}:function(d){d.x=(d.x-c)/(l-c)*t,d.y=(1-(o.y?d.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 oI(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 v0(){return this.eachAfter(oI)}function b0(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}function g0(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 _0(e,t){for(var r=this,n=[r],i=[],o,a,u,f=-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,++f,this);return this}function y0(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}function w0(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 x0(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function S0(e){for(var t=this,r=aI(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 aI(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 O0(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function E0(){return Array.from(this)}function A0(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function R0(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*T0(){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 fo(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=cI)):t===void 0&&(t=sI);for(var r=new Da(e),n,i=[r],o,a,u,f;n=i.pop();)if((a=t(n.data))&&(f=(a=Array.from(a)).length))for(n.children=a,u=f-1;u>=0;--u)i.push(o=a[u]=new Da(a[u])),o.parent=n,o.depth=n.depth+1;return r.eachBefore(fI)}function uI(){return fo(this).eachBefore(lI)}function sI(e){return e.children}function cI(e){return Array.isArray(e)?e[1]:null}function lI(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function fI(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Da(e){this.data=e,this.depth=this.height=0,this.parent=null}Da.prototype=fo.prototype={constructor:Da,count:v0,each:b0,eachAfter:_0,eachBefore:g0,find:y0,sum:w0,sort:x0,path:S0,ancestors:O0,descendants:E0,leaves:A0,links:R0,copy:uI,[Symbol.iterator]:T0};var Kp=j(M0()),V0=j(Na()),mn=j(mt());var _I=(0,Yp.lazy)(()=>Promise.resolve().then(()=>(j0(),q0))),yI=(0,Yp.lazy)(()=>Promise.resolve().then(()=>(B0(),D0)));function Xp(e,t){let r=t.getPlugin("LinearGenomeViewPlugin"),{BaseLinearDisplay:n}=r.exports;return mn.types.compose("LinearMafDisplay",n,mn.types.model({type:mn.types.literal("LinearMafDisplay"),configuration:(0,Gs.ConfigurationReference)(e),rowHeight:15,rowProportion:.8,showAllLetters:!1,mismatchRendering:!0,showBranchLen:!1,treeAreaWidth:80,showAsUpperCase:!0,showSidebar:!0})).volatile(()=>({hoveredInfo:void 0,prefersOffset:!0,volatileSamples:void 0,volatileTree:void 0,highlightedRowNames:void 0,hoveredTreeNode: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,Kp.default)(o,i.volatileSamples)||(i.volatileSamples=o),(0,Kp.default)(a,i.volatileTree)||(i.volatileTree=a)},setShowAsUpperCase(o){i.showAsUpperCase=o},setTreeAreaWidth(o){i.treeAreaWidth=o},setShowSidebar(o){i.showSidebar=o},setHighlightedRowNames(o,a){i.highlightedRowNames=o,i.hoveredTreeNode=a},showInsertionSequenceDialog(o){(0,ur.getSession)(i).queueDialog(a=>[yI,{model:i,onClose:a,insertionData:o}])}})).views(i=>({get rendererTypeName(){return"LinearMafRenderer"},get rendererConfig(){let a=(0,Gs.getConf)(i,["renderer"])||{};return i.rendererType.configSchema.create({...a,type:"LinearMafRenderer"},(0,ur.getEnv)(i))}})).views(i=>({get root(){return i.volatileTree?fo(i.volatileTree,o=>o.children).sum(o=>o.children?0:1).sort((o,a)=>Us(o.data.length||1,a.data.length||1)):void 0}})).views(i=>({get hierarchy(){let o=i.root;if(o){let a=i.treeAreaWidth;Zp().size([this.totalHeight-i.rowHeight,a]).separation(()=>1)(o);for(let f of o.descendants())f.x=f.x+i.rowHeight/2;return zp(o,o.data.length=0,a/Bp(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 Zi(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 leafMap(){return new Map(this.leaves?.map(o=>[o.data.name,o]))},get nodeDescendantNames(){let o=new Map;function a(u){if(!u.children||u.children.length===0){let s=[u.data.name];return o.set(u,s),s}let f=[];for(let s of u.children)f.push(...a(s));return o.set(u,f),f}return this.hierarchy&&a(this.hierarchy),o},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:f,samples:s,rowHeight:c,rowProportion:l,mismatchRendering:d,showAsUpperCase:p}=i;return{...a(),notReady:!i.volatileSamples&&!i.volatileTree||super.notReady,config:f,samples:s,rowHeight:c,rowProportion:l,showAllLetters:u,mismatchRendering:d,showAsUpperCase:p}},trackMenuItems(){return[...o(),{label:"Set feature height",type:"subMenu",subMenu:[{label:"Normal",onClick:()=>{i.setRowHeight(15),i.setRowProportion(.8)}},{label:"Compact",onClick:()=>{i.setRowHeight(8),i.setRowProportion(.9)}},{label:"Manually set height",onClick:()=>{(0,ur.getSession)(i).queueDialog(u=>[_I,{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)}},{label:"Show sidebar",type:"checkbox",checked:i.showSidebar,onClick:()=>{i.setShowSidebar(!i.showSidebar)}}]}}}).views(i=>({get svgFontSize(){return Math.min(Math.max(i.rowHeight,8),14)},get canDisplayLabel(){return i.rowHeight>=7},get labelWidth(){return(0,ur.max)(i.samples?.map(a=>(0,ur.measureText)(a.label,this.svgFontSize)).map(a=>this.canDisplayLabel?a:20)||[],0)},get sidebarWidth(){return i.showSidebar?this.labelWidth+5+i.treeWidth:0}})).actions(i=>({afterCreate(){(0,mn.addDisposer)(i,(0,V0.autorun)(async()=>{try{let{rpcManager:o}=(0,ur.getSession)(i),a=(0,H0.getRpcSessionId)(i);i.setSamples(await o.call(a,"MafGetSamples",{sessionId:a,adapterConfig:i.adapterConfig,statusCallback:u=>{(0,mn.isAlive)(i)&&i.setMessage(u)}}))}catch(o){console.error(o),(0,ur.getSession)(i).notifyError(`${o}`,o)}}))}})).actions(i=>{let{renderSvg:o}=i;return{async renderSvg(a){let{renderSvg:u}=await Promise.resolve().then(()=>(W0(),U0));return u(i,a,o)}}})}function Jp(e){e.addDisplayType(()=>{let t=$p(e),r=Xp(t,e);return new G0.DisplayType({name:"LinearMafDisplay",configSchema:t,stateModel:r,ReactComponent:h0,viewType:"LinearGenomeView",trackType:"MafTrack",displayName:"MAF display"})})}var fw=j(rn()),Zs=j(ht());var cw=j(gr());var Ba=class{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,r){let n=this.length++;for(;n>0;){let i=n-1>>1,o=this.values[i];if(r>=o)break;this.ids[n]=this.ids[i],this.values[n]=o,n=i}this.ids[n]=t,this.values[n]=r}pop(){if(this.length===0)return;let t=this.ids,r=this.values,n=t[0],i=--this.length;if(i>0){let o=t[i],a=r[i],u=0,f=i>>1;for(;u<f;){let s=(u<<1)+1,c=s+1,l=s+(+(c<i)&+(r[c]<r[s]));if(r[l]>=a)break;t[u]=t[l],r[u]=r[l],u=l}t[u]=o,r[u]=a}return n}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}};var $0=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Qp=3,vi=class e{static from(t,r=0){if(r%8!==0)throw new Error("byteOffset must be 8-byte aligned.");if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[n,i]=new Uint8Array(t,r+0,2);if(n!==251)throw new Error("Data does not appear to be in a Flatbush format.");let o=i>>4;if(o!==Qp)throw new Error(`Got v${o} data when expected v${Qp}.`);let a=$0[i&15];if(!a)throw new Error("Unrecognized array type.");let[u]=new Uint16Array(t,r+2,1),[f]=new Uint32Array(t,r+4,1);return new e(f,u,a,void 0,t,r)}constructor(t,r=16,n=Float64Array,i=ArrayBuffer,o,a=0){if(t===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(t)||t<=0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.byteOffset=a;let u=t,f=u;this._levelBounds=[u*4];do u=Math.ceil(u/this.nodeSize),f+=u,this._levelBounds.push(f*4);while(u!==1);this.ArrayType=n,this.IndexArrayType=f<16384?Uint16Array:Uint32Array;let s=$0.indexOf(n),c=f*4*n.BYTES_PER_ELEMENT;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);if(o)this.data=o,this._boxes=new n(o,a+8,f*4),this._indices=new this.IndexArrayType(o,a+8+c,f),this._pos=f*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{let l=this.data=new i(8+c+f*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new n(l,8,f*4),this._indices=new this.IndexArrayType(l,8+c,f),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(l,0,2).set([251,(Qp<<4)+s]),new Uint16Array(l,2,1)[0]=r,new Uint32Array(l,4,1)[0]=t}this._queue=new Ba}add(t,r,n=t,i=r){let o=this._pos>>2,a=this._boxes;return this._indices[o]=o,a[this._pos++]=t,a[this._pos++]=r,a[this._pos++]=n,a[this._pos++]=i,t<this.minX&&(this.minX=t),r<this.minY&&(this.minY=r),n>this.maxX&&(this.maxX=n),i>this.maxY&&(this.maxY=i),o}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);let t=this._boxes;if(this.numItems<=this.nodeSize){t[this._pos++]=this.minX,t[this._pos++]=this.minY,t[this._pos++]=this.maxX,t[this._pos++]=this.maxY;return}let r=this.maxX-this.minX||1,n=this.maxY-this.minY||1,i=new Uint32Array(this.numItems),o=65535;for(let a=0,u=0;a<this.numItems;a++){let f=t[u++],s=t[u++],c=t[u++],l=t[u++],d=Math.floor(o*((f+c)/2-this.minX)/r),p=Math.floor(o*((s+l)/2-this.minY)/n);i[a]=xI(d,p)}eh(i,t,this._indices,0,this.numItems-1,this.nodeSize);for(let a=0,u=0;a<this._levelBounds.length-1;a++){let f=this._levelBounds[a];for(;u<f;){let s=u,c=t[u++],l=t[u++],d=t[u++],p=t[u++];for(let h=1;h<this.nodeSize&&u<f;h++)c=Math.min(c,t[u++]),l=Math.min(l,t[u++]),d=Math.max(d,t[u++]),p=Math.max(p,t[u++]);this._indices[this._pos>>2]=s,t[this._pos++]=c,t[this._pos++]=l,t[this._pos++]=d,t[this._pos++]=p}}}search(t,r,n,i,o){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4,u=[],f=[];for(;a!==void 0;){let s=Math.min(a+this.nodeSize*4,Z0(a,this._levelBounds));for(let c=a;c<s;c+=4){let l=this._boxes[c];if(n<l)continue;let d=this._boxes[c+1];if(i<d)continue;let p=this._boxes[c+2];if(t>p)continue;let h=this._boxes[c+3];if(r>h)continue;let m=this._indices[c>>2]|0;a>=this.numItems*4?u.push(m):(o===void 0||o(m,l,d,p,h))&&f.push(m)}a=u.pop()}return f}neighbors(t,r,n=1/0,i=1/0,o){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4,u=this._queue,f=[],s=i*i;e:for(;a!==void 0;){let c=Math.min(a+this.nodeSize*4,Z0(a,this._levelBounds));for(let l=a;l<c;l+=4){let d=this._indices[l>>2]|0,p=this._boxes[l],h=this._boxes[l+1],m=this._boxes[l+2],v=this._boxes[l+3],_=t<p?p-t:t>m?t-m:0,w=r<h?h-r:r>v?r-v:0,y=_*_+w*w;y>s||(a>=this.numItems*4?u.push(d<<1,y):(o===void 0||o(d))&&u.push((d<<1)+1,y))}for(;u.length&&u.peek()&1;)if(u.peekValue()>s||(f.push(u.pop()>>1),f.length===n))break e;a=u.length?u.pop()>>1:void 0}return u.clear(),f}};function Z0(e,t){let r=0,n=t.length-1;for(;r<n;){let i=r+n>>1;t[i]>e?n=i:r=i+1}return t[r]}function eh(e,t,r,n,i,o){if(Math.floor(n/o)>=Math.floor(i/o))return;let a=e[n],u=e[n+i>>1],f=e[i],s=f,c=Math.max(a,u);f>c?s=c:c===a?s=Math.max(u,f):c===u&&(s=Math.max(a,f));let l=n-1,d=i+1;for(;;){do l++;while(e[l]<s);do d--;while(e[d]>s);if(l>=d)break;wI(e,t,r,l,d)}eh(e,t,r,n,d,o),eh(e,t,r,d+1,i,o)}function wI(e,t,r,n,i){let o=e[n];e[n]=e[i],e[i]=o;let a=4*n,u=4*i,f=t[a],s=t[a+1],c=t[a+2],l=t[a+3];t[a]=t[u],t[a+1]=t[u+1],t[a+2]=t[u+2],t[a+3]=t[u+3],t[u]=f,t[u+1]=s,t[u+2]=c,t[u+3]=l;let d=r[n];r[n]=r[i],r[i]=d}function xI(e,t){let r=e^t,n=65535^r,i=65535^(e|t),o=e&(t^65535),a=r|n>>1,u=r>>1^r,f=i>>1^n&o>>1^i,s=r&i>>1^o>>1^o;r=a,n=u,i=f,o=s,a=r&r>>2^n&n>>2,u=r&n>>2^n&(r^n)>>2,f^=r&i>>2^n&o>>2,s^=n&i>>2^(r^n)&o>>2,r=a,n=u,i=f,o=s,a=r&r>>4^n&n>>4,u=r&n>>4^n&(r^n)>>4,f^=r&i>>4^n&o>>4,s^=n&i>>4^(r^n)&o>>4,r=a,n=u,i=f,o=s,f^=r&i>>8^n&o>>8,s^=n&i>>8^(r^n)&o>>8,r=f^f>>1,n=s^s>>1;let c=e^t,l=n|65535^(c|r);return c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,(l<<1|c)>>>0}var K0="bold 10px Courier New,monospace";function za(e,t,r=!1){return r?!0:Math.abs(e-t.lastInsertedX)>.5*Math.max(1,t.bpPerPx)}function Ua(e,t,r,n,i,o){e.spatialIndex.push(o),e.spatialIndexCoords.push(t,r,n,i),e.lastInsertedX=t}function Y0(e,t,r,n,i){let{ctx:o,scale:a}=e,u=e.rowHeight/2;o.beginPath(),o.fillStyle="black";for(let f=0,s=0,c=t.length;f<c;f++)if(r[f]!=="-"){if(t[f]==="-"){let l=n+a*s;o.moveTo(l,i+u),o.lineTo(l+a+.4,i+u)}s++}o.stroke()}var th=j(ht());function X0(e){return Object.fromEntries(Object.entries(rh(e)).map(([t,r])=>[t,e.palette.getContrastText(r)]))}function rh(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 J0(){let e=(0,th.measureText)("A"),t=(0,th.measureText)("M")-2;return{charWidth:e,charHeight:t}}function Q0(e,t,r,n,i){if(e.showAllLetters)return;let{ctx:o,scale:a,h:u,canvasWidth:f}=e;o.fillStyle="lightgrey";for(let s=0,c=0,l=t.length;s<l;s++)if(r[s]!=="-"){let d=t[s];if(r[s]===d&&d!==" "){let p=n+a*c;Zt(o,p,i,a+.4,u,f)}c++}}function ew(e,t,r,n,i,o,a,u){let{ctx:f,scale:s,h:c,canvasWidth:l,showAllLetters:d,mismatchRendering:p,colorForBase:h}=e;for(let m=0,v=0,_=t.length;m<_;m++){let w=t[m];if(r[m]!=="-"){if(w!=="-"){let y=n+s*v;r[m]!==w&&w!==" "?(Zt(f,y,i,s+.4,c,l,p?h[w]??"black":"orange"),za(y,e)&&Ua(e,y,i,y+e.scale+.4,i+e.h,{pos:v+a,chr:u,base:w,sampleId:o})):d&&(Zt(f,y,i,s+.4,c,l,p?h[w]??"black":"lightblue"),za(y,e)&&Ua(e,y,i,y+e.scale+.4,i+e.h,{pos:v+a,chr:u,base:w,sampleId:o}))}v++}}}function EI(e,t){return t?e.toUpperCase():e}function tw(e,t,r,n,i,o){let{ctx:a,scale:u,hp2:f,rowHeight:s,showAllLetters:c,mismatchRendering:l,contrastForBase:d,showAsUpperCase:p,charHeight:h}=e;if(u>=10){for(let m=0,v=0,_=t.length;m<_;m++)if(n[m]!=="-"){let w=i+u*v,y=(u-10)/2+1,x=t[m];(c||n[m]!==x)&&x!=="-"&&(a.fillStyle=l?d[x]??"white":"black",s>h&&a.fillText(EI(r[m]||"",p),w+y,f+o+3)),v++}}}var ow=j(ht());function aw(e,t,r,n,i,o,a,u,f){let{ctx:s,scale:c,h:l,canvasWidth:d,rowHeight:p,charHeight:h}=e;for(let m=0,v=0,_=t.length;m<_;m++){let w="";for(;r[m]==="-";)t[m]!=="-"&&t[m]!==" "&&(w+=t[m]),m++;if(w.length>0){let y=n+c*v-1,x,O;if(w.length>10){let E=`${w.length}`;if(o>10)x=y-1,O=2,Zt(s,x,i,O,l,d,"purple");else if(l>h){let P=(0,ow.measureText)(E,10),C=2;x=y-P/2-C,O=P+2*C,Zt(s,x,i,O,l,d,"purple"),s.fillStyle="white",s.fillText(E,y-P/2,i+l*7/8)}else{let P=2;x=y-P,O=2*P,Zt(s,x,i,O,l,d,"purple")}}else{x=y,O=1,Zt(s,x,i,O,l,d,"purple");let E=2;x=y-E,O=1+2*E,o<.2&&p>5&&(Zt(s,y-2,i,5,1,d),Zt(s,y-2,i+l-1,5,1,d))}let M=w.length>10;za(x,e,!0)&&Ua(e,x,i,x+O,i+e.h,{pos:v+u,chr:f,base:w,sampleId:a,isInsertion:!0,isLargeInsertion:M})}v++}}var uw=j(ht());function sw(e,t,r,n,i){let[o]=(0,uw.featureSpanPx)(e,t,r),a=e.get("alignments"),u=e.get("seq").toLowerCase();for(let[f,s]of Object.entries(a)){let c=n.get(f);if(c===void 0)continue;let l=s.seq,d=l.toLowerCase(),p=i.offset+i.rowHeight*c;Y0(i,d,u,o,p),Q0(i,d,u,o,p),ew(i,d,u,o,p,c,s.start,s.chr),tw(i,d,l,u,o,p),aw(i,d,u,o,p,r,c,s.start,s.chr)}}function lw({ctx:e,renderArgs:t}){let{regions:r,bpPerPx:n,rowHeight:i,showAllLetters:o,theme:a,mismatchRendering:u,samples:f,rowProportion:s,features:c,showAsUpperCase:l}=t,d=r[0],p=(d.end-d.start)/n,h=i*s,m=(0,cw.createJBrowseTheme)(a),v=rh(m),_=X0(m),w=new Map(f.map((R,L)=>[R.id,L])),y=1/n,x=h/2,O=(i-h)/2,{charWidth:M,charHeight:E}=J0();e.font=K0;let P={ctx:e,scale:y,bpPerPx:n,canvasWidth:p,rowHeight:i,h,hp2:x,offset:O,colorForBase:v,contrastForBase:_,showAllLetters:o,mismatchRendering:u,showAsUpperCase:l,charWidth:M,charHeight:E,spatialIndex:[],spatialIndexCoords:[],lastInsertedX:-1/0};for(let R of c.values())sw(R,d,n,w,P);let C=new vi(P.spatialIndex.length||1);if(P.spatialIndex.length===0)C.add(0,0,1,1);else for(let R=0,L=P.spatialIndexCoords.length;R<L;R+=4)C.add(P.spatialIndexCoords[R],P.spatialIndexCoords[R+1],P.spatialIndexCoords[R+2],P.spatialIndexCoords[R+3]);return C.finish(),{flatbush:C.data,items:P.spatialIndex,samples:f}}var Wa=class extends fw.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],f=o.length*a+100,s=(u.end-u.start)/i,c=await this.getFeatures(t),l=await(0,Zs.updateStatus)("Rendering alignment",r,()=>(0,Zs.renderToAbstractCanvas)(s,f,t,p=>lw({ctx:p,renderArgs:{...t,features:c}})));return{...await super.render({...t,...l,width:s,height:f}),...l,features:new Map,width:s,height:f,containsNoTransferables:!0}}};var sr=j(Fe()),dw=j(gr());var pw=j(er()),PI=(0,pw.observer)(function(e){let{items:t,displayModel:r,height:n,samples:i,flatbush:o}=e,a=(0,sr.useRef)(null),u=(0,sr.useMemo)(()=>vi.from(o),[o]),[f,s]=(0,sr.useState)(!1),c=(0,sr.useCallback)((l,d)=>{let p=0,h=0;if(a.current){let v=a.current.getBoundingClientRect();p=l-v.left,h=d-v.top}let m=u.search(p,h,p+1,h+1);if(m.length){let v=m.find(y=>t[y]?.isInsertion),_=v!==void 0?t[v]:t[m[0]],w=i[_.sampleId];return{..._,sampleId:w?.id??"unknown",sampleLabel:w?.label||w?.id||"unknown"}}else return},[u,t,i]);return sr.default.createElement("div",{ref:a,onClick:l=>{let d=c(l.clientX,l.clientY);d?.isLargeInsertion&&r.showInsertionSequenceDialog?.({sequence:d.base,sampleLabel:d.sampleLabel,chr:d.chr,pos:d.pos})},onMouseMove:l=>{let d=c(l.clientX,l.clientY);r.setHoveredInfo?.(d),r.setHighlightedRowNames?.(d?.sampleId?[d.sampleId]:void 0),s(!!d?.isLargeInsertion)},onMouseLeave:()=>{r.setHoveredInfo?.(void 0),r.setHighlightedRowNames?.(void 0),s(!1)},style:{overflow:"visible",position:"relative",height:n,cursor:f?"pointer":"default"}},sr.default.createElement(dw.PrerenderedCanvas,{...e,style:{position:"absolute",left:0}}))}),hw=PI;var mw=j(ii());var MI=(0,mw.ConfigurationSchema)("LinearMafRenderer",{baseColor:{type:"color",defaultValue:"lightgrey"}},{explicitlyTyped:!0}),vw=MI;function ih(e){e.addRendererType(()=>new Wa({name:"LinearMafRenderer",ReactComponent:hw,configSchema:vw,pluginManager:e}))}var _w=j(rn()),yw=j(mt());var ge=j(Fe()),Hr=j(gr()),po=j(ht()),Ue=j(oi()),bw=j(mt()),gw=j(on()),CI=(0,gw.makeStyles)()(e=>({textbox:{width:"100%"},paper:{margin:e.spacing(),padding:e.spacing()},submit:{marginTop:25,marginBottom:100,display:"block"}}));function oh({model:e}){let{classes:t}=CI(),[r,n]=(0,ge.useState)(""),[i,o]=(0,ge.useState)(),[a,u]=(0,ge.useState)(),[f,s]=(0,ge.useState)(),[c,l]=(0,ge.useState)(),[d,p]=(0,ge.useState)("MAF track"),[h,m]=(0,ge.useState)("BigMafAdapter"),[v,_]=(0,ge.useState)("TBI"),w=(0,bw.getRoot)(e);return ge.default.createElement(Ue.Paper,{className:t.paper},ge.default.createElement(Ue.Paper,null,c?ge.default.createElement(Hr.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:y=>{m(y.target.value)}},["BigMafAdapter","MafTabixAdapter"].map(y=>ge.default.createElement(Ue.FormControlLabel,{key:y,value:y,control:ge.default.createElement(Ue.Radio,null),checked:h===y,label:y})))),h==="BigMafAdapter"?ge.default.createElement(Hr.FileSelector,{location:i,name:"Path to bigMaf",rootModel:w,setLocation:y=>{o(y)}}):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=>{_(y.target.value)}},["TBI","CSI"].map(y=>ge.default.createElement(Ue.FormControlLabel,{key:y,value:y,control:ge.default.createElement(Ue.Radio,null),checked:v===y,label:y})))),ge.default.createElement(Hr.FileSelector,{location:i,name:"Path to MAF tabix",rootModel:w,setLocation:y=>{o(y)}}),ge.default.createElement(Hr.FileSelector,{location:a,name:"Path to MAF tabix index",rootModel:w,setLocation:y=>{u(y)}})):ge.default.createElement(ge.default.Fragment,null,ge.default.createElement(Hr.FileSelector,{location:i,name:"Path to TAF.gz (Bgzipped TAF)",rootModel:w,setLocation:y=>{o(y)}}),ge.default.createElement(Hr.FileSelector,{location:a,name:"Path to TAF.gz.tai (TAF index)",rootModel:w,setLocation:y=>{u(y)}}))),ge.default.createElement("div",null,ge.default.createElement(Hr.FileSelector,{location:f,name:"Path to newick tree (.nh)",rootModel:w,setLocation:y=>{s(y)}}),ge.default.createElement(Ue.TextField,{multiline:!0,rows:10,value:r,onChange:y=>{n(y.target.value)},helperText:"Sample names (optional if .nh supplied, required if not)",placeholder:"Enter sample names from the MAF file, one per line, or JSON formatted array of samples",variant:"outlined",fullWidth:!0})),ge.default.createElement(Ue.TextField,{value:d,helperText:"Track name",onChange:y=>{p(y.target.value)}}),ge.default.createElement(Ue.Button,{variant:"contained",className:t.submit,onClick:()=>{try{let y=(0,po.getSession)(e),x=[];try{x=JSON.parse(r)}catch{x=r.split(/\n|\r\n|\r/)}let O=[`${d.toLowerCase().replaceAll(" ","_")}-${Date.now()}`,y.adminMode?"":"-sessionTrack"].join("");(0,po.isSessionWithAddTracks)(y)&&(y.addTrackConf({trackId:O,type:"MafTrack",name:d,assemblyNames:[e.assembly],adapter:h==="BigMafAdapter"?{type:h,bigBedLocation:i,samples:x,nhLocation:f}:h==="MafTabixAdapter"?{type:h,bedGzLocation:i,nhLocation:f,index:{indexType:v,location:a},samples:x}:{type:h,tafGzLocation:i,taiLocation:a,nhLocation:f,samples:x}}),e.view?.showTrack(O)),e.clearData(),(0,po.isSessionModelWithWidgets)(y)&&y.hideWidget(e)}catch(y){l(y)}}},"Submit"))}function ah(e){e.addAddTrackWorkflowType(()=>new _w.AddTrackWorkflowType({name:"MAF track",ReactComponent:oh,stateModel:yw.types.model({})}))}var aP=j(_b()),uP=j(Tb()),Yu=class extends uP.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:f}=await(0,aP.getAdapter)(n,u,a);return f.getSamples(o,i)}};function Pb(e){e.addRpcMethod(()=>new Yu(e))}var cP=j(_b()),lP=j(Tb());function sP({regions:e,showAllLetters:t,samples:r,features:n}){let i=e[0],o=new Map(r.map((f,s)=>[f.id,s])),a=i.end-i.start,u=r.map(()=>new Array(a).fill("-"));for(let f of n.values()){let s=f.get("start"),c=f.get("alignments"),l=f.get("seq");for(let[d,p]of Object.entries(c)){let h=p.seq,m=o.get(d);if(m===void 0)continue;let v=u[m];for(let _=0,w=0,y=h.length;_<y;_++)if(l[_]!=="-"){let x=h[_],O=s+w-i.start;O>=0&&O<a&&(x==="-"?v[O]="-":x!==" "&&(t?v[O]=x:l[_]===x?v[O]=".":v[O]=x)),w++}}}return u.map(f=>f.join(""))}var Xu=class extends lP.default{name="MafGetSequences";async execute(t,r){let n=await this.deserializeArguments(t,r),{samples:i,regions:o,adapterConfig:a,sessionId:u,showAllLetters:f}=n,s=(await(0,cP.getAdapter)(this.pluginManager,u,a)).dataAdapter,c=await ri(s.getFeatures(o[0],n).pipe(ni()));return sP({features:new Map(c.map(l=>[l.id(),l])),samples:i,regions:o,showAllLetters:f})}};function Mb(e){e.addRpcMethod(()=>new Xu(e))}var vP=j(rn());var fP=j(Bd()),ba=j(ht()),dP=j(zd()),pP=j(Ud()),hP=j(mt());var Ju=class extends fP.BaseFeatureDataAdapter{setupP;async setupPre(){if(!this.getSubAdapter)throw new Error("no getSubAdapter available");return{adapter:(await this.getSubAdapter({...(0,hP.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,ba.updateStatus)("Downloading index",r,()=>this.setupPre2())}async getRefNames(t){let{adapter:r}=await this.setup(t);return r.getRefNames()}async getHeader(t){let{adapter:r}=await this.setup(t);return r.getHeader()}getFeatures(t,r){let{statusCallback:n=()=>{}}=r||{};return(0,pP.ObservableCreate)(async i=>{let{adapter:o}=await this.setup(r),a=await(0,ba.updateStatus)("Downloading alignments",n,()=>ri(o.getFeatures(t).pipe(ni())));await(0,ba.updateStatus)("Processing alignments",n,()=>{let u="",f=this.getConf("refAssemblyName");for(let s of a){let c=s.get("field5").split(","),l={},d=c.length;for(let p=0;p<d;p++){let m=c[p].split(":"),[v,_,w,y,x,O]=m;if(!v||!O)continue;let M,E,P=v.indexOf(".");if(P===-1)M=v,E="";else{let C=v.indexOf(".",P+1);if(C===-1)M=v.slice(0,Math.max(0,P)),E=v.slice(Math.max(0,P+1));else{let R=v.slice(P+1,C);R.length>0&&!Number.isNaN(+R)?(M=v.slice(0,Math.max(0,C)),E=v.slice(Math.max(0,C+1))):(M=v.slice(0,Math.max(0,P)),E=v.slice(Math.max(0,P+1)))}}M&&(u||(u=M),l[M]={chr:E,start:+_,srcSize:+w,strand:y==="-"?-1:1,unknown:+x,seq:O})}i.next(new ba.SimpleFeature({id:s.id(),data:{start:s.get("start"),end:s.get("end"),refName:s.get("refName"),name:s.get("name"),score:s.get("score"),alignments:l,seq:l[f||t.assemblyName]?.seq||l[u]?.seq}}))}}),i.complete()})}async getSamples(t){let r=this.getConf("nhLocation"),n=r.uri==="/path/to/my.nh"?void 0:await(0,dP.openLocation)(r).readFile("utf8");return{samples:Zi(this.getConf("samples")),tree:n?Sa(n):void 0}}freeResources(){}};var Cb=j(ii());var qZ=(0,Cb.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,Cb.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}),mP=qZ;function Ib(e){return e.addAdapterType(()=>new vP.AdapterType({name:"MafTabixAdapter",AdapterClass:Ju,configSchema:mP}))}var Ld=j(rn());var bP=j(ii()),gP=j(rn());function kb(e){return(0,bP.ConfigurationSchema)("MafTrack",{},{baseConfiguration:(0,gP.createBaseTrackConfig)(e),explicitIdentifier:"trackId"})}function qb(e){return e.addTrackType(()=>{let t=kb(e);return new Ld.TrackType({name:"MafTrack",configSchema:t,displayName:"MAF track",stateModel:(0,Ld.createBaseTrackModel)(e,"MafTrack",t)})})}var Nd=class extends _P.default{name="MafViewerPlugin";version=zb;install(t){Qd(t),qb(t),Jp(t),ih(t),Ib(t),ah(t),Mb(t),Pb(t)}configure(t){}};return Nb(jZ);})();
|
|
9
9
|
/*! Bundled license information:
|
|
10
10
|
|
|
11
11
|
tabbable/dist/index.esm.js:
|
|
12
12
|
(*!
|
|
13
|
-
* tabbable 6.
|
|
13
|
+
* tabbable 6.3.0
|
|
14
14
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
15
15
|
*)
|
|
16
16
|
|