"use strict";vart=require("obsidian");functione(t,e,n,r){returnnew(n||(n=Promise))((function(i,a){functiono(t){try{u(r.next(t))}catch(t){a(t)}}functionl(t){try{u(r.throw(t))}catch(t){a(t)}}functionu(t){vare;t.done?i(t.value):(e=t.value,einstanceofn?e:newn((function(t){t(e)}))).then(o,l)}u((r=r.apply(t,e||[])).next())}))}functionn(t,e){returnnull==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}functionr(t,e){returnnull==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}functioni(t){lete,i,o;functionl(t,n,r=0,a=t.length){if(r<a){if(0!==e(n,n))returna;do{conste=r+a>>>1;i(t[e],n)<0?r=e+1:a=e}while(r<a)}returnr}return2!==t.length?(e=n,i=(e,r)=>n(t(e),r),o=(e,n)=>t(e)-n):(e=t===n||t===r?t:a,i=t,o=t),{left:l,center:function(t,e,n=0,r=t.length){consti=l(t,e,n,r-1);returni>n&&o(t[i-1],e)>-o(t[i],e)?i-1:i},right:function(t,n,r=0,a=t.length){if(r<a){if(0!==e(n,n))returna;do{conste=r+a>>>1;i(t[e],n)<=0?r=e+1:a=e}while(r<a)}returnr}}}functiona(){return0}"function"==typeofSuppressedError&&SuppressedError;consto=i(n).right;i((function(t){returnnull===t?NaN:+t})).center;classlextendsMap{constructor(t,e=s){if(super(),Object.defineProperties(this,{_intern:{value:newMap},_key:{value:e}}),null!=t)for(const[e,n]oft)this.set(e,n)}get(t){returnsuper.get(u(this,t))}has(t){returnsuper.has(u(this,t))}set(t,e){returnsuper.set(function({_intern:t,_key:e},n){constr=e(n);returnt.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){returnsuper.delete(function({_intern:t,_key:e},n){constr=e(n);t.has(r)&&(n=t.get(r),t.delete(r));returnn}(this,t))}}functionu({_intern:t,_key:e},n){constr=e(n);returnt.has(r)?t.get(r):n}functions(t){returnnull!==t&&"object"==typeoft?t.valueOf():t}functionf(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}constc=Math.sqrt(50),h=Math.sqrt(10),d=Math.sqrt(2);functiong(t,e,n){constr=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=c?10:a>=h?5:a>=d?2:1;letl,u,s;returni<0?(s=Math.pow(10,-i)/o,l=Math.round(t*s),u=Math.round(e*s),l/s<t&&++l,u/s>e&&--u,s=-s):(s=Math.pow(10,i)*o,l=Math.round(t/s),u=Math.round(e/s),l*s<t&&++l,u*s>e&&--u),u<l&&.5<=n&&n<2?g(t,e,2*n):[l,u,s]}functionp(t,e,n){returng(t=+t,e=+e,n=+n)[2]}functiony(t,e,n){n=+n;constr=(e=+e)<(t=+t),i=r?p(e,t,n):p(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}functionm(t,e){letn;if(void0===e)for(consteoft)null!=e&&(n<e||void0===n&&e>=e)&&(n=e);else{letr=-1;for(letioft)null!=(i=e(i,++r,t))&&(n<i||void0===n&&i>=i)&&(n=i)}returnn}functionv(t,e){letn;if(void0===e)for(consteoft)null!=e&&(n>e||void0===n&&e>=e)&&(n=e);else{letr=-1;for(letioft)null!=(i=e(i,++r,t))&&(n>i||void0===n&&i>=i)&&(n=i)}returnn}functionx(t,e,r=0,i=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=e&&e<=i))returnt;for(a=void0===a?f:function(t=n){if(t===n)returnf;if("function"!=typeoft)thrownewTypeError("compare is not a function");return(e,n)=>{constr=t(e,n);returnr||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){constn=i-r+1,o=e-r+1,l=Math.log(n),u=.5*Math.exp(2*l/3),s=.5*Math.sqrt(l*u*(n-u)/n)*(o-n/2<0?-1:1);x(t,e,Math.max(r,Math.floor(e-o*u/n+s)),Math.min(i,Math.floor(e+(n-o)*u/n+s)),a)}constn=t[e];leto=r,l=i;for(A(t,r,e),a(t[i],n)>0&&A(t,r,i);o<l;){for(A(t,o,l),++o,--l;a(t[o],n)<0;)++o;for(;a(t[l],n)>0;)--l}0===a(t[r],n)?A(t,r,l):(++l,A(t,l,i)),l<=e&&(r=l+1),e<=l&&(i=l-1)}returnt}functionA(t,e,n){constr=t[e];t[e]=t[n],t[n]=r}functionw(t,e){returnfunction(t,e,n){if(t=Float64Array.from(function*(t,e){if(void0===e)for(leteoft)null!=e&&(e=+e)>=e&&(yielde);else{letn=-1;for(letroft)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yieldr)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)returnv(t);if(e>=1)returnm(t);varr,i=(r-1)*e,a=Math.floor(i),o=m(x(t,a).subarray(0,a+1));returno+(v(t.subarray(a+1))-o)*(i-a)}}(t,.5,e)}functionb(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(varr=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=newArray(i);++r<i;)a[r]=t+r*n;returna}functionD(t,e){letn=0;if(void0===e)for(leteoft)(e=+e)&&(n+=e)