@nfdi4plants/swate-components
Version:
Customizable React components for ontology annotation, based on Swate and the ARC.
5 lines • 163 kB
JavaScript
(function(Et,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],S):(Et=typeof globalThis<"u"?globalThis:Et||self,S(Et["@nfdi4plants/swate-components"]={},Et.React,Et.ReactDOM))})(this,function(Et,S,ka){"use strict";function $a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Fn=$a(S);function It(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Na(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function Aa(e){return e!=null&&typeof e.GetEnumerator=="function"}function Ma(e){return e!=null&&typeof e.CompareTo=="function"}function Oa(e){return e!=null&&typeof e.Equals=="function"}function Bi(e){return e!=null&&typeof e.GetHashCode=="function"}function Ra(e){return e!=null&&typeof e.Dispose=="function"}function le(e){Ra(e)&&e.Dispose()}function P(){return null}function cs(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}class Fa{constructor(t){this.iter=t,this.current=P()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this.iter.next();return this.current=t.value,!t.done}"System.Collections.IEnumerator.Reset"(){throw new Error("JS iterators cannot be reset")}Dispose(){}}function te(e){return Aa(e)?e.GetEnumerator():new Fa(e[Symbol.iterator]())}function Pn(e){return{next(){const t=e["System.Collections.IEnumerator.MoveNext"](),n=t?e["System.Collections.Generic.IEnumerator`1.get_Current"]():void 0;return{done:!t,value:n}}}}class Re{constructor(t){this.factory=t,this.isValueCreated=!1}get Value(){return this.isValueCreated||(this.createdValue=this.factory(),this.isValueCreated=!0),this.createdValue}get IsValueCreated(){return this.isValueCreated}}function pe(e,t){return e.toString(10).padStart(t,"0")}function Gi(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}function Li(e,t){return e=e,e.toString(t)}function Pa(e,t){return e=e,e.toString(t)}let fs=class as{static id(t){return as.idMap.has(t)||as.idMap.set(t,++as.count),as.idMap.get(t)}};fs.idMap=new WeakMap,fs.count=0;function hs(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function wr(e){return e*2654435761|0}function ji(e){return hs(e.toString(32))}function Dn(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const s=e[r];t=(t<<5)+t^s}return t}function Da(e){if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return wr(e);case"bigint":return ji(e);case"string":return hs(e);default:return wr(fs.id(e))}}function xa(e){return Bi(e)?e.GetHashCode():Da(e)}function Ba(e){return e.getTime()}function Ga(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=Ge(e[r]);return Dn(n)}function Ge(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return wr(e);case"bigint":return ji(e);case"string":return hs(e);default:{if(Bi(e))return e.GetHashCode();if(It(e))return Ga(e);if(e instanceof Date)return Ba(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>Ge(r));return Dn(n)}else return wr(fs.id(e))}}}function mo(e){return xa(e)}function po(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Hi(e,t){return po(e,t,Q)}function La(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let s=0;s<n.length;s++)if(n[s]!==r[s]||!Q(e[n[s]],t[r[s]]))return!1;return!0}function Q(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:Oa(e)?e.Equals(t):It(e)?It(t)&&Hi(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&Vi(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&La(e,t)}function Vi(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+Gi(e),r=t.getTime()+Gi(t)),n===r?0:n<r?-1:1}function jt(e,t){return e===t?0:e<t?-1:1}function ja(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,s=0;r<e.length;r++)if(s=n(e[r],t[r]),s!==0)return s;return 0}function Ui(e,t){return ja(e,t,ft)}function Ha(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let s=0,o=0;s<n.length;s++){const i=n[s];if(i!==r[s])return i<r[s]?-1:1;if(o=ft(e[i],t[i]),o!==0)return o}return 0}function ft(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:Ma(e)?e.CompareTo(t):It(e)?It(t)?Ui(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?Vi(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?Ha(e,t):-1}function V(e){const t={};for(const n of e)t[n[0]]=n[1];return t}function Va(e,t=0){const n=Math.pow(10,t),r=+(t?e*n:e).toFixed(8),s=Math.floor(r),o=r-s,i=1e-8,u=o>.5-i&&o<.5+i?s%2===0?s:s+1:Math.round(r);return t?u/n:u}const qi=new WeakMap;function Ua(e){if(e==null)return null;const t=(n,r)=>e(n)(r);return qi.set(t,e),t}function qa(e){return qi.get(e)??(t=>n=>e(t,n))}function Ja(e){let t=0,n="[";for(const r of e){if(t===0)n+=Le(r);else if(t===100){n+="; ...";break}else n+="; "+Le(r);t++}return n+"]"}function Le(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return Ja(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,o])=>s+" = "+Le(o,t+1)).join(`
`)+" }":(r==null?void 0:r.name)??""}}return String(e)}function za(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=Le(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>Le(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}let kt=class{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return za(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>Ge(n));return t.splice(0,0,wr(this.tag)),Dn(t)}Equals(t){return this===t?!0:cs(this,t)&&this.tag===t.tag?Hi(this.fields,t.fields):!1}CompareTo(t){return this===t?0:cs(this,t)?this.tag===t.tag?Ui(this.fields,t.fields):this.tag<t.tag?-1:1:-1}};function Wa(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function Ka(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+Le(n)).join(`
`)+" }"}function Za(e){const t=Object.values(e).map(n=>Ge(n));return Dn(t)}function Qa(e,t){if(e===t)return!0;if(cs(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Q(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function Xa(e,t){if(e===t)return 0;if(cs(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=ft(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}let pt=class{toJSON(){return Wa(this)}toString(){return Ka(this)}GetHashCode(){return Za(this)}Equals(t){return Qa(this,t)}CompareTo(t){return Xa(this,t)}};class zt{get contents(){return this.getter()}set contents(t){this.setter(t)}constructor(t,n){typeof n=="function"?(this.getter=t,this.setter=n):(this.getter=()=>t,this.setter=r=>{t=r})}}class Ya{constructor(t){this.message=t}}function ec(e){return e instanceof Ya||e instanceof Error}function tc(e){return e instanceof Promise}function ds(e){return ec(e)||tc(e)?e:new Error(String(e))}var he={},nc=28,rc=1,xn=1e6,sc=1e6,oc=-29,ic=29,lc=!1,Cr="[big.js] ",mn=Cr+"Invalid ",ms=mn+"decimal places",uc=mn+"rounding mode",Ji=Cr+"Division by zero",$t=void 0,ac=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function zi(){function e(t){var n=this;if(!(n instanceof e))return t===$t?zi():new e(t);if(t instanceof e)n.s=t.s,n.e=t.e,n.c=t.c.slice(),cc(n);else{if(typeof t!="string"){if(e.strict===!0)throw TypeError(mn+"number");t=t===0&&1/t<0?"-0":String(t)}fc(n,t)}n.constructor=e}return e.prototype=he,e.DP=nc,e.RM=rc,e.NE=oc,e.PE=ic,e.strict=lc,e}function cc(e){if(e.c.length>1&&!e.c[0]){let t=e.c.findIndex(n=>n);e.c=e.c.slice(t),e.e=e.e-t}}function fc(e,t){var n,r,s;if(!ac.test(t))throw Error(mn+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),s=t.length,r=0;r<n&&r<s&&t.charAt(r)=="0";)++r;if(r==s)e.c=[e.e=0];else for(e.e=n-r-1,e.c=[],n=0;r<s;)e.c[n++]=+t.charAt(r++);return e=Wt(e,je.DP+1,je.RM),e}function Wt(e,t,n,r){var s=e.c;if(n===$t&&(n=je.RM),n!==0&&n!==1&&n!==2&&n!==3)throw Error(uc);if(t<1)r=n===3&&(r||!!s[0])||t===0&&(n===1&&s[0]>=5||n===2&&(s[0]>5||s[0]===5&&(r||s[1]!==$t))),s.length=1,r?(e.e=e.e-t+1,s[0]=1):s[0]=e.e=0;else if(t<s.length){const o=s.findIndex((i,u)=>u>=t&&i>0)<0;if(r=n===1&&s[t]>=5||n===2&&(s[t]>5||s[t]===5&&(r||s[t+1]!==$t||s[t-1]&1))||n===3&&(r||!o),s.length=t--,r)for(;++s[t]>9;)s[t]=0,t--||(++e.e,s.unshift(1));for(t=s.length;!s[--t];)s.pop()}return e}function Bn(e,t,n){var r=e.e,s=e.c.join(""),o=s.length;if(t)s=s.charAt(0)+(o>1?"."+s.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)s="0"+s;s="0."+s}else if(r>0)if(++r>o)for(r-=o;r--;)s+="0";else r<o&&(s=s.slice(0,r)+"."+s.slice(r));else o>1&&(s=s.charAt(0)+"."+s.slice(1));return e.s<0&&n?"-"+s:s}he.abs=function(){var e=new this.constructor(this);return e.s=1,e},he.cmp=function(s){var t,n=this.constructor,r=new n(this),s=new n(s),o=r.c,i=s.c,u=r.s,l=s.s,a=r.e,c=s.e;if(!o[0]||!i[0])return o[0]?u:i[0]?-l:0;if(u!=l)return u;if(t=u<0,a!=c)return a>c^t?1:-1;for(l=Math.max(o.length,i.length),u=0;u<l;u++)if(a=u<o.length?o[u]:0,c=u<i.length?i[u]:0,a!=c)return a>c^t?1:-1;return 0},he.div=function(r){var t=this.constructor,n=new t(this),r=new t(r),s=n.c,o=r.c,i=n.s==r.s?1:-1,u=t.DP;if(u!==~~u||u<0||u>xn)throw Error(ms);if(!o[0])throw Error(Ji);if(!s[0])return r.s=i,r.c=[r.e=0],r;var l,a,c,m,p,w=o.slice(),y=l=o.length,k=s.length,b=s.slice(0,l),v=b.length,D=r,x=D.c=[],X=0,ee=u+(D.e=n.e-r.e)+1;for(D.s=i,i=ee<0?0:ee,w.unshift(0);v++<l;)b.push(0);do{for(c=0;c<10;c++){if(l!=(v=b.length))m=l>v?1:-1;else for(p=-1,m=0;++p<l;)if(o[p]!=b[p]){m=o[p]>b[p]?1:-1;break}if(m<0){for(a=v==l?o:w;v;){if(b[--v]<a[v]){for(p=v;p&&!b[--p];)b[p]=9;--b[p],b[v]+=10}b[v]-=a[v]}for(;!b[0];)b.shift()}else break}x[X++]=m?c:++c,b[0]&&m?b[v]=s[y]||0:b=[s[y]]}while((y++<k||b[0]!==$t)&&i--);return!x[0]&&X!=1&&(x.shift(),D.e--,ee--),X>ee&&Wt(D,ee,t.RM,b[0]!==$t),D},he.eq=function(e){return this.cmp(e)===0},he.gt=function(e){return this.cmp(e)>0},he.gte=function(e){return this.cmp(e)>-1},he.lt=function(e){return this.cmp(e)<0},he.lte=function(e){return this.cmp(e)<1},he.minus=he.sub=function(u){var t,n,r,s,o=this.constructor,i=new o(this),u=new o(u),l=i.s,a=u.s;if(l!=a)return u.s=-a,i.plus(u);var c=i.c.slice(),m=i.e,p=u.c,w=u.e;if(!c[0]||!p[0])return p[0]?u.s=-a:c[0]?u=new o(i):u.s=1,u;if(l=m-w){for((s=l<0)?(l=-l,r=c):(w=m,r=p),r.reverse(),a=l;a--;)r.push(0);r.reverse()}else for(n=((s=c.length<p.length)?c:p).length,l=a=0;a<n;a++)if(c[a]!=p[a]){s=c[a]<p[a];break}if(s&&(r=c,c=p,p=r,u.s=-u.s),(a=(n=p.length)-(t=c.length))>0)for(;a--;)c[t++]=0;for(a=t;n>l;){if(c[--n]<p[n]){for(t=n;t&&!c[--t];)c[t]=9;--c[t],c[n]+=10}c[n]-=p[n]}for(;c[--a]===0;)c.pop();for(;c[0]===0;)c.shift(),--w;return c[0]||(u.s=1,c=[w=0]),u.c=c,u.e=w,u},he.mod=function(s){var t,n=this.constructor,r=new n(this),s=new n(s),o=r.s,i=s.s;if(!s.c[0])throw Error(Ji);return r.s=s.s=1,t=s.cmp(r)==1,r.s=o,s.s=i,t?new n(r):(o=n.DP,i=n.RM,n.DP=n.RM=0,r=r.div(s),n.DP=o,n.RM=i,this.minus(r.times(s)))},he.plus=he.add=function(i){var t,n,r,s=this.constructor,o=new s(this),i=new s(i);if(o.s!=i.s)return i.s=-i.s,o.minus(i);var u=o.e,l=o.c,a=i.e,c=i.c;if(!l[0]||!c[0])return c[0]||(l[0]?i=new s(o):i.s=o.s),i;if(l=l.slice(),t=u-a){for(t>0?(a=u,r=c):(t=-t,r=l),r.reverse();t--;)r.push(0);r.reverse()}for(l.length-c.length<0&&(r=c,c=l,l=r),t=c.length,n=0;t;l[t]%=10)n=(l[--t]=l[t]+c[t]+n)/10|0;for(n&&(l.unshift(n),++a),t=l.length;l[--t]===0;)l.pop();return i.c=l,i.e=a,i},he.pow=function(e){var t=this.constructor,n=new t(this),r=new t("1"),s=new t("1"),o=e<0;if(e!==~~e||e<-1e6||e>sc)throw Error(mn+"exponent");for(o&&(e=-e);e&1&&(r=r.times(n)),e>>=1,!!e;)n=n.times(n);return o?s.div(r):r},he.prec=function(e,t){if(e!==~~e||e<1||e>xn)throw Error(mn+"precision");return Wt(new this.constructor(this),e,t)},he.round=function(e,t){if(e===$t)e=0;else if(e!==~~e||e<-1e6||e>xn)throw Error(ms);return Wt(new this.constructor(this),e+this.e+1,t)},he.sqrt=function(){var e,t,n,r=this.constructor,s=new r(this),o=s.s,i=s.e,u=new r("0.5");if(!s.c[0])return new r(s);if(o<0)throw Error(Cr+"No square root");o=Math.sqrt(s+""),o===0||o===1/0?(t=s.c.join(""),t.length+i&1||(t+="0"),o=Math.sqrt(t),i=((i+1)/2|0)-(i<0||i&1),e=new r((o==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+i)):e=new r(o+""),i=e.e+(r.DP+=4);do n=e,e=u.times(n.plus(s.div(n)));while(n.c.slice(0,i).join("")!==e.c.slice(0,i).join(""));return Wt(e,(r.DP-=4)+e.e+1,r.RM)},he.times=he.mul=function(s){var t,n=this.constructor,r=new n(this),s=new n(s),o=r.c,i=s.c,u=o.length,l=i.length,a=r.e,c=s.e;if(s.s=r.s==s.s?1:-1,!o[0]||!i[0])return s.c=[s.e=0],s;for(s.e=a+c,u<l&&(t=o,o=i,i=t,c=u,u=l,l=c),t=new Array(c=u+l);c--;)t[c]=0;for(a=l;a--;){for(l=0,c=u+a;c>a;)l=t[c]+i[a]*o[c-a-1]+l,t[c--]=l%10,l=l/10|0;t[c]=l}for(l?++s.e:t.shift(),a=t.length;!t[--a];)t.pop();return s.c=t,s},he.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==$t){if(e!==~~e||e<0||e>xn)throw Error(ms);for(n=Wt(new n.constructor(n),++e,t);n.c.length<e;)n.c.push(0)}return Bn(n,!0,!!r)},he.toFixed=function(e,t){var n=this,r=n.c[0];if(e!==$t){if(e!==~~e||e<0||e>xn)throw Error(ms);for(n=Wt(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length<e;)n.c.push(0)}return Bn(n,!1,!!r)},he.toJSON=he.toString=function(){var e=this,t=e.constructor;return Bn(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},he.toNumber=function(){var e=Number(Bn(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(Cr+"Imprecise conversion");return e},he.toPrecision=function(e,t){var n=this,r=n.constructor,s=n.c[0];if(e!==$t){if(e!==~~e||e<1||e>xn)throw Error(mn+"precision");for(n=Wt(new r(n),e,t);n.c.length<e;)n.c.push(0)}return Bn(n,e<=n.e||n.e<=r.NE||n.e>=r.PE,!!s)},he.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(Cr+"valueOf disallowed");return Bn(e,e.e<=t.NE||e.e>=t.PE,!0)};var je=zi();const pn=Symbol("numeric");function Wi(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[pn])}function hc(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function go(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[pn]().multiply(t)}function ps(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[pn]().toFixed(t)}function gs(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[pn]().toPrecision(t)}function ys(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[pn]().toExponential(t)}function _s(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[pn]().toHex()}je.prototype.GetHashCode=function(){return Dn([this.s,this.e].concat(this.c))},je.prototype.Equals=function(e){return!this.cmp(e)},je.prototype.CompareTo=function(e){return this.cmp(e)},je.prototype[pn]=function(){const e=this;return{multiply:t=>e.mul(t),toPrecision:t=>e.toPrecision(t),toExponential:t=>e.toExponential(t),toFixed:t=>e.toFixed(t),toHex:()=>(Number(e)>>>0).toString(16)}},new je(0),new je(1),new je(-1),new je("79228162514264337593543950335"),new je("-79228162514264337593543950335");function dc(e){return e.toString()}function mc(e,t){const n=new Uint8Array(t*301/1e3+1|0);let r=1;for(let s=e.length-1;s>=0;s--){let o=e[s];for(let i=0;i<r;i++){const u=n[i]*16+o|0;n[i]=u%10|0,o=u/10|0}for(;o>0;)n[r++]=o%10|0,o=o/10|0}return n.slice(0,r)}function yo(e,t,n){for(let r=0;r<8;r++)e[n+r]=t>>r*4&15}function pc(e,t,n,r,s){const i=new Uint8Array(24);yo(i,e,0),yo(i,t,8),yo(i,n,16);const u=mc(i,96);s=s&127;const l=new je(0);return l.c=Array.from(u.reverse()),l.e=u.length-s-1,l.s=r?-1:1,new je(l)}let _o=class{constructor(t,n,r,s,o,i,u){this.fullname=t,this.generics=n,this.construct=r,this.parent=s,this.fields=o,this.cases=i,this.enumCases=u}toString(){return Se(this)}GetHashCode(){return Ki(this)}Equals(t){return ws(this,t)}};function He(e){return e.generics!=null?e.generics:[]}function Ki(e){const t=hs(e.fullname),n=He(e).map(Ki);return Dn([t,...n])}function ws(e,t){return e.fullname===""?t.fullname===""&&po(br(e),br(t),([n,r],[s,o])=>n===s&&ws(r,o)):e.fullname===t.fullname&&po(He(e),He(t),ws)}function ke(e){if(Array.isArray(e))return e[0];if(e instanceof _o){const t=Cs(e);if(t!=null)return ke(t)+"[]";{const n=e.fullname.lastIndexOf(".");return n===-1?e.fullname:e.fullname.substr(n+1)}}else return e.name}function Se(e){const t=Cs(e);return t!=null?Se(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Se(n)).join(",")+"]"}function gc(e){return Cs(e)!=null}function Cs(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function yc(e){return e.generics!=null&&e.generics.length>0}function _c(e){return e.enumCases!=null&&e.enumCases.length>0}function wc(e){var t;return(t=e.generics)==null?void 0:t[0]}function Zi(e){if(e.cases!=null)return e.cases();throw new Error(`${e.fullname} is not an F# union type`)}function br(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Cc(e){if(Xi(e)&&e.generics!=null)return e.generics;throw new Error(`${e.fullname} is not a tuple type`)}function Qi(e){if(bs(e)&&e.generics!=null){const t=e.generics;return[t[0],t[1]]}else throw new Error(`${e.fullname} is not an F# function type`)}function bc(e){return e instanceof _o?e.cases!=null:e instanceof kt}function Sc(e){return e instanceof _o?e.fields!=null:e instanceof pt}function Xi(e){return e.fullname.startsWith("System.Tuple")}function bs(e){return e.fullname==="Microsoft.FSharp.Core.FSharpFunc`2"}function Tc(e,t){const r=Zi(t)[e.tag];if(r==null)throw new Error(`Cannot find case ${e.name} in union type`);return[r,e.fields]}function vc(e){return e.fields==null?[]:e.fields}function Ec(e,t){return e[t[0]]}function Nt(e,t){const n=(e.fields||[]).length;if(t.length!==n)throw new Error(`Expected an array of length ${n} but got ${t.length}`);const r=e.declaringType.construct;return r==null?{}:(e.declaringType.cases?e.declaringType.cases().length==1:!1)?new r(...t):new r(e.tag,t)}function Yi(e,t){const n=br(e);if(n.length!==t.length)throw new Error(`Expected an array of length ${n.length} but got ${t.length}`);return e.construct!=null?new e.construct(...t):n.reduce((r,[s,o],i)=>(r[s]=t[i],r),{})}function Sr(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Ic(e){return e!=null&&typeof e.CompareTo=="function"}function kc(e){return e!=null&&typeof e.Equals=="function"}function $c(e){return e!=null&&typeof e.GetHashCode=="function"}function Ss(e,t){var n,r;return((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===((r=Object.getPrototypeOf(t))==null?void 0:r.constructor)}function el(e,t){return e.toString(10).padStart(t,"0")}function tl(e){const t=e;return typeof t.offset=="number"?t.offset:e.kind===1?0:e.getTimezoneOffset()*-6e4}class Kt{static id(t){return Kt.idMap.has(t)||Kt.idMap.set(t,++Kt.count),Kt.idMap.get(t)}}Kt.idMap=new WeakMap,Kt.count=0;function wo(e){let t=0,n=5381;const r=e.length;for(;t<r;)n=n*33^e.charCodeAt(t++);return n}function Co(e){return e*2654435761|0}function Nc(e){return wo(e.toString(32))}function Tr(e){let t=0;const n=e.length;for(let r=0;r<n;r++){const s=e[r];t=(t<<5)+t^s}return t}function Ac(e){return e.getTime()}function Mc(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r++)n[r]=vr(e[r]);return Tr(n)}function vr(e){var t;if(e==null)return 0;switch(typeof e){case"boolean":return e?1:0;case"number":return Co(e);case"bigint":return Nc(e);case"string":return wo(e);default:{if($c(e))return e.GetHashCode();if(Sr(e))return Mc(e);if(e instanceof Date)return Ac(e);if(((t=Object.getPrototypeOf(e))==null?void 0:t.constructor)===Object){const n=Object.values(e).map(r=>vr(r));return Tr(n)}else return Co(Kt.id(e))}}}function bo(e,t,n){if(e==null)return t==null;if(t==null||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function nl(e,t){return bo(e,t,Ts)}function Oc(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;n.sort(),r.sort();for(let s=0;s<n.length;s++)if(n[s]!==r[s]||!Ts(e[n[s]],t[r[s]]))return!1;return!0}function Ts(e,t){var n;return e===t?!0:e==null?t==null:t==null?!1:kc(e)?e.Equals(t):Sr(e)?Sr(t)&&nl(e,t):typeof e!="object"?!1:e instanceof Date?t instanceof Date&&rl(e,t)===0:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object&&Oc(e,t)}function rl(e,t){let n,r;return"offset"in e&&"offset"in t?(n=e.getTime(),r=t.getTime()):(n=e.getTime()+tl(e),r=t.getTime()+tl(t)),n===r?0:n<r?-1:1}function Rc(e,t,n){if(e==null)return t==null?0:1;if(t==null)return-1;if(e.length!==t.length)return e.length<t.length?-1:1;for(let r=0,s=0;r<e.length;r++)if(s=n(e[r],t[r]),s!==0)return s;return 0}function sl(e,t){return Rc(e,t,vs)}function Fc(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return n.length<r.length?-1:1;n.sort(),r.sort();for(let s=0,o=0;s<n.length;s++){const i=n[s];if(i!==r[s])return i<r[s]?-1:1;if(o=vs(e[i],t[i]),o!==0)return o}return 0}function vs(e,t){var n;return e===t?0:e==null?t==null?0:-1:t==null?1:Ic(e)?e.CompareTo(t):Sr(e)?Sr(t)?sl(e,t):-1:typeof e!="object"?e<t?-1:1:e instanceof Date?t instanceof Date?rl(e,t):-1:((n=Object.getPrototypeOf(e))==null?void 0:n.constructor)===Object?Fc(e,t):-1}let ol=class xi{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return vr(this.value)}Equals(t){return t==null?!1:Ts(this.value,t instanceof xi?t.value:t)}CompareTo(t){return t==null?1:vs(this.value,t instanceof xi?t.value:t)}};function Pc(e){return e==null||e instanceof ol?new ol(e):e}function Dc(e){let t=0,n="[";for(const r of e){if(t===0)n+=gn(r);else if(t===100){n+="; ...";break}else n+="; "+gn(r);t++}return n+"]"}function gn(e,t=0){var n;if(e!=null&&typeof e=="object"){if(typeof e.toString=="function")return e.toString();if(Symbol.iterator in e)return Dc(e);{const r=(n=Object.getPrototypeOf(e))==null?void 0:n.constructor;return r===Object&&t<10?"{ "+Object.entries(e).map(([s,o])=>s+" = "+gn(o,t+1)).join(`
`)+" }":(r==null?void 0:r.name)??""}}return String(e)}function xc(e,t){if(t.length===0)return e;{let n,r=!0;return t.length===1?(n=gn(t[0]),r=n.indexOf(" ")>=0):n=t.map(s=>gn(s)).join(", "),e+(r?" (":" ")+n+(r?")":"")}}class Bc{get name(){return this.cases()[this.tag]}toJSON(){return this.fields.length===0?this.name:[this.name].concat(this.fields)}toString(){return xc(this.name,this.fields)}GetHashCode(){const t=this.fields.map(n=>vr(n));return t.splice(0,0,Co(this.tag)),Tr(t)}Equals(t){return this===t?!0:Ss(this,t)&&this.tag===t.tag?nl(this.fields,t.fields):!1}CompareTo(t){return this===t?0:Ss(this,t)?this.tag===t.tag?sl(this.fields,t.fields):this.tag<t.tag?-1:1:-1}}function Gc(e){const t={},n=Object.keys(e);for(let r=0;r<n.length;r++)t[n[r]]=e[n[r]];return t}function Lc(e){return"{ "+Object.entries(e).map(([t,n])=>t+" = "+gn(n)).join(`
`)+" }"}function jc(e){const t=Object.values(e).map(n=>vr(n));return Tr(t)}function Hc(e,t){if(e===t)return!0;if(Ss(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++)if(!Ts(e[n[r]],t[n[r]]))return!1;return!0}else return!1}function Vc(e,t){if(e===t)return 0;if(Ss(e,t)){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=vs(e[n[r]],t[n[r]]);if(s!==0)return s}return 0}else return-1}class yn{toJSON(){return Gc(this)}toString(){return Lc(this)}GetHashCode(){return jc(this)}Equals(t){return Hc(this,t)}CompareTo(t){return Vc(this,t)}}const Gn=Symbol("numeric");function Uc(e){return typeof e=="number"||typeof e=="bigint"||(e==null?void 0:e[Gn])}function qc(e,t){return typeof e=="number"||typeof e=="bigint"?e<t?-1:e>t?1:0:e.CompareTo(t)}function Jc(e,t){return typeof e=="number"?e*t:typeof e=="bigint"?e*BigInt(t):e[Gn]().multiply(t)}function zc(e,t){return typeof e=="number"?e.toFixed(t):typeof e=="bigint"?e:e[Gn]().toFixed(t)}function il(e,t){return typeof e=="number"?e.toPrecision(t):typeof e=="bigint"?e:e[Gn]().toPrecision(t)}function ll(e,t){return typeof e=="number"?e.toExponential(t):typeof e=="bigint"?e:e[Gn]().toExponential(t)}function ul(e){return typeof e=="number"?(Number(e)>>>0).toString(16):typeof e=="bigint"?BigInt.asUintN(64,e).toString(16):e[Gn]().toHex()}class Wc{constructor(t,n,r,s){this.declaringType=t,this.tag=n,this.name=r,this.fields=s}}let gt=class{constructor(t,n,r,s,o,i,u){this.fullname=t,this.generics=n,this.construct=r,this.parent=s,this.fields=o,this.cases=i,this.enumCases=u}toString(){return Eo(this)}GetHashCode(){return al(this)}Equals(t){return To(this,t)}};function So(e){return e.generics!=null?e.generics:[]}function al(e){const t=wo(e.fullname),n=So(e).map(al);return Tr([t,...n])}function To(e,t){return e.fullname===""?t.fullname===""&&bo(fl(e),fl(t),([n,r],[s,o])=>n===s&&To(r,o)):e.fullname===t.fullname&&bo(So(e),So(t),To)}function Ln(e,t,n,r){return new gt(e,t,n,r)}function _n(e,t,n,r){return new gt(e,t,n,void 0,r)}function Kc(e,t,n,r){const s=new gt(e,t,n,void 0,void 0,()=>{const o=n.prototype.cases();return r().map((i,u)=>new Wc(s,u,o[u],i))});return s}function jn(e,t){return new gt("Microsoft.FSharp.Core.FSharpFunc`2",[e,t])}function wn(e){return new gt("Microsoft.FSharp.Core.FSharpOption`1",[e])}function Zc(e){return new gt("Microsoft.FSharp.Collections.FSharpList`1",[e])}function Hn(e){return new gt("[]",[e])}const Qc=new gt("Microsoft.FSharp.Core.Unit"),ht=new gt("System.String"),cl=new gt("System.Boolean"),vo=new gt("System.Int32");function Eo(e){const t=Xc(e);return t!=null?Eo(t)+"[]":e.generics==null||e.generics.length===0?e.fullname:e.fullname+"["+e.generics.map(n=>Eo(n)).join(",")+"]"}function Xc(e){var t;return e.fullname==="[]"&&((t=e.generics)==null?void 0:t.length)===1?e.generics[0]:void 0}function fl(e){if(e.fields!=null)return e.fields();throw new Error(`${e.fullname} is not an F# record type`)}function Yc(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+el(n,2)+":"+el(r,2)}function ef(e,t){return new Date(e.getTime()+(e.offset??0)).toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Yc(e.offset??0)}function tf(e,t){return e.kind===1?e.toUTCString():e.toLocaleString()}function nf(e,t,n){return e.offset!=null?ef(e):tf(e)}const Er=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g;function rf(e,t){return qc(e,t)<0}function sf(e){return{input:e,cont:af(e)}}function of(e,t){return typeof t=="string"?e(t):t.cont(e)}function lf(e){return of(t=>t,e)}function uf(e,t,n,r,s){let o="";if(t=t||"",s=s||"",Uc(e))switch(s.toLowerCase()!=="x"&&(rf(e,0)?(e=Jc(e,-1),o="-"):t.indexOf(" ")>=0?o=" ":t.indexOf("+")>=0&&(o="+")),r=r==null?null:parseInt(r,10),s){case"f":case"F":r=r??6,e=zc(e,r);break;case"g":case"G":e=r!=null?il(e,r):il(e);break;case"e":case"E":e=r!=null?ll(e,r):ll(e);break;case"x":e=ul(e);break;case"X":e=ul(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=nf(e):e=gn(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=o+e;else{const i=t.indexOf("0")>=0,u=t.indexOf("-")>=0,l=u||!i?" ":"0";l==="0"?(e=dl(e,n-o.length,l,u),e=o+e):e=dl(o+e,n,l,u)}return e}function hl(e,t,n,r="",s=-1){return(...o)=>{let i=r;const u=t.slice(),l=n.slice();for(const a of o){const[,,c,m,p,w]=l[0];let y=m;if(s>=0)y=s,s=-1;else if(y==="*"){if(a<0)throw new Error("Non-negative number required");s=a;continue}i+=u[0],i+=uf(a,c,y,p,w),u.splice(0,1),l.splice(0,1)}return l.length===0?(i+=u[0],e(i)):hl(e,u,l,i,s)}}function af(e){return t=>{Er.lastIndex=0;const n=[],r=[];let s=0,o=Er.exec(e);for(;o;){const i=o.index+(o[1]||"").length;n.push(e.substring(s,i).replace(/%%/g,"%")),r.push(o),s=Er.lastIndex,Er.lastIndex-=1,o=Er.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),hl(t,n,r))}}function dl(e,t,n,r){n=n||" ",t=t-e.length;for(let s=0;s<t;s++)e=r?e+n:n+e;return e}function cf(e,t){if(!e(t))return Pc(t)}BigInt.prototype.toJSON=function(){return`${this.toString()}`};const ml=0n;function ff(e){return e<ml?-e:e}function hf(e){return BigInt(e)}function Io(e){return BigInt(Math.trunc(e))}function df(e){return BigInt(e)}function ko(e){return BigInt.asIntN(64,e)}function pl(e){return BigInt.asUintN(64,e)}function mf(e){return Number(e)}function gl(e){const t=e<ml,n=ff(e),r=Number(BigInt.asUintN(32,n)),s=Number(BigInt.asUintN(32,n>>32n)),o=Number(BigInt.asUintN(32,n>>64n));return pc(r,s,o,t,0)}function pf(e){return e.toString()}function gf(e){return BigInt(e)}const yf=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],wf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Cf=["January","February","March","April","May","June","July","August","September","October","November","December"];function nt(e,t,n){let r=0,s=t;for(;s<e.length&&e[s]===n;)s++,r++;return r}function yl(e,t){return t>=e.length-1?-1:e.charCodeAt(t+1)}function bf(e,t){let n=t;const r=e[t];let s="",o=!1;for(;t<e.length;){t++;const i=e[t];if(i===r){o=!0;break}else if(i==="\\")if(t<e.length)t++,s+=e[t];else throw new Error("Invalid string format");else s+=i}if(!o)throw new Error(`Invalid string format could not find matching quote for ${r}`);return[s,t-n+1]}function $o(e,t,n){let r=0,s=0,o="";const i=n?No(e.getTime(),1):e;for(;r<t.length;){const u=t[r];switch(u){case"d":switch(s=nt(t,r,"d"),r+=s,s){case 1:o+=Cl(i);break;case 2:o+=pe(Cl(i),2);break;case 3:o+=yf[Tl(i)];break;case 4:o+=_f[Tl(i)];break}break;case"f":if(s=nt(t,r,"f"),r+=s,s<=3){const b=10**(3-s);o+=pe(Math.floor(ks(i)/b),s)}else s<=7&&(o+=(""+ks(i)).padEnd(s,"0"));break;case"F":if(s=nt(t,r,"F"),r+=s,s<=3){const b=10**(3-s),v=Math.floor(ks(i)/b);v!=0&&(o+=pe(v,s))}else if(s<=7){const b=ks(i);b!=0&&(o+=pe(b,3))}break;case"g":s=nt(t,r,"g"),r+=s,s<=2&&(o+="A.D.");break;case"h":switch(s=nt(t,r,"h"),r+=s,s){case 1:const b=Is(i)%12;o+=b||12;break;case 2:const v=Is(i)%12;o+=pe(v||12,2);break}break;case"H":switch(s=nt(t,r,"H"),r+=s,s){case 1:o+=Is(i);break;case 2:o+=pe(Is(i),2);break}break;case"K":switch(s=nt(t,r,"K"),r+=s,s){case 1:switch(_l(i)){case 1:o+="Z";break;case 2:o+=Vn(i.getTimezoneOffset()*-6e4);break}break}break;case"m":switch(s=nt(t,r,"m"),r+=s,s){case 1:o+=bl(i);break;case 2:o+=pe(bl(i),2);break}break;case"M":switch(s=nt(t,r,"M"),r+=s,s){case 1:o+=$s(i);break;case 2:o+=pe($s(i),2);break;case 3:o+=wf[$s(i)-1];break;case 4:o+=Cf[$s(i)-1];break}break;case"s":switch(s=nt(t,r,"s"),r+=s,s){case 1:o+=Sl(i);break;case 2:o+=pe(Sl(i),2);break}break;case"t":switch(s=nt(t,r,"t"),r+=s,s){case 1:o+=i.getHours()<12?"A":"P";break;case 2:o+=i.getHours()<12?"AM":"PM";break}break;case"y":switch(s=nt(t,r,"y"),r+=s,s){case 1:o+=i.getFullYear()%100;break;case 2:o+=pe(i.getFullYear()%100,2);break;case 3:o+=pe(i.getFullYear(),3);break;case 4:o+=pe(i.getFullYear(),4);break;case 5:o+=pe(i.getFullYear(),5);break}break;case"z":s=nt(t,r,"z"),r+=s;let l="";switch(_l(i)){case 1:l="+00:00";break;case 2:l=Vn(i.getTimezoneOffset()*-6e4);break;case 0:l=Vn(kf(i).getTimezoneOffset()*-6e4);break}const a=l[0]==="-"?"-":"+",c=parseInt(l.substring(1,3),10),m=parseInt(l.substring(4,6),10);switch(s){case 1:o+=`${a}${c}`;break;case 2:o+=`${a}${pe(c,2)}`;break;default:o+=`${a}${pe(c,2)}:${pe(m,2)}`;break}break;case":":o+=":",r++;break;case"/":o+="/",r++;break;case"'":case'"':const[p,w]=bf(t,r);o+=p,r+=w;break;case"%":const y=yl(t,r);if(y>=0&&y!==37)r+=2,o+=$o(i,String.fromCharCode(y),n);else throw new Error("Invalid format string");break;case"\\":const k=yl(t,r);if(k>=0)r+=2,o+=String.fromCharCode(k);else throw new Error("Invalid format string");break;default:r++,o+=u;break}}return o}function _l(e){return e.kind||0}function Vn(e){const t=e<0;e=Math.abs(e);const n=~~(e/36e5),r=e%36e5/6e4;return(t?"-":"+")+pe(n,2)+":"+pe(r,2)}function Es(e,t){const n=e.toISOString();return t==="first"?n.substring(0,n.indexOf("T")):n.substring(n.indexOf("T")+1,n.length-1)}function Sf(e,t){if(t)return e.toISOString();{const n=e.kind==null?!0:e.kind===2;return pe(e.getFullYear(),4)+"-"+pe(e.getMonth()+1,2)+"-"+pe(e.getDate(),2)+"T"+pe(e.getHours(),2)+":"+pe(e.getMinutes(),2)+":"+pe(e.getSeconds(),2)+"."+pe(e.getMilliseconds(),3)+(n?Vn(e.getTimezoneOffset()*-6e4):"")}}function Tf(e,t){const n=e.toISOString();return n.substring(0,n.length-1)+Vn(t)}function vf(e,t){const n=new Date(e.getTime()+(e.offset??0));if(typeof t!="string")return n.toISOString().replace(/\.\d+/,"").replace(/[A-Z]|\.\d+/g," ")+Vn(e.offset??0);if(t.length===1)switch(t){case"D":case"d":return Es(n,"first");case"T":case"t":return Es(n,"second");case"O":case"o":return Tf(n,e.offset??0);default:throw new Error("Unrecognized Date print format")}else return $o(n,t,!0)}function Ef(e,t){const n=e.kind===1;if(typeof t!="string")return n?e.toUTCString():e.toLocaleString();if(t.length===1)switch(t){case"D":case"d":return n?Es(e,"first"):e.toLocaleDateString();case"T":case"t":return n?Es(e,"second"):e.toLocaleTimeString();case"O":case"o":return Sf(e,n);default:throw new Error("Unrecognized Date print format")}else return $o(e,t,n)}function Un(e,t,n){return e.offset!=null?vf(e,t):Ef(e,t)}function No(e,t){const n=new Date(e);return n.kind=(t??0)|0,n}function wl(e){function t(){throw new Error(`The string is not a valid Date: ${e}`)}(e==null||e.trim()==="")&&t(),e.length===10&&e[4]==="-"&&e[7]==="-"&&(e+="T00:00:00");let n=new Date(e),r=null;if(isNaN(n.getTime())){const s=/^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(e);if(s!=null){let o,i=0;if(s[2]!=null){const u=s[2].split(":"),l=parseInt(u[0],10);i=l*3600+parseInt(u[1]||"0",10)*60+parseFloat(u[2]||"0"),s[3]!=null&&s[3].toUpperCase()==="PM"&&l<12&&(i+=720)}if(s[4]!=null){if(s[1]!=null)o=new Date(s[1]+" UTC");else{const u=new Date;o=new Date(u.getUTCFullYear()+"/"+(u.getUTCMonth()+1)+"/"+u.getUTCDate())}if(s[4]==="Z")r="Z";else{let u=parseInt(s[5],10)*60+parseInt(s[6]||"0",10);s[4][0]==="-"&&(u*=-1),r=u,i-=u*60}}else if(s[1]!=null)o=new Date(s[1]);else{const u=new Date;o=new Date(u.getFullYear()+"/"+(u.getMonth()+1)+"/"+u.getDate())}n=new Date(o.getTime()+i*1e3),n=new Date(n.getTime()+(n.getTimezoneOffset()-o.getTimezoneOffset())*6e4)}else t();isNaN(n.getTime())&&t()}return[n,r]}function If(e,t=!1){const[n,r]=wl(e),s=r!=null?t&&r==="Z"?1:2:0;return No(n.getTime(),s)}function kf(e){return e.kind===2?e:No(e.getTime(),2)}function Cl(e){return e.kind===1?e.getUTCDate():e.getDate()}function Is(e){return e.kind===1?e.getUTCHours():e.getHours()}function ks(e){return e.kind===1?e.getUTCMilliseconds():e.getMilliseconds()}function bl(e){return e.kind===1?e.getUTCMinutes():e.getMinutes()}function $s(e){return(e.kind===1?e.getUTCMonth():e.getMonth())+1}function Sl(e){return e.kind===1?e.getUTCSeconds():e.getSeconds()}function Tl(e){return e.kind===1?e.getUTCDay():e.getDay()}function vl(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}const Ir=/(^|[^%])%([0+\- ]*)(\*|\d+)?(?:\.(\d+))?(\w)/g,$f=/\{(\d+)(,-?\d+)?(?:\:([a-zA-Z])(\d{0,2})|\:(.+?))?\}/g;function El(e,t){return hc(e,t)<0}function Nf(e,t,n){return e==null?t==null?0:-1:t==null?1:e.localeCompare(t)}function Ao(e,t,n){return e.length>=t.length?Nf(e.substr(e.length-t.length,t.length),t)===0:!1}function L(e){return{input:e,cont:Mf(e)}}function Il(e,t){return typeof t=="string"?e(t):t.cont(e)}function Te(e){return Il(t=>t,e)}function ue(e){return Il(t=>{throw new Error(t)},e)}function Af(e,t,n,r,s){let o="";if(t=t||"",s=s||"",Wi(e))switch(s.toLowerCase()!=="x"&&(El(e,0)?(e=go(e,-1),o="-"):t.indexOf(" ")>=0?o=" ":t.indexOf("+")>=0&&(o="+")),r=r==null?null:parseInt(r,10),s){case"f":case"F":r=r??6,e=ps(e,r);break;case"g":case"G":e=r!=null?gs(e,r):gs(e);break;case"e":case"E":e=r!=null?ys(e,r):ys(e);break;case"x":e=_s(e);break;case"X":e=_s(e).toUpperCase();break;default:e=String(e);break}else e instanceof Date?e=Un(e):e=Le(e);if(n=typeof n=="number"?n:parseInt(n,10),isNaN(n))e=o+e;else{const i=t.indexOf("0")>=0,u=t.indexOf("-")>=0,l=u||!i?" ":"0";l==="0"?(e=$r(e,n-o.length,l,u),e=o+e):e=$r(o+e,n,l,u)}return e}function kl(e,t,n,r="",s=-1){return(...o)=>{let i=r;const u=t.slice(),l=n.slice();for(const a of o){const[,,c,m,p,w]=l[0];let y=m;if(s>=0)y=s,s=-1;else if(y==="*"){if(a<0)throw new Error("Non-negative number required");s=a;continue}i+=u[0],i+=Af(a,c,y,p,w),u.splice(0,1),l.splice(0,1)}return l.length===0?(i+=u[0],e(i)):kl(e,u,l,i,s)}}function Mf(e){return t=>{Ir.lastIndex=0;const n=[],r=[];let s=0,o=Ir.exec(e);for(;o;){const i=o.index+(o[1]||"").length;n.push(e.substring(s,i).replace(/%%/g,"%")),r.push(o),s=Ir.lastIndex,Ir.lastIndex-=1,o=Ir.exec(e)}return n.length===0?t(e.replace(/%%/g,"%")):(n.push(e.substring(s).replace(/%%/g,"%")),kl(t,n,r))}}function $l(e,...t){let n;return typeof e=="object"?(n=String(t[0]),t.shift()):n=e,n.replace($f,(r,s,o,i,u,l)=>{if(s<0||s>=t.length)throw new Error("Index must be greater or equal to zero and less than the arguments' length.");let a=t[s];if(Wi(a))switch(u=u==null?null:parseInt(u,10),i){case"f":case"F":u=u??2,a=ps(a,u);break;case"g":case"G":a=u!=null?gs(a,u):gs(a);break;case"e":case"E":a=u!=null?ys(a,u):ys(a);break;case"p":case"P":u=u??2,a=ps(go(a,100),u)+" %";break;case"d":case"D":a=u!=null?Oo(String(a),u,"0"):String(a);break;case"x":case"X":a=u!=null?Oo(_s(a),u,"0"):_s(a),i==="X"&&(a=a.toUpperCase());break;default:if(l){let c="";a=l.replace(/([0#,]+)(\.[0#]+)?/,(m,p,w)=>{El(a,0)&&(a=go(a,-1),c="-"),w=w==null?"":w.substring(1),a=ps(a,Math.max(w.length,0));let[y,k]=a.split(".");k||(k="");const b=p.replace(/,/g,"").replace(/^#+/,"").length;y=Oo(y,b,"0");const v=w.replace(/#+$/,"").length;if(v>k.length?k=Ff(k,v,"0"):v<k.length&&(k=k.substring(0,v)+k.substring(v).replace(/0+$/,"")),p.indexOf(",")>0){const D=y.length%3,x=Math.floor(y.length/3);let X=D>0?y.substr(0,D)+(x>0?",":""):"";for(let ee=0;ee<x;ee++)X+=y.substr(D+ee*3,3)+(ee<x-1?",":"");y=X}return k.length>0?y+"."+k:y}),a=c+a}}else a instanceof Date?a=Un(a,l||i):a=Le(a);return o=parseInt((o||" ").substring(1),10),isNaN(o)||(a=$r(String(a),Math.abs(o)," ",o<0)),a})}function kr(e){return typeof e!="string"||e.length===0}function Mo(e){return typeof e!="string"||/^\s*$/.test(e)}function U(e,t){return Array.isArray(t)?t.join(e):Array.from(t).join(e)}function Of(e){throw new Error("The environment doesn't support '"+e+"', please use a polyfill.")}function Rf(e){const t=typeof atob=="function"?atob(e):Of("atob"),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function $r(e,t,n,r){n=n||" ",t=t-e.length;for(let s=0;s<t;s++)e=r?e+n:n+e;return e}function Oo(e,t,n){return $r(e,t,n)}function Ff(e,t,n){return $r(e,t,n,!0)}function Pf(e,...t){if(t.length===0)return e.trim();const n="["+vl(t.join(""))+"]+";return e.replace(new RegExp("^"+n),"").replace(new RegExp(n+"$"),"")}function Df(e,...t){return t.length===0?e.trimEnd():e.replace(new RegExp("["+vl(t.join(""))+"]+$"),"")}function xf(e,t,n){if(t+(n||0)>e.length)throw new Error("Invalid startIndex and/or length");return n!=null?e.substr(t,n):e.substr(t)}class Cn{constructor(t){this.value=t}toJSON(){return this.value}toString(){return String(this.value)}GetHashCode(){return Ge(this.value)}Equals(t){return t==null?!1:Q(this.value,t instanceof Cn?t.value:t)}CompareTo(t){return t==null?1:ft(this.value,t instanceof Cn?t.value:t)}}function f(e){if(e==null)throw new Error("Option has no value");return e instanceof Cn?e.value:e}function dt(e){return e instanceof Cn?e.value:e}function Ne(e){return e==null||e instanceof Cn?new Cn(e):e}function Ve(e){return e==null?[]:[f(e)]}function ve(e,t){return e!=null?f(e):t}function qn(e,t){return e??t}function Qe(e,t){return t!=null?Ne(e(f(t))):void 0}function Ro(e,t){return t!=null?e(f(t)):void 0}class Bf extends Bc{constructor(t,n){super(),this.tag=t,this.fields=n}cases(){return["Exact","Complete","PerformanceComplete","Fuzzy"]}}function Gf(){return Kc("Shared.Database.FullTextSearch",[],Bf,()=>[[],[],[],[]])}class Lf extends yn{constructor(t,n,r,s,o){super(),this.Accession=t,this.Name=n,this.Description=r,this.IsObsolete=s,this.FK_Ontology=o}}function Nr(){return _n("Shared.Database.Term",[],Lf,()=>[["Accession",ht],["Name",ht],["Description",ht],["IsObsolete",cl],["FK_Ontology",ht]])}function Ns(e,t){let n,r,s,o,i;const u=e.data,l=t.data;return i=u==null?l==null?void 0:(n=f(l),Ne(n)):l!=null?(r=f(u),s=f(l),Ne(Object.assign({},r,s))):(o=f(u),Ne(o)),{name:dt(qn(e.name,t.name)),id:dt(qn(e.id,t.id)),description:dt(qn(e.description,t.description)),source:dt(qn(e.source,t.source)),href:dt(qn(e.href,t.href)),isObsolete:dt(qn(e.isObsolete,t.isObsolete)),data:i}}function jf(e){return It(e)?U(" ",e):e}function Jn(e,t){return new Array(t)}function Hf(e,t){if(e!=null&&/\S/.test(e)){const n=+e.replace("_","");if(!Number.isNaN(n))return t.contents=n,!0}return!1}function As(e){const t=new zt(0);if(Hf(e,t))return t.contents;throw new Error(`The input string ${e} was not in a correct format.`)}function Nl(e,t){return e>t?e:t}function Al(e,t){return e<t?e:t}const Fo="Collection was empty.";function Vf(e){throw new Error(e)}function Ms(e){return!!Q(e,P())}function Ml(){throw new Error("An index satisfying the predicate was not found in the collection.")}function Uf(){throw new Error("Arrays had different lengths")}function Ol(e,t,n,r){const s=t|0;return e.fill(r,s,s+n)}function qf(e,t,n){const r=t|0;return e.slice(r,r+n)}function Jf(e){if(e.length===0)throw new Error("The input array was empty\\nParameter name: array");return B(e.length-1,e)}function Po(e,t,n){const r=t.length|0,s=Jn(n,r);for(let o=0;o<=r-1;o++)Xe(s,o,e(o,B(o,t)));return s}function se(e,t,n){const r=t.length|0,s=Jn(n,r);for(let o=0;o<=r-1;o++)Xe(s,o,e(B(o,t)));return s}function zf(e,t){const n=Array.isArray(e)?e:Array.from(e);switch(n.length|0){case 0:return Jn(t,0);case 1:return B(0,n);default:{let s=0,o=0;for(let u=0;u<=n.length-1;u++){const l=B(u,n);o=o+l.length|0}const i=Jn(t,o);for(let u=0;u<=n.length-1;u++){const l=B(u,n);for(let a=0;a<=l.length-1;a++)Xe(i,s,B(a,l)),s=s+1|0}return i}}}function Wf(e,t){const n=Jn(t,1);return Xe(n,0,e),n}function Rl(e,t,n){if(e<0)throw new Error("The input must be non-negative\\nParameter name: count");if(e>t.length)throw new Error("count is greater than array length\\nParameter name: count");return e===0?Jn(n,0):t.slice(0,0+e)}function Kf(e,t){const n=t.find(e);return n==null?Ml():f(n)}function bn(e,t){return t.find(e)}function Zf(e,t){return(r=>{e:for(;;){const s=r;if(s>=t.length)return Ml();{const o=e(B(s,t));if(o!=null)return f(o);r=s+1;continue e}}})(0)}function Qf(e,t,n){const r=e;return n.reduce(r,t)}function Do(e,t){e.length!==t.length&&Uf();const n=new Array(e.length);for(let r=0;r<=e.length-1;r++)Xe(n,r,[B(r,e),B(r,t)]);return n}function Os(e,t,n){if(Ms(t))return!!Ms(n);if(Ms(n))return!1;{let r=0,s=!0;const o=t.length|0,i=n.length|0;if(o>i)return!1;if(o<i)return!1;for(;r<o&&s;)s=e(B(r,t),B(r,n)),r=r+1|0;return s}}function Xf(e){if(e.length===0)throw new Error("The input array was empty\\nParameter name: array");return B(0,e)}function Yf(e){if(e.length!==0)return Ne(B(0,e))}function B(e,t){if(e<0||e>=t.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");return t[e]}function Xe(e,t,n){if(t<0||t>=e.length)throw new Error("Index was outside the bounds of the array.\\nParameter name: index");e[t]=n}class At extends pt{constructor(t,n){super(),this.head=t,this.tail=n}toString(){return"["+U("; ",this)+"]"}Equals(t){const n=this;return n===t?!0:((s,o)=>{e:for(;;){const i=s,u=o,l=i.tail,a=u.tail;if(l!=null)if(a!=null){const c=f(l),m=f(a);if(Q(i.head,u.head)){s=c,o=m;continue e}else return!1}else return!1;else return a==null}})(n,t)}GetHashCode(){return((r,s,o)=>{e:for(;;){const i=r,u=s,l=o,a=l.tail;if(a!=null){const c=f(a);if(i>18)return u|0;r=i+1,s=(u<<1)+Ge(l.head)+631*i,o=c;continue e}else return u|0}})(0,0,this)|0}toJSON(){const t=this;return Array.from(t)}CompareTo(t){return((s,o)=>{e:for(;;){const i=s,u=o,l=i.tail,a=u.tail;if(l!=null)if(a!=null){const c=f(l),m=f(a),p=ft(i.head,u.head)|0;if(p===0){s=c,o=m;continue e}else return p|0}else return 1;else return a!=null?-1:0}})(this,t)|0}GetEnumerator(){return th(this)}[Symbol.iterator](){return Pn(te(this))}"System.Collections.IEnumerable.GetEnumerator"(){return te(this)}}class eh{constructor(t){this.xs=t,this.it=this.xs,this.current=P()}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current}"System.Collections.IEnumerator.get_Current"(){return this.current}"System.Collections.IEnumerator.MoveNext"(){const t=this,n=t.it.tail;if(n!=null){const r=f(n);return t.current=t.it.head,t.it=r,!0}else return!1}"System.Collections.IEnumerator.Reset"(){const t=this;t.it=t.xs,t.current=P()}Dispose(){}}function th(e){return new eh(e)}function Mt(){return new At(P(),void 0)}function Rs(e,t){return new At(e,t)}function Ar(e){return e.tail==null}function Fl(e){return((n,r)=>{e:for(;;){const s=n,i=r.tail;if(i!=null){n=s+1,r=f(i);continue e}else return s|0}})(0,e)|0}function xo(e){if(e.tail!=null)return e.head;throw new Error(Fo+"\\nParameter name: list")}function Sn(e){const t=e.tail;if(t!=null)return f(t);throw new Error(Fo+"\\nParameter name: list")}function Ot(){return Mt()}function rt(e,t){return Rs(e,t)}function yt(e){return Rs(e,Mt())}function q(e){return Ar(e)}function Bo(e){return Fl(e)}function $(e){return xo(e)}function T(e){return Sn(e)}function zn(e){const t=Fl(e)|0,n=Ol(new Array(t),0,t,null);return((s,o)=>{e:for(;;){const i=s,u=o;if(!Ar(u)){Xe(n,i,xo(u)),s=i+1,o=Sn(u);continue e}break}})(0,e),n}function Zt(e,t,n){let r=t,s=n;for(;!Ar(s);)r=e(r,$(s)),s=Sn(s);return r}function Pl(e){return Zt((t,n)=>Rs(n,t),Mt(),e)}function be(e,t){let n=t;for(let r=e.length-1;r>=0;r--)n=Rs(B(r,e),n);return n}function G(e){return be(e,Mt())}function nh(e){let t,n;if(It(e))return G(e);if(e instanceof At)return e;{const r=Mt();let s=r;const o=te(e);try{for(;o["System.Collections.IEnumerator.MoveNext"]();){const l=o["System.Collections.Generic.IEnumerator`1.get_Current"]();s=(t=s,n=new At(l,void 0),t.tail=n,n)}}finally{le(o)}const i=s,u=Mt();return i.tail=u,Sn(r)}}function Ye(e,t){const n=Mt(),r=Zt((o,i)=>{const u=new At(e(i),void 0);return o.tail=u,u},n,t),s=Mt();return r.tail=s,Sn(n)}function rh(e,t){return(r=>{e:for(;;){const s=r;if(Ar(s))return;{const o=e(xo(s));if(o==null){r=Sn(s);continue e}else return o}}})(t)}function Dl(e,t){return rh(n=>e(n)?Ne(n):void 0,t)}function sh(e,t){const n=Mt(),r=Zt((o,i)=>{const u=e(i);if(u==null)return o;{const l=new At(f(u),void 0);return o.tail=l,l}},n,t),s=Mt();return r.tail=s,Sn(n)}function oh(e,t){if(Ar(t))throw new Error(Fo);return Zt(e,$(t),T(t))}class ih{constructor(){}}function lh(){return new ih}function Qt(e,t){return{then:(n,r)=>{try{return t().then(n,r)}catch(s){if(Q(r,P()))return Promise.reject(s);try{return Promise.resolve(r(s))}catch(o){return Promise.reject(o)}}},catch:n=>{try{return t().catch(n)}catch(r){try{return Promise.resolve(n(r))}catch(s){return Promise.reject(s)}}}}}function Fs(e,t){return new Promise((n,r)=>{try{Promise.resolve(t).then(n,r)}catch(s){r(s)}})}const mt=lh(),uh="Enumeration already finished.",ah="Enumeration has not started. Call MoveNext.",ch="Reset is not supported on this enumerator.";function fh(){throw new Error(ch)}function Go(){throw new Error(ah)}function Lo(){throw new Error(uh)}class hh{constructor(t){this.f=t}toString(){const t=this;let n=0,r="seq [";const s=te(t);try{for(;n<4&&s["System.Collections.IEnumerator.MoveNext"]();)n>0&&(r=r+"; "),r=r+Le(s["System.Collections.Generic.IEnumerator`1.get_Current"]()),n=n+1|0;return n===4&&(r=r+"; ..."),r+"]"}finally{le(s)}}GetEnumerator(){return this.f()}[Symbol.iterator](){return Pn(te(this))}"System.Collections.IEnumerable.GetEnumerator"(){return this.f()}}function dh(e){return new hh(e)}class mh{constructor(t,n,r){this.current=t,this.next=n,this.dispose=r}"System.Collections.Generic.IEnumerator`1.get_Current"(){return this.current()}"System.Collections.IEnumerator.get_Current"(){return this.current()}"System.Collections.IEnumerator.MoveNext"(){return this.next()}"System.Collections.IEnumerator.Reset"(){fh()}Dispose(){this.dispose()}}function jo(e,t,n){return new mh(e,t,n)}function ph(e){let t,n,r=!1,s=!1,o;const i=()=>{if(s=!0,n!=null){const u=f(n);try{le(u)}finally{n=void 0}}if(t!=null){const u=f(t);try{le(u)}finally{t=void 0}}};return jo(()=>(r?s&&Lo():Go(),o!=null?f(o):Lo()),()=>{let u;if(r||(r=!0),s)return!1;{let l;for(;l==null;){const a=t,c=n;if(a!=null)if(c!=null){const m=f(c);if(m["System.Collections.IEnumerator.MoveNext"]())o=Ne(m["System.Collections.Generic.IEnumerator`1.get_Current"]()),l=!0;else try{le(m)}finally{n=void 0}}else{const m=f(a);m["System.Collections.IEnumerator.MoveNext"]()?n=(u=m["System.Collections.Generic.IEnumerator`1.get_Current"](),te(u)):(i(),l=!1)}else t=te(e)}return f(l)}},()=>{s||i()})}function gh(e,t,n){let r=!1,s,o=Ne(e());const i=()=>{if(o!=null){const l=f(o);try{n(l)}finally{o=void 0}}},u=()=>{try{i()}finally{s=void 0}};return jo(()=>(r||Go(),s!=null?f(s):Lo()),()=>{if(r||(r=!0),o!=null){const l=f(o);let a;try{a=t(l)}catch(c){throw u(),c}return a!=null?(s=a,!0):(u(),!1)}else return!1},i)}function yh(e,t){let n,r=t;return jo(()=>{if(n!=null){const s=f(n)[0];return f(n)[1],s}else return Go()},()=>(n=e(r),n!=nul